-
Notifications
You must be signed in to change notification settings - Fork 12
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
uti argument in as.sir not working as expected #141
Comments
I think my issue was using |
Definitely something to improve! I was just working on it the other week. Which version of the package did you use? |
I updated to v2.1.1 today so it should be latest release! |
It is, but you might be interested in our latest beta version that is all about veterinary medicine :) Please read this: https://msberends.github.io/AMR/news/index.html You can now set animal species! Supports 20 languages. I’m curious if this solves your problem with uti as well. You can try the latest version using: install.packages("AMR", repos = "https://msberends.r-universe.dev/") Would be awesome if you could let me know if this revamped approach works for you! |
Oh I missed that v2.1.1.9015 wasn't on CRAN yet. Thanks for letting me know - I will try it out! |
Yes and no. As I thought, the When using as.sir(data, ...) it does still seem to try and interpret other columns, but at least it doesn't seem to affect the output as far as I can tell. |
The more I use this argument, the harder I find it is to get consistent behaviour from it but I think I may have found the problem. I've created a minimal example dataset attached. minimal_reproducible_example.csv With this minimal example, if you run It seems to be that the breakpoints do not get applied correctly to each host if there are multiple. For example, using this dataset, the above as.sir function will correctly identify dog urine isolates as S or R. Once you include isolate 33 which is a cat, they all seem to become resistant. The canine and feline breakpoints should be the same for AMP and E. coli, so I did some digging into the clinical_breakpoints dataset and it does not actually have the feline uncomplicated UTI breakpoint for AMP, even though it is in the CLSI VET01 2023 guidelines. Therefore, I think it is blanket applying the soft tissue breakpoint for cats, to both the cat and dog isolates, rendering them all resistant. |
Wow, thanks so much for your time! Consistent behaviour is the most important thing, so some bits must be changed in the functions, no doubt about that.
This is also a very important thing, I need to check why this is the case. Are you not getting notes that dogs breakpoints are being used? |
It does, but it seems to default to the soft tissue breakpoints, rendering urine cultures resistant. |
Closing as part of wider issue in #142 |
This is for veterinary data using CLSI 2023 guidelines. I have a dataframe with a list of MICs for a variety of antimicrobials and a column labelled "specimen" which has the body site, including some "urine" samples.
I am having several issues with the uti argument as follows:
uti = TRUE
, all are interpreted with urine breakpoints regardless of the site specified.dataset %>% mutate_if(is.mic, as.sir, guideline = "CLSI", breakpoint_type = "animal", host = "host", col_mo = "organism_name", uti = "urine")
), like the example given on the as.sir documentation (https://msberends.github.io/AMR/reference/as.sir.html), I get this errorargument uti must be TRUE or FALSE, i.e. not be a text string
The text was updated successfully, but these errors were encountered: