[med-svn] [Git][med-team/kma][upstream] New upstream version 1.3.6
Nilesh Patra
gitlab at salsa.debian.org
Tue Oct 27 17:32:00 GMT 2020
Nilesh Patra pushed to branch upstream at Debian Med / kma
Commits:
c7ff5ab7 by Nilesh Patra at 2020-10-27T22:59:43+05:30
New upstream version 1.3.6
- - - - -
8 changed files:
- KMAspecification.pdf
- kma.c
- makeindex.c
- qualcheck.c
- qualcheck.h
- updateindex.c
- updateindex.h
- version.h
Changes:
=====================================
KMAspecification.pdf
=====================================
Binary files a/KMAspecification.pdf and b/KMAspecification.pdf differ
=====================================
kma.c
=====================================
@@ -145,7 +145,7 @@ static void helpMessage(int exeStatus) {
fprintf(helpOut, "#\t-mmap\t\tMemory map *.comp.by\n");
fprintf(helpOut, "#\t-tmp\t\tSet directory for temporary files.\n");
fprintf(helpOut, "#\t-1t1\t\tForce end to end mapping\tFalse\n");
- fprintf(helpOut, "#\t-hmm\t\tUse a HMM to assign template(s)\n#\t\t\tto query sequences\t\tFalse\n");
+ fprintf(helpOut, "#\t-hmm\t\tUse a HMM to assign template(s)\n#\t\t\tto query sequences\t\tTrue\n");
fprintf(helpOut, "#\t-ck\t\tCount kmers instead of\n#\t\t\tpseudo alignment\t\tFalse\n");
fprintf(helpOut, "#\t-ca\t\tMake circular alignments\tFalse\n");
fprintf(helpOut, "#\t-boot\t\tBootstrap sequence\t\tFalse\n");
=====================================
makeindex.c
=====================================
@@ -99,7 +99,7 @@ void makeDB(HashMap *templates, int kmerindex, char **inputfiles, int fileCount,
}
bias = compDNAref(compressor, qseq->seq, qseq->len);
- if(compressor->seqlen > MinLen && update_DB(templates, compressor, templates->DB_size, MinKlen, homQ, homT, *template_ulengths, *template_slengths)) {
+ if(compressor->seqlen > MinLen && update_DB(templates, compressor, templates->DB_size, MinKlen, homQ, homT, *template_ulengths, *template_slengths, header)) {
/* Update annots */
seq = header->seq + header->len;
while(isspace(*--seq)) {
=====================================
qualcheck.c
=====================================
@@ -26,9 +26,9 @@
#include "stdnuc.h"
#include "stdstat.h"
-int (*QualCheck)(HashMap *templates, CompDNA *, int, double, double, unsigned *) = &lengthCheck;;
+int (*QualCheck)(HashMap *templates, CompDNA *, int, double, double, unsigned *, Qseqs *) = &lengthCheck;
-int lengthCheck(HashMap *templates, CompDNA *qseq, int MinKlen, double homQ, double homT, unsigned *template_ulengths) {
+int lengthCheck(HashMap *templates, CompDNA *qseq, int MinKlen, double homQ, double homT, unsigned *template_ulengths, Qseqs *header) {
int i, j, end, rc, thisKlen, prefix_len, prefix_shifter;
long unsigned prefix;
@@ -76,10 +76,10 @@ int lengthCheck(HashMap *templates, CompDNA *qseq, int MinKlen, double homQ, dou
}
}
-int queryCheck(HashMap *templates, CompDNA *qseq, int MinKlen, double homQ, double homT, unsigned *template_ulengths) {
+int queryCheck(HashMap *templates, CompDNA *qseq, int MinKlen, double homQ, double homT, unsigned *template_ulengths, Qseqs *header) {
static unsigned *Scores_tot = 0, *bestTemplates = 0;
- int i, j, end, rc;
+ int i, j, end, rc, template;
unsigned thisKlen, prefix_len, prefix_shifter, shifter, DB_size, *values;
double bestQ, thisQ;
long unsigned prefix;
@@ -159,26 +159,30 @@ int queryCheck(HashMap *templates, CompDNA *qseq, int MinKlen, double homQ, doub
/* get query cov */
bestQ = 0;
+ template = 0;
for(i = 1; i <= *bestTemplates; ++i) {
thisQ = 1.0 * Scores_tot[bestTemplates[i]] / thisKlen;
if(bestQ < thisQ) {
bestQ = thisQ;
+ template = bestTemplates[i];
}
Scores_tot[bestTemplates[i]] = 0;
}
if(bestQ < homQ) {
+ fprintf(stdout, "%s\t%d\t%f\t%d\n", header->seq + 1, DB_size, bestQ, template);
return 1;
} else {
+ fprintf(stdout, "%s\t%d\t%f\t%d\n", header->seq + 1, template, bestQ, template);
return 0;
}
}
-int templateCheck(HashMap *templates, CompDNA *qseq, int MinKlen, double homQ, double homT, unsigned *template_ulengths) {
+int templateCheck(HashMap *templates, CompDNA *qseq, int MinKlen, double homQ, double homT, unsigned *template_ulengths, Qseqs *header) {
static unsigned *Scores = 0, *Scores_tot = 0, *bestTemplates = 0;
static HashMap_kmers *foundKmers = 0;
- int i, j, end, rc;
+ int i, j, end, rc, templateQ, templateT;
unsigned thisKlen, prefix_len, prefix_shifter, shifter, DB_size, *values;
double bestQ, thisQ, bestT, thisT;
long unsigned key, prefix;
@@ -270,15 +274,19 @@ int templateCheck(HashMap *templates, CompDNA *qseq, int MinKlen, double homQ, d
/* get query cov */
bestQ = 0;
+ templateQ = 0;
bestT = 0;
+ templateT = 0;
for(i = 1; i <= *bestTemplates; ++i) {
thisQ = 1.0 * Scores_tot[bestTemplates[i]] / thisKlen;
if(thisQ > bestQ) {
bestQ = thisQ;
+ templateQ = bestTemplates[i];
}
thisT = 1.0 * Scores[bestTemplates[i]] / template_ulengths[bestTemplates[i]];
if(thisT > bestT) {
bestT = thisT;
+ templateT = bestTemplates[i];
}
Scores_tot[bestTemplates[i]] = 0;
Scores[bestTemplates[i]] = 0;
@@ -286,8 +294,14 @@ int templateCheck(HashMap *templates, CompDNA *qseq, int MinKlen, double homQ, d
emptyHash(foundKmers);
- if(cmp(bestT < homT, bestQ < homQ) && thisKlen >= MinKlen) {
- return 1;
+ if(thisKlen >= MinKlen) {
+ if(cmp(bestT < homT, bestQ < homQ)) {
+ fprintf(stdout, "%s\t%d\t%f\t%d\t%f\t%d\n", header->seq + 1, DB_size, bestQ, templateQ, bestT, templateT);
+ return 1;
+ } else {
+ fprintf(stdout, "%s\t%d\t%f\t%d\t%f\t%d\n", header->seq + 1, (bestT < homT) ? templateQ : templateT, bestQ, templateQ, bestT, templateT);
+ return 0;
+ }
} else {
return 0;
}
=====================================
qualcheck.h
=====================================
@@ -20,10 +20,10 @@
#include "compdna.h"
#include "hashmap.h"
-extern int (*QualCheck)(HashMap *templates, CompDNA *, int, double, double, unsigned *);
-int lengthCheck(HashMap *templates, CompDNA *qseq, int MinKlen, double homQ, double homT, unsigned *template_ulengths);
-int queryCheck(HashMap *templates, CompDNA *qseq, int MinKlen, double homQ, double homT, unsigned *template_ulengths);
-int templateCheck(HashMap *templates, CompDNA *qseq, int MinKlen, double homQ, double homT, unsigned *template_ulengths);
+extern int (*QualCheck)(HashMap *templates, CompDNA *, int, double, double, unsigned *, Qseqs *);
+int lengthCheck(HashMap *templates, CompDNA *qseq, int MinKlen, double homQ, double homT, unsigned *template_ulengths, Qseqs *header);
+int queryCheck(HashMap *templates, CompDNA *qseq, int MinKlen, double homQ, double homT, unsigned *template_ulengths, Qseqs *header);
+int templateCheck(HashMap *templates, CompDNA *qseq, int MinKlen, double homQ, double homT, unsigned *template_ulengths, Qseqs *header);
void updateScoreAndTemplate(unsigned *Scores_tot, unsigned *bestTemplates, unsigned *values);
void updateScoreAndTemplateHU(unsigned *Scores_tot, unsigned *bestTemplates, unsigned *values_org);
void addUscore(unsigned *Scores, unsigned *values);
=====================================
updateindex.c
=====================================
@@ -27,10 +27,10 @@
#include "stdnuc.h"
#include "updateindex.h"
-int (*update_DB)(HashMap *, CompDNA *, unsigned, int, double, double, unsigned *, unsigned *) = &updateDBs;
+int (*update_DB)(HashMap *, CompDNA *, unsigned, int, double, double, unsigned *, unsigned *, Qseqs *) = &updateDBs;
void (*updateAnnotsPtr)(CompDNA *, int, int, FILE *, unsigned **, unsigned **, unsigned **) = &updateAnnots;
-int updateDBs(HashMap *templates, CompDNA *qseq, unsigned template, int MinKlen, double homQ, double homT, unsigned *template_ulengths, unsigned *template_slengths) {
+int updateDBs(HashMap *templates, CompDNA *qseq, unsigned template, int MinKlen, double homQ, double homT, unsigned *template_ulengths, unsigned *template_slengths, Qseqs *header) {
int i, j, end, shifter;
@@ -57,7 +57,7 @@ int updateDBs(HashMap *templates, CompDNA *qseq, unsigned template, int MinKlen,
return 1;
}
-int updateDBs_sparse(HashMap *templates, CompDNA *qseq, unsigned template, int MinKlen, double homQ, double homT, unsigned *template_ulengths, unsigned *template_slengths) {
+int updateDBs_sparse(HashMap *templates, CompDNA *qseq, unsigned template, int MinKlen, double homQ, double homT, unsigned *template_ulengths, unsigned *template_slengths, Qseqs *header) {
int i, j, end, rc, prefix_len, prefix_shifter, shifter;
long unsigned prefix;
@@ -71,7 +71,7 @@ int updateDBs_sparse(HashMap *templates, CompDNA *qseq, unsigned template, int M
shifter = sizeof(long unsigned) * sizeof(long unsigned) - (templates->kmersize << 1);
/* test homology and length */
- if(QualCheck(templates, qseq, MinKlen, homQ, homT, template_ulengths)) {
+ if(QualCheck(templates, qseq, MinKlen, homQ, homT, template_ulengths, header)) {
template_slengths[template] = 0;
template_ulengths[template] = 0;
for(rc = 0; rc < 2; ++rc) {
=====================================
updateindex.h
=====================================
@@ -21,10 +21,10 @@
#include "compdna.h"
#include "hashmap.h"
-extern int (*update_DB)(HashMap *, CompDNA *, unsigned, int, double, double, unsigned *, unsigned *);
+extern int (*update_DB)(HashMap *, CompDNA *, unsigned, int, double, double, unsigned *, unsigned *, Qseqs *);
extern void (*updateAnnotsPtr)(CompDNA *, int, int, FILE *, unsigned **, unsigned **, unsigned **);
-int updateDBs(HashMap *templates, CompDNA *qseq, unsigned template, int MinKlen, double homQ, double homT, unsigned *template_ulengths, unsigned *template_slengths);
-int updateDBs_sparse(HashMap *templates, CompDNA *qseq, unsigned template, int MinKlen, double homQ, double homT, unsigned *template_ulengths, unsigned *template_slengths);
+int updateDBs(HashMap *templates, CompDNA *qseq, unsigned template, int MinKlen, double homQ, double homT, unsigned *template_ulengths, unsigned *template_slengths, Qseqs *header);
+int updateDBs_sparse(HashMap *templates, CompDNA *qseq, unsigned template, int MinKlen, double homQ, double homT, unsigned *template_ulengths, unsigned *template_slengths, Qseqs *header);
void updateAnnots(CompDNA *qseq, int DB_size, int kmerindex, FILE *seq_out, unsigned **template_lengths, unsigned **template_ulengths, unsigned **template_slengths);
void updateAnnots_sparse(CompDNA *qseq, int DB_size, int kmerindex, FILE *seq_out, unsigned **template_lengths, unsigned **template_ulengths, unsigned **template_slengths);
void dumpSeq(CompDNA *qseq, int kmerindex, FILE *seq_out);
=====================================
version.h
=====================================
@@ -17,4 +17,4 @@
* limitations under the License.
*/
-#define KMA_VERSION "1.3.5"
+#define KMA_VERSION "1.3.6"
View it on GitLab: https://salsa.debian.org/med-team/kma/-/commit/c7ff5ab7d4b0e2594907884f30f4aef3a77e657e
--
View it on GitLab: https://salsa.debian.org/med-team/kma/-/commit/c7ff5ab7d4b0e2594907884f30f4aef3a77e657e
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20201027/ab00178e/attachment-0001.html>
More information about the debian-med-commit
mailing list