MOD: Corrected condition in getSon to handle the root of the taxonomy
git-svn-id: https://www.grenoble.prabi.fr/svn/LECASofts/ecoPCR/trunk@422 60f365c0-8329-0410-b2a4-ec073aeeaa1d
This commit is contained in:
@ -45,6 +45,7 @@ static void printheader(void)
|
||||
"scientific name");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* display son's list for given taxon
|
||||
**/
|
||||
@ -57,7 +58,8 @@ static void get_son(ecotaxonomy_t *taxonomy, ecotx_t *taxon, int32_t *count, cha
|
||||
i < taxonomy->taxons->count;
|
||||
i++, current_taxon++)
|
||||
{
|
||||
if (taxon->taxid == current_taxon->parent->taxid)
|
||||
|
||||
if (taxon != current_taxon && taxon->taxid == current_taxon->parent->taxid)
|
||||
{
|
||||
if (rankname == NULL || !strcmp(rankname,taxonomy->ranks->label[current_taxon->rank]))
|
||||
{
|
||||
|
@ -29,14 +29,14 @@ ecotxidx_t *read_taxonomyidx(const char *filename,const char *filename2)
|
||||
|
||||
index->count=count+count2;
|
||||
|
||||
fprintf(stderr,"Readind %d taxa...\n",count);
|
||||
fprintf(stderr,"Reading %d taxa...\n",count);
|
||||
for (i=0; i < count; i++){
|
||||
readnext_ecotaxon(f,&(index->taxon[i]));
|
||||
index->taxon[i].parent=index->taxon + (int32_t)index->taxon[i].parent;
|
||||
}
|
||||
|
||||
if (count2>0)
|
||||
fprintf(stderr,"Readind %d local taxa...\n",count2);
|
||||
fprintf(stderr,"Reading %d local taxa...\n",count2);
|
||||
else
|
||||
fprintf(stderr,"No local taxon\n");
|
||||
|
||||
|
Reference in New Issue
Block a user