mirror of https://github.com/msberends/AMR.git
fixes
This commit is contained in:
parent
a4e2e25e3f
commit
1b499bf012
|
@ -1,5 +1,5 @@
|
|||
Package: AMR
|
||||
Version: 2.0.0.9030
|
||||
Version: 2.0.0.9031
|
||||
Date: 2023-07-10
|
||||
Title: Antimicrobial Resistance Data Analysis
|
||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||
|
|
2
NEWS.md
2
NEWS.md
|
@ -1,4 +1,4 @@
|
|||
# AMR 2.0.0.9030
|
||||
# AMR 2.0.0.9031
|
||||
|
||||
## New
|
||||
* Clinical breakpoints and intrinsic resistance of EUCAST 2023 and CLSI 2023 have been added for `as.sir()`. EUCAST 2023 (v13.0) is now the new default guideline for all MIC and disks diffusion interpretations
|
||||
|
|
11
R/plot.R
11
R/plot.R
|
@ -763,6 +763,12 @@ plot_name_of_I <- function(guideline) {
|
|||
|
||||
plot_colours_subtitle_guideline <- function(x, mo, ab, guideline, colours_SIR, fn, language, method, breakpoint_type, include_PKPD, ...) {
|
||||
guideline <- get_guideline(guideline, AMR::clinical_breakpoints)
|
||||
|
||||
# store previous interpretations to backup
|
||||
sir_history <- AMR_env$sir_interpretation_history
|
||||
# and clear previous interpretations
|
||||
AMR_env$sir_interpretation_history <- AMR_env$sir_interpretation_history[0, , drop = FALSE]
|
||||
|
||||
if (!is.null(mo) && !is.null(ab)) {
|
||||
# interpret and give colour based on MIC values
|
||||
mo <- as.mo(mo)
|
||||
|
@ -770,11 +776,6 @@ plot_colours_subtitle_guideline <- function(x, mo, ab, guideline, colours_SIR, f
|
|||
ab <- as.ab(ab)
|
||||
abname <- ab_name(ab, language = language)
|
||||
|
||||
# store previous interpretations to backup
|
||||
sir_history <- AMR_env$sir_interpretation_history
|
||||
# and clear previous interpretations
|
||||
AMR_env$sir_interpretation_history <- AMR_env$sir_interpretation_history[0, , drop = FALSE]
|
||||
|
||||
sir <- suppressWarnings(suppressMessages(as.sir(fn(names(x)), mo = mo, ab = ab, guideline = guideline, include_screening = FALSE, include_PKPD = include_PKPD, breakpoint_type = breakpoint_type, ...)))
|
||||
guideline_txt <- guideline
|
||||
if (all(is.na(sir))) {
|
||||
|
|
13
R/sir.R
13
R/sir.R
|
@ -911,11 +911,12 @@ as_sir_method <- function(method_short,
|
|||
msgs <- character(0)
|
||||
if (nrow(breakpoints) == 0) {
|
||||
# apparently no breakpoints found
|
||||
msg_note(paste0(
|
||||
"No ", method_coerced, " breakpoints available for ",
|
||||
suppressMessages(suppressWarnings(ab_name(ab_coerced, language = NULL, tolower = TRUE))),
|
||||
" (", ab_coerced, ")"
|
||||
))
|
||||
message(
|
||||
paste0(font_rose_bg(" WARNING "), "\n"),
|
||||
font_black(paste0(" ", AMR_env$bullet_icon, " No ", method_coerced, " breakpoints available for ",
|
||||
suppressMessages(suppressWarnings(ab_name(ab_coerced, language = NULL, tolower = TRUE))),
|
||||
" (", ab_coerced, ")")))
|
||||
|
||||
load_mo_uncertainties(metadata_mo)
|
||||
return(rep(NA_sir_, nrow(df)))
|
||||
}
|
||||
|
@ -1090,7 +1091,7 @@ as_sir_method <- function(method_short,
|
|||
message_(intro_txt, appendLF = FALSE, as_note = FALSE)
|
||||
}
|
||||
if (isTRUE(rise_warning)) {
|
||||
message(font_rose_bg(" * WARNING *"))
|
||||
message(font_rose_bg(" WARNING "))
|
||||
} else if (length(msgs) == 0) {
|
||||
message(font_green_bg(" OK "))
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue