Compare commits
6 Commits
ecopcr_v1.
...
master
Author | SHA1 | Date | |
---|---|---|---|
40f2972bda | |||
7db34d77a4 | |||
3503f66520 | |||
9deb30a8c4 | |||
c4321036be | |||
a92a7fa070 |
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,8 +1,12 @@
|
|||||||
|
/.gitignore
|
||||||
|
/.cproject
|
||||||
|
/.project
|
||||||
|
|
||||||
# /src/
|
# /src/
|
||||||
/src/ecoPCR
|
/src/ecoPCR
|
||||||
/src/ecofind
|
/src/ecofind
|
||||||
/src/*.P
|
/src/*.P
|
||||||
|
/src/*.o
|
||||||
/src/ecogrep
|
/src/ecogrep
|
||||||
|
|
||||||
# /src/libapat/
|
# /src/libapat/
|
||||||
@ -14,3 +18,4 @@
|
|||||||
|
|
||||||
# /src/libthermo/
|
# /src/libthermo/
|
||||||
/src/libthermo/*.P
|
/src/libthermo/*.P
|
||||||
|
|
||||||
|
Binary file not shown.
24
src/ecopcr.c
24
src/ecopcr.c
@ -6,7 +6,7 @@
|
|||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
|
|
||||||
|
|
||||||
#define VERSION "1.0.0"
|
#define VERSION "1.0.1"
|
||||||
|
|
||||||
|
|
||||||
/* ----------------------------------------------- */
|
/* ----------------------------------------------- */
|
||||||
@ -610,13 +610,14 @@ int main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
posj+=o2c->patlen;
|
posj+=o2c->patlen;
|
||||||
// printf("coucou %d %d %d\n",posi,posj,apatseq->seqlen);
|
// printf("coucou %d %d %d\n",posi,posj,apatseq->seqlen);
|
||||||
errj =apatseq->hiterr[1]->val[j];
|
errj = apatseq->hiterr[1]->val[j];
|
||||||
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; // TODO
|
if (circular > 0)
|
||||||
length = posi - posj - 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)))
|
||||||
@ -649,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,11 +669,12 @@ 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) */ TODO ????
|
length = posj - posi + 1 - o2->patlen - o1->patlen; /* - o1->patlen : deleted by <EC> (prior to the OBITools3) */
|
||||||
length = posj - posi - o2->patlen - o1->patlen;
|
else {
|
||||||
if (posj < posi)
|
if (circular > 0)
|
||||||
//length = posj + apatseq->seqlen - posi - o1->patlen - o2->patlen; TODO ????
|
length = posj + apatseq->seqlen - posi - o1->patlen - o2->patlen;
|
||||||
length = posi - posj - o2->patlen - o1->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)))
|
||||||
|
@ -34,14 +34,11 @@ ecorankidx_t *read_rankidx(const char *filename)
|
|||||||
int32_t rank_index(const char* label,ecorankidx_t* ranks)
|
int32_t rank_index(const char* label,ecorankidx_t* ranks)
|
||||||
{
|
{
|
||||||
char **rep;
|
char **rep;
|
||||||
|
fprintf(stderr,"Looking for rank -%s-... ",label);
|
||||||
rep = bsearch(label,ranks->label,ranks->count,sizeof(char*),compareRankLabel);
|
rep = bsearch(label,ranks->label,ranks->count,sizeof(char*),compareRankLabel);
|
||||||
|
|
||||||
if (rep)
|
if (rep)
|
||||||
return rep-ranks->label;
|
return rep-ranks->label;
|
||||||
else
|
|
||||||
ECOERROR(ECO_NOTFOUND_ERROR,"Rank label not found");
|
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -341,6 +341,9 @@ ecotx_t *eco_getsuperkingdom(ecotx_t *taxon,
|
|||||||
if (taxonomy && tax!=taxonomy)
|
if (taxonomy && tax!=taxonomy)
|
||||||
{
|
{
|
||||||
rankindex = rank_index("superkingdom",taxonomy->ranks);
|
rankindex = rank_index("superkingdom",taxonomy->ranks);
|
||||||
|
if (rankindex < 0) {
|
||||||
|
rankindex = rank_index("domain",taxonomy->ranks);
|
||||||
|
}
|
||||||
tax=taxonomy;
|
tax=taxonomy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user