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

strange results for P. aer when using BRMO-guideline within MDRO() #21

Closed
jukkiebah opened this issue Jan 13, 2021 · 7 comments
Closed
Labels
bug Something isn't working, labelled wrong or otherwise erroneous

Comments

@jukkiebah
Copy link

jukkiebah commented Jan 13, 2021

Hai

When i use the mdro() function with the dutch wip-brmo guidelines (or when using the equivalent brmo() function), I get strange results for my Pseudomonas aeruginosa isolates:
A portion (~8%, n=1080 isolates) are labeled MDRO/BRMO positive, the rest is negative.
However the positive isolates have reason ‘not covered by BRMO guideline ", and in results for non-susceptible it says “” (aka the string is empy). I am not entirely sure if these are labeled correctly, so I want to be able to see which antibiotics are labeled by the algoritm as non-susceptible. These isolates are covered by the guideline, so I think there is a mistake in there somewhere.
Thanks!

@msberends
Copy link
Owner

Can you share a couple of rows that should have been flagged?

E.g., using

df %>%
  # this assumes dplyr 1.0.0 or later and
  # that your mo column is named 'microorganism':
  select(microorganism, where(is.rsi)) %>%
  saveRDS("psae.rds")

And then uploading psae.rds here?

@msberends
Copy link
Owner

Or any other way I can see some antibiotic results 😃

Can also be plain text. Don't put too much effort into it, I can work with any bunch of text or data.

@jukkiebah
Copy link
Author

Thank you!

hereby:

psae.feather.zip

@msberends
Copy link
Owner

Alright, I could reproduce it:

# AMR 1.5.0
# dplyr 1.0.2
# cleaner 1.5.1 - for freq()

psae <- arrow::read_feather("/Users/msberends/Downloads/psae.feather")
psae2 <- psae %>%
  mutate(Microbe_ID = as.mo(Microbe_ID)) %>%
  mutate_if(is.rsi.eligible, as.rsi) %>%
  rename_with(as.ab, where(is.rsi)) %>% 
  filter(mo_genus() == "Pseudomonas",
         mo_species() == "aeruginosa")

nrow(psae2)
#> [1] 15872

psae2 %>% mutate(brmo = brmo())
#> NOTE: Using column 'Microbe_ID' as input for `col_mo`.
#> NOTE: Auto-guessing columns suitable for analysis (using only the first 10,000 rows)... OK.
#> 
#> Only results with 'R' are considered as resistance. Use `combine_SI = FALSE` to also consider 'I' as resistance.
#> 
#> Determining multidrug-resistant organisms (MDRO), according to:
#> Guideline: WIP-Richtlijn Bijzonder Resistente Micro-organismen (BRMO)
#> Author(s): RIVM (Rijksinstituut voor de Volksgezondheid)
#> Version:   Revision as of December 2017
#> Source:    https://www.rivm.nl/Documenten_en_publicaties/Professioneel_Praktisch/Richtlijnen/Infectieziekten/WIP_Richtlijnen/WIP_Richtlijnen/Ziekenhuizen/WIP_richtlijn_BRMO_Bijzonder_Resistente_Micro_Organismen_ZKH
#> 
#> => Found 1080 BRMOs out of 15872 isolates (6.8%)

verbose <- brmo(psae2, verbose = TRUE)
freq(verbose$reason)
#> Frequency table 
#> 
#> Class:      character
#> Length:     15,872
#> Available:  15,872 (100%, NA: 0 = 0%)
#> Unique:     2
#> 
#> Shortest:   25
#> Longest:    29
#> 
#>      Item                             Count   Percent   Cum. Count   Cum. Percent
#> ---  ------------------------------  ------  --------  -----------  -------------
#> 1    too few antibiotics are R        14792    93.20%        14792         93.20%
#> 2    not covered by BRMO guideline     1080     6.80%        15872        100.00%

Where it says 'too few antibiotics are R', this should of course not be the case. Also found the reason - the 'reason' field was not being set in P. aeruginosa in the Dutch guideline. It also applied to the German guideline.

This is now fixed (still have to upload the fix):

psae2 %>% 
  slice(1:15) %>% # only first 15 rows
  brmo(verbose = TRUE)
row_number Microbe_ID MDRO reason columns_nonsusceptible
1 B_PSDMN_AERG Negative too few antibiotics are R
2 B_PSDMN_AERG Negative too few antibiotics are R
3 B_PSDMN_AERG Negative too few antibiotics are R
4 B_PSDMN_AERG Negative too few antibiotics are R
5 B_PSDMN_AERG Negative too few antibiotics are R
6 B_PSDMN_AERG Negative too few antibiotics are R
7 B_PSDMN_AERG Positive at least 3 classes contain R CAZ, CIP, MEM, TZP
8 B_PSDMN_AERG Negative too few antibiotics are R
9 B_PSDMN_AERG Negative too few antibiotics are R
10 B_PSDMN_AERG Negative too few antibiotics are R
11 B_PSDMN_AERG Negative too few antibiotics are R
12 B_PSDMN_AERG Positive at least 3 classes contain R CAZ, CIP, MEM
13 B_PSDMN_AERG Positive at least 3 classes contain R CAZ, CIP, TZP
14 B_PSDMN_AERG Negative too few antibiotics are R
15 B_PSDMN_AERG Negative too few antibiotics are R

@msberends
Copy link
Owner

Many thanks for catching this bug!!

@msberends msberends added the bug Something isn't working, labelled wrong or otherwise erroneous label Jan 15, 2021
@jukkiebah
Copy link
Author

jukkiebah commented Jan 16, 2021 via email

@msberends
Copy link
Owner

Sure, great idea. Let’s have the discussion in #23.

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