From 595ad56985d25c71a995e30b04b074ef26b36869 Mon Sep 17 00:00:00 2001 From: Yan Gao Date: Wed, 15 Apr 2020 11:17:22 +0800 Subject: [PATCH] v1.0.0 --- .gitignore | 12 +-- MANIFEST.in | 12 +++ Makefile | 22 +++++- README.md | 30 ++++---- evaluation/msa_abPOA.c | 164 +++++++++++++++++++++++++++++++++++++++++ python/Makefile | 25 ------- python/README.md | 32 ++++---- python/cabpoa.pxd | 4 +- python/example.py | 2 +- python/setup.py | 51 ------------- setup.py | 60 +++++++++++++++ src/abpoa.c | 2 +- src/abpoa_pog.c | 2 +- 13 files changed, 298 insertions(+), 120 deletions(-) create mode 100644 MANIFEST.in create mode 100644 evaluation/msa_abPOA.c delete mode 100644 python/Makefile delete mode 100644 python/setup.py create mode 100644 setup.py diff --git a/.gitignore b/.gitignore index a1b6fbb..42b11a3 100644 --- a/.gitignore +++ b/.gitignore @@ -53,14 +53,16 @@ tags cscope.* # python +dist/* +pyabpoa.egg-info/* python/build/* python/dist/* python/example.png python/pyabpoa.c -python/pyabPOA.egg-info/* +python/pyabpoa.egg-info/* +python/src/* # eval file -msa_abPOA* -msa_abPOA.c -s2g_abPOA* -s2g_abPOA.c +evaluation/msa_abPOA +evaluation/msa_spoa + diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..c96a53b --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,12 @@ +include src/abpoa.h +include src/abpoa_align.h +include src/abpoa_graph.h +include src/kdq.h +include src/kseq.h +include src/simd_abpoa_align.h +include src/simd_instruction.h +include src/utils.h +include python/cabpoa.pxd +include python/pyabpoa.c +include python/pyabpoa.pyx +include python/README.md diff --git a/Makefile b/Makefile index 77f7247..b859e62 100644 --- a/Makefile +++ b/Makefile @@ -41,22 +41,27 @@ SIMD_FLAG = -march=native ifneq ($(sse2),) SIMD_FLAG=$(FLAG_SSE2) + py_SIMD_FLAG = SSE2=1 else ifneq ($(sse41),) SIMD_FLAG=$(FLAG_SSE41) + py_SIMD_FLAG = SSE41=1 else ifneq ($(avx2),) SIMD_FLAG=$(FLAG_AVX2) + py_SIMD_FLAG = AVX2=1 else ifneq ($(avx512f),) SIMD_FLAG=$(FLAG_AVX512F) + py_SIMD_FLAG = AVX512f=1 else ifneq ($(avx512bw),) SIMD_FLAG=$(FLAG_AVX512BW) + py_SIMD_FLAG = AVX512BW=1 endif .c.o: $(CC) -c $(CFLAGS) $< -o $@ -BIN = $(BIN_DIR)/abPOA +BIN = $(BIN_DIR)/abpoa ifneq ($(gdb),) - BIN = $(BIN_DIR)/gdb_abPOA + BIN = $(BIN_DIR)/gdb_abpoa endif ABPOALIB = $(LIB_DIR)/libabpoa.a # TODO add example @@ -64,7 +69,7 @@ EXAMPLE = example all: $(BIN) -abPOA: $(BIN) +abpoa: $(BIN) libabpoa: $(ABPOALIB) example: $(EXAMPLE) @@ -89,5 +94,16 @@ $(SRC_DIR)/simd_check.o:$(SRC_DIR)/simd_check.c $(SRC_DIR)/simd_instruction.h $(SRC_DIR)/simd_abpoa_align.o:$(SRC_DIR)/simd_abpoa_align.c $(SRC_DIR)/abpoa_graph.h $(SRC_DIR)/abpoa_align.h $(SRC_DIR)/simd_instruction.h $(SRC_DIR)/utils.h $(CC) -c $(CFLAGS) $(SIMD_FLAG) $< -o $@ +install_py: python/cabpoa.pxd python/pyabpoa.pyx python/README.md + ${py_SIMD_FLAG} python setup.py install + +sdist: install_py + ${py_SIMD_FLAG} python setup.py sdist #bdist_wheel + +publish_pypi: clean_py sdist + twine upload dist/* + clean: rm -f $(SRC_DIR)/*.[oa] $(LIB_DIR)/*.[oa] $(BIN) +clean_py: + rm -rf build/ dist/ pyabpoa.egg-info/ python/pyabpoa.c diff --git a/README.md b/README.md index 01b8132..fdfc75f 100644 --- a/README.md +++ b/README.md @@ -16,17 +16,17 @@ tar -zxvf abPOA-v1.0.0.tar.gz && cd abPOA-v1.0.0 Install via conda and run with test data: ``` conda install -c bioconda abpoa -abPOA ./test_data/seq.fa > cons.fa +abpoa ./test_data/seq.fa > cons.fa ``` Or, make from source and run with test data: ``` -make; ./bin/abPOA ./test_data/seq.fa > cons.fa +make; ./bin/abpoa ./test_data/seq.fa > cons.fa ``` ## Table of Contents - [Introduction](#introduction) - [Installation](#install) - - [Installing abPOA and pyabPOA via conda or pip](#conda) + - [Installing abPOA and pyabpoa via conda or pip](#conda) - [Building abPOA from source files](#build) - [Pre-built binary executable file for Linux/Unix](#binary) - [General usage](#usage) @@ -53,12 +53,12 @@ It right now supports SSE2/SSE41/AVX2 vectorization and more advanced instructio ## Installation -### Installing abPOA and [pyabPOA](python/README.md) via conda or pip +### Installing abPOA and [pyabpoa](python/README.md) via conda or pip On Linux/Unix and Mac OS, abPOA can be installed via ``` conda install -c bioconda abpoa # install abPOA program -conda install -c bioconda pyabpoa # install pyabPOA module -pip install pyabpoa # install pyabPOA module +conda install -c bioconda pyabpoa # install pyabpoa module +pip install pyabpoa # install pyabpoa module ``` ### Building abPOA from source files @@ -88,26 +88,26 @@ tar -zxvf abPOA-v1.0.0_x64-linux.tar.gz ### Generate consensus sequence ``` -abPOA seq.fa > cons.fa +abpoa seq.fa > cons.fa ``` ### Generate row-column multiple sequence alignment in PIR format ``` -abPOA seq.fa -r2 > cons.out +abpoa seq.fa -r2 > cons.out ``` ### Generate plot of alignment graph ``` -abPOA seq.fa -g poa.png > cons.fa +abpoa seq.fa -g poa.png > cons.fa ``` ## Commands and options ``` -abPOA: adaptive banded Partial Order Alignment +abpoa: adaptive banded Partial Order Alignment -Usage: abPOA [option] > cons.fa/msa.out +Usage: abpoa [option] > cons.fa/msa.out Options: Alignment: @@ -142,20 +142,20 @@ Options: ``` ## Input -abPOA works with FASTA, FASTQ, gzip'd FASTA(.fa.gz) and gzip'd FASTQ(.fq.gz) formats. The input file is expected to contains multiple reads which will be processed as a whole set. +abpoa works with FASTA, FASTQ, gzip'd FASTA(.fa.gz) and gzip'd FASTQ(.fq.gz) formats. The input file is expected to contains multiple reads which will be processed as a whole set. -abPOA also can take a list of file names as input with option `-l`, where each line is the path of one sequence file containing multiple sequences. +abpoa also can take a list of file names as input with option `-l`, where each line is the path of one sequence file containing multiple sequences. ## Output ### Consensus sequence -abPOA outputs consensus sequence in FASTA format with the name field as "Consensus_sequence". +abpoa outputs consensus sequence in FASTA format with the name field as "Consensus_sequence". For example: ``` >Consensus_sequence ACGTGTACACGTTGAC ``` ### Row-column multiple sequence alignment -abPOA outputs the row-column multiple sequence alignment of input sequences in PIR format with a FASTA header. For example: +abpoa outputs the row-column multiple sequence alignment of input sequences in PIR format with a FASTA header. For example: ``` >Multiple_sequence_alignment ACGTGTACA-GTTGAC diff --git a/evaluation/msa_abPOA.c b/evaluation/msa_abPOA.c new file mode 100644 index 0000000..e5763df --- /dev/null +++ b/evaluation/msa_abPOA.c @@ -0,0 +1,164 @@ +/* To compile: + * gcc -O3 msa_abPOA.c -I ./include -L ./lib -labpoa -lz -o msa_abPOA + */ +#include +#include +#include +#include +#include +#include +#include +#include "abpoa.h" + +#define MAX_SEQ_LEN 10000 +#define MAX_INDEL_LEN 1000 +// AaCcGgTtNn ==> 0,1,2,3,4 +unsigned char nst_nt4_table[256] = { + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 /*'-'*/, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 0, 4, 1, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 0, 4, 1, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 +}; + +// read fasta format +char *get_seq(FILE *fp) +{ + char c = fgetc(fp); + if (feof(fp)) return NULL; // end of file + else if (c != '>') { + fprintf(stderr, "Unexpected format.\n"); + exit(1); + } + // starts with '>' + char *seq = (char *)malloc(sizeof(char) * MAX_SEQ_LEN); + fgets(seq, MAX_SEQ_LEN, fp); // header line + if(fgets(seq, MAX_SEQ_LEN, fp) == NULL) { // sequence line + fprintf(stderr, "No fasta sequence.\n"); + exit(1); + } + + int seq_len = strlen(seq) - 1; + seq[seq_len] = '\0'; + return seq; +} + +void help() { + printf( + "\n" + "usage: ./msa_abPOA [options ...]\n" + "\n" + " options:\n" + " -b \n" + " default: 10\n" + " 1st part of extra-band-width, set as negative to disable adaptive banded DP\n" + " -m \n" + " default: 2\n" + " score for matching bases\n" + " -x \n" + " default: 4\n" + " penalty for mismatching bases\n" + " -o \n" + " default: gap_open1 = 4, gap_open2 = 24\n" + " gap opening penalty (must be non-negative)\n" + " -e \n" + " default: gap_ext1 = 2, gap_ext2 = 1\n" + " gap extension penalty (must be non-negative)\n" + " -s \n" + " default: seq.fa\n" + " the input sequence set\n" + " -n \n" + " default: 10\n" + " number of sequences in each set\n" + " -h \n" + " prints the usage\n" + ); +} + +int main (int argc, char * const argv[]) { + char *seq_file = "seq.fa"; + //initial + abpoa_para_t *abpt = abpoa_init_para(); + + int n_seqs = 0, *seq_lens; uint8_t **bseqs; + char opt; char *s;; + while ((opt = getopt(argc, argv, "l:m:x:o:e:s:n:hb:")) != -1) { + switch (opt) { + case 'l': abpt->align_mode = atoi(optarg); break; + case 'm': abpt->match = atoi(optarg); break; + case 'x': abpt->mismatch = atoi(optarg); break; + case 'o': abpt->gap_open1 = strtol(optarg, &s, 10); if (*s == ',') abpt->gap_open2 = strtol(s+1, &s, 10); break; + case 'e': abpt->gap_ext1 = strtol(optarg, &s, 10); if (*s == ',') abpt->gap_ext2 = strtol(s+1, &s, 10); break; + case 's': seq_file = optarg; break; + case 'n': n_seqs = atoi(optarg); break; + case 'b': abpt->wb = atoi(optarg); break; + case 'h': help(); return 0; + default: help(); return 1; + } + } + + seq_lens = (int*)malloc(sizeof(int) * n_seqs); + bseqs = (uint8_t**)malloc(sizeof(uint8_t*) * n_seqs); + + // output options + abpt->out_cons = 1; // generate consensus sequence, set 0 to disable + + abpoa_post_set_para(abpt); + + FILE *fp_seq; + if((fp_seq = fopen(seq_file, "r")) == NULL) { + printf("fail to read seq\n"); + exit(1); + } + + struct timeval start_time, end_time; + double runtime = 0; + + int i; + abpoa_t *ab = abpoa_init(); + while(1) { + int seq_i = 0; + while(1) { + char *seq = get_seq(fp_seq); + if(seq == NULL ) break; + + int seq_len = strlen(seq); + seq_lens[seq_i] = seq_len; + bseqs[seq_i] = (uint8_t*)malloc(seq_len * sizeof(uint8_t)); + for (i = 0; i < seq_len; ++i) + bseqs[seq_i][i] = nst_nt4_table[(int)seq[i]]; + free(seq); + seq_i++; + if (seq_i == n_seqs) break; // read a set of sequences + } + if (seq_i == 0) break; + + gettimeofday(&start_time, NULL); + abpoa_msa(ab, abpt, n_seqs, seq_lens, bseqs, stdout, NULL, NULL, NULL, NULL, NULL); + gettimeofday(&end_time, NULL); + runtime = runtime + (end_time.tv_sec - start_time.tv_sec) + (end_time.tv_usec - start_time.tv_usec) * 1e-6; + + if (n_seqs > 0) { + for (i = 0; i < n_seqs; ++i) free(bseqs[i]); + } + + if(feof(fp_seq)) break; + } + abpoa_free(ab, abpt); + fprintf(stderr, "%.2f\t", runtime); + + free(seq_lens); free(bseqs); + abpoa_free_para(abpt); fclose(fp_seq); + return 0; +} diff --git a/python/Makefile b/python/Makefile deleted file mode 100644 index dd0dc75..0000000 --- a/python/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -default: install - -simd_flag = -ifneq ($(AVX2),) - simd_flag = AVX2=1 -endif -ifneq ($(SSE4),) - simd_flag = SSE4=1 -endif -ifneq ($(SSE2),) - simd_flag = SSE2=1 -endif - -install: cabpoa.pxd pyabpoa.pyx setup.py README.md - ${simd_flag} python setup.py install - -sdist: pyabpoa.c setup.py README.md - ${simd_flag} python setup.py sdist bdist_wheel - -publish: clean sdist - twine upload dist/* - -clean: - rm -rf build dist abpoa.egg-info build pyabPOA.egg-info - rm -f pyabpoa.c diff --git a/python/README.md b/python/README.md index f5bf7eb..27c8656 100644 --- a/python/README.md +++ b/python/README.md @@ -1,20 +1,20 @@ -# pyabPOA: abPOA Python interface +# pyabpoa: abPOA Python interface ## Introduction -pyabPOA provides an easy-to-use interface to [abPOA](https://github.com/yangao07/abPOA). +pyabpoa provides an easy-to-use interface to [abPOA](https://github.com/yangao07/abPOA). ## Installation -### Install pyabPOA with conda or pip +### Install pyabpoa with conda or pip -pyabPOA can be installed with conda or pip: +pyabpoa can be installed with conda or pip: ``` conda install -c bioconda pyabpoa -pip install pyabPOA +pip install pyabpoa ``` -### Install pyabPOA from source -Alternatively, you can install pyabPOA from source: +### Install pyabpoa from source +Alternatively, you can install pyabpoa from source: ``` git clone https://github.com/yangao07/abPOA.git cd abPOA/python @@ -29,7 +29,7 @@ python ./example.py ## Usage ``` -import pyabPOA as pa +import pyabpoa as pa a = pa.msa_aligner() seqs=[ 'CCGAAGA', @@ -48,11 +48,11 @@ res.print_msa() # print row-column multiple sequence alignment in PIR format ## APIs -### Class pyabPOA.msa_aligner +### Class pyabpoa.msa_aligner ``` -pyabPOA.msa_aligner(aln_mode='g', ...) +pyabpoa.msa_aligner(aln_mode='g', ...) ``` -This constructs a multiple sequence alignment handler of pyabPOA, it accepts the following arguments: +This constructs a multiple sequence alignment handler of pyabpoa, it accepts the following arguments: * **aln_mode**: alignment mode. 'g': global, 'l': local, 'e': extension; default: 'g' * **match**: match score; default: 2 * **gap_open1**: first gap opening penalty; default: 4 @@ -65,18 +65,18 @@ This constructs a multiple sequence alignment handler of pyabPOA, it accepts the * **min_freq**: minimum frequency of each consensus to output for diploid datal default: 0.3 ``` -pyabPOA.msa_aligner.msa(seqs, out_cons, out_msa, out_pog=None) +pyabpoa.msa_aligner.msa(seqs, out_cons, out_msa, out_pog=None) ``` This method performs mutliple sequence alignment and generates * **consensus sequence** if `out_cons` is set as `True` * **row-column multiple sequence alignment in PIR format** if `out_msa` is set as `True` * **plot of alignment graph** if `out_pog` is set as a file name with suffix as `.png` or `.pdf` -### Class pyabPOA.msa_result +### Class pyabpoa.msa_result ``` -pyabPOA.msa_result(seq_n, cons_n, cons_len, ...) +pyabpoa.msa_result(seq_n, cons_n, cons_len, ...) ``` -This class describes the information of the generated consensus sequence and row-column multiple sequence alignment. The returned result of `pyabPOA.msa_aligner.msa()` is an object of this class and it has the following properties: +This class describes the information of the generated consensus sequence and row-column multiple sequence alignment. The returned result of `pyabpoa.msa_aligner.msa()` is an object of this class and it has the following properties: * **seq_n**: number of input sequences * **cons_n**: number of generated consensus sequences * **cons_len**: an array of consensus sequence length @@ -84,4 +84,4 @@ This class describes the information of the generated consensus sequence and row * **msa_len**: size of each row in the row-column multiple sequence alignment * **msa_seq**: an array containing `seq_n` rows of the row-column multiple sequence alignment -`pyabPOA.msa_result()` also has a function of `print_msa`. It prints the row-column multiple sequence alignment. +`pyabpoa.msa_result()` also has a function of `print_msa`. It prints the row-column multiple sequence alignment. diff --git a/python/cabpoa.pxd b/python/cabpoa.pxd index 17f0ebb..c9f957a 100644 --- a/python/cabpoa.pxd +++ b/python/cabpoa.pxd @@ -1,10 +1,10 @@ from libc.stdint cimport int8_t, uint8_t, int32_t, int64_t, uint32_t, uint64_t from libc.stdio cimport FILE -cdef extern from "../include/simd_instruction.h": +cdef extern from "simd_instruction.h": int simd_check() -cdef extern from "../include/abpoa.h": +cdef extern from "abpoa.h": cdef int ABPOA_GLOBAL_MODE "ABPOA_GLOBAL_MODE" cdef int ABPOA_LOCAL_MODE "ABPOA_LOCAL_MODE" cdef int ABPOA_EXTEND_MODE "ABPOA_EXTEND_MODE" diff --git a/python/example.py b/python/example.py index 1a71dbc..8f32791 100644 --- a/python/example.py +++ b/python/example.py @@ -1,4 +1,4 @@ -import pyabPOA as pa +import pyabpoa as pa #@parameters of msa_aligner: # aln_mode='g' # g: global, l: local, e: extension diff --git a/python/setup.py b/python/setup.py deleted file mode 100644 index de23e92..0000000 --- a/python/setup.py +++ /dev/null @@ -1,51 +0,0 @@ -try: - from setuptools import setup, Extension -except ImportError: - from distutils.core import setup - from distutils.extension import Extension - -cmdclass = {} -long_description = open('README.md').read() - -try: - from Cython.Build import build_ext -except ImportError: # without Cython - module_src = 'pyabpoa.c' -else: # with Cython - module_src = 'pyabpoa.pyx' - cmdclass['build_ext'] = build_ext - -import os - -simd_flag='-march=native' -if os.getenv('SSE4', False): - simd_flag='-msse4.1' -elif os.getenv('SSE2', False): - simd_flag='-msse2' -elif os.getenv('AVX2', False): - simd_flag='-mavx2' - -src_dir='../src/' -inc_dir='../include' - -setup( - # Information - name = "pyabPOA", - description = "pyabPOA: SIMD-based Python library for fast partial order alignment using adaptive band", - long_description = long_description, - version = "1.0.0", - url = "https://github.com/yangao07/abpoa", - author = "Yan Gao", - author_email = "yangao07@hit.edu.cn", - license = "GLP", - keywords = "multiple-sequence-alignment sequece-to-graph alignment", - # Build instructions - ext_modules = [Extension("pyabPOA", - sources=[module_src, src_dir+'abpoa_align.c', src_dir+'abpoa_graph.c', src_dir+'simd_abpoa_align.c', src_dir+'utils.c', src_dir+'simd_check.c', src_dir+'abpoa_pog.c'], - include_dirs=[inc_dir], - depends=[src_dir+'abpoa.h', src_dir+'abpoa_align.h', src_dir+'abpoa_graph.h', src_dir+'kdq.h', src_dir+'kseq.h', src_dir+'simd_abpoa_align.h', src_dir+'simd_instruction.h', src_dir+'utils.h', 'cabpoa.pxd'], - libraries = ['z', 'm', 'pthread'], - extra_compile_args=['-O3', '-Wno-error=declaration-after-statement', simd_flag])], - install_requires=['cython'], - cmdclass = cmdclass -) diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..b847a18 --- /dev/null +++ b/setup.py @@ -0,0 +1,60 @@ +try: + from setuptools import setup, Extension +except ImportError: + from distutils.core import setup + from distutils.extension import Extension + +cmdclass = {} + +try: + from Cython.Build import build_ext +except ImportError: # without Cython + module_src = 'python/pyabpoa.c' +else: # with Cython + module_src = 'python/pyabpoa.pyx' + cmdclass['build_ext'] = build_ext + +import os, platform, sys + +sys.path.append('python') + +if platform.machine() in ["aarch64", "arm64"]: + simd_flag='-msse2' +else: + simd_flag='-march=native' + if os.getenv('SSE4', False): + simd_flag='-msse4.1' + elif os.getenv('SSE2', False): + simd_flag='-msse2' + elif os.getenv('AVX2', False): + simd_flag='-mavx2' + +src_dir='src/' +inc_dir='src/' + +src=[module_src, src_dir+'abpoa_align.c', src_dir+'abpoa_graph.c', src_dir+'simd_abpoa_align.c', src_dir+'utils.c', src_dir+'simd_check.c', src_dir+'abpoa_pog.c'] + +long_description = open('python/README.md').read() + +setup( + # Information + name = "pyabpoa", + description = "pyabpoa: SIMD-based partial order alignment using adaptive band", + long_description = long_description, + long_description_content_type="text/markdown", + version = "1.0.0-a", + url = "https://github.com/yangao07/abpoa", + author = "Yan Gao", + author_email = "yangao07@hit.edu.cn", + license = "GLP", + keywords = "multiple-sequence-alignment partial-order-graph-alignment", + # Build instructions + ext_modules = [Extension("pyabpoa", + sources=src, + include_dirs=[inc_dir], + depends=[src_dir+'abpoa.h', src_dir+'abpoa_align.h', src_dir+'abpoa_graph.h', src_dir+'kdq.h', src_dir+'kseq.h', src_dir+'simd_abpoa_align.h', src_dir+'simd_instruction.h', src_dir+'utils.h', 'python/cabpoa.pxd'], + libraries = ['z', 'm', 'pthread'], + extra_compile_args=['-O3', '-Wno-error=declaration-after-statement', simd_flag])], + install_requires=['cython'], + cmdclass = cmdclass +) diff --git a/src/abpoa.c b/src/abpoa.c index c68a41d..60950ee 100644 --- a/src/abpoa.c +++ b/src/abpoa.c @@ -11,7 +11,7 @@ KSEQ_INIT(gzFile, gzread) -char PROG[20] = "abPOA"; +char PROG[20] = "abpoa"; #define _ba BOLD UNDERLINE "a" NONE #define _bb BOLD UNDERLINE "b" NONE #define _bP BOLD UNDERLINE "P" NONE diff --git a/src/abpoa_pog.c b/src/abpoa_pog.c index 8bc9531..58e1c10 100644 --- a/src/abpoa_pog.c +++ b/src/abpoa_pog.c @@ -30,7 +30,7 @@ // base (index, rank, node_id) // A (1, 1, 2) A: base 1: index 1: rank 2: node_id int abpoa_dump_pog(abpoa_t *ab, abpoa_para_t *abpt) { - char PROG[20] = "abPOA"; int font_size=24; + char PROG[20] = "abpoa"; int font_size=24; abpoa_graph_t *graph = ab->abg; if (graph->is_topological_sorted == 0) abpoa_topological_sort(ab, abpt);