mirror of
https://github.com/msberends/AMR.git
synced 2025-09-02 23:44:09 +02:00
Compare commits
9 Commits
65ec098acf
...
main
Author | SHA1 | Date | |
---|---|---|---|
60bd631e1a | |||
9b07a8573a | |||
fc72cf9324 | |||
2f866985c9 | |||
6cb724a208 | |||
49274f010b | |||
8da0f525b5 | |||
|
68442f3042 | ||
39ea5f6597 |
87
.github/prehooks/pre-commit
vendored
87
.github/prehooks/pre-commit
vendored
@@ -68,49 +68,56 @@ echo ""
|
|||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
echo "Updating semantic versioning and date..."
|
echo "Updating semantic versioning and date..."
|
||||||
|
|
||||||
# Get tags from remote and remove tags not on remote
|
current_branch=$(git rev-parse --abbrev-ref HEAD)
|
||||||
git fetch origin --prune --prune-tags --quiet
|
if [ "$current_branch" != "main" ]; then
|
||||||
currenttagfull=$(git describe --tags --abbrev=0)
|
echo "- Current branch is '$current_branch'; skipping version/date update (only runs on 'main')"
|
||||||
currenttag=$(git describe --tags --abbrev=0 | sed 's/v//')
|
|
||||||
|
|
||||||
# Assume main branch to be 'main' or 'master'
|
|
||||||
defaultbranch=$(git branch | cut -c 3- | grep -E '^master$|^main$')
|
|
||||||
if [ "$currenttag" = "" ]; then
|
|
||||||
currenttag="0.0.1"
|
|
||||||
currentcommit=$(git rev-list --count ${defaultbranch})
|
|
||||||
echo "- No git tags found, creating one in format 'v(x).(y).(z)' - currently ${currentcommit} previous commits in '${defaultbranch}'"
|
|
||||||
else
|
else
|
||||||
currentcommit=$(git rev-list --count ${currenttagfull}..${defaultbranch})
|
# Version update logic begins here
|
||||||
echo "- Latest tag is '${currenttagfull}', with ${currentcommit} previous commits in '${defaultbranch}'"
|
|
||||||
fi
|
# Get tags from remote and remove tags not on remote
|
||||||
|
git fetch origin --prune --prune-tags --quiet
|
||||||
# Combine tag and commit number
|
currenttagfull=$(git describe --tags --abbrev=0)
|
||||||
currentversion="$currenttag.$((currentcommit + 9001))"
|
currenttag=$(git describe --tags --abbrev=0 | sed 's/v//')
|
||||||
echo "- ${currentpkg} pkg version set to ${currentversion}"
|
|
||||||
|
# Assume main branch to be 'main' or 'master'
|
||||||
# Update version number and date in DESCRIPTION
|
defaultbranch=$(git branch | cut -c 3- | grep -E '^master$|^main$')
|
||||||
sed -i -- "s/^Version: .*/Version: ${currentversion}/" DESCRIPTION
|
if [ "$currenttag" = "" ]; then
|
||||||
sed -i -- "s/^Date: .*/Date: $(date '+%Y-%m-%d')/" DESCRIPTION
|
currenttag="0.0.1"
|
||||||
echo "- Updated version number and date in ./DESCRIPTION"
|
currentcommit=$(git rev-list --count ${defaultbranch})
|
||||||
rm -f DESCRIPTION--
|
echo "- No git tags found, creating one in format 'v(x).(y).(z)' - currently ${currentcommit} previous commits in '${defaultbranch}'"
|
||||||
git add DESCRIPTION
|
else
|
||||||
|
currentcommit=$(git rev-list --count ${currenttagfull}..${defaultbranch})
|
||||||
# Update version number in NEWS.md
|
echo "- Latest tag is '${currenttagfull}', with ${currentcommit} previous commits in '${defaultbranch}'"
|
||||||
if [ -e "NEWS.md" ]; then
|
|
||||||
if [ "$currentpkg" = "your" ]; then
|
|
||||||
currentpkg=""
|
|
||||||
fi
|
fi
|
||||||
sed -i -- "1s/.*/# ${currentpkg} ${currentversion}/" NEWS.md
|
|
||||||
echo "- Updated version number in ./NEWS.md"
|
# Combine tag and commit number
|
||||||
rm -f NEWS.md--
|
currentversion="$currenttag.$((currentcommit + 9001))"
|
||||||
git add NEWS.md
|
echo "- ${currentpkg} pkg version set to ${currentversion}"
|
||||||
else
|
|
||||||
echo "- No NEWS.md found!"
|
# Update version number and date in DESCRIPTION
|
||||||
|
sed -i -- "s/^Version: .*/Version: ${currentversion}/" DESCRIPTION
|
||||||
|
sed -i -- "s/^Date: .*/Date: $(date '+%Y-%m-%d')/" DESCRIPTION
|
||||||
|
echo "- Updated version number and date in ./DESCRIPTION"
|
||||||
|
rm -f DESCRIPTION--
|
||||||
|
git add DESCRIPTION
|
||||||
|
|
||||||
|
# Update version number in NEWS.md
|
||||||
|
if [ -e "NEWS.md" ]; then
|
||||||
|
if [ "$currentpkg" = "your" ]; then
|
||||||
|
currentpkg=""
|
||||||
|
fi
|
||||||
|
sed -i -- "1s/.*/# ${currentpkg} ${currentversion}/" NEWS.md
|
||||||
|
echo "- Updated version number in ./NEWS.md"
|
||||||
|
rm -f NEWS.md--
|
||||||
|
git add NEWS.md
|
||||||
|
else
|
||||||
|
echo "- No NEWS.md found!"
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Save the version number for use in the commit-msg hook
|
||||||
|
echo "${currentversion}" > .git/commit_version.tmp
|
||||||
fi
|
fi
|
||||||
echo ""
|
|
||||||
|
|
||||||
# Save the version number for use in the commit-msg hook
|
|
||||||
echo "${currentversion}" > .git/commit_version.tmp
|
|
||||||
|
|
||||||
git add data-raw/*
|
git add data-raw/*
|
||||||
git add data/*
|
git add data/*
|
||||||
|
7
.github/workflows/check-old-tinytest.yaml
vendored
7
.github/workflows/check-old-tinytest.yaml
vendored
@@ -59,8 +59,15 @@ jobs:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
|
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
|
||||||
|
LANG: en_US.UTF-8
|
||||||
|
LC_ALL: en_US.UTF-8
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Set up locales
|
||||||
|
run: |
|
||||||
|
sudo locale-gen en_US.UTF-8
|
||||||
|
sudo update-locale LANG=en_US.UTF-8
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: r-lib/actions/setup-r@v2
|
- uses: r-lib/actions/setup-r@v2
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 3.0.0.9010
|
Version: 3.0.0.9019
|
||||||
Date: 2025-07-17
|
Date: 2025-09-01
|
||||||
Title: Antimicrobial Resistance Data Analysis
|
Title: Antimicrobial Resistance Data Analysis
|
||||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||||
data analysis and to work with microbial and antimicrobial properties by
|
data analysis and to work with microbial and antimicrobial properties by
|
||||||
|
9
NEWS.md
9
NEWS.md
@@ -1,4 +1,4 @@
|
|||||||
# AMR 3.0.0.9010
|
# AMR 3.0.0.9019
|
||||||
|
|
||||||
This is primarily a bugfix release, though we added one nice feature too.
|
This is primarily a bugfix release, though we added one nice feature too.
|
||||||
|
|
||||||
@@ -15,9 +15,16 @@ This is primarily a bugfix release, though we added one nice feature too.
|
|||||||
* Fixed a bug in `as.sir()` to allow any tidyselect language (#220)
|
* Fixed a bug in `as.sir()` to allow any tidyselect language (#220)
|
||||||
* Fixed a bug in `as.sir()` to pick right breakpoint when `uti = FALSE` (#216)
|
* Fixed a bug in `as.sir()` to pick right breakpoint when `uti = FALSE` (#216)
|
||||||
* Fixed a bug in `ggplot_sir()` when using `combine_SI = FALSE` (#213)
|
* Fixed a bug in `ggplot_sir()` when using `combine_SI = FALSE` (#213)
|
||||||
|
* Fixed a bug the `antimicrobials` data set to remove statins (#229)
|
||||||
|
* Fixed a bug in `mdro()` to make sure all genes specified in arguments are acknowledges
|
||||||
|
* Fixed ATC J01CR05 to map to piperacillin/tazobactam rather than piperacillin/sulbactam (#230)
|
||||||
* Fixed all plotting to contain a separate colour for SDD (susceptible dose-dependent) (#223)
|
* Fixed all plotting to contain a separate colour for SDD (susceptible dose-dependent) (#223)
|
||||||
* Fixed some specific Dutch translations for antimicrobials
|
* Fixed some specific Dutch translations for antimicrobials
|
||||||
|
* Added all reasons in verbose output of `mdro()` (#227)
|
||||||
|
* Added `names` to `age_groups()` so that custom names can be given (#215)
|
||||||
* Added note to `as.sir()` to make it explicit when higher-level taxonomic breakpoints are used (#218)
|
* Added note to `as.sir()` to make it explicit when higher-level taxonomic breakpoints are used (#218)
|
||||||
|
* Added antibiotic codes from the Comprehensive Antibiotic Resistance Database (CARD) to the `antimicrobials` data set (#225)
|
||||||
|
* Updated Fosfomycin to be of antibiotic class 'Phosphonics' (#225)
|
||||||
* Updated `random_mic()` and `random_disk()` to set skewedness of the distribution and allow multiple microorganisms
|
* Updated `random_mic()` and `random_disk()` to set skewedness of the distribution and allow multiple microorganisms
|
||||||
|
|
||||||
|
|
||||||
|
@@ -519,7 +519,7 @@ word_wrap <- function(...,
|
|||||||
)
|
)
|
||||||
msg <- paste0(parts, collapse = "`")
|
msg <- paste0(parts, collapse = "`")
|
||||||
}
|
}
|
||||||
msg <- gsub("`(.+?)`", font_grey_bg("\\1"), msg)
|
msg <- gsub("`(.+?)`", font_grey_bg("`\\1`"), msg)
|
||||||
|
|
||||||
# clean introduced whitespace in between fullstops
|
# clean introduced whitespace in between fullstops
|
||||||
msg <- gsub("[.] +[.]", "..", msg)
|
msg <- gsub("[.] +[.]", "..", msg)
|
||||||
|
12
R/age.R
12
R/age.R
@@ -128,9 +128,10 @@ age <- function(x, reference = Sys.Date(), exact = FALSE, na.rm = FALSE, ...) {
|
|||||||
|
|
||||||
#' Split Ages into Age Groups
|
#' Split Ages into Age Groups
|
||||||
#'
|
#'
|
||||||
#' Split ages into age groups defined by the `split` argument. This allows for easier demographic (antimicrobial resistance) analysis.
|
#' Split ages into age groups defined by the `split` argument. This allows for easier demographic (antimicrobial resistance) analysis. The function returns an ordered [factor].
|
||||||
#' @param x Age, e.g. calculated with [age()].
|
#' @param x Age, e.g. calculated with [age()].
|
||||||
#' @param split_at Values to split `x` at - the default is age groups 0-11, 12-24, 25-54, 55-74 and 75+. See *Details*.
|
#' @param split_at Values to split `x` at - the default is age groups 0-11, 12-24, 25-54, 55-74 and 75+. See *Details*.
|
||||||
|
#' @param names Optional names to be given to the various age groups.
|
||||||
#' @param na.rm A [logical] to indicate whether missing values should be removed.
|
#' @param na.rm A [logical] to indicate whether missing values should be removed.
|
||||||
#' @details To split ages, the input for the `split_at` argument can be:
|
#' @details To split ages, the input for the `split_at` argument can be:
|
||||||
#'
|
#'
|
||||||
@@ -152,6 +153,7 @@ age <- function(x, reference = Sys.Date(), exact = FALSE, na.rm = FALSE, ...) {
|
|||||||
#'
|
#'
|
||||||
#' # split into 0-19, 20-49 and 50+
|
#' # split into 0-19, 20-49 and 50+
|
||||||
#' age_groups(ages, c(20, 50))
|
#' age_groups(ages, c(20, 50))
|
||||||
|
#' age_groups(ages, c(20, 50), names = c("Under 20 years", "20 to 50 years", "Over 50 years"))
|
||||||
#'
|
#'
|
||||||
#' # split into groups of ten years
|
#' # split into groups of ten years
|
||||||
#' age_groups(ages, 1:10 * 10)
|
#' age_groups(ages, 1:10 * 10)
|
||||||
@@ -181,9 +183,10 @@ age <- function(x, reference = Sys.Date(), exact = FALSE, na.rm = FALSE, ...) {
|
|||||||
#' )
|
#' )
|
||||||
#' }
|
#' }
|
||||||
#' }
|
#' }
|
||||||
age_groups <- function(x, split_at = c(12, 25, 55, 75), na.rm = FALSE) {
|
age_groups <- function(x, split_at = c(0, 12, 25, 55, 75), names = NULL, na.rm = FALSE) {
|
||||||
meet_criteria(x, allow_class = c("numeric", "integer"), is_positive_or_zero = TRUE, is_finite = TRUE)
|
meet_criteria(x, allow_class = c("numeric", "integer"), is_positive_or_zero = TRUE, is_finite = TRUE)
|
||||||
meet_criteria(split_at, allow_class = c("numeric", "integer", "character"), is_positive_or_zero = TRUE, is_finite = TRUE)
|
meet_criteria(split_at, allow_class = c("numeric", "integer", "character"), is_positive_or_zero = TRUE, is_finite = TRUE)
|
||||||
|
meet_criteria(names, allow_class = "character", allow_NULL = TRUE)
|
||||||
meet_criteria(na.rm, allow_class = "logical", has_length = 1)
|
meet_criteria(na.rm, allow_class = "logical", has_length = 1)
|
||||||
|
|
||||||
if (any(x < 0, na.rm = TRUE)) {
|
if (any(x < 0, na.rm = TRUE)) {
|
||||||
@@ -224,6 +227,11 @@ age_groups <- function(x, split_at = c(12, 25, 55, 75), na.rm = FALSE) {
|
|||||||
|
|
||||||
agegroups <- factor(lbls[y], levels = lbls, ordered = TRUE)
|
agegroups <- factor(lbls[y], levels = lbls, ordered = TRUE)
|
||||||
|
|
||||||
|
if (!is.null(names)) {
|
||||||
|
stop_ifnot(length(names) == length(levels(agegroups)), "`names` must have the same length as the number of age groups (", length(levels(agegroups)), ").")
|
||||||
|
levels(agegroups) <- names
|
||||||
|
}
|
||||||
|
|
||||||
if (isTRUE(na.rm)) {
|
if (isTRUE(na.rm)) {
|
||||||
agegroups <- agegroups[!is.na(agegroups)]
|
agegroups <- agegroups[!is.na(agegroups)]
|
||||||
}
|
}
|
||||||
|
@@ -177,8 +177,8 @@ ggplot_sir <- function(data,
|
|||||||
nrow = NULL,
|
nrow = NULL,
|
||||||
colours = c(
|
colours = c(
|
||||||
S = "#3CAEA3",
|
S = "#3CAEA3",
|
||||||
SI = "#3CAEA3",
|
|
||||||
SDD = "#8FD6C4",
|
SDD = "#8FD6C4",
|
||||||
|
SI = "#3CAEA3",
|
||||||
I = "#F6D55C",
|
I = "#F6D55C",
|
||||||
IR = "#ED553B",
|
IR = "#ED553B",
|
||||||
R = "#ED553B"
|
R = "#ED553B"
|
||||||
@@ -206,7 +206,7 @@ ggplot_sir <- function(data,
|
|||||||
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_positive_or_zero = TRUE, is_finite = TRUE)
|
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_positive_or_zero = TRUE, is_finite = TRUE)
|
||||||
language <- validate_language(language)
|
language <- validate_language(language)
|
||||||
meet_criteria(nrow, allow_class = c("numeric", "integer"), has_length = 1, allow_NULL = TRUE, is_positive = TRUE, is_finite = TRUE)
|
meet_criteria(nrow, allow_class = c("numeric", "integer"), has_length = 1, allow_NULL = TRUE, is_positive = TRUE, is_finite = TRUE)
|
||||||
meet_criteria(colours, allow_class = c("character", "logical"))
|
meet_criteria(colours, allow_class = c("character", "logical"), allow_NULL = TRUE)
|
||||||
meet_criteria(datalabels, allow_class = "logical", has_length = 1)
|
meet_criteria(datalabels, allow_class = "logical", has_length = 1)
|
||||||
meet_criteria(datalabels.size, allow_class = c("numeric", "integer"), has_length = 1, is_positive = TRUE, is_finite = TRUE)
|
meet_criteria(datalabels.size, allow_class = c("numeric", "integer"), has_length = 1, is_positive = TRUE, is_finite = TRUE)
|
||||||
meet_criteria(datalabels.colour, allow_class = "character", has_length = 1)
|
meet_criteria(datalabels.colour, allow_class = "character", has_length = 1)
|
||||||
@@ -246,7 +246,7 @@ ggplot_sir <- function(data,
|
|||||||
) +
|
) +
|
||||||
theme_sir()
|
theme_sir()
|
||||||
|
|
||||||
if (fill == "interpretation") {
|
if (fill == "interpretation" && !is.null(colours) && !isFALSE(colours)) {
|
||||||
p <- suppressWarnings(p + scale_sir_colours(aesthetics = "fill", colours = colours))
|
p <- suppressWarnings(p + scale_sir_colours(aesthetics = "fill", colours = colours))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
82
R/mdro.R
82
R/mdro.R
@@ -41,7 +41,7 @@
|
|||||||
#' @inheritParams eucast_rules
|
#' @inheritParams eucast_rules
|
||||||
#' @param pct_required_classes Minimal required percentage of antimicrobial classes that must be available per isolate, rounded down. For example, with the default guideline, 17 antimicrobial classes must be available for *S. aureus*. Setting this `pct_required_classes` argument to `0.5` (default) means that for every *S. aureus* isolate at least 8 different classes must be available. Any lower number of available classes will return `NA` for that isolate.
|
#' @param pct_required_classes Minimal required percentage of antimicrobial classes that must be available per isolate, rounded down. For example, with the default guideline, 17 antimicrobial classes must be available for *S. aureus*. Setting this `pct_required_classes` argument to `0.5` (default) means that for every *S. aureus* isolate at least 8 different classes must be available. Any lower number of available classes will return `NA` for that isolate.
|
||||||
#' @param combine_SI A [logical] to indicate whether all values of S and I must be merged into one, so resistance is only considered when isolates are R, not I. As this is the default behaviour of the [mdro()] function, it follows the redefinition by EUCAST about the interpretation of I (increased exposure) in 2019, see section 'Interpretation of S, I and R' below. When using `combine_SI = FALSE`, resistance is considered when isolates are R or I.
|
#' @param combine_SI A [logical] to indicate whether all values of S and I must be merged into one, so resistance is only considered when isolates are R, not I. As this is the default behaviour of the [mdro()] function, it follows the redefinition by EUCAST about the interpretation of I (increased exposure) in 2019, see section 'Interpretation of S, I and R' below. When using `combine_SI = FALSE`, resistance is considered when isolates are R or I.
|
||||||
#' @param verbose A [logical] to turn Verbose mode on and off (default is off). In Verbose mode, the function does not return the MDRO results, but instead returns a data set in logbook form with extensive info about which isolates would be MDRO-positive, or why they are not.
|
#' @param verbose A [logical] to turn Verbose mode on and off (default is off). In Verbose mode, the function returns a data set with the MDRO results in logbook form with extensive info about which isolates would be MDRO-positive, or why they are not.
|
||||||
#' @details
|
#' @details
|
||||||
#' These functions are context-aware. This means that the `x` argument can be left blank if used inside a [data.frame] call, see *Examples*.
|
#' These functions are context-aware. This means that the `x` argument can be left blank if used inside a [data.frame] call, see *Examples*.
|
||||||
#'
|
#'
|
||||||
@@ -174,48 +174,23 @@ mdro <- function(x = NULL,
|
|||||||
}
|
}
|
||||||
|
|
||||||
# get gene values as TRUE/FALSE
|
# get gene values as TRUE/FALSE
|
||||||
if (is.character(esbl)) {
|
resolve_gene_var <- function(x, gene, varname) {
|
||||||
meet_criteria(esbl, is_in = colnames(x), allow_NA = FALSE, has_length = 1)
|
if (is.character(gene)) {
|
||||||
esbl <- x[[esbl]]
|
meet_criteria(gene, is_in = colnames(x), allow_NA = FALSE, has_length = 1)
|
||||||
meet_criteria(esbl, allow_class = "logical", allow_NA = TRUE)
|
gene <- x[[gene]]
|
||||||
} else if (length(esbl) == 1) {
|
meet_criteria(gene, allow_class = "logical", allow_NA = TRUE)
|
||||||
esbl <- rep(esbl, NROW(x))
|
} else if (length(gene) == 1) {
|
||||||
}
|
gene <- rep(gene, NROW(x))
|
||||||
if (is.character(carbapenemase)) {
|
}
|
||||||
meet_criteria(carbapenemase, is_in = colnames(x), allow_NA = FALSE, has_length = 1)
|
x[[varname]] <- gene
|
||||||
carbapenemase <- x[[carbapenemase]]
|
x
|
||||||
meet_criteria(carbapenemase, allow_class = "logical", allow_NA = TRUE)
|
|
||||||
} else if (length(carbapenemase) == 1) {
|
|
||||||
carbapenemase <- rep(carbapenemase, NROW(x))
|
|
||||||
}
|
|
||||||
if (is.character(mecA)) {
|
|
||||||
meet_criteria(mecA, is_in = colnames(x), allow_NA = FALSE, has_length = 1)
|
|
||||||
mecA <- x[[mecA]]
|
|
||||||
meet_criteria(mecA, allow_class = "logical", allow_NA = TRUE)
|
|
||||||
} else if (length(mecA) == 1) {
|
|
||||||
mecA <- rep(mecA, NROW(x))
|
|
||||||
}
|
|
||||||
if (is.character(mecC)) {
|
|
||||||
meet_criteria(mecC, is_in = colnames(x), allow_NA = FALSE, has_length = 1)
|
|
||||||
mecC <- x[[mecC]]
|
|
||||||
meet_criteria(mecC, allow_class = "logical", allow_NA = TRUE)
|
|
||||||
} else if (length(mecC) == 1) {
|
|
||||||
mecC <- rep(mecC, NROW(x))
|
|
||||||
}
|
|
||||||
if (is.character(vanA)) {
|
|
||||||
meet_criteria(vanA, is_in = colnames(x), allow_NA = FALSE, has_length = 1)
|
|
||||||
vanA <- x[[vanA]]
|
|
||||||
meet_criteria(vanA, allow_class = "logical", allow_NA = TRUE)
|
|
||||||
} else if (length(vanA) == 1) {
|
|
||||||
vanA <- rep(vanA, NROW(x))
|
|
||||||
}
|
|
||||||
if (is.character(vanB)) {
|
|
||||||
meet_criteria(vanB, is_in = colnames(x), allow_NA = FALSE, has_length = 1)
|
|
||||||
vanB <- x[[vanB]]
|
|
||||||
meet_criteria(vanB, allow_class = "logical", allow_NA = TRUE)
|
|
||||||
} else if (length(vanB) == 1) {
|
|
||||||
vanB <- rep(vanB, NROW(x))
|
|
||||||
}
|
}
|
||||||
|
x <- resolve_gene_var(x, esbl, "esbl")
|
||||||
|
x <- resolve_gene_var(x, carbapenemase, "carbapenemase")
|
||||||
|
x <- resolve_gene_var(x, mecA, "mecA")
|
||||||
|
x <- resolve_gene_var(x, mecC, "mecC")
|
||||||
|
x <- resolve_gene_var(x, vanA, "vanA")
|
||||||
|
x <- resolve_gene_var(x, vanB, "vanB")
|
||||||
|
|
||||||
info.bak <- info
|
info.bak <- info
|
||||||
# don't throw info's more than once per call
|
# don't throw info's more than once per call
|
||||||
@@ -772,7 +747,7 @@ mdro <- function(x = NULL,
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
x[rows_to_change, "MDRO"] <<- to
|
x[rows_to_change, "MDRO"] <<- to
|
||||||
x[rows_to_change, "reason"] <<- reason
|
x[rows_to_change, "reason"] <<- paste0(x[rows_to_change, "reason", drop = TRUE], "; ", reason)
|
||||||
x[rows_not_to_change, "reason"] <<- "guideline criteria not met"
|
x[rows_not_to_change, "reason"] <<- "guideline criteria not met"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -854,7 +829,7 @@ mdro <- function(x = NULL,
|
|||||||
x <- left_join_microorganisms(x, by = col_mo)
|
x <- left_join_microorganisms(x, by = col_mo)
|
||||||
x$MDRO <- ifelse(!is.na(x$genus), 1, NA_integer_)
|
x$MDRO <- ifelse(!is.na(x$genus), 1, NA_integer_)
|
||||||
x$row_number <- seq_len(nrow(x))
|
x$row_number <- seq_len(nrow(x))
|
||||||
x$reason <- NA_character_
|
x$reason <- ""
|
||||||
x$all_nonsusceptible_columns <- ""
|
x$all_nonsusceptible_columns <- ""
|
||||||
|
|
||||||
if (guideline$code == "cmi2012") {
|
if (guideline$code == "cmi2012") {
|
||||||
@@ -1498,7 +1473,7 @@ mdro <- function(x = NULL,
|
|||||||
}
|
}
|
||||||
trans_tbl(
|
trans_tbl(
|
||||||
3, # positive
|
3, # positive
|
||||||
rows = which(x$order == "Enterobacterales" & esbl == TRUE),
|
rows = which(x$order == "Enterobacterales" & x$esbl == TRUE),
|
||||||
cols = "any",
|
cols = "any",
|
||||||
any_all = "any",
|
any_all = "any",
|
||||||
reason = "Enterobacterales: ESBL"
|
reason = "Enterobacterales: ESBL"
|
||||||
@@ -1519,7 +1494,7 @@ mdro <- function(x = NULL,
|
|||||||
)
|
)
|
||||||
trans_tbl(
|
trans_tbl(
|
||||||
3,
|
3,
|
||||||
rows = which(x$order == "Enterobacterales" & carbapenemase == TRUE),
|
rows = which(x$order == "Enterobacterales" & x$carbapenemase == TRUE),
|
||||||
cols = "any",
|
cols = "any",
|
||||||
any_all = "any",
|
any_all = "any",
|
||||||
reason = "Enterobacterales: carbapenemase"
|
reason = "Enterobacterales: carbapenemase"
|
||||||
@@ -1557,14 +1532,14 @@ mdro <- function(x = NULL,
|
|||||||
)
|
)
|
||||||
trans_tbl(
|
trans_tbl(
|
||||||
2, # unconfirmed
|
2, # unconfirmed
|
||||||
rows = which(x[[col_mo]] %in% AMR::microorganisms.groups$mo[AMR::microorganisms.groups$mo_group_name == "Acinetobacter baumannii complex"] & is.na(carbapenemase)),
|
rows = which(x[[col_mo]] %in% AMR::microorganisms.groups$mo[AMR::microorganisms.groups$mo_group_name == "Acinetobacter baumannii complex"] & is.na(x$carbapenemase)),
|
||||||
cols = carbapenems,
|
cols = carbapenems,
|
||||||
any_all = "any",
|
any_all = "any",
|
||||||
reason = "A. baumannii-calcoaceticus complex: potential carbapenemase"
|
reason = "A. baumannii-calcoaceticus complex: potential carbapenemase"
|
||||||
)
|
)
|
||||||
trans_tbl(
|
trans_tbl(
|
||||||
3,
|
3,
|
||||||
rows = which(x[[col_mo]] %in% AMR::microorganisms.groups$mo[AMR::microorganisms.groups$mo_group_name == "Acinetobacter baumannii complex"] & carbapenemase == TRUE),
|
rows = which(x[[col_mo]] %in% AMR::microorganisms.groups$mo[AMR::microorganisms.groups$mo_group_name == "Acinetobacter baumannii complex"] & x$carbapenemase == TRUE),
|
||||||
cols = carbapenems,
|
cols = carbapenems,
|
||||||
any_all = "any",
|
any_all = "any",
|
||||||
reason = "A. baumannii-calcoaceticus complex: carbapenemase"
|
reason = "A. baumannii-calcoaceticus complex: carbapenemase"
|
||||||
@@ -1574,6 +1549,7 @@ mdro <- function(x = NULL,
|
|||||||
x$psae <- 0
|
x$psae <- 0
|
||||||
x$psae <- x$psae + ifelse(NA_as_FALSE(col_values(x, TOB) == "R") | NA_as_FALSE(col_values(x, AMK) == "R"), 1, 0)
|
x$psae <- x$psae + ifelse(NA_as_FALSE(col_values(x, TOB) == "R") | NA_as_FALSE(col_values(x, AMK) == "R"), 1, 0)
|
||||||
x$psae <- x$psae + ifelse(NA_as_FALSE(col_values(x, IPM) == "R") | NA_as_FALSE(col_values(x, MEM) == "R"), 1, 0)
|
x$psae <- x$psae + ifelse(NA_as_FALSE(col_values(x, IPM) == "R") | NA_as_FALSE(col_values(x, MEM) == "R"), 1, 0)
|
||||||
|
x$psae <- x$psae + ifelse(NA_as_FALSE(x$carbapenemase), 1, 0)
|
||||||
x$psae <- x$psae + ifelse(NA_as_FALSE(col_values(x, PIP) == "R") | NA_as_FALSE(col_values(x, TZP) == "R"), 1, 0)
|
x$psae <- x$psae + ifelse(NA_as_FALSE(col_values(x, PIP) == "R") | NA_as_FALSE(col_values(x, TZP) == "R"), 1, 0)
|
||||||
x$psae <- x$psae + ifelse(NA_as_FALSE(col_values(x, CAZ) == "R") | NA_as_FALSE(col_values(x, CZA) == "R"), 1, 0)
|
x$psae <- x$psae + ifelse(NA_as_FALSE(col_values(x, CAZ) == "R") | NA_as_FALSE(col_values(x, CZA) == "R"), 1, 0)
|
||||||
x$psae <- x$psae + ifelse(NA_as_FALSE(col_values(x, CIP) == "R") | NA_as_FALSE(col_values(x, NOR) == "R") | NA_as_FALSE(col_values(x, LVX) == "R"), 1, 0)
|
x$psae <- x$psae + ifelse(NA_as_FALSE(col_values(x, CIP) == "R") | NA_as_FALSE(col_values(x, NOR) == "R") | NA_as_FALSE(col_values(x, LVX) == "R"), 1, 0)
|
||||||
@@ -1602,7 +1578,7 @@ mdro <- function(x = NULL,
|
|||||||
)
|
)
|
||||||
trans_tbl(
|
trans_tbl(
|
||||||
3,
|
3,
|
||||||
rows = which(x$genus == "Enterococcus" & x$species == "faecium" & (vanA == TRUE | vanB == TRUE)),
|
rows = which(x$genus == "Enterococcus" & x$species == "faecium" & (x$vanA == TRUE | x$vanB == TRUE)),
|
||||||
cols = c(PEN, AMX, AMP, VAN),
|
cols = c(PEN, AMX, AMP, VAN),
|
||||||
any_all = "any",
|
any_all = "any",
|
||||||
reason = "E. faecium: vanA/vanB gene + penicillin group"
|
reason = "E. faecium: vanA/vanB gene + penicillin group"
|
||||||
@@ -1611,14 +1587,14 @@ mdro <- function(x = NULL,
|
|||||||
# Staphylococcus aureus complex (= aureus, argenteus or schweitzeri)
|
# Staphylococcus aureus complex (= aureus, argenteus or schweitzeri)
|
||||||
trans_tbl(
|
trans_tbl(
|
||||||
2,
|
2,
|
||||||
rows = which(x$genus == "Staphylococcus" & x$species %in% c("aureus", "argenteus", "schweitzeri") & (is.na(mecA) | is.na(mecC))),
|
rows = which(x$genus == "Staphylococcus" & x$species %in% c("aureus", "argenteus", "schweitzeri") & (is.na(x$mecA) | is.na(x$mecC))),
|
||||||
cols = c(AMC, TZP, FLC, OXA, FOX, FOX1),
|
cols = c(AMC, TZP, FLC, OXA, FOX, FOX1),
|
||||||
any_all = "any",
|
any_all = "any",
|
||||||
reason = "S. aureus complex: potential MRSA"
|
reason = "S. aureus complex: potential MRSA"
|
||||||
)
|
)
|
||||||
trans_tbl(
|
trans_tbl(
|
||||||
3,
|
3,
|
||||||
rows = which(x$genus == "Staphylococcus" & x$species %in% c("aureus", "argenteus", "schweitzeri") & (mecA == TRUE | mecC == TRUE)),
|
rows = which(x$genus == "Staphylococcus" & x$species %in% c("aureus", "argenteus", "schweitzeri") & (x$mecA == TRUE | x$mecC == TRUE)),
|
||||||
cols = "any",
|
cols = "any",
|
||||||
any_all = "any",
|
any_all = "any",
|
||||||
reason = "S. aureus complex: mecA/mecC gene"
|
reason = "S. aureus complex: mecA/mecC gene"
|
||||||
@@ -1899,6 +1875,10 @@ mdro <- function(x = NULL,
|
|||||||
# fill in empty reasons
|
# fill in empty reasons
|
||||||
x$reason[is.na(x$reason)] <- "not covered by guideline"
|
x$reason[is.na(x$reason)] <- "not covered by guideline"
|
||||||
x[rows_empty, "reason"] <- paste(x[rows_empty, "reason"], "(note: no available test results)")
|
x[rows_empty, "reason"] <- paste(x[rows_empty, "reason"], "(note: no available test results)")
|
||||||
|
# starting semicolons must be removed
|
||||||
|
x$reason <- trimws(gsub("^;", "", x$reason))
|
||||||
|
# if criteria were not met initially, but later they were, then they have a following semicolon; remove the initial lack of meeting criteria
|
||||||
|
x$reason <- trimws(gsub("guideline criteria not met;", "", x$reason, fixed = TRUE))
|
||||||
# format data set
|
# format data set
|
||||||
colnames(x)[colnames(x) == col_mo] <- "microorganism"
|
colnames(x)[colnames(x) == col_mo] <- "microorganism"
|
||||||
x$microorganism <- mo_name(x$microorganism, language = NULL)
|
x$microorganism <- mo_name(x$microorganism, language = NULL)
|
||||||
|
131
R/plotting.R
131
R/plotting.R
@@ -90,6 +90,10 @@
|
|||||||
#' autoplot(some_mic_values, mo = "Escherichia coli", ab = "cipro")
|
#' autoplot(some_mic_values, mo = "Escherichia coli", ab = "cipro")
|
||||||
#' }
|
#' }
|
||||||
#' if (require("ggplot2")) {
|
#' if (require("ggplot2")) {
|
||||||
|
#' autoplot(some_mic_values, mo = "Staph aureus", ab = "Ceftaroline", guideline = "CLSI")
|
||||||
|
#' }
|
||||||
|
#'
|
||||||
|
#' if (require("ggplot2")) {
|
||||||
#' # support for 27 languages, various guidelines, and many options
|
#' # support for 27 languages, various guidelines, and many options
|
||||||
#' autoplot(some_disk_values,
|
#' autoplot(some_disk_values,
|
||||||
#' mo = "Escherichia coli", ab = "cipro",
|
#' mo = "Escherichia coli", ab = "cipro",
|
||||||
@@ -146,7 +150,7 @@
|
|||||||
#' aes(group, mic)
|
#' aes(group, mic)
|
||||||
#' ) +
|
#' ) +
|
||||||
#' geom_boxplot() +
|
#' geom_boxplot() +
|
||||||
#' geom_violin(linetype = 2, colour = "grey", fill = NA) +
|
#' geom_violin(linetype = 2, colour = "grey30", fill = NA) +
|
||||||
#' scale_y_mic()
|
#' scale_y_mic()
|
||||||
#' }
|
#' }
|
||||||
#' if (require("ggplot2")) {
|
#' if (require("ggplot2")) {
|
||||||
@@ -158,7 +162,7 @@
|
|||||||
#' aes(group, mic)
|
#' aes(group, mic)
|
||||||
#' ) +
|
#' ) +
|
||||||
#' geom_boxplot() +
|
#' geom_boxplot() +
|
||||||
#' geom_violin(linetype = 2, colour = "grey", fill = NA) +
|
#' geom_violin(linetype = 2, colour = "grey30", fill = NA) +
|
||||||
#' scale_y_mic(mic_range = c(NA, 0.25))
|
#' scale_y_mic(mic_range = c(NA, 0.25))
|
||||||
#' }
|
#' }
|
||||||
#'
|
#'
|
||||||
@@ -191,7 +195,7 @@
|
|||||||
#' aes(x = group, y = mic, colour = sir)
|
#' aes(x = group, y = mic, colour = sir)
|
||||||
#' ) +
|
#' ) +
|
||||||
#' theme_minimal() +
|
#' theme_minimal() +
|
||||||
#' geom_boxplot(fill = NA, colour = "grey") +
|
#' geom_boxplot(fill = NA, colour = "grey30") +
|
||||||
#' geom_jitter(width = 0.25)
|
#' geom_jitter(width = 0.25)
|
||||||
#'
|
#'
|
||||||
#' plain
|
#' plain
|
||||||
@@ -377,12 +381,7 @@ create_scale_sir <- function(aesthetics, colours_SIR, language, eucast_I, ...) {
|
|||||||
args <- list(...)
|
args <- list(...)
|
||||||
args[c("value", "labels", "limits")] <- NULL
|
args[c("value", "labels", "limits")] <- NULL
|
||||||
|
|
||||||
if (length(colours_SIR) == 1) {
|
colours_SIR <- expand_SIR_colours(colours_SIR, unname = FALSE)
|
||||||
colours_SIR <- rep(colours_SIR, 4)
|
|
||||||
} else if (length(colours_SIR) == 3) {
|
|
||||||
colours_SIR <- c(colours_SIR[1], colours_SIR[1], colours_SIR[2], colours_SIR[3])
|
|
||||||
}
|
|
||||||
colours_SIR <- unname(colours_SIR)
|
|
||||||
|
|
||||||
if (identical(aesthetics, "x")) {
|
if (identical(aesthetics, "x")) {
|
||||||
ggplot_fn <- ggplot2::scale_x_discrete
|
ggplot_fn <- ggplot2::scale_x_discrete
|
||||||
@@ -392,24 +391,19 @@ create_scale_sir <- function(aesthetics, colours_SIR, language, eucast_I, ...) {
|
|||||||
args,
|
args,
|
||||||
list(
|
list(
|
||||||
aesthetics = aesthetics,
|
aesthetics = aesthetics,
|
||||||
values = c(
|
values = c(colours_SIR, NI = "grey30")
|
||||||
S = colours_SIR[1],
|
|
||||||
SDD = colours_SIR[2],
|
|
||||||
I = colours_SIR[3],
|
|
||||||
R = colours_SIR[4],
|
|
||||||
NI = "grey30"
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
scale <- do.call(ggplot_fn, args)
|
scale <- do.call(ggplot_fn, args)
|
||||||
|
|
||||||
scale$labels <- function(x) {
|
scale$labels <- function(x) {
|
||||||
stop_ifnot(all(x %in% c(levels(NA_sir_), NA)),
|
stop_ifnot(all(x %in% c(levels(NA_sir_), "SI", "IR", NA)),
|
||||||
"Apply `scale_", aesthetics[1], "_sir()` to a variable of class 'sir', see `?as.sir`.",
|
"Apply `scale_", aesthetics[1], "_sir()` to a variable of class 'sir', see `?as.sir`.",
|
||||||
call = FALSE
|
call = FALSE
|
||||||
)
|
)
|
||||||
x <- as.character(as.sir(x))
|
x <- as.character(x)
|
||||||
|
x[!x %in% c("SI", "IR")] <- as.character(as.sir(x[!x %in% c("SI", "IR")]))
|
||||||
if (!is.null(language)) {
|
if (!is.null(language)) {
|
||||||
x[x == "S"] <- "(S) Susceptible"
|
x[x == "S"] <- "(S) Susceptible"
|
||||||
x[x == "SDD"] <- "(SDD) Susceptible dose-dependent"
|
x[x == "SDD"] <- "(SDD) Susceptible dose-dependent"
|
||||||
@@ -419,6 +413,8 @@ create_scale_sir <- function(aesthetics, colours_SIR, language, eucast_I, ...) {
|
|||||||
x[x == "I"] <- "(I) Intermediate"
|
x[x == "I"] <- "(I) Intermediate"
|
||||||
}
|
}
|
||||||
x[x == "R"] <- "(R) Resistant"
|
x[x == "R"] <- "(R) Resistant"
|
||||||
|
x[x == "SI"] <- "(S/I) Susceptible"
|
||||||
|
x[x == "IR"] <- "(I/R) Non-susceptible"
|
||||||
x[x == "NI"] <- "(NI) Non-interpretable"
|
x[x == "NI"] <- "(NI) Non-interpretable"
|
||||||
x <- translate_AMR(x, language = language)
|
x <- translate_AMR(x, language = language)
|
||||||
}
|
}
|
||||||
@@ -426,7 +422,7 @@ create_scale_sir <- function(aesthetics, colours_SIR, language, eucast_I, ...) {
|
|||||||
}
|
}
|
||||||
scale$limits <- function(x, ...) {
|
scale$limits <- function(x, ...) {
|
||||||
# force SIR in the right order
|
# force SIR in the right order
|
||||||
as.character(sort(factor(x, levels = levels(NA_sir_))))
|
as.character(sort(factor(x, levels = c(levels(NA_sir_), "SI", "IR"))))
|
||||||
}
|
}
|
||||||
|
|
||||||
scale
|
scale
|
||||||
@@ -536,6 +532,7 @@ plot.mic <- function(x,
|
|||||||
|
|
||||||
x <- as.mic(x) # make sure that currently implemented MIC levels are used
|
x <- as.mic(x) # make sure that currently implemented MIC levels are used
|
||||||
main <- gsub(" +", " ", paste0(main, collapse = " "))
|
main <- gsub(" +", " ", paste0(main, collapse = " "))
|
||||||
|
colours_SIR <- expand_SIR_colours(colours_SIR)
|
||||||
|
|
||||||
x <- plotrange_as_table(x, expand = expand)
|
x <- plotrange_as_table(x, expand = expand)
|
||||||
cols_sub <- plot_colours_subtitle_guideline(
|
cols_sub <- plot_colours_subtitle_guideline(
|
||||||
@@ -683,6 +680,8 @@ autoplot.mic <- function(object,
|
|||||||
title <- gsub(" +", " ", paste0(title, collapse = " "))
|
title <- gsub(" +", " ", paste0(title, collapse = " "))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
colours_SIR <- expand_SIR_colours(colours_SIR)
|
||||||
|
|
||||||
object <- as.mic(object) # make sure that currently implemented MIC levels are used
|
object <- as.mic(object) # make sure that currently implemented MIC levels are used
|
||||||
x <- plotrange_as_table(object, expand = expand)
|
x <- plotrange_as_table(object, expand = expand)
|
||||||
cols_sub <- plot_colours_subtitle_guideline(
|
cols_sub <- plot_colours_subtitle_guideline(
|
||||||
@@ -702,12 +701,14 @@ autoplot.mic <- function(object,
|
|||||||
colnames(df) <- c("mic", "count")
|
colnames(df) <- c("mic", "count")
|
||||||
df$cols <- cols_sub$cols
|
df$cols <- cols_sub$cols
|
||||||
df$cols[df$cols == colours_SIR[1]] <- "(S) Susceptible"
|
df$cols[df$cols == colours_SIR[1]] <- "(S) Susceptible"
|
||||||
df$cols[df$cols == colours_SIR[2]] <- paste("(I)", plot_name_of_I(cols_sub$guideline))
|
df$cols[df$cols == colours_SIR[2]] <- "(SDD) Susceptible dose-dependent"
|
||||||
df$cols[df$cols == colours_SIR[3]] <- "(R) Resistant"
|
df$cols[df$cols == colours_SIR[3]] <- paste("(I)", plot_name_of_I(cols_sub$guideline))
|
||||||
|
df$cols[df$cols == colours_SIR[4]] <- "(R) Resistant"
|
||||||
df$cols <- factor(translate_into_language(df$cols, language = language),
|
df$cols <- factor(translate_into_language(df$cols, language = language),
|
||||||
levels = translate_into_language(
|
levels = translate_into_language(
|
||||||
c(
|
c(
|
||||||
"(S) Susceptible",
|
"(S) Susceptible",
|
||||||
|
"(SDD) Susceptible dose-dependent",
|
||||||
paste("(I)", plot_name_of_I(cols_sub$guideline)),
|
paste("(I)", plot_name_of_I(cols_sub$guideline)),
|
||||||
"(R) Resistant"
|
"(R) Resistant"
|
||||||
),
|
),
|
||||||
@@ -721,10 +722,10 @@ autoplot.mic <- function(object,
|
|||||||
vals <- c(
|
vals <- c(
|
||||||
"(S) Susceptible" = colours_SIR[1],
|
"(S) Susceptible" = colours_SIR[1],
|
||||||
"(SDD) Susceptible dose-dependent" = colours_SIR[2],
|
"(SDD) Susceptible dose-dependent" = colours_SIR[2],
|
||||||
"(I) Susceptible, incr. exp." = colours_SIR[2],
|
"(I) Susceptible, incr. exp." = colours_SIR[3],
|
||||||
"(I) Intermediate" = colours_SIR[2],
|
"(I) Intermediate" = colours_SIR[3],
|
||||||
"(R) Resistant" = colours_SIR[3],
|
"(R) Resistant" = colours_SIR[4],
|
||||||
"(NI) Non-interpretable" = "grey"
|
"(NI) Non-interpretable" = "grey30"
|
||||||
)
|
)
|
||||||
names(vals) <- translate_into_language(names(vals), language = language)
|
names(vals) <- translate_into_language(names(vals), language = language)
|
||||||
p <- p +
|
p <- p +
|
||||||
@@ -790,6 +791,7 @@ plot.disk <- function(x,
|
|||||||
meet_criteria(expand, allow_class = "logical", has_length = 1)
|
meet_criteria(expand, allow_class = "logical", has_length = 1)
|
||||||
|
|
||||||
main <- gsub(" +", " ", paste0(main, collapse = " "))
|
main <- gsub(" +", " ", paste0(main, collapse = " "))
|
||||||
|
colours_SIR <- expand_SIR_colours(colours_SIR)
|
||||||
|
|
||||||
x <- plotrange_as_table(x, expand = expand)
|
x <- plotrange_as_table(x, expand = expand)
|
||||||
cols_sub <- plot_colours_subtitle_guideline(
|
cols_sub <- plot_colours_subtitle_guideline(
|
||||||
@@ -935,6 +937,8 @@ autoplot.disk <- function(object,
|
|||||||
title <- gsub(" +", " ", paste0(title, collapse = " "))
|
title <- gsub(" +", " ", paste0(title, collapse = " "))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
colours_SIR <- expand_SIR_colours(colours_SIR)
|
||||||
|
|
||||||
x <- plotrange_as_table(object, expand = expand)
|
x <- plotrange_as_table(object, expand = expand)
|
||||||
cols_sub <- plot_colours_subtitle_guideline(
|
cols_sub <- plot_colours_subtitle_guideline(
|
||||||
x = x,
|
x = x,
|
||||||
@@ -952,10 +956,10 @@ autoplot.disk <- function(object,
|
|||||||
df <- as.data.frame(x, stringsAsFactors = TRUE)
|
df <- as.data.frame(x, stringsAsFactors = TRUE)
|
||||||
colnames(df) <- c("disk", "count")
|
colnames(df) <- c("disk", "count")
|
||||||
df$cols <- cols_sub$cols
|
df$cols <- cols_sub$cols
|
||||||
|
|
||||||
df$cols[df$cols == colours_SIR[1]] <- "(S) Susceptible"
|
df$cols[df$cols == colours_SIR[1]] <- "(S) Susceptible"
|
||||||
df$cols[df$cols == colours_SIR[2]] <- paste("(I)", plot_name_of_I(cols_sub$guideline))
|
df$cols[df$cols == colours_SIR[2]] <- "(SDD) Susceptible dose-dependent"
|
||||||
df$cols[df$cols == colours_SIR[3]] <- "(R) Resistant"
|
df$cols[df$cols == colours_SIR[3]] <- paste("(I)", plot_name_of_I(cols_sub$guideline))
|
||||||
|
df$cols[df$cols == colours_SIR[4]] <- "(R) Resistant"
|
||||||
df$cols <- factor(translate_into_language(df$cols, language = language),
|
df$cols <- factor(translate_into_language(df$cols, language = language),
|
||||||
levels = translate_into_language(
|
levels = translate_into_language(
|
||||||
c(
|
c(
|
||||||
@@ -973,10 +977,10 @@ autoplot.disk <- function(object,
|
|||||||
vals <- c(
|
vals <- c(
|
||||||
"(S) Susceptible" = colours_SIR[1],
|
"(S) Susceptible" = colours_SIR[1],
|
||||||
"(SDD) Susceptible dose-dependent" = colours_SIR[2],
|
"(SDD) Susceptible dose-dependent" = colours_SIR[2],
|
||||||
"(I) Susceptible, incr. exp." = colours_SIR[2],
|
"(I) Susceptible, incr. exp." = colours_SIR[3],
|
||||||
"(I) Intermediate" = colours_SIR[2],
|
"(I) Intermediate" = colours_SIR[3],
|
||||||
"(R) Resistant" = colours_SIR[3],
|
"(R) Resistant" = colours_SIR[4],
|
||||||
"(NI) Non-interpretable" = "grey"
|
"(NI) Non-interpretable" = "grey30"
|
||||||
)
|
)
|
||||||
names(vals) <- translate_into_language(names(vals), language = language)
|
names(vals) <- translate_into_language(names(vals), language = language)
|
||||||
p <- p +
|
p <- p +
|
||||||
@@ -1093,12 +1097,7 @@ barplot.sir <- function(height,
|
|||||||
language <- validate_language(language)
|
language <- validate_language(language)
|
||||||
meet_criteria(expand, allow_class = "logical", has_length = 1)
|
meet_criteria(expand, allow_class = "logical", has_length = 1)
|
||||||
|
|
||||||
if (length(colours_SIR) == 1) {
|
colours_SIR <- expand_SIR_colours(colours_SIR)
|
||||||
colours_SIR <- rep(colours_SIR, 4)
|
|
||||||
} else if (length(colours_SIR) == 3) {
|
|
||||||
colours_SIR <- c(colours_SIR[1], colours_SIR[1], colours_SIR[2], colours_SIR[3])
|
|
||||||
}
|
|
||||||
colours_SIR <- unname(colours_SIR)
|
|
||||||
|
|
||||||
# add SDD and N to colours
|
# add SDD and N to colours
|
||||||
colours_SIR <- c(colours_SIR, "grey30")
|
colours_SIR <- c(colours_SIR, "grey30")
|
||||||
@@ -1148,12 +1147,7 @@ autoplot.sir <- function(object,
|
|||||||
title <- gsub(" +", " ", paste0(title, collapse = " "))
|
title <- gsub(" +", " ", paste0(title, collapse = " "))
|
||||||
}
|
}
|
||||||
|
|
||||||
if (length(colours_SIR) == 1) {
|
colours_SIR <- expand_SIR_colours(colours_SIR)
|
||||||
colours_SIR <- rep(colours_SIR, 4)
|
|
||||||
} else if (length(colours_SIR) == 3) {
|
|
||||||
colours_SIR <- c(colours_SIR[1], colours_SIR[1], colours_SIR[2], colours_SIR[3])
|
|
||||||
}
|
|
||||||
colours_SIR <- unname(colours_SIR)
|
|
||||||
|
|
||||||
df <- as.data.frame(table(object), stringsAsFactors = TRUE)
|
df <- as.data.frame(table(object), stringsAsFactors = TRUE)
|
||||||
colnames(df) <- c("x", "n")
|
colnames(df) <- c("x", "n")
|
||||||
@@ -1252,13 +1246,6 @@ plot_colours_subtitle_guideline <- function(x, mo, ab, guideline, colours_SIR, f
|
|||||||
|
|
||||||
guideline <- get_guideline(guideline, AMR::clinical_breakpoints)
|
guideline <- get_guideline(guideline, AMR::clinical_breakpoints)
|
||||||
|
|
||||||
if (length(colours_SIR) == 1) {
|
|
||||||
colours_SIR <- rep(colours_SIR, 4)
|
|
||||||
} else if (length(colours_SIR) == 3) {
|
|
||||||
colours_SIR <- c(colours_SIR[1], colours_SIR[1], colours_SIR[2], colours_SIR[3])
|
|
||||||
}
|
|
||||||
colours_SIR <- unname(colours_SIR)
|
|
||||||
|
|
||||||
# store previous interpretations to backup
|
# store previous interpretations to backup
|
||||||
sir_history <- AMR_env$sir_interpretation_history
|
sir_history <- AMR_env$sir_interpretation_history
|
||||||
# and clear previous interpretations
|
# and clear previous interpretations
|
||||||
@@ -1382,11 +1369,7 @@ scale_sir_colours <- function(...,
|
|||||||
colours_SIR <- list(...)$colours
|
colours_SIR <- list(...)$colours
|
||||||
}
|
}
|
||||||
|
|
||||||
if (length(colours_SIR) == 1) {
|
colours_SIR <- expand_SIR_colours(colours_SIR, unname = FALSE)
|
||||||
colours_SIR <- rep(colours_SIR, 4)
|
|
||||||
} else if (length(colours_SIR) == 3) {
|
|
||||||
colours_SIR <- c(colours_SIR[1], colours_SIR[1], colours_SIR[2], colours_SIR[3])
|
|
||||||
}
|
|
||||||
|
|
||||||
# behaviour when coming from ggplot_sir()
|
# behaviour when coming from ggplot_sir()
|
||||||
if ("colours" %in% names(list(...))) {
|
if ("colours" %in% names(list(...))) {
|
||||||
@@ -1502,3 +1485,39 @@ labels_sir_count <- function(position = NULL,
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
expand_SIR_colours <- function(colours_SIR, unname = TRUE) {
|
||||||
|
sir_order <- c("S", "SDD", "I", "R", "SI", "IR")
|
||||||
|
|
||||||
|
if (is.null(names(colours_SIR))) {
|
||||||
|
if (length(colours_SIR) == 1) {
|
||||||
|
colours_SIR <- rep(colours_SIR, 4)
|
||||||
|
} else if (length(colours_SIR) == 3) {
|
||||||
|
# old method for AMR < 3.0.1 which allowed for 3 colours
|
||||||
|
# fill in green for SDD as extra colour
|
||||||
|
colours_SIR <- c(colours_SIR[1], colours_SIR[1], colours_SIR[2], colours_SIR[3])
|
||||||
|
}
|
||||||
|
if (length(colours_SIR) == 4) {
|
||||||
|
# add colours for SI (same as S) and IR (same as R)
|
||||||
|
colours_SIR <- c(colours_SIR[1:4], colours_SIR[1], colours_SIR[4])
|
||||||
|
}
|
||||||
|
names(colours_SIR) <- sir_order
|
||||||
|
} else {
|
||||||
|
# named input: match and reorder
|
||||||
|
stop_ifnot(
|
||||||
|
all(names(colours_SIR) %in% sir_order),
|
||||||
|
"Unknown names in `colours_SIR`. Expected any of: ", vector_or(levels(NA_sir_), quotes = FALSE, sort = FALSE), "."
|
||||||
|
)
|
||||||
|
if (length(colours_SIR) == 4) {
|
||||||
|
# add colours for SI (same as S) and IR (same as R)
|
||||||
|
colours_SIR <- c(colours_SIR[1:4], SI = unname(colours_SIR[1]), IR = unname(colours_SIR[4]))
|
||||||
|
}
|
||||||
|
colours_SIR <- colours_SIR[sir_order]
|
||||||
|
}
|
||||||
|
|
||||||
|
if (unname) {
|
||||||
|
colours_SIR <- unname(colours_SIR)
|
||||||
|
}
|
||||||
|
|
||||||
|
return(colours_SIR)
|
||||||
|
}
|
||||||
|
BIN
R/sysdata.rda
BIN
R/sysdata.rda
Binary file not shown.
@@ -19,56 +19,59 @@
|
|||||||
#' @keywords internal
|
#' @keywords internal
|
||||||
#' @export
|
#' @export
|
||||||
#' @examples
|
#' @examples
|
||||||
#' library(tidymodels)
|
#' if (require("tidymodels")) {
|
||||||
#'
|
#'
|
||||||
#' # The below approach formed the basis for this paper: DOI 10.3389/fmicb.2025.1582703
|
#' # The below approach formed the basis for this paper: DOI 10.3389/fmicb.2025.1582703
|
||||||
#' # Presence of ESBL genes was predicted based on raw MIC values.
|
#' # Presence of ESBL genes was predicted based on raw MIC values.
|
||||||
#'
|
#'
|
||||||
#'
|
#'
|
||||||
#' # example data set in the AMR package
|
#' # example data set in the AMR package
|
||||||
#' esbl_isolates
|
#' esbl_isolates
|
||||||
#'
|
#'
|
||||||
#' # Prepare a binary outcome and convert to ordered factor
|
#' # Prepare a binary outcome and convert to ordered factor
|
||||||
#' data <- esbl_isolates %>%
|
#' data <- esbl_isolates %>%
|
||||||
#' mutate(esbl = factor(esbl, levels = c(FALSE, TRUE), ordered = TRUE))
|
#' mutate(esbl = factor(esbl, levels = c(FALSE, TRUE), ordered = TRUE))
|
||||||
#'
|
#'
|
||||||
#' # Split into training and testing sets
|
#' # Split into training and testing sets
|
||||||
#' split <- initial_split(data)
|
#' split <- initial_split(data)
|
||||||
#' training_data <- training(split)
|
#' training_data <- training(split)
|
||||||
#' testing_data <- testing(split)
|
#' testing_data <- testing(split)
|
||||||
#'
|
#'
|
||||||
#' # Create and prep a recipe with MIC log2 transformation
|
#' # Create and prep a recipe with MIC log2 transformation
|
||||||
#' mic_recipe <- recipe(esbl ~ ., data = training_data) %>%
|
#' mic_recipe <- recipe(esbl ~ ., data = training_data) %>%
|
||||||
#' # Optionally remove non-predictive variables
|
|
||||||
#' remove_role(genus, old_role = "predictor") %>%
|
|
||||||
#' # Apply the log2 transformation to all MIC predictors
|
|
||||||
#' step_mic_log2(all_mic_predictors()) %>%
|
|
||||||
#' prep()
|
|
||||||
#'
|
#'
|
||||||
#' # View prepped recipe
|
#' # Optionally remove non-predictive variables
|
||||||
#' mic_recipe
|
#' remove_role(genus, old_role = "predictor") %>%
|
||||||
#'
|
#'
|
||||||
#' # Apply the recipe to training and testing data
|
#' # Apply the log2 transformation to all MIC predictors
|
||||||
#' out_training <- bake(mic_recipe, new_data = NULL)
|
#' step_mic_log2(all_mic_predictors()) %>%
|
||||||
#' out_testing <- bake(mic_recipe, new_data = testing_data)
|
|
||||||
#'
|
#'
|
||||||
#' # Fit a logistic regression model
|
#' # And apply the preparation steps
|
||||||
#' fitted <- logistic_reg(mode = "classification") %>%
|
#' prep()
|
||||||
#' set_engine("glm") %>%
|
|
||||||
#' fit(esbl ~ ., data = out_training)
|
|
||||||
#'
|
#'
|
||||||
#' # Generate predictions on the test set
|
#' # View prepped recipe
|
||||||
#' predictions <- predict(fitted, out_testing) %>%
|
#' mic_recipe
|
||||||
#' bind_cols(out_testing)
|
|
||||||
#'
|
#'
|
||||||
#' # Evaluate predictions using standard classification metrics
|
#' # Apply the recipe to training and testing data
|
||||||
#' our_metrics <- metric_set(accuracy, kap, ppv, npv)
|
#' out_training <- bake(mic_recipe, new_data = NULL)
|
||||||
#' metrics <- our_metrics(predictions, truth = esbl, estimate = .pred_class)
|
#' out_testing <- bake(mic_recipe, new_data = testing_data)
|
||||||
#'
|
#'
|
||||||
#' # Show performance:
|
#' # Fit a logistic regression model
|
||||||
#' # - negative predictive value (NPV) of ~98%
|
#' fitted <- logistic_reg(mode = "classification") %>%
|
||||||
#' # - positive predictive value (PPV) of ~94%
|
#' set_engine("glm") %>%
|
||||||
#' metrics
|
#' fit(esbl ~ ., data = out_training)
|
||||||
|
#'
|
||||||
|
#' # Generate predictions on the test set
|
||||||
|
#' predictions <- predict(fitted, out_testing) %>%
|
||||||
|
#' bind_cols(out_testing)
|
||||||
|
#'
|
||||||
|
#' # Evaluate predictions using standard classification metrics
|
||||||
|
#' our_metrics <- metric_set(accuracy, kap, ppv, npv)
|
||||||
|
#' metrics <- our_metrics(predictions, truth = esbl, estimate = .pred_class)
|
||||||
|
#'
|
||||||
|
#' # Show performance
|
||||||
|
#' metrics
|
||||||
|
#' }
|
||||||
all_mic <- function() {
|
all_mic <- function() {
|
||||||
x <- tidymodels_amr_select(levels(NA_mic_))
|
x <- tidymodels_amr_select(levels(NA_mic_))
|
||||||
names(x)
|
names(x)
|
||||||
|
@@ -56,7 +56,8 @@ os.makedirs(r_lib_path, exist_ok=True)
|
|||||||
os.environ['R_LIBS_SITE'] = r_lib_path
|
os.environ['R_LIBS_SITE'] = r_lib_path
|
||||||
|
|
||||||
from rpy2 import robjects
|
from rpy2 import robjects
|
||||||
from rpy2.robjects import pandas2ri
|
from rpy2.robjects.conversion import localconverter
|
||||||
|
from rpy2.robjects import default_converter, numpy2ri, pandas2ri
|
||||||
from rpy2.robjects.packages import importr, isinstalled
|
from rpy2.robjects.packages import importr, isinstalled
|
||||||
|
|
||||||
# Import base and utils
|
# Import base and utils
|
||||||
@@ -94,27 +95,26 @@ if r_amr_version != python_amr_version:
|
|||||||
print(f"AMR: Setting up R environment and AMR datasets...", flush=True)
|
print(f"AMR: Setting up R environment and AMR datasets...", flush=True)
|
||||||
|
|
||||||
# Activate the automatic conversion between R and pandas DataFrames
|
# Activate the automatic conversion between R and pandas DataFrames
|
||||||
pandas2ri.activate()
|
with localconverter(default_converter + numpy2ri.converter + pandas2ri.converter):
|
||||||
|
# example_isolates
|
||||||
|
example_isolates = robjects.r('''
|
||||||
|
df <- AMR::example_isolates
|
||||||
|
df[] <- lapply(df, function(x) {
|
||||||
|
if (inherits(x, c("Date", "POSIXt", "factor"))) {
|
||||||
|
as.character(x)
|
||||||
|
} else {
|
||||||
|
x
|
||||||
|
}
|
||||||
|
})
|
||||||
|
df <- df[, !sapply(df, is.list)]
|
||||||
|
df
|
||||||
|
''')
|
||||||
|
example_isolates['date'] = pd.to_datetime(example_isolates['date'])
|
||||||
|
|
||||||
# example_isolates
|
# microorganisms
|
||||||
example_isolates = pandas2ri.rpy2py(robjects.r('''
|
microorganisms = robjects.r('AMR::microorganisms[, !sapply(AMR::microorganisms, is.list)]')
|
||||||
df <- AMR::example_isolates
|
antimicrobials = robjects.r('AMR::antimicrobials[, !sapply(AMR::antimicrobials, is.list)]')
|
||||||
df[] <- lapply(df, function(x) {
|
clinical_breakpoints = robjects.r('AMR::clinical_breakpoints[, !sapply(AMR::clinical_breakpoints, is.list)]')
|
||||||
if (inherits(x, c("Date", "POSIXt", "factor"))) {
|
|
||||||
as.character(x)
|
|
||||||
} else {
|
|
||||||
x
|
|
||||||
}
|
|
||||||
})
|
|
||||||
df <- df[, !sapply(df, is.list)]
|
|
||||||
df
|
|
||||||
'''))
|
|
||||||
example_isolates['date'] = pd.to_datetime(example_isolates['date'])
|
|
||||||
|
|
||||||
# microorganisms
|
|
||||||
microorganisms = pandas2ri.rpy2py(robjects.r('AMR::microorganisms[, !sapply(AMR::microorganisms, is.list)]'))
|
|
||||||
antimicrobials = pandas2ri.rpy2py(robjects.r('AMR::antimicrobials[, !sapply(AMR::antimicrobials, is.list)]'))
|
|
||||||
clinical_breakpoints = pandas2ri.rpy2py(robjects.r('AMR::clinical_breakpoints[, !sapply(AMR::clinical_breakpoints, is.list)]'))
|
|
||||||
|
|
||||||
base.options(warn = 0)
|
base.options(warn = 0)
|
||||||
|
|
||||||
@@ -129,16 +129,15 @@ echo "from .datasets import clinical_breakpoints" >> $init_file
|
|||||||
|
|
||||||
# Write header to the functions Python file, including the convert_to_python function
|
# Write header to the functions Python file, including the convert_to_python function
|
||||||
cat <<EOL > "$functions_file"
|
cat <<EOL > "$functions_file"
|
||||||
|
import functools
|
||||||
import rpy2.robjects as robjects
|
import rpy2.robjects as robjects
|
||||||
from rpy2.robjects.packages import importr
|
from rpy2.robjects.packages import importr
|
||||||
from rpy2.robjects.vectors import StrVector, FactorVector, IntVector, FloatVector, DataFrame
|
from rpy2.robjects.vectors import StrVector, FactorVector, IntVector, FloatVector, DataFrame
|
||||||
from rpy2.robjects import pandas2ri
|
from rpy2.robjects.conversion import localconverter
|
||||||
|
from rpy2.robjects import default_converter, numpy2ri, pandas2ri
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
# Activate automatic conversion between R data frames and pandas data frames
|
|
||||||
pandas2ri.activate()
|
|
||||||
|
|
||||||
# Import the AMR R package
|
# Import the AMR R package
|
||||||
amr_r = importr('AMR')
|
amr_r = importr('AMR')
|
||||||
|
|
||||||
@@ -156,10 +155,8 @@ def convert_to_python(r_output):
|
|||||||
return list(r_output) # Convert to a Python list of integers or floats
|
return list(r_output) # Convert to a Python list of integers or floats
|
||||||
|
|
||||||
# Check if it's a pandas-compatible R data frame
|
# Check if it's a pandas-compatible R data frame
|
||||||
elif isinstance(r_output, pd.DataFrame):
|
elif isinstance(r_output, (pd.DataFrame, DataFrame)):
|
||||||
return r_output # Return as pandas DataFrame (already converted by pandas2ri)
|
return r_output # Return as pandas DataFrame (already converted by pandas2ri)
|
||||||
elif isinstance(r_output, DataFrame):
|
|
||||||
return pandas2ri.rpy2py(r_output) # Return as pandas DataFrame
|
|
||||||
|
|
||||||
# Check if the input is a NumPy array and has a string data type
|
# Check if the input is a NumPy array and has a string data type
|
||||||
if isinstance(r_output, np.ndarray) and np.issubdtype(r_output.dtype, np.str_):
|
if isinstance(r_output, np.ndarray) and np.issubdtype(r_output.dtype, np.str_):
|
||||||
@@ -167,6 +164,15 @@ def convert_to_python(r_output):
|
|||||||
|
|
||||||
# Fall-back
|
# Fall-back
|
||||||
return r_output
|
return r_output
|
||||||
|
|
||||||
|
def r_to_python(r_func):
|
||||||
|
"""Decorator that runs an rpy2 function under a localconverter
|
||||||
|
and then applies convert_to_python to its output."""
|
||||||
|
@functools.wraps(r_func)
|
||||||
|
def wrapper(*args, **kwargs):
|
||||||
|
with localconverter(default_converter + numpy2ri.converter + pandas2ri.converter):
|
||||||
|
return convert_to_python(r_func(*args, **kwargs))
|
||||||
|
return wrapper
|
||||||
EOL
|
EOL
|
||||||
|
|
||||||
# Directory where the .Rd files are stored (update path as needed)
|
# Directory where the .Rd files are stored (update path as needed)
|
||||||
@@ -246,11 +252,12 @@ for rd_file in "$rd_dir"/*.Rd; do
|
|||||||
gsub("FALSE", "False", func_args)
|
gsub("FALSE", "False", func_args)
|
||||||
gsub("NULL", "None", func_args)
|
gsub("NULL", "None", func_args)
|
||||||
|
|
||||||
# Write the Python function definition to the output file
|
# Write the Python function definition to the output file, using decorator
|
||||||
print "def " func_name_py "(" func_args "):" >> "'"$functions_file"'"
|
print "@r_to_python" >> "'"$functions_file"'"
|
||||||
print " \"\"\"Please see our website of the R package for the full manual: https://amr-for-r.org\"\"\"" >> "'"$functions_file"'"
|
print "def " func_name_py "(" func_args "):" >> "'"$functions_file"'"
|
||||||
print " return convert_to_python(amr_r." func_name_py "(" func_args "))" >> "'"$functions_file"'"
|
print " \"\"\"Please see our website of the R package for the full manual: https://amr-for-r.org\"\"\"" >> "'"$functions_file"'"
|
||||||
|
print " return amr_r." func_name_py "(" func_args ")" >> "'"$functions_file"'"
|
||||||
|
|
||||||
print "from .functions import " func_name_py >> "'"$init_file"'"
|
print "from .functions import " func_name_py >> "'"$init_file"'"
|
||||||
}
|
}
|
||||||
' "$rd_file"
|
' "$rd_file"
|
||||||
|
@@ -1 +1 @@
|
|||||||
228840b3941753c4adee2b781d901590
|
d12f1c78feaecbb4d1631f9c735ad49b
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -116,7 +116,7 @@
|
|||||||
"CSU" 68718 "Cefsumide" "Cephalosporins (unclassified gen.)" "NA" "NA" "cefsulmid,cefsumido,cefsumidum" "NA"
|
"CSU" 68718 "Cefsumide" "Cephalosporins (unclassified gen.)" "NA" "NA" "cefsulmid,cefsumido,cefsumidum" "NA"
|
||||||
"CPT" 56841980 "Ceftaroline" "Cephalosporins (5th gen.)" "J01DI02,QJ01DI02" "ceftar,cfro" "ceftaroine,teflaro,zinforo" "73604-1,73605-8,73626-4,73627-2,73649-6,73650-4,74170-2"
|
"CPT" 56841980 "Ceftaroline" "Cephalosporins (5th gen.)" "J01DI02,QJ01DI02" "ceftar,cfro" "ceftaroine,teflaro,zinforo" "73604-1,73605-8,73626-4,73627-2,73649-6,73650-4,74170-2"
|
||||||
"CPA" "Ceftaroline/avibactam" "Cephalosporins (5th gen.)" "NA" "NA" "NA" "73604-1,73626-4,73649-6"
|
"CPA" "Ceftaroline/avibactam" "Cephalosporins (5th gen.)" "NA" "NA" "NA" "73604-1,73626-4,73649-6"
|
||||||
"CAZ" 5481173 "Ceftazidime" "Cephalosporins (3rd gen.)" "J01DD02,QJ01DD02" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "caz,cefta,ceftaz,cfta,cftz,taz,tz,xtz" "ceftazimide,ceptaz,fortam,fortaz,fortum,glazidim,kefazim,modacin,pentacef,tazicef,tizime" 4 "g" "101481-0,101482-8,101483-6,132-1,133-9,134-7,135-4,18893-8,21151-6,3449-6,35774-9,35775-6,35776-4,42352-5,55648-0,55649-8,55650-6,55651-4,58705-5,6995-5,73603-3,73625-6,73648-8,80960-8,87734-0,90850-9"
|
"CAZ" 5481173 "Ceftazidime" "Cephalosporins (3rd gen.)" "J01DD02,QJ01DD02" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "caz,cef,cefta,ceftaz,cfta,cftz,taz,tz,xtz" "ceftazimide,ceptaz,fortam,fortaz,fortum,glazidim,kefazim,modacin,pentacef,tazicef,tizime" 4 "g" "101481-0,101482-8,101483-6,132-1,133-9,134-7,135-4,18893-8,21151-6,3449-6,35774-9,35775-6,35776-4,42352-5,55648-0,55649-8,55650-6,55651-4,58705-5,6995-5,73603-3,73625-6,73648-8,80960-8,87734-0,90850-9"
|
||||||
"CZA" 90643431 "Ceftazidime/avibactam" "Cephalosporins (3rd gen.)" "J01DD52,QJ01DD52" "cfav" "avycaz,zavicefta" 6 "g" "101483-6,73603-3,73625-6,73648-8,87734-0"
|
"CZA" 90643431 "Ceftazidime/avibactam" "Cephalosporins (3rd gen.)" "J01DD52,QJ01DD52" "cfav" "avycaz,zavicefta" 6 "g" "101483-6,73603-3,73625-6,73648-8,87734-0"
|
||||||
"CCV" 9575352 "Ceftazidime/clavulanic acid" "Cephalosporins (3rd gen.)" "J01DD52,QJ01DD52" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "czcl,tazcla,xtzl" "NA" 6 "g" "NA"
|
"CCV" 9575352 "Ceftazidime/clavulanic acid" "Cephalosporins (3rd gen.)" "J01DD52,QJ01DD52" "Other beta-lactam antibacterials" "Third-generation cephalosporins" "czcl,tazcla,xtzl" "NA" 6 "g" "NA"
|
||||||
"CEM" 6537431 "Cefteram" "Cephalosporins (3rd gen.)" "J01DD18,QJ01DD18" "cefter" "cefterame,cefteramum,ceftetrame" 0.4 "g" "100047-0,76144-5"
|
"CEM" 6537431 "Cefteram" "Cephalosporins (3rd gen.)" "J01DD18,QJ01DD18" "cefter" "cefterame,cefteramum,ceftetrame" 0.4 "g" "100047-0,76144-5"
|
||||||
@@ -162,7 +162,7 @@
|
|||||||
"CYC" 6234 "Cycloserine" "Oxazolidinones" "J04AB01,QJ04AB01" "Drugs for treatment of tuberculosis" "Antibiotics" "cycl,cyclos" "cicloserina,closina,cyclorin,cycloserin,cycloserinum,farmiserina,levcicloserina,levcycloserine,levcycloserinum,micoserina,miroserina,miroseryn,novoserin,oxamicina,oxamycin,seromycin,tebemicina,wasserina" 0.75 "g" "16702-3,18914-2,212-1,213-9,214-7,215-4,23608-3,25207-2,25208-0,25209-8,25251-0,3519-6,55667-0"
|
"CYC" 6234 "Cycloserine" "Oxazolidinones" "J04AB01,QJ04AB01" "Drugs for treatment of tuberculosis" "Antibiotics" "cycl,cyclos" "cicloserina,closina,cyclorin,cycloserin,cycloserinum,farmiserina,levcicloserina,levcycloserine,levcycloserinum,micoserina,miroserina,miroseryn,novoserin,oxamicina,oxamycin,seromycin,tebemicina,wasserina" 0.75 "g" "16702-3,18914-2,212-1,213-9,214-7,215-4,23608-3,25207-2,25208-0,25209-8,25251-0,3519-6,55667-0"
|
||||||
"DAL" 23724878 "Dalbavancin" "Glycopeptides" "J01XA04,QJ01XA04" "Other antibacterials" "Glycopeptide antibacterials" "dalb,dalbav" "dalbavancina,dalvance,xydalba,zeven" 1.5 "g" "41688-3,41689-1,41690-9,41734-5"
|
"DAL" 23724878 "Dalbavancin" "Glycopeptides" "J01XA04,QJ01XA04" "Other antibacterials" "Glycopeptide antibacterials" "dalb,dalbav" "dalbavancina,dalvance,xydalba,zeven" 1.5 "g" "41688-3,41689-1,41690-9,41734-5"
|
||||||
"DAN" 71335 "Danofloxacin" "Fluoroquinolones" "QJ01MA92" "danofl" "advocin,danofloxacine,danofloxacino,danofloxacinum" "73601-7,73623-1,73646-2"
|
"DAN" 71335 "Danofloxacin" "Fluoroquinolones" "QJ01MA92" "danofl" "advocin,danofloxacine,danofloxacino,danofloxacinum" "73601-7,73623-1,73646-2"
|
||||||
"DPS" 2955 "Dapsone" "Other antibacterials" "D10AX05,J04BA02,QD10AX05,QJ04BA02" "Drugs for treatment of lepra" "Drugs for treatment of lepra" "NA" "aczone,atrisone,avlosulfon,avlosulfone,avlosulphone,benzenamide,benzenamine,bissulfone,bissulphone,croysulfone,croysulphone,dapson,dapsona,dapsonum,daspone,diaphenylsulfon,diaphenylsulfone,diaphenylsulphon,diaphenylsulphone,diphenasone,diphone,disulfone,disulone,disulphone,dubronax,dumitone,eporal,medapsol,novophone,servidapson,sulfadione,sulfona,sulfonyldianiline,sulphadione,sulphonyldianiline,tarimyl,udolac,undolac" 50 "mg" "51698-9,9747-7"
|
"DPS" 2955 "Dapsone" "Other antibacterials" "D10AX05,J04BA02,QD10AX05,QJ04BA02" "Drugs for treatment of lepra" "Drugs for treatment of lepra" "dao" "aczone,atrisone,avlosulfon,avlosulfone,avlosulphone,benzenamide,benzenamine,bissulfone,bissulphone,croysulfone,croysulphone,dapson,dapsona,dapsonum,daspone,diaphenylsulfon,diaphenylsulfone,diaphenylsulphon,diaphenylsulphone,diphenasone,diphone,disulfone,disulone,disulphone,dubronax,dumitone,eporal,medapsol,novophone,servidapson,sulfadione,sulfona,sulfonyldianiline,sulphadione,sulphonyldianiline,tarimyl,udolac,undolac" 50 "mg" "51698-9,9747-7"
|
||||||
"DAP" 16134395 "Daptomycin" "Other antibacterials" "J01XX09,QJ01XX09" "Other antibacterials" "Other antibacterials" "dap,dapt,dapt25,dapt50,daptom" "cidecin,cubicin,dapcin,daptomicina,daptomycine,daptomycinum,deptomycin" 0.28 "g" "35787-1,35788-9,35789-7,41691-7"
|
"DAP" 16134395 "Daptomycin" "Other antibacterials" "J01XX09,QJ01XX09" "Other antibacterials" "Other antibacterials" "dap,dapt,dapt25,dapt50,daptom" "cidecin,cubicin,dapcin,daptomicina,daptomycine,daptomycinum,deptomycin" 0.28 "g" "35787-1,35788-9,35789-7,41691-7"
|
||||||
"DFX" 487101 "Delafloxacin" "Fluoroquinolones" "J01MA23,QJ01MA23" "NA" "baxdela,delafloxacinum,quofenix" 0.9 "g" 0.6 "g" "88885-9,90447-4,93790-4"
|
"DFX" 487101 "Delafloxacin" "Fluoroquinolones" "J01MA23,QJ01MA23" "NA" "baxdela,delafloxacinum,quofenix" 0.9 "g" 0.6 "g" "88885-9,90447-4,93790-4"
|
||||||
"DLM" 6480466 "Delamanid" "Antimycobacterials" "J04AK06,QJ04AK06" "Drugs for treatment of tuberculosis" "Other drugs for treatment of tuberculosis" "dela" "deltyba" 0.2 "g" "93851-4,96109-4"
|
"DLM" 6480466 "Delamanid" "Antimycobacterials" "J04AK06,QJ04AK06" "Drugs for treatment of tuberculosis" "Other drugs for treatment of tuberculosis" "dela" "deltyba" 0.2 "g" "93851-4,96109-4"
|
||||||
@@ -184,7 +184,7 @@
|
|||||||
"ERV" 54726192 "Eravacycline" "Tetracyclines" "J01AA13,QJ01AA13" "Tetracyclines" "Tetracyclines" "erav" "xerava" 0.14 "g" "100049-6,85423-2,93767-2"
|
"ERV" 54726192 "Eravacycline" "Tetracyclines" "J01AA13,QJ01AA13" "Tetracyclines" "Tetracyclines" "erav" "xerava" 0.14 "g" "100049-6,85423-2,93767-2"
|
||||||
"ETP" 150610 "Ertapenem" "Carbapenems" "J01DH03,QJ01DH03" "Other beta-lactam antibacterials" "Carbapenems" "erta,ertape,etp" "ertapenemsalt,invanz" 1 "g" "101486-9,35799-6,35800-2,35801-0,35802-8"
|
"ETP" 150610 "Ertapenem" "Carbapenems" "J01DH03,QJ01DH03" "Other beta-lactam antibacterials" "Carbapenems" "erta,ertape,etp" "ertapenemsalt,invanz" 1 "g" "101486-9,35799-6,35800-2,35801-0,35802-8"
|
||||||
"ERY" 12560 "Erythromycin" "Macrolides/lincosamides" "D10AF02,J01FA01,QD10AF02,QJ01FA01,QJ51FA01,QS01AA17,S01AA17" "Macrolides, lincosamides and streptogramins" "Macrolides" "e,em,ery,ery32,eryt,eryth" "abboticin,abomacetin,acneryne,acnesol,aknemycin,aknin,benzamycin,derimer,deripil,dotycin,dumotrycin,emgel,emuvin,emycin,endoeritrin,erecin,erisone,eritomicina,eritrocina,eritromicina,ermycin,eryacne,eryacnen,erycen,erycette,erycinum,eryderm,erydermer,erygel,eryhexal,erymax,erymed,erysafe,erytab,erythro,erythroderm,erythrogran,erythroguent,erythromast,erythromid,erythromycine,erythromycinum,erytop,erytrociclin,ilocaps,ilosone,iloticina,ilotycin,inderm,latotryd,lederpax,mephamycin,mercina,oftamolets,pantoderm,pantodrin,pantomicina,pharyngocin,primacine,propiocine,proterytrin,retcin,robimycin,sansac,spotex,staticin,stiemicyn,stiemycin,tiprocin,torlamicina,wemid" 2 "g" 1 "g" "100050-4,11576-6,12298-6,16829-4,16830-2,18919-1,18920-9,20380-2,232-9,233-7,234-5,235-2,236-0,23633-1,237-8,238-6,239-4,25224-7,25275-9,3597-2,7009-4"
|
"ERY" 12560 "Erythromycin" "Macrolides/lincosamides" "D10AF02,J01FA01,QD10AF02,QJ01FA01,QJ51FA01,QS01AA17,S01AA17" "Macrolides, lincosamides and streptogramins" "Macrolides" "e,em,ery,ery32,eryt,eryth" "abboticin,abomacetin,acneryne,acnesol,aknemycin,aknin,benzamycin,derimer,deripil,dotycin,dumotrycin,emgel,emuvin,emycin,endoeritrin,erecin,erisone,eritomicina,eritrocina,eritromicina,ermycin,eryacne,eryacnen,erycen,erycette,erycinum,eryderm,erydermer,erygel,eryhexal,erymax,erymed,erysafe,erytab,erythro,erythroderm,erythrogran,erythroguent,erythromast,erythromid,erythromycine,erythromycinum,erytop,erytrociclin,ilocaps,ilosone,iloticina,ilotycin,inderm,latotryd,lederpax,mephamycin,mercina,oftamolets,pantoderm,pantodrin,pantomicina,pharyngocin,primacine,propiocine,proterytrin,retcin,robimycin,sansac,spotex,staticin,stiemicyn,stiemycin,tiprocin,torlamicina,wemid" 2 "g" 1 "g" "100050-4,11576-6,12298-6,16829-4,16830-2,18919-1,18920-9,20380-2,232-9,233-7,234-5,235-2,236-0,23633-1,237-8,238-6,239-4,25224-7,25275-9,3597-2,7009-4"
|
||||||
"ETH" 14052 "Ethambutol" "Antimycobacterials" "J04AK02,QJ04AK02" "Drugs for treatment of tuberculosis" "Other drugs for treatment of tuberculosis" "etha,ethamb" "aethambutolum,dadibutol,diambutol,etambutol,etambutolo,ethambutolum,myambutol,purderal,servambutol,tibutol" 1.2 "g" 1.2 "g" "100051-2,16841-9,18921-7,20381-0,23625-7,240-2,241-0,242-8,243-6,25187-6,25194-2,25195-9,25230-4,25404-5,3607-9,42645-2,42646-0,55154-9,55674-6,56025-0,7010-2,89491-5"
|
"ETH" 14052 "Ethambutol" "Antimycobacterials" "J04AK02,QJ04AK02" "Drugs for treatment of tuberculosis" "Other drugs for treatment of tuberculosis" "emb,etha,ethamb" "aethambutolum,dadibutol,diambutol,etambutol,etambutolo,ethambutolum,myambutol,purderal,servambutol,tibutol" 1.2 "g" 1.2 "g" "100051-2,16841-9,18921-7,20381-0,23625-7,240-2,241-0,242-8,243-6,25187-6,25194-2,25195-9,25230-4,25404-5,3607-9,42645-2,42646-0,55154-9,55674-6,56025-0,7010-2,89491-5"
|
||||||
"ETI" 456476 "Ethambutol/isoniazid" "Antimycobacterials" "J04AM03,QJ04AM03" "Drugs for treatment of tuberculosis" "Combinations of drugs for treatment of tuberculosis" "NA" "NA" "NA"
|
"ETI" 456476 "Ethambutol/isoniazid" "Antimycobacterials" "J04AM03,QJ04AM03" "Drugs for treatment of tuberculosis" "Combinations of drugs for treatment of tuberculosis" "NA" "NA" "NA"
|
||||||
"ETI1" 2761171 "Ethionamide" "Antimycobacterials" "J04AD03,QJ04AD03" "Drugs for treatment of tuberculosis" "Thiocarbamide derivatives" "ethi,ethion" "aethionamidum,aetina,aetiva,amidazin,amidazine,atina,ethimide,ethina,ethinamide,ethionamidum,ethioniamide,ethylisothiamide,ethyonomide,etimid,etiocidan,etionamid,etionamida,etionamide,etioniamid,etionid,etionizin,etionizina,etionizine,fatoliamid,iridocin,iridozin,isothin,isotiamida,itiocide,nicotion,nisotin,nizotin,rigenicid,sertinon,teberus,thianid,thianide,thioamide,thiodine,thiomid,thioniden,tianid,tiomid,trecator,trekator,trescatyl,trescazide,tubenamide,tubermin,tuberoid,tuberoson" 0.75 "g" "16099-4,16845-0,18922-5,20382-8,23617-4,25183-5,25196-7,25198-3,25231-2,41693-3,42647-8,42648-6,7011-0,96110-2"
|
"ETI1" 2761171 "Ethionamide" "Antimycobacterials" "J04AD03,QJ04AD03" "Drugs for treatment of tuberculosis" "Thiocarbamide derivatives" "ethi,ethion" "aethionamidum,aetina,aetiva,amidazin,amidazine,atina,ethimide,ethina,ethinamide,ethionamidum,ethioniamide,ethylisothiamide,ethyonomide,etimid,etiocidan,etionamid,etionamida,etionamide,etioniamid,etionid,etionizin,etionizina,etionizine,fatoliamid,iridocin,iridozin,isothin,isotiamida,itiocide,nicotion,nisotin,nizotin,rigenicid,sertinon,teberus,thianid,thianide,thioamide,thiodine,thiomid,thioniden,tianid,tiomid,trecator,trekator,trescatyl,trescazide,tubenamide,tubermin,tuberoid,tuberoson" 0.75 "g" "16099-4,16845-0,18922-5,20382-8,23617-4,25183-5,25196-7,25198-3,25231-2,41693-3,42647-8,42648-6,7011-0,96110-2"
|
||||||
"ETO" 6034 "Ethopabate" "Other antibacterials" "QP51AX17" "NA" "ethopabat" "NA"
|
"ETO" 6034 "Ethopabate" "Other antibacterials" "QP51AX17" "NA" "ethopabat" "NA"
|
||||||
@@ -202,7 +202,7 @@
|
|||||||
"FLM" 3374 "Flumequine" "Quinolones" "J01MB07,QJ01MB07" "Quinolone antibacterials" "Other quinolones" "flumeq" "apurone,fantacin,flumequina,flumequino,flumequinum,flumigal,flumiquil,flumisol,flumix,imequyl" 1.2 "g" "55675-3,55676-1,55677-9,55678-7"
|
"FLM" 3374 "Flumequine" "Quinolones" "J01MB07,QJ01MB07" "Quinolone antibacterials" "Other quinolones" "flumeq" "apurone,fantacin,flumequina,flumequino,flumequinum,flumigal,flumiquil,flumisol,flumix,imequyl" 1.2 "g" "55675-3,55676-1,55677-9,55678-7"
|
||||||
"FLR1" 71260 "Flurithromycin" "Macrolides/lincosamides" "J01FA14,QJ01FA14" "Macrolides, lincosamides and streptogramins" "Macrolides" "NA" "abbot,beritromicina,berythromycin,berythromycine,berythromycinum,flurithromycine,flurithromycinum,fluritromicina,fluritromycinum,flurizic,mizar" 0.75 "g" "NA"
|
"FLR1" 71260 "Flurithromycin" "Macrolides/lincosamides" "J01FA14,QJ01FA14" "Macrolides, lincosamides and streptogramins" "Macrolides" "NA" "abbot,beritromicina,berythromycin,berythromycine,berythromycinum,flurithromycine,flurithromycinum,fluritromicina,fluritromycinum,flurizic,mizar" 0.75 "g" "NA"
|
||||||
"FFL" 214356 "Fosfluconazole" "Antifungals/antimycotics" "NA" "NA" "fosfluconazol,procif,prodif" "NA"
|
"FFL" 214356 "Fosfluconazole" "Antifungals/antimycotics" "NA" "NA" "fosfluconazol,procif,prodif" "NA"
|
||||||
"FOS" 446987 "Fosfomycin" "Other antibacterials" "J01XX01,QJ01XX01,QS02AA17,S02AA17" "Other antibacterials" "Other antibacterials" "ff,fm,fo,fof,fos,fosf,fosfom,fosmyc" "fosfocina,fosfomicin,fosfomicina,fosfomycine,fosfomycinum,fosfonomycin,infectophos,phosphonemycin,phosphonomycin,veramina" 3 "g" 8 "g" "25596-8,25653-7,35809-3,35810-1"
|
"FOS" 446987 "Fosfomycin" "Phosphonics" "J01XX01,QJ01XX01,QS02AA17,S02AA17" "Other antibacterials" "Other antibacterials" "ff,fm,fo,fof,fos,fosf,fosfom,fosmyc" "fosfocina,fosfomicin,fosfomicina,fosfomycine,fosfomycinum,fosfonomycin,infectophos,phosphonemycin,phosphonomycin,veramina" 3 "g" 8 "g" "25596-8,25653-7,35809-3,35810-1"
|
||||||
"FMD" 572 "Fosmidomycin" "Other antibacterials" "NA" "NA" "fosmidomicina,fosmidomycina,fosmidomycine,fosmidomycinsalt,fosmidomycinum" "NA"
|
"FMD" 572 "Fosmidomycin" "Other antibacterials" "NA" "NA" "fosmidomicina,fosmidomycina,fosmidomycine,fosmidomycinsalt,fosmidomycinum" "NA"
|
||||||
"FRM" 8378 "Framycetin" "Aminoglycosides" "D09AA01,QD09AA01,QJ01GB91,QR01AX08,QS01AA07,R01AX08,S01AA07" "fram,framyc" "actilin,actiline,antibiotique,bycomycin,enterfram,fradiomycin,fradiomycinum,framicetina,framidal,framycetine,framycetinum,framycin,framygen,francetin,jernadex,myacyne,mycerin,mycifradin,neobrettin,neolate,neomas,neomcin,neomicina,neomin,neomycine,neomycinum,nivemycin,soframycin,soframycine" "18926-6,257-6,258-4,259-2,260-0,55679-5"
|
"FRM" 8378 "Framycetin" "Aminoglycosides" "D09AA01,QD09AA01,QJ01GB91,QR01AX08,QS01AA07,R01AX08,S01AA07" "fram,framyc" "actilin,actiline,antibiotique,bycomycin,enterfram,fradiomycin,fradiomycinum,framicetina,framidal,framycetine,framycetinum,framycin,framygen,francetin,jernadex,myacyne,mycerin,mycifradin,neobrettin,neolate,neomas,neomcin,neomicina,neomin,neomycine,neomycinum,nivemycin,soframycin,soframycine" "18926-6,257-6,258-4,259-2,260-0,55679-5"
|
||||||
"FUR" 6870646 "Furazidin" "Other antibacterials" "J01XE03,QJ01XE03" "Other antibacterials" "Nitrofuran derivatives" "NA" "akritoin,furagin,furaginum,furamag,furazidine,hydantoin" 0.3 "g" "NA"
|
"FUR" 6870646 "Furazidin" "Other antibacterials" "J01XE03,QJ01XE03" "Other antibacterials" "Nitrofuran derivatives" "NA" "akritoin,furagin,furaginum,furamag,furazidine,hydantoin" 0.3 "g" "NA"
|
||||||
@@ -268,7 +268,7 @@
|
|||||||
"MET" 6087 "Meticillin" "Beta-lactams/penicillins" "J01CF03,QJ01CF03,QJ51CF03" "Beta-lactam antibacterials, penicillins" "Beta-lactamase resistant penicillins" "methic,meti" "belfacillin,celbenin,celpilline,cinopenil,dimocillin,estafcilina,flabelline,lucopenin,metacillin,methcillin,methicillin,methicillinanhydrous,methicillinhydrate,methicillinsalt,methicillinum,methycillin,meticilina,meticillina,meticilline,meticillinsalt,meticillinum,penaureus,penysol,staficyn,staphcillin,synticillin" 4 "g" "NA"
|
"MET" 6087 "Meticillin" "Beta-lactams/penicillins" "J01CF03,QJ01CF03,QJ51CF03" "Beta-lactam antibacterials, penicillins" "Beta-lactamase resistant penicillins" "methic,meti" "belfacillin,celbenin,celpilline,cinopenil,dimocillin,estafcilina,flabelline,lucopenin,metacillin,methcillin,methicillin,methicillinanhydrous,methicillinhydrate,methicillinsalt,methicillinum,methycillin,meticilina,meticillina,meticilline,meticillinsalt,meticillinum,penaureus,penysol,staficyn,staphcillin,synticillin" 4 "g" "NA"
|
||||||
"MTP" 68590 "Metioprim" "Other antibacterials" "NA" "NA" "methioprim,metioprima,metioprime,metioprimum" "NA"
|
"MTP" 68590 "Metioprim" "Other antibacterials" "NA" "NA" "methioprim,metioprima,metioprime,metioprimum" "NA"
|
||||||
"MXT" 3047729 "Metioxate" "Fluoroquinolones" "NA" "NA" "metioxato,metioxatum" "NA"
|
"MXT" 3047729 "Metioxate" "Fluoroquinolones" "NA" "NA" "metioxato,metioxatum" "NA"
|
||||||
"MTR" 4173 "Metronidazole" "Other antibacterials" "A01AB17,D06BX01,G01AF01,J01XD01,P01AB01,QA01AB17,QD06BX01,QG01AF01,QJ01XD01,QP51CA01" "Other antibacterials" "Imidazole derivatives" "metr,metron,mnz" "acromona,anagiardil,arilin,atrivyl,bexon,clont,danizol,deflamon,donnan,efloran,elyzol,entizol,eumin,flagemona,flagesol,flagil,flagyl,flazol,flegyl,florazole,fossyol,giatricol,gineflavir,givagil,hydroxydimetridazole,hydroxymetronidazole,izoklion,klion,klont,mepagyl,meronidal,metric,metrolag,metrolyl,metromidol,metronidazolo,metronidazolum,metroplex,metrotop,mexibol,monagyl,monasin,nalox,nidagyl,noritate,novonidazol,nuvessa,orvagil,polibiotic,protostat,rathimed,rosaced,rosased,sanatrichom,satric,takimetol,trichazol,trichex,trichobrol,trichocide,trichomol,trichopal,trichopol,tricocet,tricom,trikacide,trikamon,trikhopol,trikojol,trikozol,trimeks,trivazol,vagilen,vagimid,vandazole,vertisal,wagitran,zadstat,zidoval" 2 "g" 1.5 "g" "10991-8,18946-4,326-9,327-7,328-5,329-3,7031-8"
|
"MTR" 4173 "Metronidazole" "Other antibacterials" "A01AB17,D06BX01,G01AF01,J01XD01,P01AB01,QA01AB17,QD06BX01,QG01AF01,QJ01XD01,QP51CA01" "Other antibacterials" "Imidazole derivatives" "metr,metron,mnz,mtz" "acromona,anagiardil,arilin,atrivyl,bexon,clont,danizol,deflamon,donnan,efloran,elyzol,entizol,eumin,flagemona,flagesol,flagil,flagyl,flazol,flegyl,florazole,fossyol,giatricol,gineflavir,givagil,hydroxydimetridazole,hydroxymetronidazole,izoklion,klion,klont,mepagyl,meronidal,metric,metrolag,metrolyl,metromidol,metronidazolo,metronidazolum,metroplex,metrotop,mexibol,monagyl,monasin,nalox,nidagyl,noritate,novonidazol,nuvessa,orvagil,polibiotic,protostat,rathimed,rosaced,rosased,sanatrichom,satric,takimetol,trichazol,trichex,trichobrol,trichocide,trichomol,trichopal,trichopol,tricocet,tricom,trikacide,trikamon,trikhopol,trikojol,trikozol,trimeks,trivazol,vagilen,vagimid,vandazole,vertisal,wagitran,zadstat,zidoval" 2 "g" 1.5 "g" "10991-8,18946-4,326-9,327-7,328-5,329-3,7031-8"
|
||||||
"MEZ" 656511 "Mezlocillin" "Beta-lactams/penicillins" "J01CA10,QJ01CA10" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "mez,mezl,mezlo,mz" "baycipen,baypen,mezlin,mezlocilina,mezlocilline,mezlocillinsalt,mezlocillinum,multocillin" 6 "g" "18947-2,330-1,331-9,332-7,333-5,3820-8,41702-2,54194-6,54195-3,54196-1"
|
"MEZ" 656511 "Mezlocillin" "Beta-lactams/penicillins" "J01CA10,QJ01CA10" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "mez,mezl,mezlo,mz" "baycipen,baypen,mezlin,mezlocilina,mezlocilline,mezlocillinsalt,mezlocillinum,multocillin" 6 "g" "18947-2,330-1,331-9,332-7,333-5,3820-8,41702-2,54194-6,54195-3,54196-1"
|
||||||
"MSU" "Mezlocillin/sulbactam" "Beta-lactams/penicillins" "NA" "mezsul" "NA" "54194-6,54195-3,54196-1"
|
"MSU" "Mezlocillin/sulbactam" "Beta-lactams/penicillins" "NA" "mezsul" "NA" "54194-6,54195-3,54196-1"
|
||||||
"MIF" 477468 "Micafungin" "Antifungals/antimycotics" "J02AX05,QJ02AX05" "Antimycotics for systemic use" "Other antimycotics for systemic use" "mica,micafu" "fungard,funguard,micafungina,micafunginsalt,mycamine" 0.1 "g" "53812-4,58418-5,65340-2,85048-7"
|
"MIF" 477468 "Micafungin" "Antifungals/antimycotics" "J02AX05,QJ02AX05" "Antimycotics for systemic use" "Other antimycotics for systemic use" "mica,micafu" "fungard,funguard,micafungina,micafunginsalt,mycamine" 0.1 "g" "53812-4,58418-5,65340-2,85048-7"
|
||||||
@@ -339,7 +339,7 @@
|
|||||||
"PMR" 5284447 "Pimaricin" "Antifungals/antimycotics" "NA" "natamycin" "delvocid,delvolan,delvopos,mycophyt,myprozine,natacyn,natafucin,natajen,natamatrix,natamax,natamicina,natamycin,natamycine,natamycinum,pimafucin,pimaracin,pimaricine,pimarizin,synogil,tennecetin" "NA"
|
"PMR" 5284447 "Pimaricin" "Antifungals/antimycotics" "NA" "natamycin" "delvocid,delvolan,delvopos,mycophyt,myprozine,natacyn,natafucin,natajen,natamatrix,natamax,natamicina,natamycin,natamycine,natamycinum,pimafucin,pimaracin,pimaricine,pimarizin,synogil,tennecetin" "NA"
|
||||||
"PPA" 4831 "Pipemidic acid" "Quinolones" "J01MB04,QJ01MB04" "Quinolone antibacterials" "Other quinolones" "pipaci,pipz,pizu" "deblaston,dolcol,filtrax,karunomazin,memento,nuril,palin,pipedac,pipemid,pipemidate,pipemidic,pipemidicacid,pipram,pipurin,tractur,uromidin,urosten,uroval" 0.8 "g" "NA"
|
"PPA" 4831 "Pipemidic acid" "Quinolones" "J01MB04,QJ01MB04" "Quinolone antibacterials" "Other quinolones" "pipaci,pipz,pizu" "deblaston,dolcol,filtrax,karunomazin,memento,nuril,palin,pipedac,pipemid,pipemidate,pipemidic,pipemidicacid,pipram,pipurin,tractur,uromidin,urosten,uroval" 0.8 "g" "NA"
|
||||||
"PIP" 43672 "Piperacillin" "Beta-lactams/penicillins" "J01CA12,QJ01CA12" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "pi,pip,pipc,pipe,pipera,pp" "penmalin,pentcillin,peperacillin,peracin,piperacilina,piperacillina,piperacilline,piperacillinhydrate,piperacillinum,pipercillin,pipracil,tazocin" 14 "g" "101490-1,101491-9,18969-6,18970-4,25268-4,3972-7,407-7,408-5,409-3,410-1,411-9,412-7,413-5,414-3,54197-9,54198-7,54199-5,55704-1,7043-3,7044-1"
|
"PIP" 43672 "Piperacillin" "Beta-lactams/penicillins" "J01CA12,QJ01CA12" "Beta-lactam antibacterials, penicillins" "Penicillins with extended spectrum" "pi,pip,pipc,pipe,pipera,pp" "penmalin,pentcillin,peperacillin,peracin,piperacilina,piperacillina,piperacilline,piperacillinhydrate,piperacillinum,pipercillin,pipracil,tazocin" 14 "g" "101490-1,101491-9,18969-6,18970-4,25268-4,3972-7,407-7,408-5,409-3,410-1,411-9,412-7,413-5,414-3,54197-9,54198-7,54199-5,55704-1,7043-3,7044-1"
|
||||||
"PIS" "Piperacillin/sulbactam" "Beta-lactams/penicillins" "J01CR05,QJ01CR05" "NA" "NA" 14 "g" "54197-9,54198-7,54199-5,55704-1"
|
"PIS" "Piperacillin/sulbactam" "Beta-lactams/penicillins" "NA" "NA" "NA" 14 "g" "54197-9,54198-7,54199-5,55704-1"
|
||||||
"TZP" 461573 "Piperacillin/tazobactam" "Beta-lactams/penicillins" "J01CR05,QJ01CR05" "Beta-lactam antibacterials, penicillins" "Combinations of penicillins, incl. beta-lactamase inhibitors" "p/t,piptaz,piptazo,pit,pita,pt,ptc,ptz,tzp" "piptazobactam,tazonam,zobactin,zosyn" 14 "g" "101491-9,18970-4,411-9,412-7,413-5,414-3,7044-1"
|
"TZP" 461573 "Piperacillin/tazobactam" "Beta-lactams/penicillins" "J01CR05,QJ01CR05" "Beta-lactam antibacterials, penicillins" "Combinations of penicillins, incl. beta-lactamase inhibitors" "p/t,piptaz,piptazo,pit,pita,pt,ptc,ptz,tzp" "piptazobactam,tazonam,zobactin,zosyn" 14 "g" "101491-9,18970-4,411-9,412-7,413-5,414-3,7044-1"
|
||||||
"PRC" 71978 "Piridicillin" "Beta-lactams/penicillins" "NA" "NA" "NA" "NA"
|
"PRC" 71978 "Piridicillin" "Beta-lactams/penicillins" "NA" "NA" "NA" "NA"
|
||||||
"PRL" 157385 "Pirlimycin" "Macrolides/lincosamides" "QJ51FF90" "pirlim" "pirlimycina,pirlimycine,pirlimycinum,pirsue" "35829-1,35830-9,35831-7"
|
"PRL" 157385 "Pirlimycin" "Macrolides/lincosamides" "QJ51FF90" "pirlim" "pirlimycina,pirlimycine,pirlimycinum,pirsue" "35829-1,35830-9,35831-7"
|
||||||
@@ -370,7 +370,7 @@
|
|||||||
"RBC" 44631912 "Ribociclib" "Antifungals/antimycotics" "L01EF02,QL01EF02" "Antimycotics for systemic use" "Triazole derivatives" "ribo" "kisqali" 0.45 "g" "NA"
|
"RBC" 44631912 "Ribociclib" "Antifungals/antimycotics" "L01EF02,QL01EF02" "Antimycotics for systemic use" "Triazole derivatives" "ribo" "kisqali" 0.45 "g" "NA"
|
||||||
"RST" 33042 "Ribostamycin" "Aminoglycosides" "J01GB10,QJ01GB10" "Aminoglycoside antibacterials" "Other aminoglycosides" "NA" "exaluren,hetangmycin,ribastamin,ribostamicina,ribostamycine,ribostamycinum,vistamycin,xylostatin" 1 "g" "NA"
|
"RST" 33042 "Ribostamycin" "Aminoglycosides" "J01GB10,QJ01GB10" "Aminoglycoside antibacterials" "Other aminoglycosides" "NA" "exaluren,hetangmycin,ribastamin,ribostamicina,ribostamycine,ribostamycinum,vistamycin,xylostatin" 1 "g" "NA"
|
||||||
"RID1" 16659285 "Ridinilazole" "Other antibacterials" "NA" "NA" "ridinilazol" "NA"
|
"RID1" 16659285 "Ridinilazole" "Other antibacterials" "NA" "NA" "ridinilazol" "NA"
|
||||||
"RIB" 135398743 "Rifabutin" "Antimycobacterials" "J04AB04,QJ04AB04" "Drugs for treatment of tuberculosis" "Antibiotics" "ansamy,rifb" "alfacid,ansamicin,ansamycins,ansatipin,ansatipine,assatipin,mycobutin,rifabutinum" 0.15 "g" "100699-8,16100-0,16386-5,16387-3,19149-4,20386-9,23630-7,24032-5,25199-1,25200-7,25201-5,42655-1,42656-9,54183-9,96113-6"
|
"RIB" 135398743 "Rifabutin" "Antimycobacterials" "J04AB04,QJ04AB04" "Drugs for treatment of tuberculosis" "Antibiotics" "ansamy,rfb,rifb" "alfacid,ansamicin,ansamycins,ansatipin,ansatipine,assatipin,mycobutin,rifabutinum" 0.15 "g" "100699-8,16100-0,16386-5,16387-3,19149-4,20386-9,23630-7,24032-5,25199-1,25200-7,25201-5,42655-1,42656-9,54183-9,96113-6"
|
||||||
"RIF" 135398735 "Rifampicin" "Antimycobacterials" "J04AB02,QJ04AB02,QJ54AB02" "Drugs for treatment of tuberculosis" "Antibiotics" "rifa,rifamp" "abrifam,archidyn,arficin,arzide,benemicin,doloresum,eremfat,famcin,fenampicin,rifadin,rifadine,rifagen,rifaldazin,rifaldazine,rifaldin,rifam,rifamor,rifampicina,rifampicine,rifampicinum,rifampin,rifamsolin,rifapiam,rifaprodin,rifcin,rifinah,rifobac,rifoldin,rifoldine,riforal,rimactan,rimactane,rimactazid,rimactizid,rimazid,sinerdol,tubocin" 0.6 "g" 0.6 "g" "NA"
|
"RIF" 135398735 "Rifampicin" "Antimycobacterials" "J04AB02,QJ04AB02,QJ54AB02" "Drugs for treatment of tuberculosis" "Antibiotics" "rifa,rifamp" "abrifam,archidyn,arficin,arzide,benemicin,doloresum,eremfat,famcin,fenampicin,rifadin,rifadine,rifagen,rifaldazin,rifaldazine,rifaldin,rifam,rifamor,rifampicina,rifampicine,rifampicinum,rifampin,rifamsolin,rifapiam,rifaprodin,rifcin,rifinah,rifobac,rifoldin,rifoldine,riforal,rimactan,rimactane,rimactazid,rimactizid,rimazid,sinerdol,tubocin" 0.6 "g" 0.6 "g" "NA"
|
||||||
"REI" 135483893 "Rifampicin/ethambutol/isoniazid" "Antimycobacterials" "J04AM07,QJ04AM07" "Drugs for treatment of tuberculosis" "Combinations of drugs for treatment of tuberculosis" "NA" "isonarif,rifamate,rifamazid" "NA"
|
"REI" 135483893 "Rifampicin/ethambutol/isoniazid" "Antimycobacterials" "J04AM07,QJ04AM07" "Drugs for treatment of tuberculosis" "Combinations of drugs for treatment of tuberculosis" "NA" "isonarif,rifamate,rifamazid" "NA"
|
||||||
"RFI" "Rifampicin/isoniazid" "Antimycobacterials" "J04AM02,QJ04AM02" "Drugs for treatment of tuberculosis" "Combinations of drugs for treatment of tuberculosis" "NA" "NA" "NA"
|
"RFI" "Rifampicin/isoniazid" "Antimycobacterials" "J04AM02,QJ04AM02" "Drugs for treatment of tuberculosis" "Combinations of drugs for treatment of tuberculosis" "NA" "NA" "NA"
|
||||||
@@ -391,7 +391,6 @@
|
|||||||
"SRC" 54681908 "Sarecycline" "Tetracyclines" "J01AA14,QJ01AA14" "Tetracyclines" "Tetracyclines" "NA" "sareciclina,seysara" 0.1 "g" "NA"
|
"SRC" 54681908 "Sarecycline" "Tetracyclines" "J01AA14,QJ01AA14" "Tetracyclines" "Tetracyclines" "NA" "sareciclina,seysara" 0.1 "g" "NA"
|
||||||
"SRX" 9933415 "Sarmoxicillin" "Beta-lactams/penicillins" "NA" "NA" "sarmoxillina,sarmoxilline,sarmoxillinum" "NA"
|
"SRX" 9933415 "Sarmoxicillin" "Beta-lactams/penicillins" "NA" "NA" "sarmoxillina,sarmoxilline,sarmoxillinum" "NA"
|
||||||
"SEC" 71815 "Secnidazole" "Other antibacterials" "P01AB07" "NA" "flagentyl,secnidal,secnidazolum,secnil,sindose,solosec" 2 "g" "NA"
|
"SEC" 71815 "Secnidazole" "Other antibacterials" "P01AB07" "NA" "flagentyl,secnidal,secnidazolum,secnil,sindose,solosec" 2 "g" "NA"
|
||||||
"SMF" "Simvastatin/fenofibrate" "Antimycobacterials" "C10BA04,QC10BA04" "Drugs for treatment of tuberculosis" "Other drugs for treatment of tuberculosis" "simv" "NA" "NA"
|
|
||||||
"SIS" 36119 "Sisomicin" "Aminoglycosides" "J01GB08,QJ01GB08" "Aminoglycoside antibacterials" "Other aminoglycosides" "siso,sisomy" "rickamicin,salvamina,sisomicina,sisomicine,sisomicinum,sisomin,sisomycin,sissomicin,sizomycin" 0.24 "g" "18979-5,447-3,448-1,449-9,450-7,55714-0"
|
"SIS" 36119 "Sisomicin" "Aminoglycosides" "J01GB08,QJ01GB08" "Aminoglycoside antibacterials" "Other aminoglycosides" "siso,sisomy" "rickamicin,salvamina,sisomicina,sisomicine,sisomicinum,sisomin,sisomycin,sissomicin,sizomycin" 0.24 "g" "18979-5,447-3,448-1,449-9,450-7,55714-0"
|
||||||
"SIT" 461399 "Sitafloxacin" "Fluoroquinolones" "J01MA21,QJ01MA21" "sitafl" "gracevit" 0.1 "g" "NA"
|
"SIT" 461399 "Sitafloxacin" "Fluoroquinolones" "J01MA21,QJ01MA21" "sitafl" "gracevit" 0.1 "g" "NA"
|
||||||
"SDA" 2724368 "Sodium aminosalicylate" "Antimycobacterials" "J04AA02,QJ04AA02" "Drugs for treatment of tuberculosis" "Aminosalicylic acid and derivatives" "NA" "bactylan,lepasen,monopas,tubersan" 14 "g" 14 "g" "NA"
|
"SDA" 2724368 "Sodium aminosalicylate" "Antimycobacterials" "J04AA02,QJ04AA02" "Drugs for treatment of tuberculosis" "Aminosalicylic acid and derivatives" "NA" "bactylan,lepasen,monopas,tubersan" 14 "g" 14 "g" "NA"
|
||||||
@@ -495,4 +494,4 @@
|
|||||||
"VOR" 71616 "Voriconazole" "Antifungals/antimycotics" "J02AC03,QJ02AC03" "Antimycotics for systemic use" "Triazole derivatives" "vori,vorico,vrc" "vfend,voriconazol,voriconazolum,voriconzole,vorikonazole" 0.4 "g" 0.4 "g" "32379-0,35862-2,35863-0,38370-3,41199-1,41200-7,53902-3,73676-9,80553-1,80651-3"
|
"VOR" 71616 "Voriconazole" "Antifungals/antimycotics" "J02AC03,QJ02AC03" "Antimycotics for systemic use" "Triazole derivatives" "vori,vorico,vrc" "vfend,voriconazol,voriconazolum,voriconzole,vorikonazole" 0.4 "g" 0.4 "g" "32379-0,35862-2,35863-0,38370-3,41199-1,41200-7,53902-3,73676-9,80553-1,80651-3"
|
||||||
"XBR" 72144 "Xibornol" "Other antibacterials" "J01XX02,QJ01XX02" "Other antibacterials" "Other antibacterials" "NA" "bactacine,bracen,nanbacine,xibornolo,xibornolum" "NA"
|
"XBR" 72144 "Xibornol" "Other antibacterials" "J01XX02,QJ01XX02" "Other antibacterials" "Other antibacterials" "NA" "bactacine,bracen,nanbacine,xibornolo,xibornolum" "NA"
|
||||||
"ZID" 77846445 "Zidebactam" "Other antibacterials" "NA" "NA" "zidebactamsalt" "NA"
|
"ZID" 77846445 "Zidebactam" "Other antibacterials" "NA" "NA" "zidebactamsalt" "NA"
|
||||||
"ZFD" "Zoliflodacin" "NA" "NA" "NA" "NA"
|
"ZFD" "Zoliflodacin" "NA" "zol" "NA" "NA"
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -133,7 +133,7 @@ ggplot(data.frame(mic = some_mic_values,
|
|||||||
sir = interpretation),
|
sir = interpretation),
|
||||||
aes(x = group, y = mic, colour = sir)) +
|
aes(x = group, y = mic, colour = sir)) +
|
||||||
theme_minimal() +
|
theme_minimal() +
|
||||||
geom_boxplot(fill = NA, colour = "grey") +
|
geom_boxplot(fill = NA, colour = "grey30") +
|
||||||
geom_jitter(width = 0.25) +
|
geom_jitter(width = 0.25) +
|
||||||
|
|
||||||
# NEW scale function: plot MIC values to x, y, colour or fill
|
# NEW scale function: plot MIC values to x, y, colour or fill
|
||||||
|
22
index.md
22
index.md
@@ -171,14 +171,14 @@ example_isolates %>%
|
|||||||
select(bacteria,
|
select(bacteria,
|
||||||
aminoglycosides(),
|
aminoglycosides(),
|
||||||
carbapenems())
|
carbapenems())
|
||||||
#> ℹ Using column 'mo' as input for mo_fullname()
|
#> ℹ Using column 'mo' as input for `mo_fullname()`
|
||||||
#> ℹ Using column 'mo' as input for mo_is_gram_negative()
|
#> ℹ Using column 'mo' as input for `mo_is_gram_negative()`
|
||||||
#> ℹ Using column 'mo' as input for mo_is_intrinsic_resistant()
|
#> ℹ Using column 'mo' as input for `mo_is_intrinsic_resistant()`
|
||||||
#> ℹ Determining intrinsic resistance based on 'EUCAST Expected Resistant
|
#> ℹ Determining intrinsic resistance based on 'EUCAST Expected Resistant
|
||||||
#> Phenotypes' v1.2 (2023). This note will be shown once per session.
|
#> Phenotypes' v1.2 (2023). This note will be shown once per session.
|
||||||
#> ℹ For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB'
|
#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB'
|
||||||
#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)
|
#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)
|
||||||
#> ℹ For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem)
|
#> ℹ For `carbapenems()` using columns 'IPM' (imipenem) and 'MEM' (meropenem)
|
||||||
#> # A tibble: 35 × 7
|
#> # A tibble: 35 × 7
|
||||||
#> bacteria GEN TOB AMK KAN IPM MEM
|
#> bacteria GEN TOB AMK KAN IPM MEM
|
||||||
#> <chr> <sir> <sir> <sir> <sir> <sir> <sir>
|
#> <chr> <sir> <sir> <sir> <sir> <sir> <sir>
|
||||||
@@ -215,9 +215,9 @@ output format automatically (such as markdown, LaTeX, HTML, etc.).
|
|||||||
``` r
|
``` r
|
||||||
antibiogram(example_isolates,
|
antibiogram(example_isolates,
|
||||||
antimicrobials = c(aminoglycosides(), carbapenems()))
|
antimicrobials = c(aminoglycosides(), carbapenems()))
|
||||||
#> ℹ For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB'
|
#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB'
|
||||||
#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)
|
#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)
|
||||||
#> ℹ For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem)
|
#> ℹ For `carbapenems()` using columns 'IPM' (imipenem) and 'MEM' (meropenem)
|
||||||
```
|
```
|
||||||
|
|
||||||
| Pathogen | Amikacin | Gentamicin | Imipenem | Kanamycin | Meropenem | Tobramycin |
|
| Pathogen | Amikacin | Gentamicin | Imipenem | Kanamycin | Meropenem | Tobramycin |
|
||||||
@@ -289,7 +289,7 @@ ggplot(data.frame(mic = some_mic_values,
|
|||||||
sir = interpretation),
|
sir = interpretation),
|
||||||
aes(x = group, y = mic, colour = sir)) +
|
aes(x = group, y = mic, colour = sir)) +
|
||||||
theme_minimal() +
|
theme_minimal() +
|
||||||
geom_boxplot(fill = NA, colour = "grey") +
|
geom_boxplot(fill = NA, colour = "grey30") +
|
||||||
geom_jitter(width = 0.25) +
|
geom_jitter(width = 0.25) +
|
||||||
|
|
||||||
# NEW scale function: plot MIC values to x, y, colour or fill
|
# NEW scale function: plot MIC values to x, y, colour or fill
|
||||||
@@ -340,15 +340,15 @@ out <- example_isolates %>%
|
|||||||
# calculate AMR using resistance(), over all aminoglycosides and polymyxins:
|
# calculate AMR using resistance(), over all aminoglycosides and polymyxins:
|
||||||
summarise(across(c(aminoglycosides(), polymyxins()),
|
summarise(across(c(aminoglycosides(), polymyxins()),
|
||||||
resistance))
|
resistance))
|
||||||
#> ℹ For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB'
|
#> ℹ For `aminoglycosides()` using columns 'GEN' (gentamicin), 'TOB'
|
||||||
#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)
|
#> (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)
|
||||||
#> ℹ For polymyxins() using column 'COL' (colistin)
|
#> ℹ For `polymyxins()` using column 'COL' (colistin)
|
||||||
#> Warning: There was 1 warning in `summarise()`.
|
#> Warning: There was 1 warning in `summarise()`.
|
||||||
#> ℹ In argument: `across(c(aminoglycosides(), polymyxins()), resistance)`.
|
#> ℹ In argument: `across(c(aminoglycosides(), polymyxins()), resistance)`.
|
||||||
#> ℹ In group 3: `ward = "Outpatient"`.
|
#> ℹ In group 3: `ward = "Outpatient"`.
|
||||||
#> Caused by warning:
|
#> Caused by warning:
|
||||||
#> ! Introducing NA: only 23 results available for KAN in group: ward =
|
#> ! Introducing NA: only 23 results available for KAN in group: ward =
|
||||||
#> "Outpatient" (minimum = 30).
|
#> "Outpatient" (`minimum` = 30).
|
||||||
out
|
out
|
||||||
#> # A tibble: 3 × 6
|
#> # A tibble: 3 × 6
|
||||||
#> ward GEN TOB AMK KAN COL
|
#> ward GEN TOB AMK KAN COL
|
||||||
|
@@ -4,20 +4,23 @@
|
|||||||
\alias{age_groups}
|
\alias{age_groups}
|
||||||
\title{Split Ages into Age Groups}
|
\title{Split Ages into Age Groups}
|
||||||
\usage{
|
\usage{
|
||||||
age_groups(x, split_at = c(12, 25, 55, 75), na.rm = FALSE)
|
age_groups(x, split_at = c(0, 12, 25, 55, 75), names = NULL,
|
||||||
|
na.rm = FALSE)
|
||||||
}
|
}
|
||||||
\arguments{
|
\arguments{
|
||||||
\item{x}{Age, e.g. calculated with \code{\link[=age]{age()}}.}
|
\item{x}{Age, e.g. calculated with \code{\link[=age]{age()}}.}
|
||||||
|
|
||||||
\item{split_at}{Values to split \code{x} at - the default is age groups 0-11, 12-24, 25-54, 55-74 and 75+. See \emph{Details}.}
|
\item{split_at}{Values to split \code{x} at - the default is age groups 0-11, 12-24, 25-54, 55-74 and 75+. See \emph{Details}.}
|
||||||
|
|
||||||
|
\item{names}{Optional names to be given to the various age groups.}
|
||||||
|
|
||||||
\item{na.rm}{A \link{logical} to indicate whether missing values should be removed.}
|
\item{na.rm}{A \link{logical} to indicate whether missing values should be removed.}
|
||||||
}
|
}
|
||||||
\value{
|
\value{
|
||||||
Ordered \link{factor}
|
Ordered \link{factor}
|
||||||
}
|
}
|
||||||
\description{
|
\description{
|
||||||
Split ages into age groups defined by the \code{split} argument. This allows for easier demographic (antimicrobial resistance) analysis.
|
Split ages into age groups defined by the \code{split} argument. This allows for easier demographic (antimicrobial resistance) analysis. The function returns an ordered \link{factor}.
|
||||||
}
|
}
|
||||||
\details{
|
\details{
|
||||||
To split ages, the input for the \code{split_at} argument can be:
|
To split ages, the input for the \code{split_at} argument can be:
|
||||||
@@ -41,6 +44,7 @@ age_groups(ages, 50)
|
|||||||
|
|
||||||
# split into 0-19, 20-49 and 50+
|
# split into 0-19, 20-49 and 50+
|
||||||
age_groups(ages, c(20, 50))
|
age_groups(ages, c(20, 50))
|
||||||
|
age_groups(ages, c(20, 50), names = c("Under 20 years", "20 to 50 years", "Over 50 years"))
|
||||||
|
|
||||||
# split into groups of ten years
|
# split into groups of ten years
|
||||||
age_groups(ages, 1:10 * 10)
|
age_groups(ages, 1:10 * 10)
|
||||||
|
@@ -65,56 +65,59 @@ Pre-processing pipeline steps include:
|
|||||||
These steps integrate with \code{recipes::recipe()} and work like standard preprocessing steps. They are useful for preparing data for modelling, especially with classification models.
|
These steps integrate with \code{recipes::recipe()} and work like standard preprocessing steps. They are useful for preparing data for modelling, especially with classification models.
|
||||||
}
|
}
|
||||||
\examples{
|
\examples{
|
||||||
library(tidymodels)
|
if (require("tidymodels")) {
|
||||||
|
|
||||||
# The below approach formed the basis for this paper: DOI 10.3389/fmicb.2025.1582703
|
# The below approach formed the basis for this paper: DOI 10.3389/fmicb.2025.1582703
|
||||||
# Presence of ESBL genes was predicted based on raw MIC values.
|
# Presence of ESBL genes was predicted based on raw MIC values.
|
||||||
|
|
||||||
|
|
||||||
# example data set in the AMR package
|
# example data set in the AMR package
|
||||||
esbl_isolates
|
esbl_isolates
|
||||||
|
|
||||||
# Prepare a binary outcome and convert to ordered factor
|
# Prepare a binary outcome and convert to ordered factor
|
||||||
data <- esbl_isolates \%>\%
|
data <- esbl_isolates \%>\%
|
||||||
mutate(esbl = factor(esbl, levels = c(FALSE, TRUE), ordered = TRUE))
|
mutate(esbl = factor(esbl, levels = c(FALSE, TRUE), ordered = TRUE))
|
||||||
|
|
||||||
# Split into training and testing sets
|
# Split into training and testing sets
|
||||||
split <- initial_split(data)
|
split <- initial_split(data)
|
||||||
training_data <- training(split)
|
training_data <- training(split)
|
||||||
testing_data <- testing(split)
|
testing_data <- testing(split)
|
||||||
|
|
||||||
# Create and prep a recipe with MIC log2 transformation
|
# Create and prep a recipe with MIC log2 transformation
|
||||||
mic_recipe <- recipe(esbl ~ ., data = training_data) \%>\%
|
mic_recipe <- recipe(esbl ~ ., data = training_data) \%>\%
|
||||||
# Optionally remove non-predictive variables
|
|
||||||
remove_role(genus, old_role = "predictor") \%>\%
|
|
||||||
# Apply the log2 transformation to all MIC predictors
|
|
||||||
step_mic_log2(all_mic_predictors()) \%>\%
|
|
||||||
prep()
|
|
||||||
|
|
||||||
# View prepped recipe
|
# Optionally remove non-predictive variables
|
||||||
mic_recipe
|
remove_role(genus, old_role = "predictor") \%>\%
|
||||||
|
|
||||||
# Apply the recipe to training and testing data
|
# Apply the log2 transformation to all MIC predictors
|
||||||
out_training <- bake(mic_recipe, new_data = NULL)
|
step_mic_log2(all_mic_predictors()) \%>\%
|
||||||
out_testing <- bake(mic_recipe, new_data = testing_data)
|
|
||||||
|
|
||||||
# Fit a logistic regression model
|
# And apply the preparation steps
|
||||||
fitted <- logistic_reg(mode = "classification") \%>\%
|
prep()
|
||||||
set_engine("glm") \%>\%
|
|
||||||
fit(esbl ~ ., data = out_training)
|
|
||||||
|
|
||||||
# Generate predictions on the test set
|
# View prepped recipe
|
||||||
predictions <- predict(fitted, out_testing) \%>\%
|
mic_recipe
|
||||||
bind_cols(out_testing)
|
|
||||||
|
|
||||||
# Evaluate predictions using standard classification metrics
|
# Apply the recipe to training and testing data
|
||||||
our_metrics <- metric_set(accuracy, kap, ppv, npv)
|
out_training <- bake(mic_recipe, new_data = NULL)
|
||||||
metrics <- our_metrics(predictions, truth = esbl, estimate = .pred_class)
|
out_testing <- bake(mic_recipe, new_data = testing_data)
|
||||||
|
|
||||||
# Show performance:
|
# Fit a logistic regression model
|
||||||
# - negative predictive value (NPV) of ~98\%
|
fitted <- logistic_reg(mode = "classification") \%>\%
|
||||||
# - positive predictive value (PPV) of ~94\%
|
set_engine("glm") \%>\%
|
||||||
metrics
|
fit(esbl ~ ., data = out_training)
|
||||||
|
|
||||||
|
# Generate predictions on the test set
|
||||||
|
predictions <- predict(fitted, out_testing) \%>\%
|
||||||
|
bind_cols(out_testing)
|
||||||
|
|
||||||
|
# Evaluate predictions using standard classification metrics
|
||||||
|
our_metrics <- metric_set(accuracy, kap, ppv, npv)
|
||||||
|
metrics <- our_metrics(predictions, truth = esbl, estimate = .pred_class)
|
||||||
|
|
||||||
|
# Show performance
|
||||||
|
metrics
|
||||||
|
}
|
||||||
}
|
}
|
||||||
\seealso{
|
\seealso{
|
||||||
\code{\link[recipes:recipe]{recipes::recipe()}}, \code{\link[=as.mic]{as.mic()}}, \code{\link[=as.sir]{as.sir()}}
|
\code{\link[recipes:recipe]{recipes::recipe()}}, \code{\link[=as.mic]{as.mic()}}, \code{\link[=as.sir]{as.sir()}}
|
||||||
|
@@ -181,7 +181,7 @@ The \code{\link[=not_intrinsic_resistant]{not_intrinsic_resistant()}} function c
|
|||||||
\item \code{\link[=aminoglycosides]{aminoglycosides()}} can select: \cr amikacin (AMK), amikacin/fosfomycin (AKF), apramycin (APR), arbekacin (ARB), astromicin (AST), bekanamycin (BEK), dibekacin (DKB), framycetin (FRM), gentamicin (GEN), gentamicin-high (GEH), habekacin (HAB), hygromycin (HYG), isepamicin (ISE), kanamycin (KAN), kanamycin-high (KAH), kanamycin/cephalexin (KAC), micronomicin (MCR), neomycin (NEO), netilmicin (NET), pentisomicin (PIM), plazomicin (PLZ), propikacin (PKA), ribostamycin (RST), sisomicin (SIS), streptoduocin (STR), streptomycin (STR1), streptomycin-high (STH), tobramycin (TOB), and tobramycin-high (TOH)
|
\item \code{\link[=aminoglycosides]{aminoglycosides()}} can select: \cr amikacin (AMK), amikacin/fosfomycin (AKF), apramycin (APR), arbekacin (ARB), astromicin (AST), bekanamycin (BEK), dibekacin (DKB), framycetin (FRM), gentamicin (GEN), gentamicin-high (GEH), habekacin (HAB), hygromycin (HYG), isepamicin (ISE), kanamycin (KAN), kanamycin-high (KAH), kanamycin/cephalexin (KAC), micronomicin (MCR), neomycin (NEO), netilmicin (NET), pentisomicin (PIM), plazomicin (PLZ), propikacin (PKA), ribostamycin (RST), sisomicin (SIS), streptoduocin (STR), streptomycin (STR1), streptomycin-high (STH), tobramycin (TOB), and tobramycin-high (TOH)
|
||||||
\item \code{\link[=aminopenicillins]{aminopenicillins()}} can select: \cr amoxicillin (AMX) and ampicillin (AMP)
|
\item \code{\link[=aminopenicillins]{aminopenicillins()}} can select: \cr amoxicillin (AMX) and ampicillin (AMP)
|
||||||
\item \code{\link[=antifungals]{antifungals()}} can select: \cr amorolfine (AMO), amphotericin B (AMB), amphotericin B-high (AMH), anidulafungin (ANI), butoconazole (BUT), caspofungin (CAS), ciclopirox (CIX), clotrimazole (CTR), econazole (ECO), fluconazole (FLU), flucytosine (FCT), fosfluconazole (FFL), griseofulvin (GRI), hachimycin (HCH), ibrexafungerp (IBX), isavuconazole (ISV), isoconazole (ISO), itraconazole (ITR), ketoconazole (KET), manogepix (MGX), micafungin (MIF), miconazole (MCZ), nystatin (NYS), oteseconazole (OTE), pimaricin (PMR), posaconazole (POS), rezafungin (RZF), ribociclib (RBC), sulconazole (SUC), terbinafine (TRB), terconazole (TRC), and voriconazole (VOR)
|
\item \code{\link[=antifungals]{antifungals()}} can select: \cr amorolfine (AMO), amphotericin B (AMB), amphotericin B-high (AMH), anidulafungin (ANI), butoconazole (BUT), caspofungin (CAS), ciclopirox (CIX), clotrimazole (CTR), econazole (ECO), fluconazole (FLU), flucytosine (FCT), fosfluconazole (FFL), griseofulvin (GRI), hachimycin (HCH), ibrexafungerp (IBX), isavuconazole (ISV), isoconazole (ISO), itraconazole (ITR), ketoconazole (KET), manogepix (MGX), micafungin (MIF), miconazole (MCZ), nystatin (NYS), oteseconazole (OTE), pimaricin (PMR), posaconazole (POS), rezafungin (RZF), ribociclib (RBC), sulconazole (SUC), terbinafine (TRB), terconazole (TRC), and voriconazole (VOR)
|
||||||
\item \code{\link[=antimycobacterials]{antimycobacterials()}} can select: \cr 4-aminosalicylic acid (AMA), calcium aminosalicylate (CLA), capreomycin (CAP), clofazimine (CLF), delamanid (DLM), enviomycin (ENV), ethambutol (ETH), ethambutol/isoniazid (ETI), ethionamide (ETI1), isoniazid (INH), isoniazid/sulfamethoxazole/trimethoprim/pyridoxine (IST), morinamide (MRN), p-aminosalicylic acid (PAS), pretomanid (PMD), protionamide (PTH), pyrazinamide (PZA), rifabutin (RIB), rifampicin (RIF), rifampicin/ethambutol/isoniazid (REI), rifampicin/isoniazid (RFI), rifampicin/pyrazinamide/ethambutol/isoniazid (RPEI), rifampicin/pyrazinamide/isoniazid (RPI), rifamycin (RFM), rifapentine (RFP), simvastatin/fenofibrate (SMF), sodium aminosalicylate (SDA), streptomycin/isoniazid (STI), terizidone (TRZ), thioacetazone (TAT), thioacetazone/isoniazid (THI1), tiocarlide (TCR), and viomycin (VIO)
|
\item \code{\link[=antimycobacterials]{antimycobacterials()}} can select: \cr 4-aminosalicylic acid (AMA), calcium aminosalicylate (CLA), capreomycin (CAP), clofazimine (CLF), delamanid (DLM), enviomycin (ENV), ethambutol (ETH), ethambutol/isoniazid (ETI), ethionamide (ETI1), isoniazid (INH), isoniazid/sulfamethoxazole/trimethoprim/pyridoxine (IST), morinamide (MRN), p-aminosalicylic acid (PAS), pretomanid (PMD), protionamide (PTH), pyrazinamide (PZA), rifabutin (RIB), rifampicin (RIF), rifampicin/ethambutol/isoniazid (REI), rifampicin/isoniazid (RFI), rifampicin/pyrazinamide/ethambutol/isoniazid (RPEI), rifampicin/pyrazinamide/isoniazid (RPI), rifamycin (RFM), rifapentine (RFP), sodium aminosalicylate (SDA), streptomycin/isoniazid (STI), terizidone (TRZ), thioacetazone (TAT), thioacetazone/isoniazid (THI1), tiocarlide (TCR), and viomycin (VIO)
|
||||||
\item \code{\link[=betalactams]{betalactams()}} can select: \cr amoxicillin (AMX), amoxicillin/clavulanic acid (AMC), amoxicillin/sulbactam (AXS), ampicillin (AMP), ampicillin/sulbactam (SAM), apalcillin (APL), aspoxicillin (APX), azidocillin (AZD), azlocillin (AZL), aztreonam (ATM), aztreonam/avibactam (AZA), aztreonam/nacubactam (ANC), bacampicillin (BAM), benzathine benzylpenicillin (BNB), benzathine phenoxymethylpenicillin (BNP), benzylpenicillin (PEN), benzylpenicillin screening test (PEN-S), biapenem (BIA), carbenicillin (CRB), carindacillin (CRN), carumonam (CAR), cefacetrile (CAC), cefaclor (CEC), cefadroxil (CFR), cefalexin (LEX), cefaloridine (RID), cefalotin (CEP), cefamandole (MAN), cefapirin (HAP), cefatrizine (CTZ), cefazedone (CZD), cefazolin (CZO), cefcapene (CCP), cefcapene pivoxil (CCX), cefdinir (CDR), cefditoren (DIT), cefditoren pivoxil (DIX), cefepime (FEP), cefepime/amikacin (CFA), cefepime/clavulanic acid (CPC), cefepime/enmetazobactam (FPE), cefepime/nacubactam (FNC), cefepime/tazobactam (FPT), cefepime/zidebactam (FPZ), cefetamet (CAT), cefetamet pivoxil (CPI), cefetecol (CCL), cefetrizole (CZL), cefiderocol (FDC), cefixime (CFM), cefmenoxime (CMX), cefmetazole (CMZ), cefodizime (DIZ), cefonicid (CID), cefoperazone (CFP), cefoperazone/sulbactam (CSL), ceforanide (CND), cefoselis (CSE), cefotaxime (CTX), cefotaxime screening test (CTX-S), cefotaxime/clavulanic acid (CTC), cefotaxime/sulbactam (CTS), cefotetan (CTT), cefotiam (CTF), cefotiam hexetil (CHE), cefovecin (FOV), cefoxitin (FOX), cefoxitin screening test (FOX-S), cefozopran (ZOP), cefpimizole (CFZ), cefpiramide (CPM), cefpirome (CPO), cefpodoxime (CPD), cefpodoxime proxetil (CPX), cefpodoxime/clavulanic acid (CDC), cefprozil (CPR), cefquinome (CEQ), cefroxadine (CRD), cefsulodin (CFS), cefsumide (CSU), ceftaroline (CPT), ceftaroline/avibactam (CPA), ceftazidime (CAZ), ceftazidime/avibactam (CZA), ceftazidime/clavulanic acid (CCV), cefteram (CEM), cefteram pivoxil (CPL), ceftezole (CTL), ceftibuten (CTB), ceftiofur (TIO), ceftizoxime (CZX), ceftizoxime alapivoxil (CZP), ceftobiprole (BPR), ceftobiprole medocaril (CFM1), ceftolozane/tazobactam (CZT), ceftriaxone (CRO), ceftriaxone/beta-lactamase inhibitor (CEB), cefuroxime (CXM), cefuroxime axetil (CXA), cephradine (CED), ciclacillin (CIC), clometocillin (CLM), cloxacillin (CLO), dicloxacillin (DIC), doripenem (DOR), epicillin (EPC), ertapenem (ETP), flucloxacillin (FLC), hetacillin (HET), imipenem (IPM), imipenem/EDTA (IPE), imipenem/relebactam (IMR), latamoxef (LTM), lenampicillin (LEN), loracarbef (LOR), mecillinam (MEC), meropenem (MEM), meropenem/nacubactam (MNC), meropenem/vaborbactam (MEV), metampicillin (MTM), meticillin (MET), mezlocillin (MEZ), mezlocillin/sulbactam (MSU), nafcillin (NAF), oxacillin (OXA), oxacillin screening test (OXA-S), panipenem (PAN), penamecillin (PNM), penicillin/novobiocin (PNO), penicillin/sulbactam (PSU), pheneticillin (PHE), phenoxymethylpenicillin (PHN), piperacillin (PIP), piperacillin/sulbactam (PIS), piperacillin/tazobactam (TZP), piridicillin (PRC), pivampicillin (PVM), pivmecillinam (PME), procaine benzylpenicillin (PRB), propicillin (PRP), razupenem (RZM), ritipenem (RIT), ritipenem acoxil (RIA), sarmoxicillin (SRX), sulbenicillin (SBC), sultamicillin (SLT6), talampicillin (TAL), tebipenem (TBP), temocillin (TEM), ticarcillin (TIC), ticarcillin/clavulanic acid (TCC), and tigemonam (TMN)
|
\item \code{\link[=betalactams]{betalactams()}} can select: \cr amoxicillin (AMX), amoxicillin/clavulanic acid (AMC), amoxicillin/sulbactam (AXS), ampicillin (AMP), ampicillin/sulbactam (SAM), apalcillin (APL), aspoxicillin (APX), azidocillin (AZD), azlocillin (AZL), aztreonam (ATM), aztreonam/avibactam (AZA), aztreonam/nacubactam (ANC), bacampicillin (BAM), benzathine benzylpenicillin (BNB), benzathine phenoxymethylpenicillin (BNP), benzylpenicillin (PEN), benzylpenicillin screening test (PEN-S), biapenem (BIA), carbenicillin (CRB), carindacillin (CRN), carumonam (CAR), cefacetrile (CAC), cefaclor (CEC), cefadroxil (CFR), cefalexin (LEX), cefaloridine (RID), cefalotin (CEP), cefamandole (MAN), cefapirin (HAP), cefatrizine (CTZ), cefazedone (CZD), cefazolin (CZO), cefcapene (CCP), cefcapene pivoxil (CCX), cefdinir (CDR), cefditoren (DIT), cefditoren pivoxil (DIX), cefepime (FEP), cefepime/amikacin (CFA), cefepime/clavulanic acid (CPC), cefepime/enmetazobactam (FPE), cefepime/nacubactam (FNC), cefepime/tazobactam (FPT), cefepime/zidebactam (FPZ), cefetamet (CAT), cefetamet pivoxil (CPI), cefetecol (CCL), cefetrizole (CZL), cefiderocol (FDC), cefixime (CFM), cefmenoxime (CMX), cefmetazole (CMZ), cefodizime (DIZ), cefonicid (CID), cefoperazone (CFP), cefoperazone/sulbactam (CSL), ceforanide (CND), cefoselis (CSE), cefotaxime (CTX), cefotaxime screening test (CTX-S), cefotaxime/clavulanic acid (CTC), cefotaxime/sulbactam (CTS), cefotetan (CTT), cefotiam (CTF), cefotiam hexetil (CHE), cefovecin (FOV), cefoxitin (FOX), cefoxitin screening test (FOX-S), cefozopran (ZOP), cefpimizole (CFZ), cefpiramide (CPM), cefpirome (CPO), cefpodoxime (CPD), cefpodoxime proxetil (CPX), cefpodoxime/clavulanic acid (CDC), cefprozil (CPR), cefquinome (CEQ), cefroxadine (CRD), cefsulodin (CFS), cefsumide (CSU), ceftaroline (CPT), ceftaroline/avibactam (CPA), ceftazidime (CAZ), ceftazidime/avibactam (CZA), ceftazidime/clavulanic acid (CCV), cefteram (CEM), cefteram pivoxil (CPL), ceftezole (CTL), ceftibuten (CTB), ceftiofur (TIO), ceftizoxime (CZX), ceftizoxime alapivoxil (CZP), ceftobiprole (BPR), ceftobiprole medocaril (CFM1), ceftolozane/tazobactam (CZT), ceftriaxone (CRO), ceftriaxone/beta-lactamase inhibitor (CEB), cefuroxime (CXM), cefuroxime axetil (CXA), cephradine (CED), ciclacillin (CIC), clometocillin (CLM), cloxacillin (CLO), dicloxacillin (DIC), doripenem (DOR), epicillin (EPC), ertapenem (ETP), flucloxacillin (FLC), hetacillin (HET), imipenem (IPM), imipenem/EDTA (IPE), imipenem/relebactam (IMR), latamoxef (LTM), lenampicillin (LEN), loracarbef (LOR), mecillinam (MEC), meropenem (MEM), meropenem/nacubactam (MNC), meropenem/vaborbactam (MEV), metampicillin (MTM), meticillin (MET), mezlocillin (MEZ), mezlocillin/sulbactam (MSU), nafcillin (NAF), oxacillin (OXA), oxacillin screening test (OXA-S), panipenem (PAN), penamecillin (PNM), penicillin/novobiocin (PNO), penicillin/sulbactam (PSU), pheneticillin (PHE), phenoxymethylpenicillin (PHN), piperacillin (PIP), piperacillin/sulbactam (PIS), piperacillin/tazobactam (TZP), piridicillin (PRC), pivampicillin (PVM), pivmecillinam (PME), procaine benzylpenicillin (PRB), propicillin (PRP), razupenem (RZM), ritipenem (RIT), ritipenem acoxil (RIA), sarmoxicillin (SRX), sulbenicillin (SBC), sultamicillin (SLT6), talampicillin (TAL), tebipenem (TBP), temocillin (TEM), ticarcillin (TIC), ticarcillin/clavulanic acid (TCC), and tigemonam (TMN)
|
||||||
\item \code{\link[=betalactams_with_inhibitor]{betalactams_with_inhibitor()}} can select: \cr amoxicillin/clavulanic acid (AMC), amoxicillin/sulbactam (AXS), ampicillin/sulbactam (SAM), aztreonam/avibactam (AZA), aztreonam/nacubactam (ANC), cefepime/amikacin (CFA), cefepime/clavulanic acid (CPC), cefepime/enmetazobactam (FPE), cefepime/nacubactam (FNC), cefepime/tazobactam (FPT), cefepime/zidebactam (FPZ), cefoperazone/sulbactam (CSL), cefotaxime/clavulanic acid (CTC), cefotaxime/sulbactam (CTS), cefpodoxime/clavulanic acid (CDC), ceftaroline/avibactam (CPA), ceftazidime/avibactam (CZA), ceftazidime/clavulanic acid (CCV), ceftolozane/tazobactam (CZT), ceftriaxone/beta-lactamase inhibitor (CEB), imipenem/relebactam (IMR), meropenem/nacubactam (MNC), meropenem/vaborbactam (MEV), mezlocillin/sulbactam (MSU), penicillin/novobiocin (PNO), penicillin/sulbactam (PSU), piperacillin/sulbactam (PIS), piperacillin/tazobactam (TZP), and ticarcillin/clavulanic acid (TCC)
|
\item \code{\link[=betalactams_with_inhibitor]{betalactams_with_inhibitor()}} can select: \cr amoxicillin/clavulanic acid (AMC), amoxicillin/sulbactam (AXS), ampicillin/sulbactam (SAM), aztreonam/avibactam (AZA), aztreonam/nacubactam (ANC), cefepime/amikacin (CFA), cefepime/clavulanic acid (CPC), cefepime/enmetazobactam (FPE), cefepime/nacubactam (FNC), cefepime/tazobactam (FPT), cefepime/zidebactam (FPZ), cefoperazone/sulbactam (CSL), cefotaxime/clavulanic acid (CTC), cefotaxime/sulbactam (CTS), cefpodoxime/clavulanic acid (CDC), ceftaroline/avibactam (CPA), ceftazidime/avibactam (CZA), ceftazidime/clavulanic acid (CCV), ceftolozane/tazobactam (CZT), ceftriaxone/beta-lactamase inhibitor (CEB), imipenem/relebactam (IMR), meropenem/nacubactam (MNC), meropenem/vaborbactam (MEV), mezlocillin/sulbactam (MSU), penicillin/novobiocin (PNO), penicillin/sulbactam (PSU), piperacillin/sulbactam (PIS), piperacillin/tazobactam (TZP), and ticarcillin/clavulanic acid (TCC)
|
||||||
\item \code{\link[=carbapenems]{carbapenems()}} can select: \cr biapenem (BIA), doripenem (DOR), ertapenem (ETP), imipenem (IPM), imipenem/EDTA (IPE), imipenem/relebactam (IMR), meropenem (MEM), meropenem/nacubactam (MNC), meropenem/vaborbactam (MEV), panipenem (PAN), razupenem (RZM), ritipenem (RIT), ritipenem acoxil (RIA), and tebipenem (TBP)
|
\item \code{\link[=carbapenems]{carbapenems()}} can select: \cr biapenem (BIA), doripenem (DOR), ertapenem (ETP), imipenem (IPM), imipenem/EDTA (IPE), imipenem/relebactam (IMR), meropenem (MEM), meropenem/nacubactam (MNC), meropenem/vaborbactam (MEV), panipenem (PAN), razupenem (RZM), ritipenem (RIT), ritipenem acoxil (RIA), and tebipenem (TBP)
|
||||||
|
@@ -5,9 +5,9 @@
|
|||||||
\alias{antimicrobials}
|
\alias{antimicrobials}
|
||||||
\alias{antibiotics}
|
\alias{antibiotics}
|
||||||
\alias{antivirals}
|
\alias{antivirals}
|
||||||
\title{Data Sets with 617 Antimicrobial Drugs}
|
\title{Data Sets with 616 Antimicrobial Drugs}
|
||||||
\format{
|
\format{
|
||||||
\subsection{For the \link{antimicrobials} data set: a \link[tibble:tibble]{tibble} with 497 observations and 14 variables:}{
|
\subsection{For the \link{antimicrobials} data set: a \link[tibble:tibble]{tibble} with 496 observations and 14 variables:}{
|
||||||
\itemize{
|
\itemize{
|
||||||
\item \code{ab}\cr antimicrobial ID as used in this package (such as \code{AMC}), using the official EARS-Net (European Antimicrobial Resistance Surveillance Network) codes where available. \emph{\strong{This is a unique identifier.}}
|
\item \code{ab}\cr antimicrobial ID as used in this package (such as \code{AMC}), using the official EARS-Net (European Antimicrobial Resistance Surveillance Network) codes where available. \emph{\strong{This is a unique identifier.}}
|
||||||
\item \code{cid}\cr Compound ID as found in PubChem. \emph{\strong{This is a unique identifier.}}
|
\item \code{cid}\cr Compound ID as found in PubChem. \emph{\strong{This is a unique identifier.}}
|
||||||
@@ -50,7 +50,7 @@ LOINC:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
An object of class \code{deprecated_amr_dataset} (inherits from \code{tbl_df}, \code{tbl}, \code{data.frame}) with 497 rows and 14 columns.
|
An object of class \code{deprecated_amr_dataset} (inherits from \code{tbl_df}, \code{tbl}, \code{data.frame}) with 496 rows and 14 columns.
|
||||||
|
|
||||||
An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 120 rows and 11 columns.
|
An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 120 rows and 11 columns.
|
||||||
}
|
}
|
||||||
|
@@ -103,7 +103,7 @@ These 35 antimicrobial groups are allowed in the rules (case-insensitive) and ca
|
|||||||
\item aminoglycosides\cr(amikacin, amikacin/fosfomycin, apramycin, arbekacin, astromicin, bekanamycin, dibekacin, framycetin, gentamicin, gentamicin-high, habekacin, hygromycin, isepamicin, kanamycin, kanamycin-high, kanamycin/cephalexin, micronomicin, neomycin, netilmicin, pentisomicin, plazomicin, propikacin, ribostamycin, sisomicin, streptoduocin, streptomycin, streptomycin-high, tobramycin, and tobramycin-high)
|
\item aminoglycosides\cr(amikacin, amikacin/fosfomycin, apramycin, arbekacin, astromicin, bekanamycin, dibekacin, framycetin, gentamicin, gentamicin-high, habekacin, hygromycin, isepamicin, kanamycin, kanamycin-high, kanamycin/cephalexin, micronomicin, neomycin, netilmicin, pentisomicin, plazomicin, propikacin, ribostamycin, sisomicin, streptoduocin, streptomycin, streptomycin-high, tobramycin, and tobramycin-high)
|
||||||
\item aminopenicillins\cr(amoxicillin and ampicillin)
|
\item aminopenicillins\cr(amoxicillin and ampicillin)
|
||||||
\item antifungals\cr(amorolfine, amphotericin B, amphotericin B-high, anidulafungin, butoconazole, caspofungin, ciclopirox, clotrimazole, econazole, fluconazole, flucytosine, fosfluconazole, griseofulvin, hachimycin, ibrexafungerp, isavuconazole, isoconazole, itraconazole, ketoconazole, manogepix, micafungin, miconazole, nystatin, oteseconazole, pimaricin, posaconazole, rezafungin, ribociclib, sulconazole, terbinafine, terconazole, and voriconazole)
|
\item antifungals\cr(amorolfine, amphotericin B, amphotericin B-high, anidulafungin, butoconazole, caspofungin, ciclopirox, clotrimazole, econazole, fluconazole, flucytosine, fosfluconazole, griseofulvin, hachimycin, ibrexafungerp, isavuconazole, isoconazole, itraconazole, ketoconazole, manogepix, micafungin, miconazole, nystatin, oteseconazole, pimaricin, posaconazole, rezafungin, ribociclib, sulconazole, terbinafine, terconazole, and voriconazole)
|
||||||
\item antimycobacterials\cr(4-aminosalicylic acid, calcium aminosalicylate, capreomycin, clofazimine, delamanid, enviomycin, ethambutol, ethambutol/isoniazid, ethionamide, isoniazid, isoniazid/sulfamethoxazole/trimethoprim/pyridoxine, morinamide, p-aminosalicylic acid, pretomanid, protionamide, pyrazinamide, rifabutin, rifampicin, rifampicin/ethambutol/isoniazid, rifampicin/isoniazid, rifampicin/pyrazinamide/ethambutol/isoniazid, rifampicin/pyrazinamide/isoniazid, rifamycin, rifapentine, simvastatin/fenofibrate, sodium aminosalicylate, streptomycin/isoniazid, terizidone, thioacetazone, thioacetazone/isoniazid, tiocarlide, and viomycin)
|
\item antimycobacterials\cr(4-aminosalicylic acid, calcium aminosalicylate, capreomycin, clofazimine, delamanid, enviomycin, ethambutol, ethambutol/isoniazid, ethionamide, isoniazid, isoniazid/sulfamethoxazole/trimethoprim/pyridoxine, morinamide, p-aminosalicylic acid, pretomanid, protionamide, pyrazinamide, rifabutin, rifampicin, rifampicin/ethambutol/isoniazid, rifampicin/isoniazid, rifampicin/pyrazinamide/ethambutol/isoniazid, rifampicin/pyrazinamide/isoniazid, rifamycin, rifapentine, sodium aminosalicylate, streptomycin/isoniazid, terizidone, thioacetazone, thioacetazone/isoniazid, tiocarlide, and viomycin)
|
||||||
\item betalactams\cr(amoxicillin, amoxicillin/clavulanic acid, amoxicillin/sulbactam, ampicillin, ampicillin/sulbactam, apalcillin, aspoxicillin, azidocillin, azlocillin, aztreonam, aztreonam/avibactam, aztreonam/nacubactam, bacampicillin, benzathine benzylpenicillin, benzathine phenoxymethylpenicillin, benzylpenicillin, benzylpenicillin screening test, biapenem, carbenicillin, carindacillin, carumonam, cefacetrile, cefaclor, cefadroxil, cefalexin, cefaloridine, cefalotin, cefamandole, cefapirin, cefatrizine, cefazedone, cefazolin, cefcapene, cefcapene pivoxil, cefdinir, cefditoren, cefditoren pivoxil, cefepime, cefepime/amikacin, cefepime/clavulanic acid, cefepime/enmetazobactam, cefepime/nacubactam, cefepime/tazobactam, cefepime/zidebactam, cefetamet, cefetamet pivoxil, cefetecol, cefetrizole, cefiderocol, cefixime, cefmenoxime, cefmetazole, cefodizime, cefonicid, cefoperazone, cefoperazone/sulbactam, ceforanide, cefoselis, cefotaxime, cefotaxime screening test, cefotaxime/clavulanic acid, cefotaxime/sulbactam, cefotetan, cefotiam, cefotiam hexetil, cefovecin, cefoxitin, cefoxitin screening test, cefozopran, cefpimizole, cefpiramide, cefpirome, cefpodoxime, cefpodoxime proxetil, cefpodoxime/clavulanic acid, cefprozil, cefquinome, cefroxadine, cefsulodin, cefsumide, ceftaroline, ceftaroline/avibactam, ceftazidime, ceftazidime/avibactam, ceftazidime/clavulanic acid, cefteram, cefteram pivoxil, ceftezole, ceftibuten, ceftiofur, ceftizoxime, ceftizoxime alapivoxil, ceftobiprole, ceftobiprole medocaril, ceftolozane/tazobactam, ceftriaxone, ceftriaxone/beta-lactamase inhibitor, cefuroxime, cefuroxime axetil, cephradine, ciclacillin, clometocillin, cloxacillin, dicloxacillin, doripenem, epicillin, ertapenem, flucloxacillin, hetacillin, imipenem, imipenem/EDTA, imipenem/relebactam, latamoxef, lenampicillin, loracarbef, mecillinam, meropenem, meropenem/nacubactam, meropenem/vaborbactam, metampicillin, meticillin, mezlocillin, mezlocillin/sulbactam, nafcillin, oxacillin, oxacillin screening test, panipenem, penamecillin, penicillin/novobiocin, penicillin/sulbactam, pheneticillin, phenoxymethylpenicillin, piperacillin, piperacillin/sulbactam, piperacillin/tazobactam, piridicillin, pivampicillin, pivmecillinam, procaine benzylpenicillin, propicillin, razupenem, ritipenem, ritipenem acoxil, sarmoxicillin, sulbenicillin, sultamicillin, talampicillin, tebipenem, temocillin, ticarcillin, ticarcillin/clavulanic acid, and tigemonam)
|
\item betalactams\cr(amoxicillin, amoxicillin/clavulanic acid, amoxicillin/sulbactam, ampicillin, ampicillin/sulbactam, apalcillin, aspoxicillin, azidocillin, azlocillin, aztreonam, aztreonam/avibactam, aztreonam/nacubactam, bacampicillin, benzathine benzylpenicillin, benzathine phenoxymethylpenicillin, benzylpenicillin, benzylpenicillin screening test, biapenem, carbenicillin, carindacillin, carumonam, cefacetrile, cefaclor, cefadroxil, cefalexin, cefaloridine, cefalotin, cefamandole, cefapirin, cefatrizine, cefazedone, cefazolin, cefcapene, cefcapene pivoxil, cefdinir, cefditoren, cefditoren pivoxil, cefepime, cefepime/amikacin, cefepime/clavulanic acid, cefepime/enmetazobactam, cefepime/nacubactam, cefepime/tazobactam, cefepime/zidebactam, cefetamet, cefetamet pivoxil, cefetecol, cefetrizole, cefiderocol, cefixime, cefmenoxime, cefmetazole, cefodizime, cefonicid, cefoperazone, cefoperazone/sulbactam, ceforanide, cefoselis, cefotaxime, cefotaxime screening test, cefotaxime/clavulanic acid, cefotaxime/sulbactam, cefotetan, cefotiam, cefotiam hexetil, cefovecin, cefoxitin, cefoxitin screening test, cefozopran, cefpimizole, cefpiramide, cefpirome, cefpodoxime, cefpodoxime proxetil, cefpodoxime/clavulanic acid, cefprozil, cefquinome, cefroxadine, cefsulodin, cefsumide, ceftaroline, ceftaroline/avibactam, ceftazidime, ceftazidime/avibactam, ceftazidime/clavulanic acid, cefteram, cefteram pivoxil, ceftezole, ceftibuten, ceftiofur, ceftizoxime, ceftizoxime alapivoxil, ceftobiprole, ceftobiprole medocaril, ceftolozane/tazobactam, ceftriaxone, ceftriaxone/beta-lactamase inhibitor, cefuroxime, cefuroxime axetil, cephradine, ciclacillin, clometocillin, cloxacillin, dicloxacillin, doripenem, epicillin, ertapenem, flucloxacillin, hetacillin, imipenem, imipenem/EDTA, imipenem/relebactam, latamoxef, lenampicillin, loracarbef, mecillinam, meropenem, meropenem/nacubactam, meropenem/vaborbactam, metampicillin, meticillin, mezlocillin, mezlocillin/sulbactam, nafcillin, oxacillin, oxacillin screening test, panipenem, penamecillin, penicillin/novobiocin, penicillin/sulbactam, pheneticillin, phenoxymethylpenicillin, piperacillin, piperacillin/sulbactam, piperacillin/tazobactam, piridicillin, pivampicillin, pivmecillinam, procaine benzylpenicillin, propicillin, razupenem, ritipenem, ritipenem acoxil, sarmoxicillin, sulbenicillin, sultamicillin, talampicillin, tebipenem, temocillin, ticarcillin, ticarcillin/clavulanic acid, and tigemonam)
|
||||||
\item betalactams_with_inhibitor\cr(amoxicillin/clavulanic acid, amoxicillin/sulbactam, ampicillin/sulbactam, aztreonam/avibactam, aztreonam/nacubactam, cefepime/amikacin, cefepime/clavulanic acid, cefepime/enmetazobactam, cefepime/nacubactam, cefepime/tazobactam, cefepime/zidebactam, cefoperazone/sulbactam, cefotaxime/clavulanic acid, cefotaxime/sulbactam, cefpodoxime/clavulanic acid, ceftaroline/avibactam, ceftazidime/avibactam, ceftazidime/clavulanic acid, ceftolozane/tazobactam, ceftriaxone/beta-lactamase inhibitor, imipenem/relebactam, meropenem/nacubactam, meropenem/vaborbactam, mezlocillin/sulbactam, penicillin/novobiocin, penicillin/sulbactam, piperacillin/sulbactam, piperacillin/tazobactam, and ticarcillin/clavulanic acid)
|
\item betalactams_with_inhibitor\cr(amoxicillin/clavulanic acid, amoxicillin/sulbactam, ampicillin/sulbactam, aztreonam/avibactam, aztreonam/nacubactam, cefepime/amikacin, cefepime/clavulanic acid, cefepime/enmetazobactam, cefepime/nacubactam, cefepime/tazobactam, cefepime/zidebactam, cefoperazone/sulbactam, cefotaxime/clavulanic acid, cefotaxime/sulbactam, cefpodoxime/clavulanic acid, ceftaroline/avibactam, ceftazidime/avibactam, ceftazidime/clavulanic acid, ceftolozane/tazobactam, ceftriaxone/beta-lactamase inhibitor, imipenem/relebactam, meropenem/nacubactam, meropenem/vaborbactam, mezlocillin/sulbactam, penicillin/novobiocin, penicillin/sulbactam, piperacillin/sulbactam, piperacillin/tazobactam, and ticarcillin/clavulanic acid)
|
||||||
\item carbapenems\cr(biapenem, doripenem, ertapenem, imipenem, imipenem/EDTA, imipenem/relebactam, meropenem, meropenem/nacubactam, meropenem/vaborbactam, panipenem, razupenem, ritipenem, ritipenem acoxil, and tebipenem)
|
\item carbapenems\cr(biapenem, doripenem, ertapenem, imipenem, imipenem/EDTA, imipenem/relebactam, meropenem, meropenem/nacubactam, meropenem/vaborbactam, panipenem, razupenem, ritipenem, ritipenem acoxil, and tebipenem)
|
||||||
|
@@ -99,7 +99,7 @@ All 35 antimicrobial selectors are supported for use in the rules:
|
|||||||
\item \code{\link[=aminoglycosides]{aminoglycosides()}} can select: \cr amikacin, amikacin/fosfomycin, apramycin, arbekacin, astromicin, bekanamycin, dibekacin, framycetin, gentamicin, gentamicin-high, habekacin, hygromycin, isepamicin, kanamycin, kanamycin-high, kanamycin/cephalexin, micronomicin, neomycin, netilmicin, pentisomicin, plazomicin, propikacin, ribostamycin, sisomicin, streptoduocin, streptomycin, streptomycin-high, tobramycin, and tobramycin-high
|
\item \code{\link[=aminoglycosides]{aminoglycosides()}} can select: \cr amikacin, amikacin/fosfomycin, apramycin, arbekacin, astromicin, bekanamycin, dibekacin, framycetin, gentamicin, gentamicin-high, habekacin, hygromycin, isepamicin, kanamycin, kanamycin-high, kanamycin/cephalexin, micronomicin, neomycin, netilmicin, pentisomicin, plazomicin, propikacin, ribostamycin, sisomicin, streptoduocin, streptomycin, streptomycin-high, tobramycin, and tobramycin-high
|
||||||
\item \code{\link[=aminopenicillins]{aminopenicillins()}} can select: \cr amoxicillin and ampicillin
|
\item \code{\link[=aminopenicillins]{aminopenicillins()}} can select: \cr amoxicillin and ampicillin
|
||||||
\item \code{\link[=antifungals]{antifungals()}} can select: \cr amorolfine, amphotericin B, amphotericin B-high, anidulafungin, butoconazole, caspofungin, ciclopirox, clotrimazole, econazole, fluconazole, flucytosine, fosfluconazole, griseofulvin, hachimycin, ibrexafungerp, isavuconazole, isoconazole, itraconazole, ketoconazole, manogepix, micafungin, miconazole, nystatin, oteseconazole, pimaricin, posaconazole, rezafungin, ribociclib, sulconazole, terbinafine, terconazole, and voriconazole
|
\item \code{\link[=antifungals]{antifungals()}} can select: \cr amorolfine, amphotericin B, amphotericin B-high, anidulafungin, butoconazole, caspofungin, ciclopirox, clotrimazole, econazole, fluconazole, flucytosine, fosfluconazole, griseofulvin, hachimycin, ibrexafungerp, isavuconazole, isoconazole, itraconazole, ketoconazole, manogepix, micafungin, miconazole, nystatin, oteseconazole, pimaricin, posaconazole, rezafungin, ribociclib, sulconazole, terbinafine, terconazole, and voriconazole
|
||||||
\item \code{\link[=antimycobacterials]{antimycobacterials()}} can select: \cr 4-aminosalicylic acid, calcium aminosalicylate, capreomycin, clofazimine, delamanid, enviomycin, ethambutol, ethambutol/isoniazid, ethionamide, isoniazid, isoniazid/sulfamethoxazole/trimethoprim/pyridoxine, morinamide, p-aminosalicylic acid, pretomanid, protionamide, pyrazinamide, rifabutin, rifampicin, rifampicin/ethambutol/isoniazid, rifampicin/isoniazid, rifampicin/pyrazinamide/ethambutol/isoniazid, rifampicin/pyrazinamide/isoniazid, rifamycin, rifapentine, simvastatin/fenofibrate, sodium aminosalicylate, streptomycin/isoniazid, terizidone, thioacetazone, thioacetazone/isoniazid, tiocarlide, and viomycin
|
\item \code{\link[=antimycobacterials]{antimycobacterials()}} can select: \cr 4-aminosalicylic acid, calcium aminosalicylate, capreomycin, clofazimine, delamanid, enviomycin, ethambutol, ethambutol/isoniazid, ethionamide, isoniazid, isoniazid/sulfamethoxazole/trimethoprim/pyridoxine, morinamide, p-aminosalicylic acid, pretomanid, protionamide, pyrazinamide, rifabutin, rifampicin, rifampicin/ethambutol/isoniazid, rifampicin/isoniazid, rifampicin/pyrazinamide/ethambutol/isoniazid, rifampicin/pyrazinamide/isoniazid, rifamycin, rifapentine, sodium aminosalicylate, streptomycin/isoniazid, terizidone, thioacetazone, thioacetazone/isoniazid, tiocarlide, and viomycin
|
||||||
\item \code{\link[=betalactams]{betalactams()}} can select: \cr amoxicillin, amoxicillin/clavulanic acid, amoxicillin/sulbactam, ampicillin, ampicillin/sulbactam, apalcillin, aspoxicillin, azidocillin, azlocillin, aztreonam, aztreonam/avibactam, aztreonam/nacubactam, bacampicillin, benzathine benzylpenicillin, benzathine phenoxymethylpenicillin, benzylpenicillin, benzylpenicillin screening test, biapenem, carbenicillin, carindacillin, carumonam, cefacetrile, cefaclor, cefadroxil, cefalexin, cefaloridine, cefalotin, cefamandole, cefapirin, cefatrizine, cefazedone, cefazolin, cefcapene, cefcapene pivoxil, cefdinir, cefditoren, cefditoren pivoxil, cefepime, cefepime/amikacin, cefepime/clavulanic acid, cefepime/enmetazobactam, cefepime/nacubactam, cefepime/tazobactam, cefepime/zidebactam, cefetamet, cefetamet pivoxil, cefetecol, cefetrizole, cefiderocol, cefixime, cefmenoxime, cefmetazole, cefodizime, cefonicid, cefoperazone, cefoperazone/sulbactam, ceforanide, cefoselis, cefotaxime, cefotaxime screening test, cefotaxime/clavulanic acid, cefotaxime/sulbactam, cefotetan, cefotiam, cefotiam hexetil, cefovecin, cefoxitin, cefoxitin screening test, cefozopran, cefpimizole, cefpiramide, cefpirome, cefpodoxime, cefpodoxime proxetil, cefpodoxime/clavulanic acid, cefprozil, cefquinome, cefroxadine, cefsulodin, cefsumide, ceftaroline, ceftaroline/avibactam, ceftazidime, ceftazidime/avibactam, ceftazidime/clavulanic acid, cefteram, cefteram pivoxil, ceftezole, ceftibuten, ceftiofur, ceftizoxime, ceftizoxime alapivoxil, ceftobiprole, ceftobiprole medocaril, ceftolozane/tazobactam, ceftriaxone, ceftriaxone/beta-lactamase inhibitor, cefuroxime, cefuroxime axetil, cephradine, ciclacillin, clometocillin, cloxacillin, dicloxacillin, doripenem, epicillin, ertapenem, flucloxacillin, hetacillin, imipenem, imipenem/EDTA, imipenem/relebactam, latamoxef, lenampicillin, loracarbef, mecillinam, meropenem, meropenem/nacubactam, meropenem/vaborbactam, metampicillin, meticillin, mezlocillin, mezlocillin/sulbactam, nafcillin, oxacillin, oxacillin screening test, panipenem, penamecillin, penicillin/novobiocin, penicillin/sulbactam, pheneticillin, phenoxymethylpenicillin, piperacillin, piperacillin/sulbactam, piperacillin/tazobactam, piridicillin, pivampicillin, pivmecillinam, procaine benzylpenicillin, propicillin, razupenem, ritipenem, ritipenem acoxil, sarmoxicillin, sulbenicillin, sultamicillin, talampicillin, tebipenem, temocillin, ticarcillin, ticarcillin/clavulanic acid, and tigemonam
|
\item \code{\link[=betalactams]{betalactams()}} can select: \cr amoxicillin, amoxicillin/clavulanic acid, amoxicillin/sulbactam, ampicillin, ampicillin/sulbactam, apalcillin, aspoxicillin, azidocillin, azlocillin, aztreonam, aztreonam/avibactam, aztreonam/nacubactam, bacampicillin, benzathine benzylpenicillin, benzathine phenoxymethylpenicillin, benzylpenicillin, benzylpenicillin screening test, biapenem, carbenicillin, carindacillin, carumonam, cefacetrile, cefaclor, cefadroxil, cefalexin, cefaloridine, cefalotin, cefamandole, cefapirin, cefatrizine, cefazedone, cefazolin, cefcapene, cefcapene pivoxil, cefdinir, cefditoren, cefditoren pivoxil, cefepime, cefepime/amikacin, cefepime/clavulanic acid, cefepime/enmetazobactam, cefepime/nacubactam, cefepime/tazobactam, cefepime/zidebactam, cefetamet, cefetamet pivoxil, cefetecol, cefetrizole, cefiderocol, cefixime, cefmenoxime, cefmetazole, cefodizime, cefonicid, cefoperazone, cefoperazone/sulbactam, ceforanide, cefoselis, cefotaxime, cefotaxime screening test, cefotaxime/clavulanic acid, cefotaxime/sulbactam, cefotetan, cefotiam, cefotiam hexetil, cefovecin, cefoxitin, cefoxitin screening test, cefozopran, cefpimizole, cefpiramide, cefpirome, cefpodoxime, cefpodoxime proxetil, cefpodoxime/clavulanic acid, cefprozil, cefquinome, cefroxadine, cefsulodin, cefsumide, ceftaroline, ceftaroline/avibactam, ceftazidime, ceftazidime/avibactam, ceftazidime/clavulanic acid, cefteram, cefteram pivoxil, ceftezole, ceftibuten, ceftiofur, ceftizoxime, ceftizoxime alapivoxil, ceftobiprole, ceftobiprole medocaril, ceftolozane/tazobactam, ceftriaxone, ceftriaxone/beta-lactamase inhibitor, cefuroxime, cefuroxime axetil, cephradine, ciclacillin, clometocillin, cloxacillin, dicloxacillin, doripenem, epicillin, ertapenem, flucloxacillin, hetacillin, imipenem, imipenem/EDTA, imipenem/relebactam, latamoxef, lenampicillin, loracarbef, mecillinam, meropenem, meropenem/nacubactam, meropenem/vaborbactam, metampicillin, meticillin, mezlocillin, mezlocillin/sulbactam, nafcillin, oxacillin, oxacillin screening test, panipenem, penamecillin, penicillin/novobiocin, penicillin/sulbactam, pheneticillin, phenoxymethylpenicillin, piperacillin, piperacillin/sulbactam, piperacillin/tazobactam, piridicillin, pivampicillin, pivmecillinam, procaine benzylpenicillin, propicillin, razupenem, ritipenem, ritipenem acoxil, sarmoxicillin, sulbenicillin, sultamicillin, talampicillin, tebipenem, temocillin, ticarcillin, ticarcillin/clavulanic acid, and tigemonam
|
||||||
\item \code{\link[=betalactams_with_inhibitor]{betalactams_with_inhibitor()}} can select: \cr amoxicillin/clavulanic acid, amoxicillin/sulbactam, ampicillin/sulbactam, aztreonam/avibactam, aztreonam/nacubactam, cefepime/amikacin, cefepime/clavulanic acid, cefepime/enmetazobactam, cefepime/nacubactam, cefepime/tazobactam, cefepime/zidebactam, cefoperazone/sulbactam, cefotaxime/clavulanic acid, cefotaxime/sulbactam, cefpodoxime/clavulanic acid, ceftaroline/avibactam, ceftazidime/avibactam, ceftazidime/clavulanic acid, ceftolozane/tazobactam, ceftriaxone/beta-lactamase inhibitor, imipenem/relebactam, meropenem/nacubactam, meropenem/vaborbactam, mezlocillin/sulbactam, penicillin/novobiocin, penicillin/sulbactam, piperacillin/sulbactam, piperacillin/tazobactam, and ticarcillin/clavulanic acid
|
\item \code{\link[=betalactams_with_inhibitor]{betalactams_with_inhibitor()}} can select: \cr amoxicillin/clavulanic acid, amoxicillin/sulbactam, ampicillin/sulbactam, aztreonam/avibactam, aztreonam/nacubactam, cefepime/amikacin, cefepime/clavulanic acid, cefepime/enmetazobactam, cefepime/nacubactam, cefepime/tazobactam, cefepime/zidebactam, cefoperazone/sulbactam, cefotaxime/clavulanic acid, cefotaxime/sulbactam, cefpodoxime/clavulanic acid, ceftaroline/avibactam, ceftazidime/avibactam, ceftazidime/clavulanic acid, ceftolozane/tazobactam, ceftriaxone/beta-lactamase inhibitor, imipenem/relebactam, meropenem/nacubactam, meropenem/vaborbactam, mezlocillin/sulbactam, penicillin/novobiocin, penicillin/sulbactam, piperacillin/sulbactam, piperacillin/tazobactam, and ticarcillin/clavulanic acid
|
||||||
\item \code{\link[=carbapenems]{carbapenems()}} can select: \cr biapenem, doripenem, ertapenem, imipenem, imipenem/EDTA, imipenem/relebactam, meropenem, meropenem/nacubactam, meropenem/vaborbactam, panipenem, razupenem, ritipenem, ritipenem acoxil, and tebipenem
|
\item \code{\link[=carbapenems]{carbapenems()}} can select: \cr biapenem, doripenem, ertapenem, imipenem, imipenem/EDTA, imipenem/relebactam, meropenem, meropenem/nacubactam, meropenem/vaborbactam, panipenem, razupenem, ritipenem, ritipenem acoxil, and tebipenem
|
||||||
|
@@ -9,7 +9,7 @@ ggplot_sir(data, position = NULL, x = "antibiotic",
|
|||||||
fill = "interpretation", facet = NULL, breaks = seq(0, 1, 0.1),
|
fill = "interpretation", facet = NULL, breaks = seq(0, 1, 0.1),
|
||||||
limits = NULL, translate_ab = "name", combine_SI = TRUE,
|
limits = NULL, translate_ab = "name", combine_SI = TRUE,
|
||||||
minimum = 30, language = get_AMR_locale(), nrow = NULL, colours = c(S
|
minimum = 30, language = get_AMR_locale(), nrow = NULL, colours = c(S
|
||||||
= "#3CAEA3", SI = "#3CAEA3", SDD = "#8FD6C4", I = "#F6D55C", IR = "#ED553B",
|
= "#3CAEA3", SDD = "#8FD6C4", SI = "#3CAEA3", I = "#F6D55C", IR = "#ED553B",
|
||||||
R = "#ED553B"), datalabels = TRUE, datalabels.size = 2.5,
|
R = "#ED553B"), datalabels = TRUE, datalabels.size = 2.5,
|
||||||
datalabels.colour = "grey15", title = NULL, subtitle = NULL,
|
datalabels.colour = "grey15", title = NULL, subtitle = NULL,
|
||||||
caption = NULL, x.title = "Antimicrobial", y.title = "Proportion", ...)
|
caption = NULL, x.title = "Antimicrobial", y.title = "Proportion", ...)
|
||||||
|
@@ -57,7 +57,7 @@ eucast_exceptional_phenotypes(x = NULL, only_sir_columns = any(is.sir(x)),
|
|||||||
|
|
||||||
\item{combine_SI}{A \link{logical} to indicate whether all values of S and I must be merged into one, so resistance is only considered when isolates are R, not I. As this is the default behaviour of the \code{\link[=mdro]{mdro()}} function, it follows the redefinition by EUCAST about the interpretation of I (increased exposure) in 2019, see section 'Interpretation of S, I and R' below. When using \code{combine_SI = FALSE}, resistance is considered when isolates are R or I.}
|
\item{combine_SI}{A \link{logical} to indicate whether all values of S and I must be merged into one, so resistance is only considered when isolates are R, not I. As this is the default behaviour of the \code{\link[=mdro]{mdro()}} function, it follows the redefinition by EUCAST about the interpretation of I (increased exposure) in 2019, see section 'Interpretation of S, I and R' below. When using \code{combine_SI = FALSE}, resistance is considered when isolates are R or I.}
|
||||||
|
|
||||||
\item{verbose}{A \link{logical} to turn Verbose mode on and off (default is off). In Verbose mode, the function does not return the MDRO results, but instead returns a data set in logbook form with extensive info about which isolates would be MDRO-positive, or why they are not.}
|
\item{verbose}{A \link{logical} to turn Verbose mode on and off (default is off). In Verbose mode, the function returns a data set with the MDRO results in logbook form with extensive info about which isolates would be MDRO-positive, or why they are not.}
|
||||||
|
|
||||||
\item{only_sir_columns}{A \link{logical} to indicate whether only antimicrobial columns must be included that were transformed to class \link[=as.sir]{sir} on beforehand. Defaults to \code{FALSE} if no columns of \code{x} have a class \link[=as.sir]{sir}.}
|
\item{only_sir_columns}{A \link{logical} to indicate whether only antimicrobial columns must be included that were transformed to class \link[=as.sir]{sir} on beforehand. Defaults to \code{FALSE} if no columns of \code{x} have a class \link[=as.sir]{sir}.}
|
||||||
|
|
||||||
|
10
man/plot.Rd
10
man/plot.Rd
@@ -210,6 +210,10 @@ if (require("ggplot2")) {
|
|||||||
# when providing the microorganism and antibiotic, colours will show interpretations:
|
# when providing the microorganism and antibiotic, colours will show interpretations:
|
||||||
autoplot(some_mic_values, mo = "Escherichia coli", ab = "cipro")
|
autoplot(some_mic_values, mo = "Escherichia coli", ab = "cipro")
|
||||||
}
|
}
|
||||||
|
if (require("ggplot2")) {
|
||||||
|
autoplot(some_mic_values, mo = "Staph aureus", ab = "Ceftaroline", guideline = "CLSI")
|
||||||
|
}
|
||||||
|
|
||||||
if (require("ggplot2")) {
|
if (require("ggplot2")) {
|
||||||
# support for 27 languages, various guidelines, and many options
|
# support for 27 languages, various guidelines, and many options
|
||||||
autoplot(some_disk_values,
|
autoplot(some_disk_values,
|
||||||
@@ -267,7 +271,7 @@ if (require("ggplot2")) {
|
|||||||
aes(group, mic)
|
aes(group, mic)
|
||||||
) +
|
) +
|
||||||
geom_boxplot() +
|
geom_boxplot() +
|
||||||
geom_violin(linetype = 2, colour = "grey", fill = NA) +
|
geom_violin(linetype = 2, colour = "grey30", fill = NA) +
|
||||||
scale_y_mic()
|
scale_y_mic()
|
||||||
}
|
}
|
||||||
if (require("ggplot2")) {
|
if (require("ggplot2")) {
|
||||||
@@ -279,7 +283,7 @@ if (require("ggplot2")) {
|
|||||||
aes(group, mic)
|
aes(group, mic)
|
||||||
) +
|
) +
|
||||||
geom_boxplot() +
|
geom_boxplot() +
|
||||||
geom_violin(linetype = 2, colour = "grey", fill = NA) +
|
geom_violin(linetype = 2, colour = "grey30", fill = NA) +
|
||||||
scale_y_mic(mic_range = c(NA, 0.25))
|
scale_y_mic(mic_range = c(NA, 0.25))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -312,7 +316,7 @@ if (require("ggplot2")) {
|
|||||||
aes(x = group, y = mic, colour = sir)
|
aes(x = group, y = mic, colour = sir)
|
||||||
) +
|
) +
|
||||||
theme_minimal() +
|
theme_minimal() +
|
||||||
geom_boxplot(fill = NA, colour = "grey") +
|
geom_boxplot(fill = NA, colour = "grey30") +
|
||||||
geom_jitter(width = 0.25)
|
geom_jitter(width = 0.25)
|
||||||
|
|
||||||
plain
|
plain
|
||||||
|
@@ -190,6 +190,15 @@ this shows on top of every sidebar to the right
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.template-reference-topic h3,
|
||||||
|
.template-reference-topic h3 code {
|
||||||
|
color: var(--amr-green-dark) !important;
|
||||||
|
}
|
||||||
|
.template-reference-topic h3 {
|
||||||
|
font-weight: normal;
|
||||||
|
margin-top: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
/* replace 'Developers' with 'Maintainers' */
|
/* replace 'Developers' with 'Maintainers' */
|
||||||
.developers h2 {
|
.developers h2 {
|
||||||
display: none;
|
display: none;
|
||||||
|
Reference in New Issue
Block a user