1
0
mirror of https://github.com/msberends/AMR.git synced 2025-12-14 20:30:19 +01:00

fix mo_rank() for 'unknown' MOs

This commit is contained in:
2023-04-20 15:20:41 +02:00
parent 2758615cd0
commit 9148a2dcf4
25 changed files with 1270 additions and 1268 deletions

View File

@@ -178,6 +178,7 @@ breakpoints_new <- breakpoints %>%
site = gsub(".*(UTI|urinary|urine).*", "UTI", SITE_OF_INFECTION, ignore.case = TRUE),
mo,
rank_index = case_when(
is.na(mo_rank(mo)) ~ 6, # for UNKNOWN, B_GRAMN, B_ANAER, B_ANAER-NEG, etc.
mo_rank(mo) %like% "(infra|sub)" ~ 1,
mo_rank(mo) == "species" ~ 2,
mo_rank(mo) == "genus" ~ 3,