Patch a bug inducing that sequences were considered as circular whatever
the -c option was present or not.
This commit is contained in:
13
src/ecopcr.c
13
src/ecopcr.c
@ -614,8 +614,10 @@ int main(int argc, char **argv)
|
|||||||
length = 0;
|
length = 0;
|
||||||
if (posj > posi)
|
if (posj > posi)
|
||||||
length = posj - posi - o1->patlen - o2->patlen;
|
length = posj - posi - o1->patlen - o2->patlen;
|
||||||
if (posj < posi)
|
else {
|
||||||
length = posj + apatseq->seqlen - posi - o1->patlen - o2->patlen;
|
if (circular > 0)
|
||||||
|
length = posj + apatseq->seqlen - posi - o1->patlen - o2->patlen;
|
||||||
|
}
|
||||||
if ((length>0) && // For when primers touch or overlap
|
if ((length>0) && // For when primers touch or overlap
|
||||||
(!lmin || (length >= lmin)) &&
|
(!lmin || (length >= lmin)) &&
|
||||||
(!lmax || (length <= lmax)))
|
(!lmax || (length <= lmax)))
|
||||||
@ -648,7 +650,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
o1cHits = ManberAll(apatseq,o1c,3,begin,length);
|
o1cHits = ManberAll(apatseq,o1c,3,begin,length);
|
||||||
|
printf("circular= %d\n",circular);
|
||||||
if (o1cHits)
|
if (o1cHits)
|
||||||
for (i=0; i < o2Hits;i++)
|
for (i=0; i < o2Hits;i++)
|
||||||
{
|
{
|
||||||
@ -668,8 +670,11 @@ int main(int argc, char **argv)
|
|||||||
length = 0;
|
length = 0;
|
||||||
if (posj > posi)
|
if (posj > posi)
|
||||||
length = posj - posi + 1 - o2->patlen - o1->patlen; /* - o1->patlen : deleted by <EC> (prior to the OBITools3) */
|
length = posj - posi + 1 - o2->patlen - o1->patlen; /* - o1->patlen : deleted by <EC> (prior to the OBITools3) */
|
||||||
if (posj < posi)
|
else {
|
||||||
|
if (circular > 0)
|
||||||
length = posj + apatseq->seqlen - posi - o1->patlen - o2->patlen;
|
length = posj + apatseq->seqlen - posi - o1->patlen - o2->patlen;
|
||||||
|
}
|
||||||
|
|
||||||
if ((length>0) && // For when primers touch or overlap
|
if ((length>0) && // For when primers touch or overlap
|
||||||
(!lmin || (length >= lmin)) &&
|
(!lmin || (length >= lmin)) &&
|
||||||
(!lmax || (length <= lmax)))
|
(!lmax || (length <= lmax)))
|
||||||
|
Reference in New Issue
Block a user