Open sckott opened 5 years ago
@sckott Looks like an issue with the ambiguous
flag:
These are equal:
taxizedb::children(3701, db='ncbi', ambiguous=TRUE)
taxize::children(3701, db='ncbi', ambiguous=TRUE)
And so are these:
taxizedb::children(3701, db='ncbi', ambiguous=FALSE)
taxize::children(3701, db='ncbi', ambiguous=FALSE)
But not these:
taxizedb::children(3701, db='ncbi')
taxize::children(3701, db='ncbi')
Judging by the output above, in taxize
the default is ambiguous=TRUE
and in taxizedb
it is ambiguous=FALSE
.
I think something is mixed up on the taxize
side. According to ?taxize::ncbi_children
, ambiguous
is FALSE by default. Yet somewhere the default appears to be overridden.
What do you think about this set of test:
# they agree in the ambiguous case
expect_equal(
taxizedb::children(3701, db='ncbi', ambiguous=TRUE),
taxize::children(3701, db='ncbi', ambiguous=TRUE)
)
# they agree in the unambiguous case
expect_equal(
taxizedb::children(3701, db='ncbi', ambiguous=FALSE),
taxize::children(3701, db='ncbi', ambiguous=FALSE)
)
# the defaults agree
expect_equal(
taxizedb::children(3701, db='ncbi'),
taxize::children(3701, db='ncbi')
)
Currently, the last test fails, but I think the default behavior of taxize
and taxizedb
should be the same.
unarchiving it thanks to @stitam :smile_cat:
the test at https://github.com/ropensci/taxizedb/blob/master/tests/testthat/test-children.R#L10-L13 is failing
I see