Closed antunderwood closed 4 years ago
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
Looking at the code I believe an additional filter here is required https://github.com/msberends/AMR/blob/4be54d608c5da2efa871046a544cff8f00bd0e6b/data-raw/reproduction_of_rsi_translation.R#L9
filter(HOST=='HUMAN') %>%
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 😉
Great - thank you. How do I install locally. Check out code and devtools build?
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 🙂
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 🙂
Survey completed
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
Ready! You can test the 'new' as.rsi()
😄
Thanks for filling in the survey!
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?
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!
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")
I noticed a peculiarity with interpretation of some CLSI antibiotics
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
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?