C: taxonomy: fixed a bug when checking for root node
This commit is contained in:
@ -3549,7 +3549,7 @@ ecotx_t* obi_taxo_get_lca(ecotx_t* taxon1, ecotx_t* taxon2) // TODO could be mo
|
|||||||
next_taxon = current_taxon->parent;
|
next_taxon = current_taxon->parent;
|
||||||
path1[0] = current_taxon;
|
path1[0] = current_taxon;
|
||||||
i=0;
|
i=0;
|
||||||
while (current_taxon != next_taxon) // root node
|
while (current_taxon->taxid != 1) // root node
|
||||||
{
|
{
|
||||||
current_taxon = next_taxon;
|
current_taxon = next_taxon;
|
||||||
next_taxon = current_taxon->parent;
|
next_taxon = current_taxon->parent;
|
||||||
@ -3563,7 +3563,7 @@ ecotx_t* obi_taxo_get_lca(ecotx_t* taxon1, ecotx_t* taxon2) // TODO could be mo
|
|||||||
next_taxon = current_taxon->parent;
|
next_taxon = current_taxon->parent;
|
||||||
path2[0] = current_taxon;
|
path2[0] = current_taxon;
|
||||||
j=0;
|
j=0;
|
||||||
while (current_taxon != next_taxon) // root node
|
while (current_taxon->taxid != 1) // root node
|
||||||
{
|
{
|
||||||
current_taxon = next_taxon;
|
current_taxon = next_taxon;
|
||||||
next_taxon = current_taxon->parent;
|
next_taxon = current_taxon->parent;
|
||||||
|
Reference in New Issue
Block a user