mirror of
https://github.com/msberends/AMR.git
synced 2025-07-12 23:41:57 +02:00
(v1.4.0.9040) LA-MRSA / CA-MRSA
This commit is contained in:
3
R/amr.R
3
R/amr.R
@ -66,6 +66,7 @@
|
||||
#' Post Office Box 30001 \cr
|
||||
#' 9700 RB Groningen \cr
|
||||
#' The Netherlands
|
||||
#' <https://msberends.github.io/AMR/>
|
||||
#'
|
||||
#' If you have found a bug, please file a new issue at: \cr
|
||||
#' <https://github.com/msberends/AMR/issues>
|
||||
@ -73,7 +74,7 @@
|
||||
#' @rdname AMR
|
||||
NULL
|
||||
|
||||
#' Plotting for classes `rsi` and `disk`
|
||||
#' Plotting for classes `rsi`, `mic` and `disk`
|
||||
#'
|
||||
#' Functions to print classes of the `AMR` package.
|
||||
#' @inheritSection lifecycle Stable lifecycle
|
||||
|
@ -636,14 +636,18 @@ eucast_rules <- function(x,
|
||||
ab_name_base <- ab_name(cols_ab[ab_enzyme[i, ]$base_ab], language = NULL, tolower = TRUE)
|
||||
ab_name_enzyme <- ab_name(cols_ab[ab_enzyme[i, ]$ab], language = NULL, tolower = TRUE)
|
||||
|
||||
# Set base to R where base + enzyme inhibitor is R
|
||||
# Set base to R where base + enzyme inhibitor is R ----
|
||||
rule_current <- paste0("Set ", ab_name_base, " (", cols_ab[ab_enzyme[i, ]$base_ab], ") = R where ",
|
||||
ab_name_enzyme, " (", cols_ab[ab_enzyme[i, ]$ab], ") = R")
|
||||
cat(word_wrap(rule_current))
|
||||
if (info == TRUE) {
|
||||
cat(word_wrap(rule_current))
|
||||
cat("\n")
|
||||
}
|
||||
run_changes <- edit_rsi(x = x,
|
||||
col_mo = col_mo,
|
||||
to = "R",
|
||||
rule = c(rule_current, "Other rules", "", paste0("Non-EUCAST: AMR package v", utils::packageDescription("AMR")$Version)),
|
||||
rule = c(rule_current, "Other rules", "",
|
||||
paste0("Non-EUCAST: AMR package v", utils::packageDescription("AMR")$Version)),
|
||||
rows = which(as.rsi_no_warning(x[, cols_ab[ab_enzyme[i, ]$ab]]) == "R"),
|
||||
cols = cols_ab[ab_enzyme[i, ]$base_ab],
|
||||
last_verbose_info = verbose_info,
|
||||
@ -664,16 +668,18 @@ eucast_rules <- function(x,
|
||||
n_changed <- 0
|
||||
}
|
||||
|
||||
# Set base + enzyme inhibitor to S where base is S
|
||||
# Set base + enzyme inhibitor to S where base is S ----
|
||||
rule_current <- paste0("Set ", ab_name_enzyme, " (", cols_ab[ab_enzyme[i, ]$ab], ") = S where ",
|
||||
ab_name_base, " (", cols_ab[ab_enzyme[i, ]$base_ab], ") = S")
|
||||
if (info == TRUE) {
|
||||
cat(word_wrap(rule_current))
|
||||
cat("\n")
|
||||
}
|
||||
run_changes <- edit_rsi(x = x,
|
||||
col_mo = col_mo,
|
||||
to = "S",
|
||||
rule = c(rule_current, "Other rules", "", paste0("Non-EUCAST: AMR package v", utils::packageDescription("AMR")$Version)),
|
||||
rule = c(rule_current, "Other rules", "",
|
||||
paste0("Non-EUCAST: AMR package v", utils::packageDescription("AMR")$Version)),
|
||||
rows = which(as.rsi_no_warning(x[, cols_ab[ab_enzyme[i, ]$base_ab]]) == "S"),
|
||||
cols = cols_ab[ab_enzyme[i, ]$ab],
|
||||
last_verbose_info = verbose_info,
|
||||
|
10
R/mo.R
10
R/mo.R
@ -677,17 +677,17 @@ exec_as.mo <- function(x,
|
||||
|
||||
# translate known trivial abbreviations to genus + species ----
|
||||
if (toupper(x_backup_without_spp[i]) %in% c("MRSA", "MSSA", "VISA", "VRSA", "BORSA")
|
||||
| x_backup_without_spp[i] %like_case% " (mrsa|mssa|visa|vrsa) ") {
|
||||
| x_backup_without_spp[i] %like_case% "(^| )(mrsa|mssa|visa|vrsa|borsa|la-?mrsa|ca-?mrsa)( |$)") {
|
||||
x[i] <- lookup(fullname == "Staphylococcus aureus", uncertainty = -1)
|
||||
next
|
||||
}
|
||||
if (toupper(x_backup_without_spp[i]) %in% c("MRSE", "MSSE")
|
||||
| x_backup_without_spp[i] %like_case% " (mrse|msse) ") {
|
||||
| x_backup_without_spp[i] %like_case% "(^| )(mrse|msse)( |$)") {
|
||||
x[i] <- lookup(fullname == "Staphylococcus epidermidis", uncertainty = -1)
|
||||
next
|
||||
}
|
||||
if (toupper(x_backup_without_spp[i]) == "VRE"
|
||||
| x_backup_without_spp[i] %like_case% " vre "
|
||||
| x_backup_without_spp[i] %like_case% "(^| )vre "
|
||||
| x_backup_without_spp[i] %like_case% "(enterococci|enterokok|enterococo)[a-z]*?$") {
|
||||
x[i] <- lookup(genus == "Enterococcus", uncertainty = -1)
|
||||
next
|
||||
@ -711,7 +711,7 @@ exec_as.mo <- function(x,
|
||||
next
|
||||
}
|
||||
if (toupper(x_backup_without_spp[i]) == "MRPA"
|
||||
| x_backup_without_spp[i] %like_case% " mrpa ") {
|
||||
| x_backup_without_spp[i] %like_case% "(^| )mrpa( |$)") {
|
||||
# multi resistant P. aeruginosa
|
||||
x[i] <- lookup(fullname == "Pseudomonas aeruginosa", uncertainty = -1)
|
||||
next
|
||||
@ -722,7 +722,7 @@ exec_as.mo <- function(x,
|
||||
next
|
||||
}
|
||||
if (toupper(x_backup_without_spp[i]) %in% c("PISP", "PRSP", "VISP", "VRSP")
|
||||
| x_backup_without_spp[i] %like_case% " (pisp|prsp|visp|vrsp) ") {
|
||||
| x_backup_without_spp[i] %like_case% "(^| )(pisp|prsp|visp|vrsp)( |$)") {
|
||||
# peni I, peni R, vanco I, vanco R: S. pneumoniae
|
||||
x[i] <- lookup(fullname == "Streptococcus pneumoniae", uncertainty = -1)
|
||||
next
|
||||
|
Reference in New Issue
Block a user