Closed theanita1 closed 1 year ago
Hi Anita,
Oops, that’s indeed unintended! I’ll look into it. Thanks for sharing!
Hi Matthijs
Update, was having a play around with the code and tried out "uti = NULL" in my above as.sir transformation code, and for some antibiotics it gives the warning "Breakpoints for UTI and non-UTI available for tobramycin (TOB) in Serratia ureilytica - assuming non-UTI. Use argument uti to set which isolates are from urine. See ?as.sir" These abx are: CRO, CXM, FOS, GEN, and TOB
Where as others continue to give the same warning as mentioned above. Those abx are: CIP, CZO, LVX, LEX, MEC, NIT, NOR, and TMP
Thought I'd mention this as maybe there's a difference in the coding for these abx
UTI were not considered well, I also fixed this. Will be on GitHub today somewhere!
Thanks for all the info, greatly helps!!
The development version nows contains the fix to this issue. You can try the latest version using:
install.packages("remotes") # if you haven't already
remotes::install_github("msberends/AMR")
Hi Matthijs
Wow, so much faster!
Slightly major problem - none of my Enterobacterales are converting to SIRs but instead just throwing NAs. And this isn't just those that have UTI site descriptions, I mean all of them. Everything is now NA.
Also some of the Staphs are broken -the only ones that worked are clindamycin, gentamicin, penicillin and teicoplanin
Sorry to be the bearer of bad news
Oh no! I’ll try to fix this today, so you can make your annual report in time :)
It’s 6:52 AM in the Netherlands now, so I’m hopping on the train in a moment and will check this morning.
I could reproduce the problem:
as.sir(random_mic(10), ab = "gent", mo = "E. coli", guideline = "EUCAST 2022", include_PKPD = FALSE)
#> Interpreting MIC values: 'gent' (GEN, gentamicin), EUCAST 2022... OK
#> Class 'sir'
#> [1] <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA>
as.sir(random_mic(10), ab = "gent", mo = "Enterobacterales", guideline = "EUCAST 2022", include_PKPD = FALSE)
#> Interpreting MIC values: 'gent' (GEN, gentamicin), EUCAST 2022... NOTE
#> • Breakpoints for UTI and non-UTI available for gentamicin
#> (GEN) in Enterobacterales - assuming an unspecified body
#> site. Use argument uti to set which isolates are from
#> urine. See ?as.sir.
#> Class 'sir'
#> [1] R R R R S R S S S S
So the breakpoints work, but E. coli is not understood as a species within the order of Enterobacterales. I think this is a small error, I’m working on it today.
I've also got uti = F in my codes
I'm not using "Enterobacterales" as the organism, I'm using the 'mo' chr codes
Yes, I would expect that, and it should work. I just proved to myself that the clinical breakpoint itself (which is for all Enterobacterales) is working, but not for its lower taxonomy, such as E. coli. Normally, all lower species must take this breakpoint, but that last part is broken.
Sorry for the inconvenience!
I found and fixed the error, it was a silly mistake. It checked the microorganisms data set for the wrong column to look up taxonomic properties. Should be fixed now!
Please check it again with your data, also the plot in #119 (which was caused by the same silliness).
The interpretation was much slower this time but no errors and only notes for the specific meningitis sites (which doesn't effect my data set) And for the MIC plots (#119) it looks great - the gentamicin is grey and the tobramycin has interpreted according to "pseudo" Thanks heaps for the quick replies and fixes!
Hi Matthijs
Since the update the program is assuming TRUE for uti, despite having both specific code to the contrary and I created a column titled "uti" with all fields saying "FALSE"
here is my current conversion code: agar<- agar %>% mutate_if(is.mic, as.sir, add_intrinsic_resistance = F, include_PKPD = F, uti = F)
And here is a screenshot with the error:![image](https://user-images.githubusercontent.com/11519951/236979596-a90c422c-d9af-45b8-8526-d18938f38900.png)
Any suggestions?
here is a subset of my data (in MICs) so you could try and see agar_MIC_2.csv