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

Interpreting CLSI values (blood) #5

Closed
antunderwood opened this issue Jul 28, 2020 · 12 comments
Closed

Interpreting CLSI values (blood) #5

antunderwood opened this issue Jul 28, 2020 · 12 comments
Labels
bug Something isn't working, labelled wrong or otherwise erroneous

Comments

@antunderwood
Copy link

I noticed a peculiarity with interpretation of some CLSI antibiotics

> data.frame(mo = "E. coli",
+            AMC = 4) %>%
+   as.rsi(guideline = 'CLSI 2019')
NOTE: Using column `mo` as input for `col_mo`.
NOTE: Assuming column `AMC` (amoxicillin/clavulanic acid) contains MIC values.
=> Interpreting MIC values of `AMC` (amoxicillin/clavulanic acid) using guideline CLSI 2019 ... OK.
       mo AMC
1 E. coli   R
> data.frame(mo = "E. coli",
+            AMC = 4) %>%
+   as.rsi(guideline = 'CLSI 2018')
NOTE: Using column `mo` as input for `col_mo`.
NOTE: Assuming column `AMC` (amoxicillin/clavulanic acid) contains MIC values.
=> Interpreting MIC values of `AMC` (amoxicillin/clavulanic acid) using guideline CLSI 2018 ... OK.
       mo AMC
1 E. coli   S
> data.frame(mo = "E. coli",
+            AMC = 4) %>%
+   as.rsi(guideline = 'EUCAST')
NOTE: Using column `mo` as input for `col_mo`.
NOTE: Assuming column `AMC` (amoxicillin/clavulanic acid) contains MIC values.
=> Interpreting MIC values of `AMC` (amoxicillin/clavulanic acid) using guideline EUCAST 2020 ... OK.
       mo AMC
1 E. coli   S

An MIC value of 4 for AMC which I think should be interpreted as sensitive is being interpreted as R for CLSI 2019

I think this is because of row 6 in the table below

> rsi_translation %>% filter(guideline == 'CLSI 2019' & method == 'MIC' & ab == 'AMC')
   guideline method                   site           mo  ab            ref_tbl disk_dose breakpoint_S breakpoint_R   uti
1  CLSI 2019    MIC                   <NA>      B_AGGRG AMC        M45 Table 9      <NA>         4.00            8 FALSE
2  CLSI 2019    MIC                   <NA>      B_ANRSL AMC           Table 2J      <NA>         4.00           16 FALSE
3  CLSI 2019    MIC                   <NA> B_BRKHL_PSDM AMC       M45 Table 21      <NA>         8.00           32 FALSE
4  CLSI 2019    MIC                   <NA>      B_CRDBC AMC        M45 Table 9      <NA>         4.00            8 FALSE
5  CLSI 2019    MIC                   <NA> B_EKNLL_CRRD AMC        M45 Table 9      <NA>         4.00            8 FALSE
6  CLSI 2019    MIC      Skin, soft tissue B_ESCHR_COLI AMC     VET08 Table 2A      <NA>         0.25            1 FALSE
7  CLSI 2019    MIC                    UTI B_ESCHR_COLI AMC     VET08 Table 2A      <NA>         8.00           NA  TRUE
8  CLSI 2019    MIC Skin, soft tissue, UTI B_ESCHR_COLI AMC     VET08 Table 2A      <NA>         0.25            1  TRUE
9  CLSI 2019    MIC                   <NA>      B_HMPHL AMC           Table 2E      <NA>         4.00            8 FALSE
10 CLSI 2019    MIC                   <NA>      B_KGLLA AMC        M45 Table 9      <NA>         4.00            8 FALSE
11 CLSI 2019    MIC                   <NA> B_MRXLL_CTRR AMC       M45 Table 16      <NA>         4.00            8 FALSE
12 CLSI 2019    MIC                   <NA>      B_PSTRL AMC       M45 Table 17      <NA>         0.50           NA FALSE
13 CLSI 2019    MIC Skin, soft tissue, UTI B_PSTRL_MLTC AMC     VET08 Table 2H      <NA>         0.25            1  TRUE
14 CLSI 2019    MIC                   <NA>      B_STPHY AMC           Table 2C      <NA>         4.00            8 FALSE
15 CLSI 2019    MIC      Skin, soft tissue      B_STPHY AMC     VET08 Table 2C      <NA>         0.25            1 FALSE
16 CLSI 2019    MIC                    UTI      B_STPHY AMC     VET08 Table 2C      <NA>         8.00           NA  TRUE
17 CLSI 2019    MIC Skin, soft tissue, UTI      B_STPHY AMC     VET08 Table 2C      <NA>         0.25            1  TRUE
18 CLSI 2019    MIC                   <NA>      B_STRPT AMC         Table 2H-1      <NA>           NA           NA FALSE
19 CLSI 2019    MIC Skin, soft tissue, UTI      B_STRPT AMC     VET08 Table 2D      <NA>         0.25            1  TRUE
20 CLSI 2019    MIC         Non-meningitis B_STRPT_PNMN AMC           Table 2G      <NA>         2.00            8 FALSE
21 CLSI 2019    MIC                   <NA>      B_VIBRI AMC       M45 Table 20      <NA>         8.00           32 FALSE
22 CLSI 2019    MIC                   <NA>      UNKNOWN AMC Generic CLSI rules   20-10ug         8.00           32 FALSE

This should not be used for bacteraemia, only skin and soft tissue. Is there any way to exclude these and only include interpretations for blood?

@antunderwood
Copy link
Author

In addition looking at the https://github.com/msberends/AMR/blob/master/data-raw/DRGLST1.xlsx table I think the values here are for animals
image

@antunderwood
Copy link
Author

Looking at the code I believe an additional filter here is required

filter(GUIDELINES %like% "^(CLSI|EUCST)") %>%

filter(HOST=='HUMAN') %>%

@msberends msberends added the bug Something isn't working, labelled wrong or otherwise erroneous label Jul 29, 2020
@msberends
Copy link
Owner

msberends commented Jul 29, 2020

Nice catch! I removed all animal records from the file, and now:

data.frame(mo = "E. coli",
           AMC = 4) %>%
  as.rsi(guideline = "CLSI 2019")
#> NOTE: Using column `mo` as input for `col_mo`.
#> NOTE: Assuming column `AMC` (amoxicillin/clavulanic acid) contains MIC values.
#> => Interpreting MIC values of `AMC` (amoxicillin/clavulanic acid) using guideline CLSI 2019 ... OK.
#>        mo AMC
#> 1 E. coli   S

I'm running checks now and will then upload it to the master branch. I'll let you know when it's done!

You're just in time, I was about to release a new version to CRAN! So if you can confirm this is fixed, I will 😉

@antunderwood
Copy link
Author

Great - thank you.
How do I install locally. Check out code and devtools build?

@msberends
Copy link
Owner

No, just do:

remotes::install_github("msberends/AMR")

It will install the latest beta version to your computer and then you can just run your code again (you might need to refresh your R session). But this issue is not yet fixed, I'm now also fixing your other issue in one go 🙂

@msberends
Copy link
Owner

📋 Please take part in our survey!

Now you're at it, please fill in our short questionnaire! You can fill it in completely anonymously. If you know others using this AMR package, please ask them to fill it in too.

Your valuable input will help to improve the package and its functionalities 🙂

@antunderwood
Copy link
Author

Survey completed

@antunderwood
Copy link
Author

No, just do:

remotes::install_github("msberends/AMR")

It will install the latest beta version to your computer and then you can just run your code again (you might need to refresh your R session). But this issue is not yet fixed, I'm now also fixing your other issue in one go 🙂

Let me know when it's ready for testing

@msberends
Copy link
Owner

Ready! You can test the 'new' as.rsi() 😄

Thanks for filling in the survey!

@antunderwood
Copy link
Author

antunderwood commented Jul 29, 2020

Sorry for the late reply. Was checking out my comparison and it's much improved. The fixes for human only and the conserve_capped_values work a treat.

I was running into some more discrepancies.

It turns out that exports from Vitek have values such as <=.25 (i.e with no leading 0). as.mic can't interpret this and converts the value to NA

I can solve this by transforming my dataframe as follows

 dplyr::mutate(across(-c(id,Species), str_replace, "([<>]=*)\\.", "\\10.")) 

would you consider making a modification to the as.mic function to accommodate this? Should I raise a new issue?

@msberends
Copy link
Owner

No problem about the late reply, wasn’t that late!

Using across() already, nice 😜

Sure thing, I’ll fix it in the morning. New issue would be best, I’ll handle it. Many thanks again!

@msberends
Copy link
Owner

Fix released to official R repository

Just a small notice: we released a new software version, containing the fix to this issue. Please update your version using either the user interface of your software, or by running:

install.packages("AMR")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working, labelled wrong or otherwise erroneous
Projects
None yet
Development

No branches or pull requests

2 participants