mirror of
https://github.com/msberends/AMR.git
synced 2025-07-10 19:01:50 +02:00
breakpoints UTI interpretation fix
This commit is contained in:
@ -427,22 +427,13 @@ mo_pathogenicity <- function(x, language = get_AMR_locale(), keep_synonyms = get
|
||||
kngd <- AMR_env$MO_lookup$kingdom[match(x.mo, AMR_env$MO_lookup$mo)]
|
||||
rank <- AMR_env$MO_lookup$rank[match(x.mo, AMR_env$MO_lookup$mo)]
|
||||
|
||||
out <- factor(
|
||||
ifelse(prev == 1 & kngd == "Bacteria" & rank != "genus",
|
||||
"Pathogenic",
|
||||
ifelse(prev < 2 & kngd == "Fungi",
|
||||
"Potentially pathogenic",
|
||||
ifelse(prev == 2 & kngd == "Bacteria",
|
||||
"Non-pathogenic",
|
||||
ifelse(kngd == "Bacteria",
|
||||
"Potentially pathogenic",
|
||||
"Unknown"
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
levels = c("Pathogenic", "Potentially pathogenic", "Non-pathogenic", "Unknown"),
|
||||
ordered = TRUE
|
||||
out <- factor(case_when_AMR(prev == 1 & kngd == "Bacteria" & rank != "genus" ~ "Pathogenic",
|
||||
(prev < 2 & kngd == "Fungi") ~ "Potentially pathogenic",
|
||||
prev == 2 & kngd == "Bacteria" ~ "Non-pathogenic",
|
||||
kngd == "Bacteria" ~ "Potentially pathogenic",
|
||||
TRUE ~ "Unknown"),
|
||||
levels = c("Pathogenic", "Potentially pathogenic", "Non-pathogenic", "Unknown"),
|
||||
ordered = TRUE
|
||||
)
|
||||
|
||||
load_mo_uncertainties(metadata)
|
||||
|
Reference in New Issue
Block a user