-
Notifications
You must be signed in to change notification settings - Fork 3
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 not handling cases where a taxa is flagged as having a homonym issue #200
Comments
Thanks for reaching out. I was able to replicate this error and there does appear to be something wrong with how At this point, I'm not sure why this is, but I first wanted to offer one solution: Adding additional search information like authorship to your search can help return the correct results. On the ALA, the name authorship is attributed to F.Muell. Adding this information to your text search returns the correct result: library(galah)
library(tibble)
search_taxa("Acanthocladium F.Muell")
#> # A tibble: 1 × 13
#> search_term scientific_name scientific_name_auth…¹ taxon_concept_id rank
#> <chr> <chr> <chr> <chr> <chr>
#> 1 Acanthocladium … Acanthocladium F.Muell. https://id.biod… genus
#> # ℹ abbreviated name: ¹scientific_name_authorship
#> # ℹ 8 more variables: match_type <chr>, kingdom <chr>, phylum <chr>,
#> # class <chr>, order <chr>, family <chr>, genus <chr>, issues <chr> And this seems to return an expected, nice, small number in a query too! taxa <- search_taxa("Acanthocladium F.Muell")
galah_call() |>
identify(taxa) |>
atlas_counts()
#> # A tibble: 1 × 1
#> count
#> <int>
#> 1 128 |
Great! thanks for the workaround! |
A couple of points to confirm this problem. First, taxonomic search through BIE shows that the supplied hierarchy is present in ALA: Second,
Ergo I can only conclude that this is a problem with the name-matching algorithm, not with |
Describe the bug
The tibble input is not being parsed properly by
search_taxa
to return the correct taxa_id in the case where there is a Homonym issue with one of the taxa. The help file suggests the tibble input is the right approach for this case but it's not working for me.galah version
1.5.2
To Reproduce
Expected behaviour
It should return the taxa_id for "Acanthocladium" which is the current name for a small daisy genus. The homonym issue is with a moss genus that was formerly (no longer) also called "Acanthocladium".
I expected including
tibble(genus="Acanthocladium", class="Equisetopsida")
would resolve the homonym issue and the correct taxa_id would be returned.Instead of the daisy genus,
![Screenshot 2023-07-07 at 3 57 58 pm](https://private-user-images.githubusercontent.com/5534161/251650507-9ed3229d-5cc9-4785-a421-f76468e7cf46.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NzI4NDYsIm5iZiI6MTczODk3MjU0NiwicGF0aCI6Ii81NTM0MTYxLzI1MTY1MDUwNy05ZWQzMjI5ZC01Y2M5LTQ3ODUtYTQyMS1mNzY0NjhlN2NmNDYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMjM1NTQ2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZTljN2FkYzFjMzRmOTY5ZTE2MGNlODA5YmJlM2RiYzQ1N2YwNzM2NDc1ZDIzMjE4M2VhNTE5NzhmYTNlNjliYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.XaDyNQNNF8fh2U9X_Ka23TKk8brMFLH8RaqbgoYl47I)
search_taxa
returns the taxa_id for Equisetopsida which leads to a large query that then crashes the API.Apologies about the crashes, it took me a while to work out what was going on.
Additional context
This is related to #168 and #194
The text was updated successfully, but these errors were encountered: