1
0
mirror of https://github.com/msberends/AMR.git synced 2025-09-03 05:04:07 +02:00

(v2.1.1.9126) implemented WISCA! Also added top_n_microorganisms() and fixed Python wrapper

This commit is contained in:
2025-01-26 23:01:17 +01:00
parent 92c4fc0f94
commit 66833b4f5a
46 changed files with 1786 additions and 1842 deletions

View File

@@ -22,128 +22,83 @@
\alias{labels_sir_count}
\title{Plotting Helpers for AMR Data Analysis}
\usage{
scale_x_mic(keep_operators = "edges", mic_range = NULL, drop = FALSE, ...)
scale_x_mic(keep_operators = "edges", mic_range = NULL, drop = FALSE,
...)
scale_y_mic(keep_operators = "edges", mic_range = NULL, drop = FALSE, ...)
scale_y_mic(keep_operators = "edges", mic_range = NULL, drop = FALSE,
...)
scale_colour_mic(keep_operators = "edges", mic_range = NULL, drop = FALSE, ...)
scale_colour_mic(keep_operators = "edges", mic_range = NULL,
drop = FALSE, ...)
scale_fill_mic(keep_operators = "edges", mic_range = NULL, drop = FALSE, ...)
scale_fill_mic(keep_operators = "edges", mic_range = NULL, drop = FALSE,
...)
\method{plot}{mic}(
x,
mo = NULL,
ab = NULL,
guideline = "EUCAST",
main = deparse(substitute(x)),
ylab = translate_AMR("Frequency", language = language),
xlab = translate_AMR("Minimum Inhibitory Concentration (mg/L)", language = language),
colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"),
language = get_AMR_locale(),
expand = TRUE,
\method{plot}{mic}(x, mo = NULL, ab = NULL, guideline = "EUCAST",
main = deparse(substitute(x)), ylab = translate_AMR("Frequency", language
= language),
xlab = translate_AMR("Minimum Inhibitory Concentration (mg/L)", language =
language), colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"),
language = get_AMR_locale(), expand = TRUE,
include_PKPD = getOption("AMR_include_PKPD", TRUE),
breakpoint_type = getOption("AMR_breakpoint_type", "human"),
...
)
breakpoint_type = getOption("AMR_breakpoint_type", "human"), ...)
\method{autoplot}{mic}(
object,
mo = NULL,
ab = NULL,
guideline = "EUCAST",
title = deparse(substitute(object)),
\method{autoplot}{mic}(object, mo = NULL, ab = NULL,
guideline = "EUCAST", title = deparse(substitute(object)),
ylab = translate_AMR("Frequency", language = language),
xlab = translate_AMR("Minimum Inhibitory Concentration (mg/L)", language = language),
colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"),
language = get_AMR_locale(),
expand = TRUE,
xlab = translate_AMR("Minimum Inhibitory Concentration (mg/L)", language =
language), colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"),
language = get_AMR_locale(), expand = TRUE,
include_PKPD = getOption("AMR_include_PKPD", TRUE),
breakpoint_type = getOption("AMR_breakpoint_type", "human"),
...
)
breakpoint_type = getOption("AMR_breakpoint_type", "human"), ...)
\method{fortify}{mic}(object, ...)
\method{plot}{disk}(
x,
main = deparse(substitute(x)),
\method{plot}{disk}(x, main = deparse(substitute(x)),
ylab = translate_AMR("Frequency", language = language),
xlab = translate_AMR("Disk diffusion diameter (mm)", language = language),
mo = NULL,
ab = NULL,
guideline = "EUCAST",
mo = NULL, ab = NULL, guideline = "EUCAST",
colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"),
language = get_AMR_locale(),
expand = TRUE,
language = get_AMR_locale(), expand = TRUE,
include_PKPD = getOption("AMR_include_PKPD", TRUE),
breakpoint_type = getOption("AMR_breakpoint_type", "human"),
...
)
breakpoint_type = getOption("AMR_breakpoint_type", "human"), ...)
\method{autoplot}{disk}(
object,
mo = NULL,
ab = NULL,
title = deparse(substitute(object)),
ylab = translate_AMR("Frequency", language = language),
xlab = translate_AMR("Disk diffusion diameter (mm)", language = language),
guideline = "EUCAST",
colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"),
language = get_AMR_locale(),
expand = TRUE,
\method{autoplot}{disk}(object, mo = NULL, ab = NULL,
title = deparse(substitute(object)), ylab = translate_AMR("Frequency",
language = language), xlab = translate_AMR("Disk diffusion diameter (mm)",
language = language), guideline = "EUCAST", colours_SIR = c("#3CAEA3",
"#F6D55C", "#ED553B"), language = get_AMR_locale(), expand = TRUE,
include_PKPD = getOption("AMR_include_PKPD", TRUE),
breakpoint_type = getOption("AMR_breakpoint_type", "human"),
...
)
breakpoint_type = getOption("AMR_breakpoint_type", "human"), ...)
\method{fortify}{disk}(object, ...)
\method{plot}{sir}(
x,
ylab = translate_AMR("Percentage", language = language),
xlab = translate_AMR("Antimicrobial Interpretation", language = language),
main = deparse(substitute(x)),
language = get_AMR_locale(),
...
)
\method{plot}{sir}(x, ylab = translate_AMR("Percentage", language =
language), xlab = translate_AMR("Antimicrobial Interpretation", language =
language), main = deparse(substitute(x)), language = get_AMR_locale(),
...)
\method{autoplot}{sir}(
object,
title = deparse(substitute(object)),
\method{autoplot}{sir}(object, title = deparse(substitute(object)),
xlab = translate_AMR("Antimicrobial Interpretation", language = language),
ylab = translate_AMR("Frequency", language = language),
colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"),
language = get_AMR_locale(),
...
)
language = get_AMR_locale(), ...)
\method{fortify}{sir}(object, ...)
facet_sir(facet = c("interpretation", "antibiotic"), nrow = NULL)
scale_y_percent(
breaks = function(x) seq(0, max(x, na.rm = TRUE), 0.1),
limits = c(0, NA)
)
scale_y_percent(breaks = function(x) seq(0, max(x, na.rm = TRUE), 0.1),
limits = c(0, NA))
scale_sir_colours(
...,
aesthetics = "fill",
colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B")
)
scale_sir_colours(..., aesthetics = "fill", colours_SIR = c("#3CAEA3",
"#F6D55C", "#ED553B"))
theme_sir()
labels_sir_count(
position = NULL,
x = "antibiotic",
translate_ab = "name",
minimum = 30,
language = get_AMR_locale(),
combine_SI = TRUE,
datalabels.size = 3,
datalabels.colour = "grey15"
)
labels_sir_count(position = NULL, x = "antibiotic",
translate_ab = "name", minimum = 30, language = get_AMR_locale(),
combine_SI = TRUE, datalabels.size = 3, datalabels.colour = "grey15")
}
\arguments{
\item{keep_operators}{a \link{character} specifying how to handle operators (such as \code{>} and \code{<=}) in the input. Accepts one of three values: \code{"all"} (or \code{TRUE}) to keep all operators, \code{"none"} (or \code{FALSE}) to remove all operators, or \code{"edges"} to keep operators only at both ends of the range.}