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_taxa() does not find the correct genus for some search terms #194

Open
cjwaite23 opened this issue May 29, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@cjwaite23
Copy link
Contributor

Describe the bug
When using search_taxa(), some genera are not found until including a second word. This bug doesn't happen for many common genera I've tried like Dacelo, but occurs when I try less common genera.

galah version
1.5.2

To Reproduce
Take, for example, the flea genus Ips, the nematode genus Bursaphelenchus, or the flea beetle genus Phyllotreta.
When searched with search_taxa with just the raw character string, an error is returned due to the presence of homonyms.
i.e. set either genus <- "Ips", genus <- "Bursaphelenchus" or genus <- "Phyllotreta".
> search_taxa(genus)
The function returns the message No taxon matches were found for "Phyllotreta" in the selected atlas (Australia)..

To avoid the homonym issue we can try to specify that we wish to search for genus, but again we receive the same message of no taxon matches, but this time without any error or homonym messages/warnings.
> search_taxa(tibble(genus = genus))

However, if we add a space and then any string at all (a species name, "spp." or randomly pressed keys) after the search term here, then the requested genus will be found:
e.g.
> search_taxa(tibble(genus = "Ips spp."))
> search_taxa(tibble(genus = "Bursaphelenchus hunensis"))
> search_taxa(tibble(genus = "Phyllotreta lauyedfvkwusgdfkgv"))

Expected behaviour
While the homonym error is generally expected for some more obscure species and genus names, it is unexpected that a search for the exact correct string when specificed as genus is not enough to identify the correct classification. We would expect that a call of the form search_taxa(tibble(genus = genus)) would work in all instances, not just for select genera. Expected behaviour is observed for bird and other insect genera, for instance search_taxa(tibble(genus = "Dacelo")) and search_taxa(tibble(genus = "Bombus")).

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

1 participant