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

Possibility of adding EUCAST ECOFF values #102

Closed hkaspersen closed 1 year ago

hkaspersen commented 1 year ago

Hello, and thank you for a great package!

I was wondering if it will be possible in the future to add the ECOFF values from EUCAST as well?

msberends commented 1 year ago

You’re welcome, thanks for using it!

That’s really a great idea! We might be able to retrieve the data from mic.eucast.org, for example: https://mic.eucast.org/search/?search%5Bmethod%5D=mic&search%5Bantibiotic%5D=2&search%5Bspecies%5D=-1&search%5Bdisk_content%5D=-1&search%5Blimit%5D=50

How would you like them to see included in the package? As part of as.sir() so that it can warn about ECOFFs, or e.g. as a separate function?

hkaspersen commented 1 year ago

We would like to use the package to easily update the ECOFFs in our system, and having them in a table like clinical_breakpoints would be very useful, and also in the functions where this table is used it would be nice to be able to select either ECOFFs or clinical breakpoints. A lot of labs in the veterinary world use ECOFFs, so I think this would be a very nice addition to the package!

hkaspersen commented 1 year ago

Also, how often do you update the clinical breakpoints from EUCAST?

msberends commented 1 year ago

We try to update them as soon as they are more widely adopted (e.g. by WHONET) which is often 3-6 months after EUCAST releases them.

It’s hard to incorporate them sooner, since EUCAST only releases manually formatted Excel and PDF files that are useless for converting them to any decent format for machine reading.

Since we had a major software release last month, we were a bit occupied with keeping up :) Let’s hope for an updated release in June/July. CRAN also doesn’t allow releases within ~3 months.

msberends commented 1 year ago

Though I’m wondering, veterinarians use EUCAST too? I know CLSI had animal-specific guidelines, but I wasn’t aware that EUCAST is also used for interpretation in ‘non-humans’ 😄

Is this hard for your field? Or is it generally 1:1 implementable? I can imagine it’s hard for veterinary medicine to find suitable guidelines that are specific enough for your countless use cases.

hkaspersen commented 1 year ago

We use EUCAST ECOFFs for surveillance purposes mostly, and research. I am not directly involved with clinical samples, but I think we use clinical breakpoints in that setting

msberends commented 1 year ago

Hey @hkaspersen, we added ECOFFs to the package. You can use them in this way::

library(AMR)
library(dplyr)

# just quick sample data set
df <- tibble(mo = rep(c("E. coli", "S. aureus"), 10),
             cipro = random_mic(20, ab = "cipro"))

# use as.sir() with ecoff = TRUE:
df %>%
  mutate(cipro_SIR_normal = as.sir(cipro),
         cipro_SIR_ECOFF = as.sir(cipro, ecoff = TRUE))
image

Documentation is here: https://msberends.github.io/AMR/reference/as.sir.html#arguments.

You can set options(AMR_ecoff = TRUE) to always use ECOFF's in the package.

Though it's in test phase, not sure if everything works perfectly.

To install this beta version:

install.packages("remotes") # if you haven't already
remotes::install_github("msberends/AMR")
msberends commented 1 year ago

And you can use sir_interpretation_history() to check which rules were used:

sir_interpretation_history()
#> # A tibble: 50 × 12
#>    datetime            index ab_input ab_guideline mo_input mo_guideline guideline   ref_table method  input outcome breakpoint_S_R
#>    <dttm>              <int> <chr>    <ab>         <chr>    <mo>         <chr>       <chr>     <chr>   <dbl> <sir>   <chr>         
#>  1 2023-06-22 16:28:43     1 cipro    CIP          E. coli  B_ESCHR_COLI EUCAST 2023 ECOFF     MIC     0.01    S     0.064-0.064   
#>  2 2023-06-22 16:28:43     3 cipro    CIP          E. coli  B_ESCHR_COLI EUCAST 2023 ECOFF     MIC     0.025   S     0.064-0.064   
#>  3 2023-06-22 16:28:43     5 cipro    CIP          E. coli  B_ESCHR_COLI EUCAST 2023 ECOFF     MIC    32       R     0.064-0.064   
#>  4 2023-06-22 16:28:43     7 cipro    CIP          E. coli  B_ESCHR_COLI EUCAST 2023 ECOFF     MIC     2       R     0.064-0.064   
#>  5 2023-06-22 16:28:43     9 cipro    CIP          E. coli  B_ESCHR_COLI EUCAST 2023 ECOFF     MIC     0.01    S     0.064-0.064   
#>  6 2023-06-22 16:28:43    11 cipro    CIP          E. coli  B_ESCHR_COLI EUCAST 2023 ECOFF     MIC     0.002   S     0.064-0.064   
#>  7 2023-06-22 16:28:43    13 cipro    CIP          E. coli  B_ESCHR_COLI EUCAST 2023 ECOFF     MIC     0.002   S     0.064-0.064   
#>  8 2023-06-22 16:28:43    15 cipro    CIP          E. coli  B_ESCHR_COLI EUCAST 2023 ECOFF     MIC     0.001   S     0.064-0.064   
#>  9 2023-06-22 16:28:43    17 cipro    CIP          E. coli  B_ESCHR_COLI EUCAST 2023 ECOFF     MIC     8       R     0.064-0.064   
#> 10 2023-06-22 16:28:43    19 cipro    CIP          E. coli  B_ESCHR_COLI EUCAST 2023 ECOFF     MIC     4       R     0.064-0.064   
#> # ℹ 40 more rows
#> # ℹ Use `print(n = ...)` to see more rows
hkaspersen commented 1 year ago

Thank you!