My complete changes on my laptop, with specificity bug fix + ahocorasick + sets

git-svn-id: https://www.grenoble.prabi.fr/svn/LECASofts/ecoPrimers/trunk@393 60f365c0-8329-0410-b2a4-ec073aeeaa1d
This commit is contained in:
2012-01-03 21:05:31 +00:00
parent 19887e9a46
commit 1f5a30b0df
13 changed files with 2502 additions and 254 deletions

View File

@ -179,7 +179,7 @@ static void buildPrimerPairsForOneSeq(uint32_t seqid,
uint32_t i,j,k;
uint32_t matchcount=0;
pprimermatch_t matches = NULL;
primermatchcount_t seqmatchcount;
//primermatchcount_t seqmatchcount;
ppair_t pcurrent;
pair_t current;
pprimer_t wswp;
@ -189,9 +189,9 @@ static void buildPrimerPairsForOneSeq(uint32_t seqid,
//char prmr[50];
//float mtemp;
word_t w1, w1a, omask = (0x1L << (options->strict_three_prime*2)) -1;
word_t w2, w2a, wtmp;
word_t w2, w2a;//, wtmp;
uint32_t bp1,bp2;
//prmr[options->primer_length] = '\0';
for (i=0;i < primers->size; i++)
@ -252,16 +252,17 @@ static void buildPrimerPairsForOneSeq(uint32_t seqid,
{
// For all primers matching the sequence
//for(j=i+1;
// (j<matchcount)
// && ((distance=matches[j].position - matches[i].position - options->primer_length) < options->lmax);
// j++
// )
/*for(j=i+1;
(j<matchcount)
&& ((distance=matches[j].position - matches[i].position - options->primer_length) < options->lmax);
j++
)//*/
for (j=i+1; j<matchcount; j++)
{
if (matches[j].position - matches[i].position <= options->primer_length) continue;
distance = matches[j].position - matches[i].position - options->primer_length;
if (distance >= options->lmax) break;
// For all not too far primers
@ -269,9 +270,7 @@ static void buildPrimerPairsForOneSeq(uint32_t seqid,
&& (distance > options->lmin)
)
{
// If possible primer pair
current.p1 = matches[i].primer;
current.asdirect1=matches[i].strand;
current.p2 = matches[j].primer;
@ -456,7 +455,6 @@ static void buildPrimerPairsForOneSeq(uint32_t seqid,
}
}
}
pairs->count=paircount;
}