Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

search_taxonomy fails to search 'below' informal nodes #86

Closed
mjwestgate opened this issue Aug 18, 2021 · 1 comment
Closed

search_taxonomy fails to search 'below' informal nodes #86

mjwestgate opened this issue Aug 18, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@mjwestgate
Copy link
Collaborator

mjwestgate commented Aug 18, 2021

In version 1.3.0, the following code fails to detect a lot of taxa, apparently because it stops searching at nodes labeled informal or unranked. This leads to some very visible problems, e.g.

search_taxonomy("Animalia", down_to = "class")

....fails to return any of the vertebrate classes, because they are all listed under the informal rank Gnathostomata. This appears to occur because the recursive function inside search_taxonomy (level_down()) checks against find_ranks()before proceeding, and informal is not listed in find_ranks. Suggest allowing level_down to recognise informal nodes.

@mjwestgate mjwestgate added the bug Something isn't working label Aug 18, 2021
@mjwestgate
Copy link
Collaborator Author

This has been addressed with the following steps:

  • allow level_down() to skip past ranks labelled informal or unranked
  • swap level_down from using data.frame to list, enabling data on intermediate nodes to be stored
  • convert resulting object from list to tree using data.tree to allow extraction of richer node-level data
  • swap function name from search_taxonomy to ala_taxonomy for consistency with galah naming conventions for data-returning functions
  • force ala_taxonomy to require object of class ala_id (via select_taxa()) for consistency with with other ala_ functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants