Version 1.0.30

This commit is contained in:
Celine Mercier
2017-10-13 20:16:11 +02:00
parent 294a5e72d3
commit 6613bcb74a

View File

@ -20,7 +20,7 @@
#include "./sumalibs/libutils/utilities.h"
#include "mtcompare_sumatra.h"
#define VERSION "1.0.20"
#define VERSION "1.0.30"
/* ----------------------------------------------- */
@ -214,7 +214,7 @@ int compare1(fastaSeqCount db1, double threshold, BOOL normalize, int reference,
BOOL always = TRUE;
int64_t pairs = (int64_t)(db1.count - 1) * (int64_t)db1.count /2;
BOOL print;
double score;
double score, scoreG;
int32_t i,j;
char* s1;
char* s2;
@ -239,7 +239,7 @@ int compare1(fastaSeqCount db1, double threshold, BOOL normalize, int reference,
calculateMaxAndMinLenDB(db1, &lmax, &lmin);
sizeForSeqs = prepareTablesForSumathings(lmax, lmin, threshold, normalize, reference, lcsmode, &address, &iseq1, &iseq2);
for (i=0; i < db1.count; i++) // ...??
for (i=0; i < db1.count; i++) // ...?? db1.count - 1 probably
for (j=i+1; j < db1.count; j++)
{
print = FALSE;
@ -252,7 +252,23 @@ int compare1(fastaSeqCount db1, double threshold, BOOL normalize, int reference,
l1 = (db1.fastaSeqs+i)->length;
s2 = (db1.fastaSeqs+j)->sequence;
l2 = (db1.fastaSeqs+j)->length;
/* fprintf(stderr, "\n%s", s1);
fprintf(stderr, "\n%s", s2);
fprintf(stderr, "\n%f", threshold);
fprintf(stderr, "\n%d", normalize);
fprintf(stderr, "\n%d", reference);
fprintf(stderr, "\n%d\n", lcsmode);
*/
// score = generic_sse_banded_lcs_align(s1, s2, threshold, normalize, reference, lcsmode);
// fprintf(stderr, "\nscore generic = %f", scoreG);
score = alignForSumathings(s1, iseq1, s2, iseq2, l1, l2, normalize, reference, lcsmode, address, sizeForSeqs, LCSmin);
// fprintf(stderr, "\nscore = %f\n", score);
// if (scoreG != score)
// {
// fprintf(stderr, "\nscores differents\n");
// exit(1);
// }
print = always || (((normalize || lcsmode) && (score >= threshold)) || ((!lcsmode && !normalize) && (score <= threshold)));
if (print && !lcsmode && normalize)
score = 1.0 - score;
@ -322,7 +338,7 @@ int compare2(fastaSeqCount db1, fastaSeqCount db2, double threshold, BOOL normal
score = alignForSumathings(s1, iseq1, s2, iseq2, l1, l2, normalize, reference, lcsmode, address, sizeForSeqs, LCSmin);
print = always || (((normalize || lcsmode) && (score >= threshold)) || ((!lcsmode && !normalize) && (score <= threshold)));
if (print && !lcsmode && normalize)
score = 1.0 - score;
score = 1.0 - score; // TODO isn't that already done?
}
printResults(db1.fastaSeqs+i, db2.fastaSeqs+j, score, extradata, pairs, print);
}