brunobrr / bdc

Check out the vignettes with detailed documentation on each module of the bdc package
https://brunobrr.github.io/bdc
GNU General Public License v3.0
23 stars 7 forks source link

suggested name not found #260

Closed GilbertAlarcon-Cruz closed 6 months ago

GilbertAlarcon-Cruz commented 6 months ago

Hello. Thank you so much for helping me get the bdc_clean_names function to run. I now have another question. After running it and then merging the names as shown in the Taxonomy vignette I then ran: query_names <- bdc_query_names_taxadb( sci_name = CaliforniaBeeCoordinates_Clean$names_clean, replace_synonyms = TRUE, # replace synonyms by accepted names? suggest_names = TRUE, # try to found a candidate name for misspelled names? suggestion_distance = 0.9, # distance between the searched and suggested names db = "gbif", # taxonomic database parallel = FALSE, # should parallel processing be used? ncores = 2, # number of cores to be used in the parallelization process export_accepted = FALSE # save names linked to multiple accepted names ) This function also ran perfectly but I had a question about the output. I noticed that after merging the results there were some bee species that had spelling errors but were not fixed. For example, my original data had an entry labelled "Prostomia rubiflorus". The correct spelling is "Protosmia rubifloris" but after harmonizing the names and merging the results the notes column said that a correct spelling was not found even though it can be found in GBIF: https://www.gbif.org/species/1334783 Do you know why this might happen? Thank you.

lucas-jardim commented 6 months ago

Hi Gilbert,

I suggest you change suggestion_distance to 0.85, and filter the searching names to rank = "Order" and rank_name = "Hymenoptera", you are working only with Hymenoptera. Constraining the search to a rank avoids the returning of similar names of other groups such as fungi and plants or other animals.

x <- bdc_query_names_taxadb("Prostomia rubiflorus", suggestion_distance = 0.85, rank_name = "Hymenoptera", rank = "Order")

See the suggested name is "Protosmia rubifloris". This name has a distance of 0.85 from "Prostomia rubiflorus". The default distance to suggest a name is 0.9. That is why the function was not returning the correct spelling.

Att,

GilbertAlarcon-Cruz commented 6 months ago

Hi Gilbert,

I suggest you change suggestion_distance to 0.85, and filter the searching names to rank = "Order" and rank_name = "Hymenoptera", you are working only with Hymenoptera. Constraining the search to a rank avoids the returning of similar names of other groups such as fungi and plants or other animals.

x <- bdc_query_names_taxadb("Prostomia rubiflorus", suggestion_distance = 0.85, rank_name = "Hymenoptera", rank = "Order")

See the suggested name is "Protosmia rubifloris". This name has a distance of 0.85 from "Prostomia rubiflorus". The default distance to suggest a name is 0.9. That is why the function was not returning the correct spelling.

Att,

That improved the results. Thank you.