Loading KMAspecification.pdf +1.67 KiB (348 KiB) File changed.No diff preview for this file type. View original file View changed file Makefile +5 −4 Original line number Diff line number Diff line CFLAGS = -Wall -O3 -std=c99 LIBS = align.o alnfrags.o ankers.o assembly.o chain.o compdna.o compkmers.o compress.o decon.o ef.o filebuff.o frags.o hashmap.o hashmapindex.o hashmapkma.o hashmapkmers.o hashtable.o index.o kma.o kmapipe.o kmers.o kmmap.o loadupdate.o makeindex.o mt1.o nw.o pherror.o printconsensus.o qseqs.o qualcheck.o runinput.o runkma.o sam.o savekmers.o seq2fasta.o seqparse.o shm.o sparse.o spltdb.o stdnuc.o stdstat.o update.o updateindex.o updatescores.o valueshash.o vcf.o LIBS = align.o alnfrags.o ankers.o assembly.o chain.o compdna.o compkmers.o compress.o decon.o ef.o filebuff.o frags.o hashmap.o hashmapindex.o hashmapkma.o hashmapkmers.o hashtable.o index.o kma.o kmapipe.o kmers.o kmmap.o loadupdate.o makeindex.o mt1.o nw.o pherror.o printconsensus.o qseqs.o qualcheck.o runinput.o runkma.o sam.o savekmers.o seq2fasta.o seqparse.o shm.o sparse.o spltdb.o stdnuc.o stdstat.o tmp.o update.o updateindex.o updatescores.o valueshash.o vcf.o PROGS = kma kma_index kma_shm kma_update .c .o: Loading Loading @@ -43,7 +43,7 @@ hashmapkma.o: hashmapkma.h pherror.h hashmapkmers.o: hashmapkmers.h pherror.h hashtable.o: hashtable.h hashmapkma.h hashmapkmers.h pherror.h index.o: index.h compress.h decon.h hashmap.h hashmapkma.h loadupdate.h makeindex.h pherror.h stdstat.h version.h kma.o: kma.h ankers.h assembly.h chain.h hashmapkma.h kmers.h mt1.h penalties.h pherror.h qseqs.h runinput.h runkma.h savekmers.h sparse.h spltdb.h version.h kma.o: kma.h ankers.h assembly.h chain.h hashmapkma.h kmers.h mt1.h penalties.h pherror.h qseqs.h runinput.h runkma.h savekmers.h sparse.h spltdb.h tmp.h version.h kmapipe.o: kmapipe.h pherror.h kmers.o: kmers.h ankers.h compdna.h hashmapkma.h kmapipe.h pherror.h qseqs.h savekmers.h spltdb.h kmmap.o: kmmap.h hashmapkma.h Loading @@ -56,16 +56,17 @@ printconsensus.o: printconsensus.h assembly.h qseqs.o: qseqs.h pherror.h qualcheck.o: qualcheck.h compdna.h hashmap.h pherror.h stdnuc.h stdstat.h runinput.o: runinput.h compdna.h filebuff.h pherror.h qseqs.h seqparse.h runkma.o: runkma.h align.h alnfrags.h assembly.h chain.h compdna.h ef.h filebuff.h frags.h hashmapindex.h kmapipe.h nw.h pherror.h printconsensus.h qseqs.h stdnuc.h stdstat.h vcf.h runkma.o: runkma.h align.h alnfrags.h assembly.h chain.h compdna.h ef.h filebuff.h frags.h hashmapindex.h kmapipe.h nw.h pherror.h printconsensus.h qseqs.h stdnuc.h stdstat.h tmp.h vcf.h sam.o: sam.h nw.h pherror.h qseqs.h runkma.h savekmers.o: savekmers.h ankers.h compdna.h hashmapkma.h penalties.h pherror.h qseqs.h stdnuc.h stdstat.h threader.h seq2fasta.o: seq2fasta.h pherror.h qseqs.h runkma.h stdnuc.h seqparse.o: seqparse.h filebuff.h qseqs.h shm.o: shm.h pherror.h hashmapkma.h version.h sparse.o: sparse.h compkmers.h hashtable.h kmapipe.h pherror.h runinput.h savekmers.h stdnuc.h stdstat.h spltdb.o: spltdb.h align.h alnfrags.h assembly.h chain.h compdna.h ef.h filebuff.h frags.h hashmapindex.h kmapipe.h nw.h pherror.h printconsensus.h qseqs.h runkma.h stdnuc.h stdstat.h vcf.h spltdb.o: spltdb.h align.h alnfrags.h assembly.h chain.h compdna.h ef.h filebuff.h frags.h hashmapindex.h kmapipe.h nw.h pherror.h printconsensus.h qseqs.h runkma.h stdnuc.h stdstat.h tmp.h vcf.h stdnuc.o: stdnuc.h stdstat.o: stdstat.h tmp.o: tmp.h pherror.h threader.h update.o: update.h hashmapkma.h pherror.h stdnuc.h updateindex.o: updateindex.h compdna.h hashmap.h hashmapindex.h pherror.h qualcheck.h stdnuc.h pherror.h updatescores.o: updatescores.h qseqs.h Loading align.c +6 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ AlnScore KMA(const HashMap_index *template_index, const unsigned char *qseq, int mask = 0; mask = (~mask) >> (sizeof(long unsigned) * sizeof(long unsigned) - (kmersize << 1)); key = 0; /* circular, skip boundaries */ if(min < max) { min = 0; Loading Loading @@ -757,6 +758,7 @@ int anker_rc(const HashMap_index *template_index, unsigned char *qseq, int q_len if(end == -1) { end = q_len; } if(i < end - kmersize) { key = makeKmer(qseq, i, kmersize - 1); i += (kmersize - 1); Loading @@ -767,6 +769,7 @@ int anker_rc(const HashMap_index *template_index, unsigned char *qseq, int q_len while(i < end) { key = ((key << 2) | qseq[i]) & mask; value = hashMap_index_get_bound(template_index, key, 0, t_len, shifter); if(value == 0) { ++i; } else if(0 < value) { Loading Loading @@ -870,6 +873,8 @@ int anker_rc(const HashMap_index *template_index, unsigned char *qseq, int q_len stop = hashMap_index_getNextDubPos(template_index, key, 0, t_len, stop, shifter); } /* add best anker score */ score_r += (bias - i); i = bias + 1; /* update position */ Loading @@ -883,6 +888,7 @@ int anker_rc(const HashMap_index *template_index, unsigned char *qseq, int q_len } i = end + 1; } if(bestScore < score_r) { bestScore = score_r; } Loading compress.c +1 −0 Original line number Diff line number Diff line Loading @@ -702,6 +702,7 @@ HashMapKMA * compressKMA_megaDB(HashMap *templates, FILE *out) { fprintf(stderr, "# Overflow bypassed.\n"); } free(templates->values); /* convert valuesHash to a linked list */ table = 0; i = shmValues->size; Loading frags.c +2 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include "pherror.h" #include "qseqs.h" #include "threader.h" #include "tmp.h" FILE * printFrags(Frag **alignFrags, int DB_size) { Loading @@ -31,7 +32,7 @@ FILE * printFrags(Frag **alignFrags, int DB_size) { FILE *OUT; Frag *alignFrag, *next; if(!(OUT = tmpfile())) { if(!(OUT = tmpF(0))) { fprintf(stderr, "Could not create tmp files.\n"); ERROR(); } Loading Loading
KMAspecification.pdf +1.67 KiB (348 KiB) File changed.No diff preview for this file type. View original file View changed file
Makefile +5 −4 Original line number Diff line number Diff line CFLAGS = -Wall -O3 -std=c99 LIBS = align.o alnfrags.o ankers.o assembly.o chain.o compdna.o compkmers.o compress.o decon.o ef.o filebuff.o frags.o hashmap.o hashmapindex.o hashmapkma.o hashmapkmers.o hashtable.o index.o kma.o kmapipe.o kmers.o kmmap.o loadupdate.o makeindex.o mt1.o nw.o pherror.o printconsensus.o qseqs.o qualcheck.o runinput.o runkma.o sam.o savekmers.o seq2fasta.o seqparse.o shm.o sparse.o spltdb.o stdnuc.o stdstat.o update.o updateindex.o updatescores.o valueshash.o vcf.o LIBS = align.o alnfrags.o ankers.o assembly.o chain.o compdna.o compkmers.o compress.o decon.o ef.o filebuff.o frags.o hashmap.o hashmapindex.o hashmapkma.o hashmapkmers.o hashtable.o index.o kma.o kmapipe.o kmers.o kmmap.o loadupdate.o makeindex.o mt1.o nw.o pherror.o printconsensus.o qseqs.o qualcheck.o runinput.o runkma.o sam.o savekmers.o seq2fasta.o seqparse.o shm.o sparse.o spltdb.o stdnuc.o stdstat.o tmp.o update.o updateindex.o updatescores.o valueshash.o vcf.o PROGS = kma kma_index kma_shm kma_update .c .o: Loading Loading @@ -43,7 +43,7 @@ hashmapkma.o: hashmapkma.h pherror.h hashmapkmers.o: hashmapkmers.h pherror.h hashtable.o: hashtable.h hashmapkma.h hashmapkmers.h pherror.h index.o: index.h compress.h decon.h hashmap.h hashmapkma.h loadupdate.h makeindex.h pherror.h stdstat.h version.h kma.o: kma.h ankers.h assembly.h chain.h hashmapkma.h kmers.h mt1.h penalties.h pherror.h qseqs.h runinput.h runkma.h savekmers.h sparse.h spltdb.h version.h kma.o: kma.h ankers.h assembly.h chain.h hashmapkma.h kmers.h mt1.h penalties.h pherror.h qseqs.h runinput.h runkma.h savekmers.h sparse.h spltdb.h tmp.h version.h kmapipe.o: kmapipe.h pherror.h kmers.o: kmers.h ankers.h compdna.h hashmapkma.h kmapipe.h pherror.h qseqs.h savekmers.h spltdb.h kmmap.o: kmmap.h hashmapkma.h Loading @@ -56,16 +56,17 @@ printconsensus.o: printconsensus.h assembly.h qseqs.o: qseqs.h pherror.h qualcheck.o: qualcheck.h compdna.h hashmap.h pherror.h stdnuc.h stdstat.h runinput.o: runinput.h compdna.h filebuff.h pherror.h qseqs.h seqparse.h runkma.o: runkma.h align.h alnfrags.h assembly.h chain.h compdna.h ef.h filebuff.h frags.h hashmapindex.h kmapipe.h nw.h pherror.h printconsensus.h qseqs.h stdnuc.h stdstat.h vcf.h runkma.o: runkma.h align.h alnfrags.h assembly.h chain.h compdna.h ef.h filebuff.h frags.h hashmapindex.h kmapipe.h nw.h pherror.h printconsensus.h qseqs.h stdnuc.h stdstat.h tmp.h vcf.h sam.o: sam.h nw.h pherror.h qseqs.h runkma.h savekmers.o: savekmers.h ankers.h compdna.h hashmapkma.h penalties.h pherror.h qseqs.h stdnuc.h stdstat.h threader.h seq2fasta.o: seq2fasta.h pherror.h qseqs.h runkma.h stdnuc.h seqparse.o: seqparse.h filebuff.h qseqs.h shm.o: shm.h pherror.h hashmapkma.h version.h sparse.o: sparse.h compkmers.h hashtable.h kmapipe.h pherror.h runinput.h savekmers.h stdnuc.h stdstat.h spltdb.o: spltdb.h align.h alnfrags.h assembly.h chain.h compdna.h ef.h filebuff.h frags.h hashmapindex.h kmapipe.h nw.h pherror.h printconsensus.h qseqs.h runkma.h stdnuc.h stdstat.h vcf.h spltdb.o: spltdb.h align.h alnfrags.h assembly.h chain.h compdna.h ef.h filebuff.h frags.h hashmapindex.h kmapipe.h nw.h pherror.h printconsensus.h qseqs.h runkma.h stdnuc.h stdstat.h tmp.h vcf.h stdnuc.o: stdnuc.h stdstat.o: stdstat.h tmp.o: tmp.h pherror.h threader.h update.o: update.h hashmapkma.h pherror.h stdnuc.h updateindex.o: updateindex.h compdna.h hashmap.h hashmapindex.h pherror.h qualcheck.h stdnuc.h pherror.h updatescores.o: updatescores.h qseqs.h Loading
align.c +6 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ AlnScore KMA(const HashMap_index *template_index, const unsigned char *qseq, int mask = 0; mask = (~mask) >> (sizeof(long unsigned) * sizeof(long unsigned) - (kmersize << 1)); key = 0; /* circular, skip boundaries */ if(min < max) { min = 0; Loading Loading @@ -757,6 +758,7 @@ int anker_rc(const HashMap_index *template_index, unsigned char *qseq, int q_len if(end == -1) { end = q_len; } if(i < end - kmersize) { key = makeKmer(qseq, i, kmersize - 1); i += (kmersize - 1); Loading @@ -767,6 +769,7 @@ int anker_rc(const HashMap_index *template_index, unsigned char *qseq, int q_len while(i < end) { key = ((key << 2) | qseq[i]) & mask; value = hashMap_index_get_bound(template_index, key, 0, t_len, shifter); if(value == 0) { ++i; } else if(0 < value) { Loading Loading @@ -870,6 +873,8 @@ int anker_rc(const HashMap_index *template_index, unsigned char *qseq, int q_len stop = hashMap_index_getNextDubPos(template_index, key, 0, t_len, stop, shifter); } /* add best anker score */ score_r += (bias - i); i = bias + 1; /* update position */ Loading @@ -883,6 +888,7 @@ int anker_rc(const HashMap_index *template_index, unsigned char *qseq, int q_len } i = end + 1; } if(bestScore < score_r) { bestScore = score_r; } Loading
compress.c +1 −0 Original line number Diff line number Diff line Loading @@ -702,6 +702,7 @@ HashMapKMA * compressKMA_megaDB(HashMap *templates, FILE *out) { fprintf(stderr, "# Overflow bypassed.\n"); } free(templates->values); /* convert valuesHash to a linked list */ table = 0; i = shmValues->size; Loading
frags.c +2 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include "pherror.h" #include "qseqs.h" #include "threader.h" #include "tmp.h" FILE * printFrags(Frag **alignFrags, int DB_size) { Loading @@ -31,7 +32,7 @@ FILE * printFrags(Frag **alignFrags, int DB_size) { FILE *OUT; Frag *alignFrag, *next; if(!(OUT = tmpfile())) { if(!(OUT = tmpF(0))) { fprintf(stderr, "Could not create tmp files.\n"); ERROR(); } Loading