msberends / AMR

Functions to simplify and standardise antimicrobial resistance (AMR) data analysis and to work with microbial and antimicrobial properties by using evidence-based methods, as described in https://doi.org/10.18637/jss.v104.i03.
https://msberends.github.io/AMR/
Other
83 stars 12 forks source link

`as.mo()`: give preference to species if subspecies is non-existent #152

Closed msberends closed 2 months ago

msberends commented 3 months ago

Now, this happens:

as.mo("Neisseria mucosa sicca")
#> ℹ Microorganism translation was uncertain for "Neisseria mucosa sicca" (assumed Neisseria elongata glycolytica).
#>   Run mo_uncertainties() to review this, or use add_custom_microorganisms() to add custom entries.
#> Class 'mo'
#> [1] B_NESSR_ELNG_GLYC

Instead, you'd expect this:

as.mo("Neisseria mucosa sicca")
#> ℹ Microorganism translation was uncertain for "Neisseria mucosa sicca" (assumed Neisseria mucosa).
#>   Run mo_uncertainties() to review this, or use add_custom_microorganisms() to add custom entries.
#> Class 'mo'
#> [1] B_NESSR_MUCS

Thus, if a subspecies is not in our microorganisms table, prefer the species over some exotic try to find something.