Patch taxon example/counterexample selection
git-svn-id: https://www.grenoble.prabi.fr/svn/LECASofts/ecoPrimers/trunk@237 60f365c0-8329-0410-b2a4-ec073aeeaa1d
This commit is contained in:
@ -458,7 +458,7 @@ void updateseqparams (pecodnadb_t seqdb, uint32_t seqdbsize, ecotaxonomy_t *taxo
|
|||||||
|
|
||||||
for (i=0;i<seqdbsize;i++)
|
for (i=0;i<seqdbsize;i++)
|
||||||
{
|
{
|
||||||
seqdb[i]->isexample=isGoodTaxon(taxonomy,seqdb[i]->taxid,options);
|
seqdb[i]->isexample=isExampleTaxon(taxonomy,seqdb[i]->taxid,options);
|
||||||
if (seqdb[i]->isexample)
|
if (seqdb[i]->isexample)
|
||||||
(*insamples)++;
|
(*insamples)++;
|
||||||
else
|
else
|
||||||
|
@ -12,7 +12,7 @@ int isGoodTaxon(ecotaxonomy_t *taxonomy,int32_t taxon,poptions_t options)
|
|||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
result=( (options->r == 0) || (eco_is_taxid_included(taxonomy,
|
result=((options->r == 0) || (eco_is_taxid_included(taxonomy,
|
||||||
options->restricted_taxid,
|
options->restricted_taxid,
|
||||||
options->r,
|
options->r,
|
||||||
taxonomy->taxons->taxon[taxon].taxid)
|
taxonomy->taxons->taxon[taxon].taxid)
|
||||||
@ -34,6 +34,11 @@ int isExampleTaxon(ecotaxonomy_t *taxonomy,int32_t taxon,poptions_t options)
|
|||||||
options->restricted_taxid,
|
options->restricted_taxid,
|
||||||
options->r,
|
options->r,
|
||||||
taxonomy->taxons->taxon[taxon].taxid)
|
taxonomy->taxons->taxon[taxon].taxid)
|
||||||
|
)) &&
|
||||||
|
((options->e == 0) || !(eco_is_taxid_included(taxonomy,
|
||||||
|
options->exception_taxid,
|
||||||
|
options->e,
|
||||||
|
taxonomy->taxons->taxon[taxon].taxid)
|
||||||
));
|
));
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -47,8 +52,12 @@ int isCounterExampleTaxon(ecotaxonomy_t *taxonomy,int32_t taxon,poptions_t optio
|
|||||||
result=((options->g != 0) && (eco_is_taxid_included(taxonomy,
|
result=((options->g != 0) && (eco_is_taxid_included(taxonomy,
|
||||||
options->ignored_taxid,
|
options->ignored_taxid,
|
||||||
options->g,
|
options->g,
|
||||||
taxonomy->taxons->taxon[taxon].taxid)
|
taxonomy->taxons->taxon[taxon].taxid))
|
||||||
));
|
) || ((options->e != 0) && (eco_is_taxid_included(taxonomy,
|
||||||
|
options->exception_taxid,
|
||||||
|
options->e,
|
||||||
|
taxonomy->taxons->taxon[taxon].taxid))
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -64,7 +64,7 @@ int32_t getrankdbstats(pecodnadb_t seqdb, uint32_t seqdbsize, ecotaxonomy_t *tax
|
|||||||
for (i=0;i<seqdbsize;i++)
|
for (i=0;i<seqdbsize;i++)
|
||||||
{
|
{
|
||||||
taxon = &(taxonomy->taxons->taxon[seqdb[i]->taxid]);
|
taxon = &(taxonomy->taxons->taxon[seqdb[i]->taxid]);
|
||||||
seqdb[i]->isexample=isGoodTaxon(taxonomy,seqdb[i]->taxid,options);
|
seqdb[i]->isexample=isExampleTaxon(taxonomy,seqdb[i]->taxid,options);
|
||||||
|
|
||||||
tmptaxon = eco_findtaxonatrank(taxon,
|
tmptaxon = eco_findtaxonatrank(taxon,
|
||||||
options->taxonrankidx);
|
options->taxonrankidx);
|
||||||
|
Reference in New Issue
Block a user