mirror of
https://github.com/msberends/AMR.git
synced 2026-11-15 22:20:47 +01:00
implement EUCAST >= 2019 directly from their source files
This commit is contained in:
1 parent
aebad2ae47
commit
5d9974e2b9
23 files changed
+19941
-12249
No files matched your search
+2
-2
@@ -1,6 +1,6 @@
|
||||
Package: AMR
|
||||
Version: 3.0.1.9091
|
||||
Date: 2026-09-08
|
||||
Version: 3.0.1.9092
|
||||
Date: 2026-10-01
|
||||
Title: Antimicrobial Resistance Data Analysis
|
||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||
data analysis and to work with microbial and antimicrobial properties by
|
||||
|
||||
@@ -34,6 +34,7 @@ S3method("|",amr_selector)
|
||||
S3method(Complex,mic)
|
||||
S3method(Math,mic)
|
||||
S3method(Ops,mic)
|
||||
S3method(Ops,sir)
|
||||
S3method(Summary,mic)
|
||||
S3method(all,amr_selector)
|
||||
S3method(all,amr_selector_any_all)
|
||||
@@ -443,6 +444,7 @@ if(getRversion() >= "3.0.0") S3method(vctrs::vec_cast, disk.integer)
|
||||
if(getRversion() >= "3.0.0") S3method(vctrs::vec_cast, double.disk)
|
||||
if(getRversion() >= "3.0.0") S3method(vctrs::vec_cast, double.mic)
|
||||
if(getRversion() >= "3.0.0") S3method(vctrs::vec_cast, factor.mic)
|
||||
if(getRversion() >= "3.0.0") S3method(vctrs::vec_cast, factor.sir)
|
||||
if(getRversion() >= "3.0.0") S3method(vctrs::vec_cast, integer.disk)
|
||||
if(getRversion() >= "3.0.0") S3method(vctrs::vec_cast, integer.mic)
|
||||
if(getRversion() >= "3.0.0") S3method(vctrs::vec_cast, logical.amr_selector_any_all)
|
||||
@@ -453,6 +455,7 @@ if(getRversion() >= "3.0.0") S3method(vctrs::vec_cast, mic.integer)
|
||||
if(getRversion() >= "3.0.0") S3method(vctrs::vec_cast, mic.mic)
|
||||
if(getRversion() >= "3.0.0") S3method(vctrs::vec_cast, mo.character)
|
||||
if(getRversion() >= "3.0.0") S3method(vctrs::vec_cast, sir.character)
|
||||
if(getRversion() >= "3.0.0") S3method(vctrs::vec_cast, sir.factor)
|
||||
if(getRversion() >= "3.0.0") S3method(vctrs::vec_cast, sir.sir)
|
||||
if(getRversion() >= "3.0.0") S3method(vctrs::vec_math, mic)
|
||||
if(getRversion() >= "3.0.0") S3method(vctrs::vec_ptype2, ab.ab)
|
||||
@@ -474,6 +477,7 @@ if(getRversion() >= "3.0.0") S3method(vctrs::vec_ptype2, sir.default)
|
||||
if(getRversion() >= "3.0.0") S3method(vctrs::vec_ptype2, sir.sir)
|
||||
if(getRversion() >= "3.0.0") S3method(vctrs::vec_ptype_abbr, disk)
|
||||
if(getRversion() >= "3.0.0") S3method(vctrs::vec_ptype_full, disk)
|
||||
if(getRversion() >= "4.3.0") S3method(chooseOpsMethod, sir)
|
||||
importFrom(graphics,
|
||||
arrows,
|
||||
axis,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# AMR 3.0.1.9091
|
||||
# AMR 3.0.1.9092
|
||||
|
||||
Planned as v3.1.0, end of September 2026.
|
||||
Planned as v3.1.0, mid October 2026.
|
||||
|
||||
### Breaking Changes
|
||||
* The former *kingdoms* Bacteria and Archaea are now each divided into four kingdoms with new top-level *domains* 'Bacteria' and 'Archaea' (Göker and Oren, 2024, DOI: 10.1099/ijsem.0.006242). Following this, a new `domain` column in the `microorganisms` data set was added, and more importantly, `mo_kingdom()` now returns the formal kingdom (e.g. `"Pseudomonadati"` instead of `"Bacteria"`). Use `mo_domain()` for the old behaviour. For non-prokaryotic kingdoms (Fungi, Protozoa, etc.), `kingdom` and `domain` are identical.
|
||||
@@ -27,6 +27,7 @@ Planned as v3.1.0, end of September 2026.
|
||||
|
||||
### New
|
||||
* EUCAST 2026 and CLSI 2026 breakpoints: over 5,700 new breakpoints added to the `clinical_breakpoints` data set; EUCAST 2026 is now the default for all MIC and disk diffusion interpretations
|
||||
* Human EUCAST breakpoints from 2019 (v9.0) on, are now retrieved directly from EUCAST Excel files instead of relying on the WHONET repository.
|
||||
* Wildtype/Non-wildtype (WT/NWT) output when using ECOFF-based interpretation, by setting `breakpoint_type = "ECOFF"` in `as.sir()`; WT/NWT results are fully supported in all resistance/susceptibility functions and plots (#254)
|
||||
* *tidymodels* integration for using SIR, MIC and disk data in modelling pipelines: `step_mic_log2()`, `step_sir_numeric()`, and new column selectors `all_sir()`, `all_mic()`, `all_disk()`
|
||||
* New `esbl_isolates` data set for practising AMR modelling
|
||||
@@ -56,6 +57,7 @@ Planned as v3.1.0, end of September 2026.
|
||||
* BRMO classification now includes bacterial complexes (#275)
|
||||
* Translation fixes for Italian CoNS/CoPS names (#256), Dutch antimicrobials, and `sir_df()` foreign-language output (#272)
|
||||
* Fixed some EUCAST Expert Rules, mostly on *S. pneumoniae*
|
||||
* Logical comparison (`==`, `!=`) of `sir` class with a `factor` is now possible on R >= 4.3
|
||||
|
||||
### Updated
|
||||
* `top_n_microorganisms()`: new `property_for_each` argument for sub-grouping within top *n* groups; rank ordering enforced (only lower taxonomic ranks allowed); fixed `property = NULL` not being accepted; inner filter now tracks original row indices to prevent cross-group contamination
|
||||
|
||||
@@ -317,11 +317,12 @@
|
||||
#' From WHONET, imported were:
|
||||
#'
|
||||
#' * All CLSI breakpoints, including ECOFF
|
||||
#' * EUCAST breakpoints between `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "EUCAST" & type == "human")$guideline)))` and 2018
|
||||
#' * All non-human EUCAST breakpoints, including ECOFF
|
||||
#' * Human EUCAST breakpoints between `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "EUCAST" & type == "human")$guideline)))` and 2018
|
||||
#'
|
||||
#' EUCAST breakpoints from 2019 onwards, were retrieved directly from <https://www.eucast.org>.
|
||||
#'
|
||||
#' Our import and reproduction script can be found here: <https://github.com/msberends/AMR/blob/main/data-raw/_reproduction_scripts/reproduction_of_clinical_breakpoints.R>.
|
||||
#' Human EUCAST breakpoints from 2019 onwards, were retrieved directly from <https://www.eucast.org> using [this script](https://github.com/msberends/AMR/blob/main/data-raw/_reproduction_scripts/reproduction_of_clinical_breakpoints_eucast.R).
|
||||
#'
|
||||
#' Our WHONET import script can be [found here](https://github.com/msberends/AMR/blob/main/data-raw/_reproduction_scripts/reproduction_of_clinical_breakpoints.R).
|
||||
#'
|
||||
#' ### Response From CLSI and EUCAST
|
||||
#' The CEO of CLSI and the chairman of EUCAST have endorsed the work and public use of this `AMR` package (and consequently the use of their breakpoints) in June 2023, when future development of distributing clinical breakpoints was discussed in a meeting between CLSI, EUCAST, WHO, developers of WHONET software, and developers of this `AMR` package.
|
||||
|
||||
@@ -2340,6 +2340,28 @@ rep.sir <- function(x, ...) {
|
||||
y
|
||||
}
|
||||
|
||||
#' @method Ops sir
|
||||
#' @export
|
||||
#' @noRd
|
||||
Ops.sir <- function(e1, e2) {
|
||||
comparison_ops <- c("==", "!=", "<", ">", "<=", ">=")
|
||||
if (nargs() == 2 && .Generic %in% comparison_ops) {
|
||||
# coerce both sides to the current sir structure (identical levels),
|
||||
# after which comparing the integer codes is exact, including ordering
|
||||
e1 <- as.sir(e1)
|
||||
e2 <- as.sir(e2)
|
||||
return(get(.Generic, mode = "function")(as.integer(e1), as.integer(e2)))
|
||||
}
|
||||
NextMethod()
|
||||
}
|
||||
|
||||
#' @rawNamespace if(getRversion() >= "4.3.0") S3method(chooseOpsMethod, sir)
|
||||
#' @exportS3Method NULL
|
||||
#' @noRd
|
||||
chooseOpsMethod.sir <- function(x, y, mx, my, cl, reverse) {
|
||||
TRUE
|
||||
}
|
||||
|
||||
coerce_reference_data_columns <- function(x) {
|
||||
ref <- AMR::clinical_breakpoints
|
||||
for (col in names(ref)) {
|
||||
|
||||
Binary file not shown.
+16
-14
@@ -120,13 +120,14 @@ all_disk_predictors <- function() {
|
||||
#' @rdname amr-tidymodels
|
||||
#' @export
|
||||
step_mic_log2 <- function(
|
||||
recipe,
|
||||
...,
|
||||
role = NA,
|
||||
trained = FALSE,
|
||||
columns = NULL,
|
||||
skip = FALSE,
|
||||
id = recipes::rand_id("mic_log2")) {
|
||||
recipe,
|
||||
...,
|
||||
role = NA,
|
||||
trained = FALSE,
|
||||
columns = NULL,
|
||||
skip = FALSE,
|
||||
id = recipes::rand_id("mic_log2")
|
||||
) {
|
||||
recipes::add_step(
|
||||
recipe,
|
||||
step_mic_log2_new(
|
||||
@@ -195,13 +196,14 @@ tidy.step_mic_log2 <- function(x, ...) {
|
||||
#' @rdname amr-tidymodels
|
||||
#' @export
|
||||
step_sir_numeric <- function(
|
||||
recipe,
|
||||
...,
|
||||
role = NA,
|
||||
trained = FALSE,
|
||||
columns = NULL,
|
||||
skip = FALSE,
|
||||
id = recipes::rand_id("sir_numeric")) {
|
||||
recipe,
|
||||
...,
|
||||
role = NA,
|
||||
trained = FALSE,
|
||||
columns = NULL,
|
||||
skip = FALSE,
|
||||
id = recipes::rand_id("sir_numeric")
|
||||
) {
|
||||
recipes::add_step(
|
||||
recipe,
|
||||
step_sir_numeric_new(
|
||||
|
||||
@@ -91,7 +91,9 @@
|
||||
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(vctrs::vec_ptype2, sir.sir)
|
||||
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(vctrs::vec_ptype2, character.sir)
|
||||
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(vctrs::vec_cast, character.sir)
|
||||
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(vctrs::vec_cast, factor.sir)
|
||||
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(vctrs::vec_cast, sir.character)
|
||||
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(vctrs::vec_cast, sir.factor)
|
||||
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(vctrs::vec_cast, sir.sir)
|
||||
|
||||
# S3: amr_selector ----
|
||||
@@ -257,6 +259,12 @@ vec_cast.sir.sir <- function(x, to, ...) {
|
||||
vec_cast.character.sir <- function(x, to, ...) {
|
||||
as.character(x)
|
||||
}
|
||||
vec_cast.factor.sir <- function(x, to, ...) {
|
||||
factor(as.sir(x))
|
||||
}
|
||||
vec_cast.sir.character <- function(x, to, ...) {
|
||||
as.sir(x)
|
||||
}
|
||||
vec_cast.sir.factor <- function(x, to, ...) {
|
||||
as.sir(x)
|
||||
}
|
||||
@@ -503,70 +503,9 @@ dim(breakpoints_new)
|
||||
dim(clinical_breakpoints)
|
||||
|
||||
|
||||
# Correct anaerobic bacteria in EUCAST ----
|
||||
# Retrieve >= EUCAST 2019 directly from EUCAST ----
|
||||
|
||||
eucast_anaerobe_corrections <- tibble::tribble(
|
||||
~guideline, ~type, ~host, ~method, ~site, ~mo, ~rank_index, ~ab, ~ref_tbl, ~disk_dose, ~breakpoint_S, ~breakpoint_R, ~uti, ~is_SDD,
|
||||
|
||||
# Prevotella spp.
|
||||
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Prevotella"), 3, as.ab("AMP"), "Prevotella", NA, 0.5, 0.5, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Prevotella"), 3, as.ab("AMP"), "Prevotella", "2 mcg", 25, 25, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Prevotella"), 3, as.ab("SAM"), "Prevotella", "10/10 mcg", 33, 33, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Prevotella"), 3, as.ab("AMX"), "Prevotella", NA, 0.25, 0.25, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Prevotella"), 3, as.ab("AMC"), "Prevotella", "2/1 mcg", 24, 24, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Prevotella"), 3, as.ab("ETP"), "Prevotella", NA, 0.5, 0.5, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Prevotella"), 3, as.ab("ETP"), "Prevotella", "10 mcg", 29, 29, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Prevotella"), 3, as.ab("IPM"), "Prevotella", NA, 0.125, 0.125, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Prevotella"), 3, as.ab("IPM"), "Prevotella", "10 mcg", 35, 35, FALSE, FALSE,
|
||||
|
||||
# Fusobacterium necrophorum
|
||||
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Fusobacterium necrophorum"), 2, as.ab("AMP"), "F. necrophorum", NA, 0.5, 0.5, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Fusobacterium necrophorum"), 2, as.ab("AMP"), "F. necrophorum", "2 mcg", 27, 27, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Fusobacterium necrophorum"), 2, as.ab("SAM"), "F. necrophorum", NA, 0.5, 0.5, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Fusobacterium necrophorum"), 2, as.ab("SAM"), "F. necrophorum", "10/10 mcg", 33, 33, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Fusobacterium necrophorum"), 2, as.ab("AMX"), "F. necrophorum", NA, 0.5, 0.5, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Fusobacterium necrophorum"), 2, as.ab("AMC"), "F. necrophorum", NA, 0.5, 0.5, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Fusobacterium necrophorum"), 2, as.ab("AMC"), "F. necrophorum", "2/1 mcg", 23, 23, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Fusobacterium necrophorum"), 2, as.ab("ETP"), "F. necrophorum", NA, 0.06, 0.06, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Fusobacterium necrophorum"), 2, as.ab("ETP"), "F. necrophorum", "10 mcg", 35, 35, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Fusobacterium necrophorum"), 2, as.ab("IPM"), "F. necrophorum", NA, 0.125, 0.125, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Fusobacterium necrophorum"), 2, as.ab("IPM"), "F. necrophorum", "10 mcg", 36, 36, FALSE, FALSE,
|
||||
|
||||
# Clostridium perfringens
|
||||
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Clostridium perfringens"), 2, as.ab("AMP"), "C. perfringens", NA, 0.25, 0.25, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Clostridium perfringens"), 2, as.ab("AMP"), "C. perfringens", "2 mcg", 23, 23, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Clostridium perfringens"), 2, as.ab("SAM"), "C. perfringens", NA, 0.25, 0.25, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Clostridium perfringens"), 2, as.ab("SAM"), "C. perfringens", "10/10 mcg", 27, 27, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Clostridium perfringens"), 2, as.ab("AMX"), "C. perfringens", NA, 0.25, 0.25, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Clostridium perfringens"), 2, as.ab("AMC"), "C. perfringens", NA, 0.25, 0.25, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Clostridium perfringens"), 2, as.ab("AMC"), "C. perfringens", "2/1 mcg", 23, 23, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Clostridium perfringens"), 2, as.ab("ETP"), "C. perfringens", NA, 0.5, 0.5, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Clostridium perfringens"), 2, as.ab("ETP"), "C. perfringens", "10 mcg", 24, 24, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Clostridium perfringens"), 2, as.ab("IPM"), "C. perfringens", NA, 0.5, 0.5, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Clostridium perfringens"), 2, as.ab("IPM"), "C. perfringens", "10 mcg", 25, 25, FALSE, FALSE,
|
||||
|
||||
# Cutibacterium acnes
|
||||
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Cutibacterium acnes"), 2, as.ab("AMP"), "C. acnes", NA, 0.25, 0.25, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Cutibacterium acnes"), 2, as.ab("AMP"), "C. acnes", "2 mcg", 23, 23, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Cutibacterium acnes"), 2, as.ab("SAM"), "C. acnes", "10/10 mcg", 33, 33, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Cutibacterium acnes"), 2, as.ab("AMX"), "C. acnes", NA, 0.25, 0.25, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Cutibacterium acnes"), 2, as.ab("AMC"), "C. acnes", "2/1 mcg", 24, 24, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Cutibacterium acnes"), 2, as.ab("CTX"), "C. acnes", "5 mcg", 26, 26, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Cutibacterium acnes"), 2, as.ab("CRO"), "C. acnes", NA, 0.06, 0.06, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Cutibacterium acnes"), 2, as.ab("CRO"), "C. acnes", "30 mcg", 33, 33, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Cutibacterium acnes"), 2, as.ab("ETP"), "C. acnes", NA, 0.25, 0.25, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Cutibacterium acnes"), 2, as.ab("ETP"), "C. acnes", "10 mcg", 28, 28, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Cutibacterium acnes"), 2, as.ab("IPM"), "C. acnes", NA, 0.03, 0.03, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Cutibacterium acnes"), 2, as.ab("IPM"), "C. acnes", "10 mcg", 39, 39, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Cutibacterium acnes"), 2, as.ab("LNZ"), "C. acnes", NA, 2, 2, FALSE, FALSE,
|
||||
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Cutibacterium acnes"), 2, as.ab("LNZ"), "C. acnes", "10 mcg", 34, 34, FALSE, FALSE
|
||||
)
|
||||
|
||||
breakpoints_new <- clinical_breakpoints |>
|
||||
bind_rows(eucast_anaerobe_corrections) |>
|
||||
bind_rows(eucast_anaerobe_corrections |> mutate(guideline = "EUCAST 2026")) |>
|
||||
bind_rows(eucast_anaerobe_corrections |> mutate(guideline = "EUCAST 2023")) |>
|
||||
bind_rows(eucast_anaerobe_corrections |> mutate(guideline = "EUCAST 2024"))
|
||||
source("data-raw/_reproduction_scripts/reproduction_of_clinical_breakpoints_eucast.R")
|
||||
|
||||
|
||||
# SAVE TO PACKAGE ----
|
||||
|
||||
@@ -351,15 +351,24 @@ get_cell <- function(df, r, c) {
|
||||
}
|
||||
|
||||
parse_bp <- function(txt) {
|
||||
if (is.na(txt) || txt == "") return(NA_real_)
|
||||
if (is.na(txt) || txt == "") return(NA_character_)
|
||||
t <- trimws(txt)
|
||||
# if (toupper(t) %in% c("NOTE", "IE", "IP", "NA", "-")) return(NA_real_)
|
||||
if (toupper(t) %in% c("NA", "-")) return(NA_real_)
|
||||
t <- gsub("^\\((.+)\\)$", "\\1", t)
|
||||
# suppressWarnings(as.numeric(t))
|
||||
if (toupper(t) %in% c("NA", "-")) return(NA_character_)
|
||||
# Parenthesised values like "(2)" are screening breakpoints. They are
|
||||
# preserved as-is in the raw file (e.g. "(2)") so they remain
|
||||
# distinguishable from clinical breakpoints. The cleanup section
|
||||
# later strips the parentheses for numeric conversion and filters
|
||||
# screening rows out of the clean clinical_breakpoints table.
|
||||
t
|
||||
}
|
||||
|
||||
is_screening_bp <- function(txt) {
|
||||
# A breakpoint cell value wrapped in parentheses, e.g. "(2)" or "(0.5)",
|
||||
# is a screening breakpoint in EUCAST terminology (present since v12).
|
||||
if (is.na(txt) || txt == "") return(FALSE)
|
||||
grepl("^\\(.+\\)$", trimws(txt))
|
||||
}
|
||||
|
||||
format_disk_dose <- function(dose) {
|
||||
if (is.na(dose) || dose == "") return(NA_character_)
|
||||
d <- trimws(dose)
|
||||
@@ -715,6 +724,7 @@ parse_sheet <- function(xlsx_path, sheet_name) {
|
||||
disk_dose = NA_character_,
|
||||
breakpoint_S = s_val,
|
||||
breakpoint_R = r_val,
|
||||
is_screening = is_screening_bp(mic_s$base) || is_screening_bp(mic_r$base),
|
||||
note = mic_note
|
||||
)
|
||||
}
|
||||
@@ -738,6 +748,7 @@ parse_sheet <- function(xlsx_path, sheet_name) {
|
||||
disk_dose = format_disk_dose(disk_dose_cell$base),
|
||||
breakpoint_S = s_val,
|
||||
breakpoint_R = r_val,
|
||||
is_screening = is_screening_bp(disk_s$base) || is_screening_bp(disk_r$base),
|
||||
note = disk_note
|
||||
)
|
||||
}
|
||||
@@ -844,6 +855,7 @@ parse_topical_sheet <- function(xlsx_path) {
|
||||
ab = ab_name,
|
||||
disk_dose = NA_character_,
|
||||
breakpoint_S = mic_val, breakpoint_R = mic_val,
|
||||
is_screening = is_screening_bp(mic_cell$base),
|
||||
note = mic_note
|
||||
)
|
||||
}
|
||||
@@ -864,6 +876,7 @@ parse_topical_sheet <- function(xlsx_path) {
|
||||
ab = ab_name,
|
||||
disk_dose = ab_dose,
|
||||
breakpoint_S = disk_val, breakpoint_R = disk_val,
|
||||
is_screening = is_screening_bp(disk_cell$base),
|
||||
note = disk_note
|
||||
)
|
||||
}
|
||||
@@ -1027,6 +1040,7 @@ parse_yeast_sheet <- function(xlsx_path, sheet_name) {
|
||||
disk_dose = NA_character_,
|
||||
breakpoint_S = s_val,
|
||||
breakpoint_R = r_val,
|
||||
is_screening = is_screening_bp(s_cell$base) || is_screening_bp(r_cell$base),
|
||||
note = note_text
|
||||
)
|
||||
}
|
||||
@@ -1169,6 +1183,56 @@ strip_mo_exceptions <- function(x) {
|
||||
trimws(sub("\\s*\\(?(except|other than)\\b.*$", "", x, ignore.case = TRUE, perl = TRUE))
|
||||
}
|
||||
|
||||
# Occasionally, split_agent_organism() fails to separate an organism
|
||||
# restriction from the antibiotic name in column A -- typically when
|
||||
# the cell has no rich-text formatting at all (plain text, no bold/non-
|
||||
# bold boundary to split on), leaving the full string in `ab` while `mo`
|
||||
# carries only the sheet's default organism. The observed cases all
|
||||
# follow a pattern of "DrugName, organism-restriction", where the text
|
||||
# after the comma is recognisably an organism (genus-like capitalised
|
||||
# word, or "other than" / "except" phrasing) rather than a drug-name
|
||||
# continuation. For example, EUCAST 2024 Enterococcus sheet:
|
||||
# ab = "Vancomycin, enterococci other than E. casseliflavus and E. gallinarum"
|
||||
# This function detects such cases and returns a two-column tibble
|
||||
# (ab_clean, mo_from_ab) that the pipeline uses to correct both columns.
|
||||
split_organism_from_ab <- function(ab, mo) {
|
||||
# Only act on ab values that contain a bare comma (i.e. not inside
|
||||
# parentheses, which are route/indication qualifiers like "(endocarditis,
|
||||
# in combination with...)" that are part of the drug name).
|
||||
# Strip parenthetical content first to test for a bare comma.
|
||||
ab_no_parens <- gsub("\\([^)]*\\)", "", ab)
|
||||
has_bare_comma <- grepl(",", ab_no_parens)
|
||||
|
||||
ab_clean <- ab
|
||||
mo_from_ab <- rep(NA_character_, length(ab))
|
||||
|
||||
for (i in which(has_bare_comma)) {
|
||||
# Split at the first bare comma (outside parentheses)
|
||||
# Simple approach: find the first comma in ab_no_parens, use its
|
||||
# position to split the original ab string
|
||||
comma_pos <- regexpr(",", ab_no_parens[i])
|
||||
if (comma_pos < 1) next
|
||||
before <- trimws(substr(ab[i], 1, comma_pos - 1))
|
||||
after <- trimws(substr(ab[i], comma_pos + 1, nchar(ab[i])))
|
||||
if (!nzchar(after)) next
|
||||
|
||||
# The part after the comma must look like an organism restriction,
|
||||
# not a drug-name continuation. Heuristic: starts with a genus-like
|
||||
# capitalised word (3+ letters), or starts with "other" / "except",
|
||||
# or contains known taxonomic suffixes (cocci, bacill, etc.)
|
||||
is_organism <- grepl(
|
||||
"^(other\\b|except\\b|[a-z]*cocc|[a-z]*bacill|[A-Z][a-z]{2,}\\b)",
|
||||
after, ignore.case = FALSE, perl = TRUE
|
||||
)
|
||||
if (!is_organism) next
|
||||
|
||||
ab_clean[i] <- before
|
||||
mo_from_ab[i] <- after
|
||||
}
|
||||
|
||||
tibble(ab_clean = ab_clean, mo_from_ab = mo_from_ab)
|
||||
}
|
||||
|
||||
# Whole-cell variant of the above, used before any list-splitting is
|
||||
# attempted. Only strips a trailing except/other-than clause when it is NOT
|
||||
# wrapped in parentheses attached to a single list member -- e.g.
|
||||
@@ -1379,6 +1443,26 @@ split_mo_list_one <- function(s, sheet_genus_fallback) {
|
||||
breakpoints_eucast <- breakpoints_eucast_raw |>
|
||||
filter(!breakpoint_S %in% c("NOTE", "IE", "IP", "NA", "-"),
|
||||
!breakpoint_R %in% c("NOTE", "IE", "IP", "NA", "-")) |>
|
||||
# Screening breakpoints (parenthesised values like "(2)") are kept in
|
||||
# breakpoints_eucast_raw but excluded from the clinical_breakpoints table:
|
||||
# they are screening cut-offs, not interpretive breakpoints for clinical
|
||||
# reporting. The is_screening flag was set during parsing.
|
||||
filter(!is_screening)
|
||||
|
||||
# Occasionally, split_agent_organism() could not separate an organism
|
||||
# restriction from the drug name (see split_organism_from_ab comment).
|
||||
# Detect and fix those before mo resolution, so the organism restriction
|
||||
# is processed alongside the regular mo text.
|
||||
ab_mo_fix <- split_organism_from_ab(breakpoints_eucast$ab, breakpoints_eucast$mo)
|
||||
fixed_rows <- !is.na(ab_mo_fix$mo_from_ab)
|
||||
if (any(fixed_rows)) {
|
||||
message("NOTE: ", sum(fixed_rows), " row(s) had an organism restriction embedded in the ab column; ",
|
||||
"splitting into ab + mo (e.g. '", breakpoints_eucast$ab[which(fixed_rows)[1]], "').")
|
||||
breakpoints_eucast$ab[fixed_rows] <- ab_mo_fix$ab_clean[fixed_rows]
|
||||
breakpoints_eucast$mo[fixed_rows] <- ab_mo_fix$mo_from_ab[fixed_rows]
|
||||
}
|
||||
|
||||
breakpoints_eucast <- breakpoints_eucast |>
|
||||
mutate(
|
||||
mo_text = strip_mo_exceptions_wholecell(mo),
|
||||
mo_text = resolve_other_x(mo_text, sheet),
|
||||
@@ -1465,12 +1549,15 @@ if (nrow(ab_previously_coerced_eucast) > 0) {
|
||||
|
||||
breakpoints_eucast <- breakpoints_eucast |>
|
||||
mutate(
|
||||
breakpoint_S = as.numeric(breakpoint_S),
|
||||
breakpoint_R = as.numeric(breakpoint_R),
|
||||
# Strip any residual parentheses before numeric conversion (defensive:
|
||||
# is_screening rows are already filtered out above, but a missed edge
|
||||
# case would otherwise introduce silent NAs via as.numeric()).
|
||||
breakpoint_S = as.numeric(gsub("^\\((.+)\\)$", "\\1", breakpoint_S)),
|
||||
breakpoint_R = as.numeric(gsub("^\\((.+)\\)$", "\\1", breakpoint_R)),
|
||||
uti = qualifier %like_case% "UTI",
|
||||
is_SDD = FALSE # EUCAST has no "susceptible, dose dependent" category (CLSI-only concept)
|
||||
) |>
|
||||
select(-mo_text, -qualifier) |>
|
||||
select(-mo_text, -qualifier, -is_screening) |>
|
||||
# Greek symbols and EM dash symbols are not allowed by CRAN, so replace them with ASCII:
|
||||
mutate(disk_dose = disk_dose %>%
|
||||
gsub("\u03bc", "mc", ., fixed = TRUE) %>% # this is 'mu', \u03bc
|
||||
@@ -1512,7 +1599,34 @@ breakpoints_eucast <- breakpoints_eucast |>
|
||||
distinct(guideline, type, host, ab, mo, method, site, breakpoint_S, .keep_all = TRUE) |>
|
||||
select(guideline, type, host, method, site, mo, rank_index, ab, ref_tbl,
|
||||
disk_dose, breakpoint_S, breakpoint_R, uti, is_SDD, note) |>
|
||||
arrange(desc(guideline), mo, ab, type, host, method)
|
||||
mutate(
|
||||
rank_index = case_when(
|
||||
is.na(mo_rank(mo, keep_synonyms = TRUE)) ~ 6, # for UNKNOWN, B_GRAMN, B_ANAER, B_ANAER-NEG, etc.
|
||||
mo_rank(mo, keep_synonyms = TRUE) %like% "(infra|sub)" ~ 1,
|
||||
mo_rank(mo, keep_synonyms = TRUE) == "species" ~ 2,
|
||||
mo_rank(mo, keep_synonyms = TRUE) == "species group" ~ 2.5,
|
||||
mo_rank(mo, keep_synonyms = TRUE) == "genus" ~ 3,
|
||||
mo_rank(mo, keep_synonyms = TRUE) == "family" ~ 4,
|
||||
mo_rank(mo, keep_synonyms = TRUE) == "order" ~ 5,
|
||||
TRUE ~ 6
|
||||
),
|
||||
uti = ifelse(is.na(site), FALSE, site %like% ".*(UTI|urinary|urine).*")
|
||||
)
|
||||
|
||||
breakpoints_eucast %>% count(guideline)
|
||||
glimpse(breakpoints_eucast)
|
||||
|
||||
saveRDS(breakpoints_eucast_raw, "data-raw/breakpoints_eucast_raw.rds")
|
||||
|
||||
message(paste0(c("Finished. Now add to the package by running:\n\n",
|
||||
"clinical_breakpoints <- clinical_breakpoints |>",
|
||||
" filter(guideline %like% \"CLSI\" | type != \"human\" | guideline %like% \"2010|2011|2012|2013|2014|2015|2016|2017|2018\") |>",
|
||||
" bind_rows(breakpoints_eucast) |>",
|
||||
" arrange(desc(guideline), mo, ab, type, method) |>",
|
||||
" filter(!(is.na(breakpoint_S) & is.na(breakpoint_R)) & !is.na(mo) & !is.na(ab)) |>",
|
||||
" distinct(guideline, type, host, ab, mo, method, site, breakpoint_S, .keep_all = TRUE) |>",
|
||||
" dataset_UTF8_to_ASCII()",
|
||||
"",
|
||||
"usethis::use_data(clinical_breakpoints, overwrite = TRUE, compress = \"xz\", version = 2)",
|
||||
"rm(clinical_breakpoints)",
|
||||
"devtools::load_all(\".\")"),
|
||||
collapse = "\n"))
|
||||
@@ -38,7 +38,7 @@ for (i in seq_len(nrow(antimicrobials))) {
|
||||
int_resis <- interpretive_rules(int_resis,
|
||||
interpretive_rules_df = subset(
|
||||
AMR:::INTERPRETIVE_RULES_DF,
|
||||
is.na(have_these_values) & reference.rule_group == "Expected phenotypes" & reference.version == 1.2
|
||||
reference.rule_group %like% "Expected.* Phenotypes"
|
||||
),
|
||||
overwrite = TRUE,
|
||||
info = FALSE
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
+12079
-12079
File diff suppressed because it is too large.
Load diff
Binary file not shown.
@@ -1274,69 +1274,3 @@ EUCAST Expert Rules 3.3 Expert Rules on Streptococcus species genus_species one_
|
||||
EUCAST Expert Rules 3.3 Expert Rules on Streptococcus species genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G NOR S LVX I
|
||||
EUCAST Expert Rules 3.3 Expert Rules on Streptococcus species genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G NOR S MFX S
|
||||
EUCAST Expert Rules 3.3 Expert Rules on Streptococcus species genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G NOR R LVX, MFX R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. order is Enterobacterales PEN, glycopeptides_except_lipo, lipoglycopeptides, FUS, macrolides, lincosamides, streptogramins, RIF, oxazolidinones R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. fullname like ^Citrobacter (koseri|amalonaticus|sedlakii|farmeri|rodentium) aminopenicillins, TIC R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. fullname like ^Citrobacter (freundii|braakii|murliniae|werkmanii|youngae) aminopenicillins, AMC, SAM, CZO, CEP, LEX, CFR, FOX R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. genus_species is Enterobacter cloacae aminopenicillins, AMC, SAM, CZO, CEP, LEX, CFR, FOX R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. genus_species is Escherichia hermannii aminopenicillins, TIC R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. genus_species is Hafnia alvei aminopenicillins, AMC, polymyxins R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. genus_species is Klebsiella aerogenes aminopenicillins, AMC, SAM, CZO, CEP, LEX, CFR, FOX R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. genus_species is Klebsiella oxytoca aminopenicillins, TIC R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. fullname like ^Klebsiella( pneumoniae| quasipneumoniae| variicola)? aminopenicillins, TIC R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. genus_species is Leclercia adecarboxylata FOS R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. genus_species is Morganella morganii aminopenicillins, AMC, SAM, CZO, CEP, LEX, CFR, DOX, MNO, TCY, polymyxins, NIT R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. genus_species is Plesiomonas shigelloides aminopenicillins, AMC, SAM R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. genus_species is Proteus mirabilis DOX, MNO, TCY, TGC, polymyxins, NIT R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. genus_species is Proteus penneri aminopenicillins, CZO, CEP, LEX, CFR, CXM, DOX, MNO, TCY, TGC, polymyxins, NIT R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. genus_species is Proteus vulgaris aminopenicillins, CZO, CEP, LEX, CFR, CXM, DOX, MNO, TCY, TGC, polymyxins, NIT R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. genus_species is Providencia rettgeri aminopenicillins, AMC, SAM, CZO, CEP, LEX, CFR, DOX, MNO, TCY, polymyxins, NIT R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. genus_species is Providencia stuartii aminopenicillins, AMC, SAM, CZO, CEP, LEX, CFR, DOX, MNO, TCY, polymyxins, NIT R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. genus is Raoultella aminopenicillins, TIC R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. genus_species is Serratia marcescens aminopenicillins, AMC, SAM, CZO, CEP, LEX, CFR, FOX, CXM, DOX, TCY, polymyxins, NIT R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. genus_species is Yersinia enterocolitica aminopenicillins, AMC, SAM, TIC, CZO, CEP, LEX, CFR, FOX R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. genus_species is Yersinia pseudotuberculosis polymyxins R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. genus_species is Aeromonas hydrophila aminopenicillins, SAM R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. genus_species is Aeromonas veronii aminopenicillins, SAM, TIC R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. genus_species is Aeromonas dhakensis aminopenicillins, SAM, FOX R
|
||||
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. genus_species is Aeromonas caviae aminopenicillins, SAM R
|
||||
EUCAST Expert Rules 3.3 Table 2: Intrinsic resistance in non-fermentative gram-negative bacteria genus one_of Achromobacter, Acinetobacter, Alcaligenes, Bordetella, Burkholderia, Elizabethkingia, Flavobacterium, Ochrobactrum, Pseudomonas, Stenotrophomonas PEN, cephalosporins_1st, cephalosporins_2nd, glycopeptides_except_lipo, lipoglycopeptides, FUS, macrolides, lincosamides, streptogramins, RIF, oxazolidinones R
|
||||
EUCAST Expert Rules 3.3 Table 2: Intrinsic resistance in non-fermentative gram-negative bacteria fullname like ^Acinetobacter (baumannii|pittii|nosocomialis) aminopenicillins, AMC, CRO, CTX, ATM, ETP, TMP, FOS, DOX, TCY R Additional rules from header added in separate rule (genus is one of…)
|
||||
EUCAST Expert Rules 3.3 Table 2: Intrinsic resistance in non-fermentative gram-negative bacteria genus is Acinetobacter DOX, TCY R Additional rules from header added in separate rule (genus is one of…)
|
||||
EUCAST Expert Rules 3.3 Table 2: Intrinsic resistance in non-fermentative gram-negative bacteria genus_species is Achromobacter xylosoxidans aminopenicillins, CRO, CTX, ETP, ATM R Additional rules from header added in separate rule (genus is one of…)
|
||||
EUCAST Expert Rules 3.3 Table 2: Intrinsic resistance in non-fermentative gram-negative bacteria fullname like ^Burkholderia (ambifaria|anthina|arboris|cepacia|cenocepacia|contaminans|diffusa|dolosa|lata|latens|metallica|multivorans|paludis|pseudomultivorans|pyrrocinia|pseudomultivorans|seminalis|stabilis|stagnalis|territorii|ubonensis|vietnamiensis) aminopenicillins, AMC, SAM, TIC, TCC, PIP, TZP, CRO, CTX, ATM, ETP, CIP, CHL, aminoglycosides, TMP, FOS, polymyxins R Additional rules from header added in separate rule (genus is one of…)
|
||||
EUCAST Expert Rules 3.3 Table 2: Intrinsic resistance in non-fermentative gram-negative bacteria genus_species is Elizabethkingia meningoseptica aminopenicillins, AMC, SAM, TIC, TCC, CTX, CRO, CAZ, FEP, ATM, ETP, IPM, MEM, polymyxins R Additional rules from header added in separate rule (genus is one of…)
|
||||
EUCAST Expert Rules 3.3 Table 2: Intrinsic resistance in non-fermentative gram-negative bacteria genus_species is Elizabethkingia anophelis aminopenicillins, AMC, SAM, TIC, TCC, CTX, CRO, CAZ, FEP, ATM, ETP, IPM, MEM R Additional rules from header added in separate rule (genus is one of…)
|
||||
EUCAST Expert Rules 3.3 Table 2: Intrinsic resistance in non-fermentative gram-negative bacteria genus_species is Brucella anthropi aminopenicillins, AMC, SAM, TIC, TCC, PIP, TZP, CZO, CTX, CRO, CAZ, FEP, ATM, ETP R Additional rules from header added in separate rule (genus is one of…)
|
||||
EUCAST Expert Rules 3.3 Table 2: Intrinsic resistance in non-fermentative gram-negative bacteria genus_species is Pseudomonas aeruginosa aminopenicillins, AMC, SAM, CTX, CRO, ETP, CHL, KAN, NEO, TMP, DOX, MNO, TCY, TGC R Additional rules from header added in separate rule (genus is one of…)
|
||||
EUCAST Expert Rules 3.3 Table 2: Intrinsic resistance in non-fermentative gram-negative bacteria genus_species is Stenotrophomonas maltophilia aminopenicillins, AMC, SAM, TIC, PIP, TZP, CRO, CTX, ATM, ETP, IPM, MEM, aminoglycosides, TMP, FOS, TCY R Additional rules from header added in separate rule (genus is one of…)
|
||||
EUCAST Expert Rules 3.3 Table 2: Intrinsic resistance in non-fermentative gram-negative bacteria genus is Chryseobacterium aminopenicillins, AMC, SAM, TIC, TCC, CRO, CTX, CAZ, ATM, ETP, IPM, MEM, aminoglycosides, polymyxins R Additional rules from header added in separate rule (genus is one of…)
|
||||
EUCAST Expert Rules 3.3 Table 3: Intrinsic resistance in other gram-negative bacteria genus_species is Haemophilus influenzae FUS, streptogramins, glycopeptides_except_lipo, lipoglycopeptides, lincosamides, oxazolidinones R
|
||||
EUCAST Expert Rules 3.3 Table 3: Intrinsic resistance in other gram-negative bacteria genus_species is Moraxella catarrhalis TMP, glycopeptides_except_lipo, lipoglycopeptides, lincosamides, oxazolidinones R
|
||||
EUCAST Expert Rules 3.3 Table 3: Intrinsic resistance in other gram-negative bacteria genus is Neisseria TMP, glycopeptides_except_lipo, lipoglycopeptides, lincosamides, oxazolidinones R
|
||||
EUCAST Expert Rules 3.3 Table 3: Intrinsic resistance in other gram-negative bacteria genus_species is Campylobacter fetus FUS, streptogramins, TMP, NAL, glycopeptides_except_lipo, lipoglycopeptides, lincosamides, oxazolidinones R
|
||||
EUCAST Expert Rules 3.3 Table 3: Intrinsic resistance in other gram-negative bacteria fullname like ^Campylobacter (jejuni|coli) FUS, streptogramins, TMP, glycopeptides_except_lipo, lipoglycopeptides, lincosamides, oxazolidinones R
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria gramstain is Gram-positive ATM, TEM, polymyxins, NAL R
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria genus_species is Staphylococcus saprophyticus FUS, CAZ, FOS, NOV R
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria genus_species is Staphylococcus cohnii CAZ, NOV R
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria genus_species is Staphylococcus xylosus CAZ, NOV R
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria genus_species is Staphylococcus capitis CAZ, FOS R
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria genus_species is Staphylococcus aureus CAZ R
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria genus_species is Staphylococcus coagulase-negative CAZ R
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria genus is Streptococcus FUS, CAZ, aminoglycosides R
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria genus_species is Enterococcus faecalis FUS, CAZ, cephalosporins_except_CAZ, aminoglycosides, macrolides, CLI, QDA, SDI, SUD, SDM, SLF, SLF1, SLF2, SZO, SLF3, SLF4, SMX, SLF5, SLF6, SLF7, SLF8, SLF9, SLF10, SLF11, SLF12, SUT, SLF13 R These last ones are all true sulfonamides
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria genus_species is Enterococcus faecalis TMP S SXT, SLT1, SLT2, SLT3, SLT4, SLT5 S Since R to sulfonamides - TMP result is equal with combinations
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria genus_species is Enterococcus faecalis TMP I SXT, SLT1, SLT2, SLT3, SLT4, SLT5 I Since R to sulfonamides - TMP result is equal with combinations
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria genus_species is Enterococcus faecalis TMP R SXT, SLT1, SLT2, SLT3, SLT4, SLT5 R Since R to sulfonamides - TMP result is equal with combinations
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria fullname like ^Enterococcus (gallinarum|casseliflavus) FUS, CAZ, cephalosporins_except_CAZ, aminoglycosides, macrolides, CLI, QDA, VAN, SDI, SUD, SDM, SLF, SLF1, SLF2, SZO, SLF3, SLF4, SMX, SLF5, SLF6, SLF7, SLF8, SLF9, SLF10, SLF11, SLF12, SUT, SLF13 R These last ones are all true sulfonamides
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria fullname like ^Enterococcus (gallinarum|casseliflavus) TMP S SXT, SLT1, SLT2, SLT3, SLT4, SLT5 S Since R to sulfonamides - TMP result is equal with combinations
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria fullname like ^Enterococcus (gallinarum|casseliflavus) TMP I SXT, SLT1, SLT2, SLT3, SLT4, SLT5 I Since R to sulfonamides - TMP result is equal with combinations
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria fullname like ^Enterococcus (gallinarum|casseliflavus) TMP R SXT, SLT1, SLT2, SLT3, SLT4, SLT5 R Since R to sulfonamides - TMP result is equal with combinations
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria genus_species is Enterococcus faecium FUS, CAZ, cephalosporins_except_CAZ, aminoglycosides, macrolides, SDI, SUD, SDM, SLF, SLF1, SLF2, SZO, SLF3, SLF4, SMX, SLF5, SLF6, SLF7, SLF8, SLF9, SLF10, SLF11, SLF12, SUT, SLF13 R These last ones are all true sulfonamides
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria genus_species is Enterococcus faecium TMP S SXT, SLT1, SLT2, SLT3, SLT4, SLT5 S Since R to sulfonamides - TMP result is equal with combinations
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria genus_species is Enterococcus faecium TMP I SXT, SLT1, SLT2, SLT3, SLT4, SLT5 I Since R to sulfonamides - TMP result is equal with combinations
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria genus_species is Enterococcus faecium TMP R SXT, SLT1, SLT2, SLT3, SLT4, SLT5 R Since R to sulfonamides - TMP result is equal with combinations
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria genus is Corynebacterium FOS R
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria genus_species is Listeria monocytogenes CAZ, cephalosporins_except_CAZ R
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria genus one_of Leuconostoc, Pediococcus VAN, TEC R
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria genus is Lactobacillus VAN, TEC R
|
||||
EUCAST Expert Rules 3.3 Table 4: Intrinsic resistance in gram-positive bacteria fullname like ^Clostridium (ramosum|innocuum) VAN R
|
||||
|
Can't render this file because it contains an unexpected character in line 263 and column 203.
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
-1
@@ -12,7 +12,7 @@ The \code{AMR} package is a peer-reviewed, \href{https://amr-for-r.org/#copyrigh
|
||||
|
||||
This work was published in the Journal of Statistical Software (Volume 104(3); \doi{10.18637/jss.v104.i03}) and formed the basis of two PhD theses (\doi{10.33612/diss.177417131} and \doi{10.33612/diss.192486375}).
|
||||
|
||||
After installing this package, R knows \href{https://amr-for-r.org/reference/microorganisms.html}{\strong{~97 000 distinct microbial species}} (updated May 2026) and all \href{https://amr-for-r.org/reference/antimicrobials.html}{\strong{~620 antimicrobial and antiviral drugs}} by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI 2011-2026 and EUCAST 2011-2026 are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). \strong{It was designed to work in any setting, including those with very limited resources}. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the \href{https://www.rug.nl}{University of Groningen} and the \href{https://www.umcg.nl}{University Medical Center Groningen}.
|
||||
After installing this package, R knows \href{https://amr-for-r.org/reference/microorganisms.html}{\strong{~97 000 distinct microbial species}} (updated mei 2026) and all \href{https://amr-for-r.org/reference/antimicrobials.html}{\strong{~620 antimicrobial and antiviral drugs}} by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI 2011-2026 and EUCAST 2011-2026 are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). \strong{It was designed to work in any setting, including those with very limited resources}. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the \href{https://www.rug.nl}{University of Groningen} and the \href{https://www.umcg.nl}{University Medical Center Groningen}.
|
||||
|
||||
The \code{AMR} package is available in English, Arabic, Bengali, Chinese, Czech, Danish, Dutch, Finnish, French, German, Greek, Hindi, Indonesian, Italian, Japanese, Korean, Norwegian, Polish, Portuguese, Romanian, Russian, Spanish, Swahili, Swedish, Turkish, Ukrainian, Urdu, and Vietnamese. Antimicrobial drug (group) names and colloquial microorganism names are provided in these languages.
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
\alias{clinical_breakpoints}
|
||||
\title{Data Set with Clinical Breakpoints for SIR Interpretation}
|
||||
\format{
|
||||
A \link[tibble:tibble]{tibble} with 45 735 observations and 14 variables:
|
||||
A \link[tibble:tibble]{tibble} with 44 089 observations and 15 variables:
|
||||
\itemize{
|
||||
\item \code{guideline}\cr Name of the guideline
|
||||
\item \code{type}\cr Breakpoint type, either \code{"ECOFF"}, \code{"animal"}, or \code{"human"}
|
||||
@@ -53,12 +53,13 @@ Some breakpoints in this package were validated through and imported from \href{
|
||||
From WHONET, imported were:
|
||||
\itemize{
|
||||
\item All CLSI breakpoints, including ECOFF
|
||||
\item EUCAST breakpoints between 2011 and 2018
|
||||
\item All non-human EUCAST breakpoints, including ECOFF
|
||||
\item Human EUCAST breakpoints between 2011 and 2018
|
||||
}
|
||||
|
||||
EUCAST breakpoints from 2019 onwards, were retrieved directly from \url{https://www.eucast.org}.
|
||||
Human EUCAST breakpoints from 2019 onwards, were retrieved directly from \url{https://www.eucast.org} using \href{https://github.com/msberends/AMR/blob/main/data-raw/_reproduction_scripts/reproduction_of_clinical_breakpoints_eucast.R}{this script}.
|
||||
|
||||
Our import and reproduction script can be found here: \url{https://github.com/msberends/AMR/blob/main/data-raw/_reproduction_scripts/reproduction_of_clinical_breakpoints.R}.
|
||||
Our WHONET import script can be \href{https://github.com/msberends/AMR/blob/main/data-raw/_reproduction_scripts/reproduction_of_clinical_breakpoints.R}{found here}.
|
||||
}
|
||||
|
||||
\subsection{Response From CLSI and EUCAST}{
|
||||
|
||||
@@ -130,7 +130,7 @@ test_that("test-interpretive_rules.R", {
|
||||
# azithromycin and clarythromycin must be equal to Erythromycin
|
||||
a <- suppressWarnings(as.sir(interpretive_rules(
|
||||
data.frame(
|
||||
mo = example_isolates$mo,
|
||||
mo = rep(as.mo("Campylobacter jejuni"), nrow(example_isolates)),
|
||||
ERY = example_isolates$ERY,
|
||||
AZM = as.sir("R"),
|
||||
CLR = factor("R"),
|
||||
@@ -143,8 +143,8 @@ test_that("test-interpretive_rules.R", {
|
||||
)$CLR))
|
||||
b <- example_isolates$ERY
|
||||
expect_identical(
|
||||
a[!is.na(b)],
|
||||
b[!is.na(b)]
|
||||
a[!is.na(b) & b != "I"],
|
||||
b[!is.na(b) & b != "I"]
|
||||
)
|
||||
|
||||
# amox is inferred by benzylpenicillin in Kingella kingae
|
||||
|
||||
@@ -180,6 +180,7 @@ This data set is in R available as `clinical_breakpoints`, after you load the `A
|
||||
clinical_breakpoints %>%
|
||||
mutate(mo_name = mo_name(mo, language = NULL), .after = mo) %>%
|
||||
mutate(ab_name = ab_name(ab, language = NULL), .after = ab) %>%
|
||||
select(-site, -mo, -ab, -ref_tbl) %>%
|
||||
print_df()
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user