mirror of
https://github.com/msberends/AMR.git
synced 2025-04-15 13:10:32 +02:00
(v2.1.1.9226) update intrinsic_resistant
, unit test fixes
This commit is contained in:
parent
e6f88241b2
commit
969a42cc8c
@ -1,6 +1,6 @@
|
||||
Package: AMR
|
||||
Version: 2.1.1.9225
|
||||
Date: 2025-03-26
|
||||
Version: 2.1.1.9226
|
||||
Date: 2025-03-27
|
||||
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
|
||||
|
3
NEWS.md
3
NEWS.md
@ -1,4 +1,4 @@
|
||||
# AMR 2.1.1.9225
|
||||
# AMR 2.1.1.9226
|
||||
|
||||
*(this beta version will eventually become v3.0. We're happy to reach a new major milestone soon, which will be all about the new One Health support! Install this beta using [the instructions here](https://msberends.github.io/AMR/#latest-development-version).)*
|
||||
|
||||
@ -27,6 +27,7 @@ This package now supports not only tools for AMR data analysis in clinical setti
|
||||
* **Updated clinical breakpoints**
|
||||
* EUCAST 2024 and CLSI 2024 are now supported, by adding all of their over 4,000 new clinical breakpoints to the `clinical_breakpoints` data set for usage in `as.sir()`. EUCAST 2024 is now the new default guideline for all MIC and disk diffusion interpretations.
|
||||
* Added all Expected Resistant Phenotypes from EUCAST (v1.2). The default `rules` for `eucast_rules()` are now: `c("breakpoints", "expected_phenotypes")`.
|
||||
* Updated the `intrinsic_resistant` data set, which is now based on EUCAST Expected Resistant Phenotypes v1.2
|
||||
* `as.sir()` now brings additional factor levels: "NI" for non-interpretable and "SDD" for susceptible dose-dependent. Currently, the `clinical_breakpoints` data set contains 24 breakpoints that can return the value "SDD" instead of "I".
|
||||
* EUCAST interpretive rules (using `eucast_rules()`) are now available for EUCAST 12 (2022), 13 (2023), and 14 (2024).
|
||||
* **New advanced ggplot2 extensions for MIC and SIR plotting and transforming**
|
||||
|
@ -612,9 +612,9 @@ administrable_iv <- function(only_sir_columns = FALSE, return_all = TRUE, ...) {
|
||||
|
||||
#' @rdname antimicrobial_selectors
|
||||
#' @inheritParams eucast_rules
|
||||
#' @details The [not_intrinsic_resistant()] function can be used to only select antimicrobials that pose no intrinsic resistance for the microorganisms in the data set. For example, if a data set contains only microorganism codes or names of *E. coli* and *K. pneumoniae* and contains a column "vancomycin", this column will be removed (or rather, unselected) using this function. It currently applies `r format_eucast_version_nr(names(EUCAST_VERSION_EXPERT_RULES[1]))` to determine intrinsic resistance, using the [eucast_rules()] function internally. Because of this determination, this function is quite slow in terms of performance.
|
||||
#' @details The [not_intrinsic_resistant()] function can be used to only select antimicrobials that pose no intrinsic resistance for the microorganisms in the data set. For example, if a data set contains only microorganism codes or names of *E. coli* and *K. pneumoniae* and contains a column "vancomycin", this column will be removed (or rather, unselected) using this function. It currently applies `r format_eucast_version_nr(names(EUCAST_VERSION_EXPECTED_PHENOTYPES[1]))` to determine intrinsic resistance, using the [eucast_rules()] function internally. Because of this determination, this function is quite slow in terms of performance.
|
||||
#' @export
|
||||
not_intrinsic_resistant <- function(only_sir_columns = FALSE, col_mo = NULL, version_expertrules = 3.3, ...) {
|
||||
not_intrinsic_resistant <- function(only_sir_columns = FALSE, col_mo = NULL, version_expected_phenotypes = 1.2, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
# get_current_data() has to run each time, for cases where e.g., filter() and select() are used in same call
|
||||
# but it only takes a couple of milliseconds
|
||||
@ -629,8 +629,9 @@ not_intrinsic_resistant <- function(only_sir_columns = FALSE, col_mo = NULL, ver
|
||||
sapply(
|
||||
eucast_rules(vars_df,
|
||||
col_mo = col_mo,
|
||||
version_expertrules = version_expertrules,
|
||||
rules = "expert",
|
||||
version_expected_phenotypes = version_expected_phenotypes,
|
||||
rules = "expected_phenotypes",
|
||||
overwrite = TRUE,
|
||||
info = FALSE
|
||||
),
|
||||
function(col) {
|
||||
|
20
R/data.R
20
R/data.R
@ -29,17 +29,17 @@
|
||||
|
||||
#' Data Sets with `r format(nrow(antimicrobials) + nrow(antivirals), big.mark = " ")` Antimicrobial Drugs
|
||||
#'
|
||||
#' Two data sets containing all antimicrobials and antivirals. Use [as.ab()] or one of the [`ab_*`][ab_property()] functions to retrieve values from the [antimicrobials] data set. Three identifiers are included in this data set: an antimcrobial ID (`ab`, primarily used in this package) as defined by WHONET/EARS-Net, an ATC code (`atc`) as defined by the WHO, and a Compound ID (`cid`) as found in PubChem. Other properties in this data set are derived from one or more of these codes. Note that some drugs have multiple ATC codes.
|
||||
#' Two data sets containing all antimicrobials and antivirals. Use [as.ab()] or one of the [`ab_*`][ab_property()] functions to retrieve values from the [antimicrobials] data set. Three identifiers are included in this data set: an antimicrobial ID (`ab`, primarily used in this package) as defined by WHONET/EARS-Net, an ATC code (`atc`) as defined by the WHO, and a Compound ID (`cid`) as found in PubChem. Other properties in this data set are derived from one or more of these codes. Note that some drugs have multiple ATC codes.
|
||||
#' @format
|
||||
#' ### For the [antimicrobials] data set: a [tibble][tibble::tibble] with `r nrow(antimicrobials)` observations and `r ncol(antimicrobials)` variables:
|
||||
#' - `ab`\cr antimcrobial ID as used in this package (such as `AMC`), using the official EARS-Net (European Antimicrobial Resistance Surveillance Network) codes where available. ***This is a unique identifier.***
|
||||
#' - `ab`\cr antimicrobial ID as used in this package (such as `AMC`), using the official EARS-Net (European Antimicrobial Resistance Surveillance Network) codes where available. ***This is a unique identifier.***
|
||||
#' - `cid`\cr Compound ID as found in PubChem. ***This is a unique identifier.***
|
||||
#' - `name`\cr Official name as used by WHONET/EARS-Net or the WHO. ***This is a unique identifier.***
|
||||
#' - `group`\cr A short and concise group name, based on WHONET and WHOCC definitions
|
||||
#' - `atc`\cr ATC codes (Anatomical Therapeutic Chemical) as defined by the WHOCC, like `J01CR02`
|
||||
#' - `atc_group1`\cr Official pharmacological subgroup (3rd level ATC code) as defined by the WHOCC, like `"Macrolides, lincosamides and streptogramins"`
|
||||
#' - `atc_group2`\cr Official chemical subgroup (4th level ATC code) as defined by the WHOCC, like `"Macrolides"`
|
||||
#' - `abbr`\cr List of abbreviations as used in many countries, also for antimcrobial susceptibility testing (AST)
|
||||
#' - `abbr`\cr List of abbreviations as used in many countries, also for antimicrobial susceptibility testing (AST)
|
||||
#' - `synonyms`\cr Synonyms (often trade names) of a drug, as found in PubChem based on their compound ID
|
||||
#' - `oral_ddd`\cr Defined Daily Dose (DDD), oral treatment, currently available for `r sum(!is.na(AMR::antimicrobials$oral_ddd))` drugs
|
||||
#' - `oral_units`\cr Units of `oral_ddd`
|
||||
@ -238,7 +238,7 @@
|
||||
|
||||
#' Data Set with `r format(nrow(WHONET), big.mark = " ")` Isolates - WHONET Example
|
||||
#'
|
||||
#' This example data set has the exact same structure as an export file from WHONET. Such files can be used with this package, as this example data set shows. The antimcrobial results are from our [example_isolates] data set. All patient names were created using online surname generators and are only in place for practice purposes.
|
||||
#' This example data set has the exact same structure as an export file from WHONET. Such files can be used with this package, as this example data set shows. The antimicrobial results are from our [example_isolates] data set. All patient names were created using online surname generators and are only in place for practice purposes.
|
||||
#' @format A [tibble][tibble::tibble] with `r format(nrow(WHONET), big.mark = " ")` observations and `r ncol(WHONET)` variables:
|
||||
#' - `Identification number`\cr ID of the sample
|
||||
#' - `Specimen number`\cr ID of the specimen
|
||||
@ -265,7 +265,7 @@
|
||||
#' - `Inducible clindamycin resistance`\cr Clindamycin can be induced?
|
||||
#' - `Comment`\cr Other comments
|
||||
#' - `Date of data entry`\cr [Date] this data was entered in WHONET
|
||||
#' - `AMP_ND10:CIP_EE`\cr `r sum(vapply(FUN.VALUE = logical(1), WHONET, is.sir))` different antimicrobials. You can lookup the abbreviations in the [antimicrobials] data set, or use e.g. [`ab_name("AMP")`][ab_name()] to get the official name immediately. Before analysis, you should transform this to a valid antimcrobial class, using [as.sir()].
|
||||
#' - `AMP_ND10:CIP_EE`\cr `r sum(vapply(FUN.VALUE = logical(1), WHONET, is.sir))` different antimicrobials. You can lookup the abbreviations in the [antimicrobials] data set, or use e.g. [`ab_name("AMP")`][ab_name()] to get the official name immediately. Before analysis, you should transform this to a valid antimicrobial class, using [as.sir()].
|
||||
#' @details
|
||||
#' Like all data sets in this package, this data set is publicly available for download in the following formats: R, MS Excel, Apache Feather, Apache Parquet, SPSS, and Stata. Please visit [our website for the download links](https://msberends.github.io/AMR/articles/datasets.html). The actual files are of course available on [our GitHub repository](https://github.com/msberends/AMR/tree/main/data-raw).
|
||||
#' @examples
|
||||
@ -290,7 +290,7 @@
|
||||
#' - `site`\cr Body site for which the breakpoint must be applied, e.g. "Oral" or "Respiratory"
|
||||
#' - `mo`\cr Microbial ID, see [as.mo()]
|
||||
#' - `rank_index`\cr Taxonomic rank index of `mo` from 1 (subspecies/infraspecies) to 5 (unknown microorganism)
|
||||
#' - `ab`\cr Antimcrobial code as used by this package, EARS-Net and WHONET, see [as.ab()]
|
||||
#' - `ab`\cr Antimicrobial code as used by this package, EARS-Net and WHONET, see [as.ab()]
|
||||
#' - `ref_tbl`\cr Info about where the guideline rule can be found
|
||||
#' - `disk_dose`\cr Dose of the used disk diffusion method
|
||||
#' - `breakpoint_S`\cr Lowest MIC value or highest number of millimetres that leads to "S"
|
||||
@ -325,9 +325,11 @@
|
||||
#' Data set containing defined intrinsic resistance by EUCAST of all bug-drug combinations.
|
||||
#' @format A [tibble][tibble::tibble] with `r format(nrow(intrinsic_resistant), big.mark = " ")` observations and `r ncol(intrinsic_resistant)` variables:
|
||||
#' - `mo`\cr Microorganism ID
|
||||
#' - `ab`\cr Antimcrobial ID
|
||||
#' - `ab`\cr Antimicrobial ID
|
||||
#' @details
|
||||
#' This data set is based on `r format_eucast_version_nr(3.3)`.
|
||||
#' This data set is based on `r format_eucast_version_nr(names(EUCAST_VERSION_EXPECTED_PHENOTYPES[1]))`.
|
||||
#'
|
||||
#' This data set is internally used by [not_intrinsic_resistant()] (an [antimicrobial selector][antimicrobial_selectors]) and [mo_is_intrinsic_resistant()]
|
||||
#'
|
||||
#' ### Direct download
|
||||
#' Like all data sets in this package, this data set is publicly available for download in the following formats: R, MS Excel, Apache Feather, Apache Parquet, SPSS, and Stata. Please visit [our website for the download links](https://msberends.github.io/AMR/articles/datasets.html). The actual files are of course available on [our GitHub repository](https://github.com/msberends/AMR/tree/main/data-raw).
|
||||
@ -341,7 +343,7 @@
|
||||
#'
|
||||
#' EUCAST breakpoints used in this package are based on the dosages in this data set. They can be retrieved with [eucast_dosage()].
|
||||
#' @format A [tibble][tibble::tibble] with `r format(nrow(dosage), big.mark = " ")` observations and `r ncol(dosage)` variables:
|
||||
#' - `ab`\cr Antimcrobial ID as used in this package (such as `AMC`), using the official EARS-Net (European Antimicrobial Resistance Surveillance Network) codes where available
|
||||
#' - `ab`\cr Antimicrobial ID as used in this package (such as `AMC`), using the official EARS-Net (European Antimicrobial Resistance Surveillance Network) codes where available
|
||||
#' - `name`\cr Official name of the antimicrobial drug as used by WHONET/EARS-Net or the WHO
|
||||
#' - `type`\cr Type of the dosage, either `r vector_or(dosage$type)`
|
||||
#' - `dose`\cr Dose, such as "2 g" or "25 mg/kg"
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
format_eucast_version_nr <- function(version, markdown = TRUE) {
|
||||
# for documentation - adds title, version number, year and url in markdown language
|
||||
lst <- c(EUCAST_VERSION_BREAKPOINTS, EUCAST_VERSION_EXPERT_RULES)
|
||||
lst <- c(EUCAST_VERSION_BREAKPOINTS, EUCAST_VERSION_EXPECTED_PHENOTYPES, EUCAST_VERSION_EXPERT_RULES)
|
||||
version <- format(unique(version), nsmall = 1)
|
||||
txt <- character(0)
|
||||
for (i in seq_len(length(version))) {
|
||||
|
@ -52,7 +52,7 @@
|
||||
#'
|
||||
#' Determination of yeasts ([mo_is_yeast()]) will be based on the taxonomic kingdom and class. *Budding yeasts* are yeasts that reproduce asexually through a process called budding, where a new cell develops from a small protrusion on the parent cell. Taxonomically, these are members of the phylum Ascomycota, class Saccharomycetes (also called Hemiascomycetes) or Pichiomycetes. *True yeasts* quite specifically refers to yeasts in the underlying order Saccharomycetales (such as *Saccharomyces cerevisiae*). Thus, for all microorganisms that are member of the taxonomic class Saccharomycetes or Pichiomycetes, the function will return `TRUE`. It returns `FALSE` otherwise (or `NA` when the input is `NA` or the MO code is `UNKNOWN`).
|
||||
#'
|
||||
#' Determination of intrinsic resistance ([mo_is_intrinsic_resistant()]) will be based on the [intrinsic_resistant] data set, which is based on `r format_eucast_version_nr(3.3)`. The [mo_is_intrinsic_resistant()] function can be vectorised over both argument `x` (input for microorganisms) and `ab` (input for antimicrobials).
|
||||
#' Determination of intrinsic resistance ([mo_is_intrinsic_resistant()]) will be based on the [intrinsic_resistant] data set, which is based on `r format_eucast_version_nr(names(EUCAST_VERSION_EXPECTED_PHENOTYPES[1]))`. The [mo_is_intrinsic_resistant()] function can be vectorised over both argument `x` (input for microorganisms) and `ab` (input for antimicrobials).
|
||||
#'
|
||||
#' Determination of bacterial oxygen tolerance ([mo_oxygen_tolerance()]) will be based on BacDive, see *Source*. The function [mo_is_anaerobic()] only returns `TRUE` if the oxygen tolerance is `"anaerobe"`, indicting an obligate anaerobic species or genus. It always returns `FALSE` for species outside the taxonomic kingdom of Bacteria.
|
||||
#'
|
||||
@ -591,7 +591,7 @@ mo_is_intrinsic_resistant <- function(x, ab, language = get_AMR_locale(), keep_s
|
||||
if (message_not_thrown_before("mo_is_intrinsic_resistant", "version.mo", entire_session = TRUE)) {
|
||||
message_(
|
||||
"Determining intrinsic resistance based on ",
|
||||
format_eucast_version_nr(3.3, markdown = FALSE), ". ",
|
||||
format_eucast_version_nr(1.2, markdown = FALSE), ". ",
|
||||
font_red("This note will be shown once per session.")
|
||||
)
|
||||
}
|
||||
|
1
R/sir.R
1
R/sir.R
@ -659,6 +659,7 @@ as.sir.disk <- function(x,
|
||||
breakpoint_type = breakpoint_type,
|
||||
host = host,
|
||||
verbose = verbose,
|
||||
info = info,
|
||||
...
|
||||
)
|
||||
}
|
||||
|
BIN
R/sysdata.rda
BIN
R/sysdata.rda
Binary file not shown.
@ -633,7 +633,7 @@ files_changed <- function(paths = "^(R|data)/") {
|
||||
tryCatch({
|
||||
changed_files <- system("git status", intern = TRUE)
|
||||
changed_files <- unlist(strsplit(changed_files, " "))
|
||||
any(changed_files %like% paths)
|
||||
any(changed_files %like% paths[paths != "R/sysdata.rda"])
|
||||
}, error = function(e) TRUE)
|
||||
}
|
||||
|
||||
|
@ -783,36 +783,6 @@ genus_species is Brucella melitensis TCY-S S DOX S Brucella melitensis Breakpoin
|
||||
genus_species is Brucella melitensis TCY-S R DOX R Brucella melitensis Breakpoints 14
|
||||
genus_species is Burkholderia pseudomallei TCY-S S DOX I Burkholderia pseudomallei Breakpoints 14
|
||||
genus_species is Burkholderia pseudomallei TCY-S R DOX R Burkholderia pseudomallei Breakpoints 14
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
genus_species one_of Citrobacter koseri, Citrobacter amalonaticus AMP, AMX, TIC R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species is Citrobacter freundii AMP, AMX, AMC, SAM, CZO, CEP, LEX, CFR, FOX R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species one_of Enterobacter cloacae complex AMP, AMX, AMC, SAM, CZO, CEP, LEX, CFR, FOX R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species is Escherichia hermannii AMP, AMX, TIC R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species is Hafnia alvei AMP, AMX, PLB, COL R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species is Klebsiella aerogenes AMP, AMX, AMC, SAM, CZO, CEP, LEX, CFR, FOX R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species one_of Klebsiella pneumoniae complex AMX, AMP, TIC R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species is Klebsiella oxytoca AMX, AMP, TIC R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species is Leclercia adecarboxylata FOS R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species is Morganella morganii AMP, AMX, AMC, SAM, CZO, CEP, LEX, CFR, tetracyclines, PLB, COL, NIT R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species is Plesiomonas shigelloides AMX, AMP, SAM R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species is Proteus mirabilis tetracyclines, PLB, COL, NIT R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species is Proteus penneri AMP, AMX, CZO, CEP, LEX, CFR, CXM, tetracyclines, PLB, COL, NIT R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species is Proteus vulgaris AMP, AMX, CZO, CEP, LEX, CFR, CXM, tetracyclines, PLB, COL, NIT R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species is Providencia rettgeri AMP, AMX, AMC, SAM, CZO, CEP, LEX, CFR, tetracyclines, PLB, COL, NIT R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species is Providencia stuartii AMP, AMX, AMC, SAM, CZO, CEP, LEX, CFR, tetracyclines, PLB, COL, NIT R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus is Raoultella AMP, AMX, TIC R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species is Serratia marcescens AMP, AMX, AMC, SAM, CZO, CEP, LEX, CFR, FOX, CXM, PLB, COL, NIT R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species is Yersinia enterocolitica AMP, AMX, AMC, SAM, TIC, CZO, CEP, LEX, CFR, FOX R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species is Yersinia pseudotuberculosis PLB, COL R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species is Aeromonas hydrophila AMP, AMX, SAM R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species is Aeromonas veronii AMP, AMX, SAM, TIC R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species is Aeromonas dhakensis AMP, AMX, SAM, FOX R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species is Aeromonas caviae AMP, AMX, SAM R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species is Aeromonas jandaei AMP, AMX, SAM, TIC R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
order is Enterobacterales PEN, glycopeptides, lipoglycopeptides, FUS, macrolides, lincosamides, streptogramins, RIF, oxazolidinones R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species one_of Citrobacter koseri, Citrobacter amalonaticus AMP, AMX, TIC R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
genus_species is Citrobacter freundii AMP, AMX, AMC, SAM, CZO, CEP, LEX, CFR, FOX R Table 1: Expected resistant phenotype in Enterobacterales and Aeromonas spp. Expected phenotypes 1.2
|
||||
@ -850,7 +820,7 @@ genus_species is Pseudomonas aeruginosa AMP, AMX, AMC, SAM, CTX, CRO, ETP, CHL
|
||||
genus_species is Stenotrophomonas maltophilia AMP, AMX, AMC, SAM, TIC, PIP, TZP, CTX, CRO, ATM, ETP, IPM, MEM, aminoglycosides, TMP, FOS, TCY R Table 2: Expected resistant phenotype in non-fermentative gram-negative bacteria Expected phenotypes 1.2
|
||||
genus is Chryseobacterium AMP, AMX, AMC, SAM, TIC, TCC, CTX, CRO, CAZ, ATM, ETP, IPM, MEM, aminoglycosides, PLB, COL R Table 2: Expected resistant phenotype in non-fermentative gram-negative bacteria Expected phenotypes 1.2
|
||||
genus_species is Haemophilus influenzae FUS, streptogramins R Table 3: Expected resistant phenotype in gram-negative bacteria other than Enterobacterales and non-fermentative gram-negative bacteria Expected phenotypes 1.2
|
||||
genus_species is Moraxella catarrhalis R TMP R Table 3: Expected resistant phenotype in gram-negative bacteria other than Enterobacterales and non-fermentative gram-negative bacteria Expected phenotypes 1.2
|
||||
genus_species is Moraxella catarrhalis TMP R Table 3: Expected resistant phenotype in gram-negative bacteria other than Enterobacterales and non-fermentative gram-negative bacteria Expected phenotypes 1.2
|
||||
genus is Neisseria TMP R Table 3: Expected resistant phenotype in gram-negative bacteria other than Enterobacterales and non-fermentative gram-negative bacteria Expected phenotypes 1.2
|
||||
genus_species is Campylobacter fetus FUS, streptogramins, TMP, NAL R Table 3: Expected resistant phenotype in gram-negative bacteria other than Enterobacterales and non-fermentative gram-negative bacteria Expected phenotypes 1.2
|
||||
genus_species one_of Campylobacter jejuni, Campylobacter coli FUS, streptogramins, TMP R Table 3: Expected resistant phenotype in gram-negative bacteria other than Enterobacterales and non-fermentative gram-negative bacteria Expected phenotypes 1.2
|
||||
|
Can't render this file because it has a wrong number of fields in line 9.
|
@ -1,6 +1,6 @@
|
||||
This knowledge base contains all context you must know about the AMR package for R. You are a GPT trained to be an assistant for the AMR package in R. You are an incredible R specialist, especially trained in this package and in the tidyverse.
|
||||
|
||||
First and foremost, you are trained on version 2.1.1.9225. Remember this whenever someone asks which AMR package version you’re at.
|
||||
First and foremost, you are trained on version 2.1.1.9226. Remember this whenever someone asks which AMR package version you’re at.
|
||||
|
||||
Below are the contents of the NAMESPACE file, the index.md file, and all the man/*.Rd files (documentation) in the package. Every file content is split using 100 hypens.
|
||||
----------------------------------------------------------------------------------------------------
|
||||
@ -988,14 +988,14 @@ A \link[tibble:tibble]{tibble} with 500 observations and 53 variables:
|
||||
\item \verb{Inducible clindamycin resistance}\cr Clindamycin can be induced?
|
||||
\item \code{Comment}\cr Other comments
|
||||
\item \verb{Date of data entry}\cr \link{Date} this data was entered in WHONET
|
||||
\item \code{AMP_ND10:CIP_EE}\cr 28 different antimicrobials. You can lookup the abbreviations in the \link{antimicrobials} data set, or use e.g. \code{\link[=ab_name]{ab_name("AMP")}} to get the official name immediately. Before analysis, you should transform this to a valid antimcrobial class, using \code{\link[=as.sir]{as.sir()}}.
|
||||
\item \code{AMP_ND10:CIP_EE}\cr 28 different antimicrobials. You can lookup the abbreviations in the \link{antimicrobials} data set, or use e.g. \code{\link[=ab_name]{ab_name("AMP")}} to get the official name immediately. Before analysis, you should transform this to a valid antimicrobial class, using \code{\link[=as.sir]{as.sir()}}.
|
||||
}
|
||||
}
|
||||
\usage{
|
||||
WHONET
|
||||
}
|
||||
\description{
|
||||
This example data set has the exact same structure as an export file from WHONET. Such files can be used with this package, as this example data set shows. The antimcrobial results are from our \link{example_isolates} data set. All patient names were created using online surname generators and are only in place for practice purposes.
|
||||
This example data set has the exact same structure as an export file from WHONET. Such files can be used with this package, as this example data set shows. The antimicrobial results are from our \link{example_isolates} data set. All patient names were created using online surname generators and are only in place for practice purposes.
|
||||
}
|
||||
\details{
|
||||
Like all data sets in this package, this data set is publicly available for download in the following formats: R, MS Excel, Apache Feather, Apache Parquet, SPSS, and Stata. Please visit \href{https://msberends.github.io/AMR/articles/datasets.html}{our website for the download links}. The actual files are of course available on \href{https://github.com/msberends/AMR/tree/main/data-raw}{our GitHub repository}.
|
||||
@ -2264,7 +2264,7 @@ administrable_per_os(only_sir_columns = FALSE, return_all = TRUE, ...)
|
||||
administrable_iv(only_sir_columns = FALSE, return_all = TRUE, ...)
|
||||
|
||||
not_intrinsic_resistant(only_sir_columns = FALSE, col_mo = NULL,
|
||||
version_expertrules = 3.3, ...)
|
||||
version_expected_phenotypes = 1.2, ...)
|
||||
}
|
||||
\arguments{
|
||||
\item{only_sir_columns}{a \link{logical} to indicate whether only columns of class \code{sir} must be selected (default is \code{FALSE}), see \code{\link[=as.sir]{as.sir()}}}
|
||||
@ -2281,7 +2281,7 @@ not_intrinsic_resistant(only_sir_columns = FALSE, col_mo = NULL,
|
||||
|
||||
\item{col_mo}{column name of the names or codes of the microorganisms (see \code{\link[=as.mo]{as.mo()}}) - the default is the first column of class \code{\link{mo}}. Values will be coerced using \code{\link[=as.mo]{as.mo()}}.}
|
||||
|
||||
\item{version_expertrules}{the version number to use for the EUCAST Expert Rules and Intrinsic Resistance guideline. Can be "3.3", "3.2", or "3.1".}
|
||||
\item{version_expected_phenotypes}{the version number to use for the EUCAST Expected Phenotypes. Can be "1.2".}
|
||||
}
|
||||
\value{
|
||||
When used inside selecting or filtering, this returns a \link{character} vector of column names, with additional class \code{"amr_selector"}. When used individually, this returns an \link[=as.ab]{'ab' vector} with all possible antimicrobials that the function would be able to select or filter.
|
||||
@ -2309,7 +2309,7 @@ The \code{\link[=administrable_per_os]{administrable_per_os()}} and \code{\link[
|
||||
|
||||
The \code{\link[=amr_selector]{amr_selector()}} function can be used to internally filter the \link{antimicrobials} data set on any results, see \emph{Examples}. It allows for filtering on a (part of) a certain name, and/or a group name or even a minimum of DDDs for oral treatment. This function yields the highest flexibility, but is also the least user-friendly, since it requires a hard-coded filter to set.
|
||||
|
||||
The \code{\link[=not_intrinsic_resistant]{not_intrinsic_resistant()}} function can be used to only select antimicrobials that pose no intrinsic resistance for the microorganisms in the data set. For example, if a data set contains only microorganism codes or names of \emph{E. coli} and \emph{K. pneumoniae} and contains a column "vancomycin", this column will be removed (or rather, unselected) using this function. It currently applies \href{https://www.eucast.org/expert_rules_and_expected_phenotypes}{'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.3} (2021) to determine intrinsic resistance, using the \code{\link[=eucast_rules]{eucast_rules()}} function internally. Because of this determination, this function is quite slow in terms of performance.
|
||||
The \code{\link[=not_intrinsic_resistant]{not_intrinsic_resistant()}} function can be used to only select antimicrobials that pose no intrinsic resistance for the microorganisms in the data set. For example, if a data set contains only microorganism codes or names of \emph{E. coli} and \emph{K. pneumoniae} and contains a column "vancomycin", this column will be removed (or rather, unselected) using this function. It currently applies \href{https://www.eucast.org/expert_rules_and_expected_phenotypes}{'EUCAST Expected Resistant Phenotypes' v1.2} (2023) to determine intrinsic resistance, using the \code{\link[=eucast_rules]{eucast_rules()}} function internally. Because of this determination, this function is quite slow in terms of performance.
|
||||
}
|
||||
\section{Full list of supported (antimicrobial) classes}{
|
||||
|
||||
@ -2543,14 +2543,14 @@ THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/antimicrobials.Rd':
|
||||
\format{
|
||||
\subsection{For the \link{antimicrobials} data set: a \link[tibble:tibble]{tibble} with 496 observations and 14 variables:}{
|
||||
\itemize{
|
||||
\item \code{ab}\cr antimcrobial 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{name}\cr Official name as used by WHONET/EARS-Net or the WHO. \emph{\strong{This is a unique identifier.}}
|
||||
\item \code{group}\cr A short and concise group name, based on WHONET and WHOCC definitions
|
||||
\item \code{atc}\cr ATC codes (Anatomical Therapeutic Chemical) as defined by the WHOCC, like \code{J01CR02}
|
||||
\item \code{atc_group1}\cr Official pharmacological subgroup (3rd level ATC code) as defined by the WHOCC, like \code{"Macrolides, lincosamides and streptogramins"}
|
||||
\item \code{atc_group2}\cr Official chemical subgroup (4th level ATC code) as defined by the WHOCC, like \code{"Macrolides"}
|
||||
\item \code{abbr}\cr List of abbreviations as used in many countries, also for antimcrobial susceptibility testing (AST)
|
||||
\item \code{abbr}\cr List of abbreviations as used in many countries, also for antimicrobial susceptibility testing (AST)
|
||||
\item \code{synonyms}\cr Synonyms (often trade names) of a drug, as found in PubChem based on their compound ID
|
||||
\item \code{oral_ddd}\cr Defined Daily Dose (DDD), oral treatment, currently available for 179 drugs
|
||||
\item \code{oral_units}\cr Units of \code{oral_ddd}
|
||||
@ -2591,7 +2591,7 @@ antimicrobials
|
||||
antivirals
|
||||
}
|
||||
\description{
|
||||
Two data sets containing all antimicrobials and antivirals. Use \code{\link[=as.ab]{as.ab()}} or one of the \code{\link[=ab_property]{ab_*}} functions to retrieve values from the \link{antimicrobials} data set. Three identifiers are included in this data set: an antimcrobial ID (\code{ab}, primarily used in this package) as defined by WHONET/EARS-Net, an ATC code (\code{atc}) as defined by the WHO, and a Compound ID (\code{cid}) as found in PubChem. Other properties in this data set are derived from one or more of these codes. Note that some drugs have multiple ATC codes.
|
||||
Two data sets containing all antimicrobials and antivirals. Use \code{\link[=as.ab]{as.ab()}} or one of the \code{\link[=ab_property]{ab_*}} functions to retrieve values from the \link{antimicrobials} data set. Three identifiers are included in this data set: an antimicrobial ID (\code{ab}, primarily used in this package) as defined by WHONET/EARS-Net, an ATC code (\code{atc}) as defined by the WHO, and a Compound ID (\code{cid}) as found in PubChem. Other properties in this data set are derived from one or more of these codes. Note that some drugs have multiple ATC codes.
|
||||
}
|
||||
\details{
|
||||
Properties that are based on an ATC code are only available when an ATC is available. These properties are: \code{atc_group1}, \code{atc_group2}, \code{oral_ddd}, \code{oral_units}, \code{iv_ddd} and \code{iv_units}.
|
||||
@ -4212,7 +4212,7 @@ A \link[tibble:tibble]{tibble} with 34 376 observations and 14 variables:
|
||||
\item \code{site}\cr Body site for which the breakpoint must be applied, e.g. "Oral" or "Respiratory"
|
||||
\item \code{mo}\cr Microbial ID, see \code{\link[=as.mo]{as.mo()}}
|
||||
\item \code{rank_index}\cr Taxonomic rank index of \code{mo} from 1 (subspecies/infraspecies) to 5 (unknown microorganism)
|
||||
\item \code{ab}\cr Antimcrobial code as used by this package, EARS-Net and WHONET, see \code{\link[=as.ab]{as.ab()}}
|
||||
\item \code{ab}\cr Antimicrobial code as used by this package, EARS-Net and WHONET, see \code{\link[=as.ab]{as.ab()}}
|
||||
\item \code{ref_tbl}\cr Info about where the guideline rule can be found
|
||||
\item \code{disk_dose}\cr Dose of the used disk diffusion method
|
||||
\item \code{breakpoint_S}\cr Lowest MIC value or highest number of millimetres that leads to "S"
|
||||
@ -4649,7 +4649,7 @@ THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/dosage.Rd':
|
||||
\format{
|
||||
A \link[tibble:tibble]{tibble} with 503 observations and 9 variables:
|
||||
\itemize{
|
||||
\item \code{ab}\cr Antimcrobial ID as used in this package (such as \code{AMC}), using the official EARS-Net (European Antimicrobial Resistance Surveillance Network) codes where available
|
||||
\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
|
||||
\item \code{name}\cr Official name of the antimicrobial drug as used by WHONET/EARS-Net or the WHO
|
||||
\item \code{type}\cr Type of the dosage, either "high_dosage", "standard_dosage", or "uncomplicated_uti"
|
||||
\item \code{dose}\cr Dose, such as "2 g" or "25 mg/kg"
|
||||
@ -5866,10 +5866,10 @@ THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/intrinsic_resistant.Rd':
|
||||
\alias{intrinsic_resistant}
|
||||
\title{Data Set with Bacterial Intrinsic Resistance}
|
||||
\format{
|
||||
A \link[tibble:tibble]{tibble} with 301 583 observations and 2 variables:
|
||||
A \link[tibble:tibble]{tibble} with 196 665 observations and 2 variables:
|
||||
\itemize{
|
||||
\item \code{mo}\cr Microorganism ID
|
||||
\item \code{ab}\cr Antimcrobial ID
|
||||
\item \code{ab}\cr Antimicrobial ID
|
||||
}
|
||||
}
|
||||
\usage{
|
||||
@ -5879,7 +5879,9 @@ intrinsic_resistant
|
||||
Data set containing defined intrinsic resistance by EUCAST of all bug-drug combinations.
|
||||
}
|
||||
\details{
|
||||
This data set is based on \href{https://www.eucast.org/expert_rules_and_expected_phenotypes}{'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.3} (2021).
|
||||
This data set is based on \href{https://www.eucast.org/expert_rules_and_expected_phenotypes}{'EUCAST Expected Resistant Phenotypes' v1.2} (2023).
|
||||
|
||||
This data set is internally used by \code{\link[=not_intrinsic_resistant]{not_intrinsic_resistant()}} (an \link[=antimicrobial_selectors]{antimicrobial selector}) and \code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}}
|
||||
\subsection{Direct download}{
|
||||
|
||||
Like all data sets in this package, this data set is publicly available for download in the following formats: R, MS Excel, Apache Feather, Apache Parquet, SPSS, and Stata. Please visit \href{https://msberends.github.io/AMR/articles/datasets.html}{our website for the download links}. The actual files are of course available on \href{https://github.com/msberends/AMR/tree/main/data-raw}{our GitHub repository}.
|
||||
@ -7099,7 +7101,7 @@ Determination of the Gram stain (\code{\link[=mo_gramstain]{mo_gramstain()}}) wi
|
||||
|
||||
Determination of yeasts (\code{\link[=mo_is_yeast]{mo_is_yeast()}}) will be based on the taxonomic kingdom and class. \emph{Budding yeasts} are yeasts that reproduce asexually through a process called budding, where a new cell develops from a small protrusion on the parent cell. Taxonomically, these are members of the phylum Ascomycota, class Saccharomycetes (also called Hemiascomycetes) or Pichiomycetes. \emph{True yeasts} quite specifically refers to yeasts in the underlying order Saccharomycetales (such as \emph{Saccharomyces cerevisiae}). Thus, for all microorganisms that are member of the taxonomic class Saccharomycetes or Pichiomycetes, the function will return \code{TRUE}. It returns \code{FALSE} otherwise (or \code{NA} when the input is \code{NA} or the MO code is \code{UNKNOWN}).
|
||||
|
||||
Determination of intrinsic resistance (\code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}}) will be based on the \link{intrinsic_resistant} data set, which is based on \href{https://www.eucast.org/expert_rules_and_expected_phenotypes}{'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.3} (2021). The \code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}} function can be vectorised over both argument \code{x} (input for microorganisms) and \code{ab} (input for antimicrobials).
|
||||
Determination of intrinsic resistance (\code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}}) will be based on the \link{intrinsic_resistant} data set, which is based on \href{https://www.eucast.org/expert_rules_and_expected_phenotypes}{'EUCAST Expected Resistant Phenotypes' v1.2} (2023). The \code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}} function can be vectorised over both argument \code{x} (input for microorganisms) and \code{ab} (input for antimicrobials).
|
||||
|
||||
Determination of bacterial oxygen tolerance (\code{\link[=mo_oxygen_tolerance]{mo_oxygen_tolerance()}}) will be based on BacDive, see \emph{Source}. The function \code{\link[=mo_is_anaerobic]{mo_is_anaerobic()}} only returns \code{TRUE} if the oxygen tolerance is \code{"anaerobe"}, indicting an obligate anaerobic species or genus. It always returns \code{FALSE} for species outside the taxonomic kingdom of Bacteria.
|
||||
|
@ -1 +1 @@
|
||||
cb89a8b02473f40365a46e62fce5ec93
|
||||
a6a13ee6037cf957239d0109ac381821
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -38,8 +38,9 @@ for (i in seq_len(nrow(antimicrobials))) {
|
||||
int_resis <- eucast_rules(int_resis,
|
||||
eucast_rules_df = subset(
|
||||
AMR:::EUCAST_RULES_DF,
|
||||
is.na(have_these_values) & reference.version == 3.3
|
||||
is.na(have_these_values) & reference.rule_group == "Expected phenotypes" & reference.version == 1.2
|
||||
),
|
||||
overwrite = TRUE,
|
||||
info = FALSE
|
||||
)
|
||||
|
||||
@ -52,13 +53,14 @@ int_resis2 <- int_resis[, sapply(int_resis, function(x) any(!is.sir(x) | x == "R
|
||||
untreatable <- antimicrobials[which(antimicrobials$name %like% "-high|EDTA|polysorbate|macromethod|screening|/nacubactam"), "ab", drop = TRUE]
|
||||
# takes ages with filter()..., weird
|
||||
int_resis3 <- int_resis2[which(!int_resis2$ab %in% untreatable), ]
|
||||
class(int_resis3$ab) <- c("ab", "character")
|
||||
int_resis3$ab <- as.ab(int_resis3$ab)
|
||||
int_resis3
|
||||
|
||||
all(int_resis3$mo %in% microorganisms$mo)
|
||||
all(int_resis3$ab %in% antimicrobials$ab)
|
||||
|
||||
intrinsic_resistant <- df_remove_nonASCII(int_resis3)
|
||||
intrinsic_resistant <- int_resis3
|
||||
|
||||
usethis::use_data(intrinsic_resistant, internal = FALSE, overwrite = TRUE, version = 2, compress = "xz")
|
||||
rm(intrinsic_resistant)
|
||||
|
||||
|
Binary file not shown.
@ -32,14 +32,14 @@ A \link[tibble:tibble]{tibble} with 500 observations and 53 variables:
|
||||
\item \verb{Inducible clindamycin resistance}\cr Clindamycin can be induced?
|
||||
\item \code{Comment}\cr Other comments
|
||||
\item \verb{Date of data entry}\cr \link{Date} this data was entered in WHONET
|
||||
\item \code{AMP_ND10:CIP_EE}\cr 28 different antimicrobials. You can lookup the abbreviations in the \link{antimicrobials} data set, or use e.g. \code{\link[=ab_name]{ab_name("AMP")}} to get the official name immediately. Before analysis, you should transform this to a valid antimcrobial class, using \code{\link[=as.sir]{as.sir()}}.
|
||||
\item \code{AMP_ND10:CIP_EE}\cr 28 different antimicrobials. You can lookup the abbreviations in the \link{antimicrobials} data set, or use e.g. \code{\link[=ab_name]{ab_name("AMP")}} to get the official name immediately. Before analysis, you should transform this to a valid antimicrobial class, using \code{\link[=as.sir]{as.sir()}}.
|
||||
}
|
||||
}
|
||||
\usage{
|
||||
WHONET
|
||||
}
|
||||
\description{
|
||||
This example data set has the exact same structure as an export file from WHONET. Such files can be used with this package, as this example data set shows. The antimcrobial results are from our \link{example_isolates} data set. All patient names were created using online surname generators and are only in place for practice purposes.
|
||||
This example data set has the exact same structure as an export file from WHONET. Such files can be used with this package, as this example data set shows. The antimicrobial results are from our \link{example_isolates} data set. All patient names were created using online surname generators and are only in place for practice purposes.
|
||||
}
|
||||
\details{
|
||||
Like all data sets in this package, this data set is publicly available for download in the following formats: R, MS Excel, Apache Feather, Apache Parquet, SPSS, and Stata. Please visit \href{https://msberends.github.io/AMR/articles/datasets.html}{our website for the download links}. The actual files are of course available on \href{https://github.com/msberends/AMR/tree/main/data-raw}{our GitHub repository}.
|
||||
|
@ -128,7 +128,7 @@ administrable_per_os(only_sir_columns = FALSE, return_all = TRUE, ...)
|
||||
administrable_iv(only_sir_columns = FALSE, return_all = TRUE, ...)
|
||||
|
||||
not_intrinsic_resistant(only_sir_columns = FALSE, col_mo = NULL,
|
||||
version_expertrules = 3.3, ...)
|
||||
version_expected_phenotypes = 1.2, ...)
|
||||
}
|
||||
\arguments{
|
||||
\item{only_sir_columns}{a \link{logical} to indicate whether only columns of class \code{sir} must be selected (default is \code{FALSE}), see \code{\link[=as.sir]{as.sir()}}}
|
||||
@ -145,7 +145,7 @@ not_intrinsic_resistant(only_sir_columns = FALSE, col_mo = NULL,
|
||||
|
||||
\item{col_mo}{column name of the names or codes of the microorganisms (see \code{\link[=as.mo]{as.mo()}}) - the default is the first column of class \code{\link{mo}}. Values will be coerced using \code{\link[=as.mo]{as.mo()}}.}
|
||||
|
||||
\item{version_expertrules}{the version number to use for the EUCAST Expert Rules and Intrinsic Resistance guideline. Can be "3.3", "3.2", or "3.1".}
|
||||
\item{version_expected_phenotypes}{the version number to use for the EUCAST Expected Phenotypes. Can be "1.2".}
|
||||
}
|
||||
\value{
|
||||
When used inside selecting or filtering, this returns a \link{character} vector of column names, with additional class \code{"amr_selector"}. When used individually, this returns an \link[=as.ab]{'ab' vector} with all possible antimicrobials that the function would be able to select or filter.
|
||||
@ -173,7 +173,7 @@ The \code{\link[=administrable_per_os]{administrable_per_os()}} and \code{\link[
|
||||
|
||||
The \code{\link[=amr_selector]{amr_selector()}} function can be used to internally filter the \link{antimicrobials} data set on any results, see \emph{Examples}. It allows for filtering on a (part of) a certain name, and/or a group name or even a minimum of DDDs for oral treatment. This function yields the highest flexibility, but is also the least user-friendly, since it requires a hard-coded filter to set.
|
||||
|
||||
The \code{\link[=not_intrinsic_resistant]{not_intrinsic_resistant()}} function can be used to only select antimicrobials that pose no intrinsic resistance for the microorganisms in the data set. For example, if a data set contains only microorganism codes or names of \emph{E. coli} and \emph{K. pneumoniae} and contains a column "vancomycin", this column will be removed (or rather, unselected) using this function. It currently applies \href{https://www.eucast.org/expert_rules_and_expected_phenotypes}{'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.3} (2021) to determine intrinsic resistance, using the \code{\link[=eucast_rules]{eucast_rules()}} function internally. Because of this determination, this function is quite slow in terms of performance.
|
||||
The \code{\link[=not_intrinsic_resistant]{not_intrinsic_resistant()}} function can be used to only select antimicrobials that pose no intrinsic resistance for the microorganisms in the data set. For example, if a data set contains only microorganism codes or names of \emph{E. coli} and \emph{K. pneumoniae} and contains a column "vancomycin", this column will be removed (or rather, unselected) using this function. It currently applies \href{https://www.eucast.org/expert_rules_and_expected_phenotypes}{'EUCAST Expected Resistant Phenotypes' v1.2} (2023) to determine intrinsic resistance, using the \code{\link[=eucast_rules]{eucast_rules()}} function internally. Because of this determination, this function is quite slow in terms of performance.
|
||||
}
|
||||
\section{Full list of supported (antimicrobial) classes}{
|
||||
|
||||
|
@ -8,14 +8,14 @@
|
||||
\format{
|
||||
\subsection{For the \link{antimicrobials} data set: a \link[tibble:tibble]{tibble} with 496 observations and 14 variables:}{
|
||||
\itemize{
|
||||
\item \code{ab}\cr antimcrobial 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{name}\cr Official name as used by WHONET/EARS-Net or the WHO. \emph{\strong{This is a unique identifier.}}
|
||||
\item \code{group}\cr A short and concise group name, based on WHONET and WHOCC definitions
|
||||
\item \code{atc}\cr ATC codes (Anatomical Therapeutic Chemical) as defined by the WHOCC, like \code{J01CR02}
|
||||
\item \code{atc_group1}\cr Official pharmacological subgroup (3rd level ATC code) as defined by the WHOCC, like \code{"Macrolides, lincosamides and streptogramins"}
|
||||
\item \code{atc_group2}\cr Official chemical subgroup (4th level ATC code) as defined by the WHOCC, like \code{"Macrolides"}
|
||||
\item \code{abbr}\cr List of abbreviations as used in many countries, also for antimcrobial susceptibility testing (AST)
|
||||
\item \code{abbr}\cr List of abbreviations as used in many countries, also for antimicrobial susceptibility testing (AST)
|
||||
\item \code{synonyms}\cr Synonyms (often trade names) of a drug, as found in PubChem based on their compound ID
|
||||
\item \code{oral_ddd}\cr Defined Daily Dose (DDD), oral treatment, currently available for 179 drugs
|
||||
\item \code{oral_units}\cr Units of \code{oral_ddd}
|
||||
@ -56,7 +56,7 @@ antimicrobials
|
||||
antivirals
|
||||
}
|
||||
\description{
|
||||
Two data sets containing all antimicrobials and antivirals. Use \code{\link[=as.ab]{as.ab()}} or one of the \code{\link[=ab_property]{ab_*}} functions to retrieve values from the \link{antimicrobials} data set. Three identifiers are included in this data set: an antimcrobial ID (\code{ab}, primarily used in this package) as defined by WHONET/EARS-Net, an ATC code (\code{atc}) as defined by the WHO, and a Compound ID (\code{cid}) as found in PubChem. Other properties in this data set are derived from one or more of these codes. Note that some drugs have multiple ATC codes.
|
||||
Two data sets containing all antimicrobials and antivirals. Use \code{\link[=as.ab]{as.ab()}} or one of the \code{\link[=ab_property]{ab_*}} functions to retrieve values from the \link{antimicrobials} data set. Three identifiers are included in this data set: an antimicrobial ID (\code{ab}, primarily used in this package) as defined by WHONET/EARS-Net, an ATC code (\code{atc}) as defined by the WHO, and a Compound ID (\code{cid}) as found in PubChem. Other properties in this data set are derived from one or more of these codes. Note that some drugs have multiple ATC codes.
|
||||
}
|
||||
\details{
|
||||
Properties that are based on an ATC code are only available when an ATC is available. These properties are: \code{atc_group1}, \code{atc_group2}, \code{oral_ddd}, \code{oral_units}, \code{iv_ddd} and \code{iv_units}.
|
||||
|
@ -14,7 +14,7 @@ A \link[tibble:tibble]{tibble} with 34 376 observations and 14 variables:
|
||||
\item \code{site}\cr Body site for which the breakpoint must be applied, e.g. "Oral" or "Respiratory"
|
||||
\item \code{mo}\cr Microbial ID, see \code{\link[=as.mo]{as.mo()}}
|
||||
\item \code{rank_index}\cr Taxonomic rank index of \code{mo} from 1 (subspecies/infraspecies) to 5 (unknown microorganism)
|
||||
\item \code{ab}\cr Antimcrobial code as used by this package, EARS-Net and WHONET, see \code{\link[=as.ab]{as.ab()}}
|
||||
\item \code{ab}\cr Antimicrobial code as used by this package, EARS-Net and WHONET, see \code{\link[=as.ab]{as.ab()}}
|
||||
\item \code{ref_tbl}\cr Info about where the guideline rule can be found
|
||||
\item \code{disk_dose}\cr Dose of the used disk diffusion method
|
||||
\item \code{breakpoint_S}\cr Lowest MIC value or highest number of millimetres that leads to "S"
|
||||
|
@ -7,7 +7,7 @@
|
||||
\format{
|
||||
A \link[tibble:tibble]{tibble} with 503 observations and 9 variables:
|
||||
\itemize{
|
||||
\item \code{ab}\cr Antimcrobial ID as used in this package (such as \code{AMC}), using the official EARS-Net (European Antimicrobial Resistance Surveillance Network) codes where available
|
||||
\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
|
||||
\item \code{name}\cr Official name of the antimicrobial drug as used by WHONET/EARS-Net or the WHO
|
||||
\item \code{type}\cr Type of the dosage, either "high_dosage", "standard_dosage", or "uncomplicated_uti"
|
||||
\item \code{dose}\cr Dose, such as "2 g" or "25 mg/kg"
|
||||
|
@ -5,10 +5,10 @@
|
||||
\alias{intrinsic_resistant}
|
||||
\title{Data Set with Bacterial Intrinsic Resistance}
|
||||
\format{
|
||||
A \link[tibble:tibble]{tibble} with 301 583 observations and 2 variables:
|
||||
A \link[tibble:tibble]{tibble} with 196 665 observations and 2 variables:
|
||||
\itemize{
|
||||
\item \code{mo}\cr Microorganism ID
|
||||
\item \code{ab}\cr Antimcrobial ID
|
||||
\item \code{ab}\cr Antimicrobial ID
|
||||
}
|
||||
}
|
||||
\usage{
|
||||
@ -18,7 +18,9 @@ intrinsic_resistant
|
||||
Data set containing defined intrinsic resistance by EUCAST of all bug-drug combinations.
|
||||
}
|
||||
\details{
|
||||
This data set is based on \href{https://www.eucast.org/expert_rules_and_expected_phenotypes}{'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.3} (2021).
|
||||
This data set is based on \href{https://www.eucast.org/expert_rules_and_expected_phenotypes}{'EUCAST Expected Resistant Phenotypes' v1.2} (2023).
|
||||
|
||||
This data set is internally used by \code{\link[=not_intrinsic_resistant]{not_intrinsic_resistant()}} (an \link[=antimicrobial_selectors]{antimicrobial selector}) and \code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}}
|
||||
\subsection{Direct download}{
|
||||
|
||||
Like all data sets in this package, this data set is publicly available for download in the following formats: R, MS Excel, Apache Feather, Apache Parquet, SPSS, and Stata. Please visit \href{https://msberends.github.io/AMR/articles/datasets.html}{our website for the download links}. The actual files are of course available on \href{https://github.com/msberends/AMR/tree/main/data-raw}{our GitHub repository}.
|
||||
|
@ -197,7 +197,7 @@ Determination of the Gram stain (\code{\link[=mo_gramstain]{mo_gramstain()}}) wi
|
||||
|
||||
Determination of yeasts (\code{\link[=mo_is_yeast]{mo_is_yeast()}}) will be based on the taxonomic kingdom and class. \emph{Budding yeasts} are yeasts that reproduce asexually through a process called budding, where a new cell develops from a small protrusion on the parent cell. Taxonomically, these are members of the phylum Ascomycota, class Saccharomycetes (also called Hemiascomycetes) or Pichiomycetes. \emph{True yeasts} quite specifically refers to yeasts in the underlying order Saccharomycetales (such as \emph{Saccharomyces cerevisiae}). Thus, for all microorganisms that are member of the taxonomic class Saccharomycetes or Pichiomycetes, the function will return \code{TRUE}. It returns \code{FALSE} otherwise (or \code{NA} when the input is \code{NA} or the MO code is \code{UNKNOWN}).
|
||||
|
||||
Determination of intrinsic resistance (\code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}}) will be based on the \link{intrinsic_resistant} data set, which is based on \href{https://www.eucast.org/expert_rules_and_expected_phenotypes}{'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.3} (2021). The \code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}} function can be vectorised over both argument \code{x} (input for microorganisms) and \code{ab} (input for antimicrobials).
|
||||
Determination of intrinsic resistance (\code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}}) will be based on the \link{intrinsic_resistant} data set, which is based on \href{https://www.eucast.org/expert_rules_and_expected_phenotypes}{'EUCAST Expected Resistant Phenotypes' v1.2} (2023). The \code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}} function can be vectorised over both argument \code{x} (input for microorganisms) and \code{ab} (input for antimicrobials).
|
||||
|
||||
Determination of bacterial oxygen tolerance (\code{\link[=mo_oxygen_tolerance]{mo_oxygen_tolerance()}}) will be based on BacDive, see \emph{Source}. The function \code{\link[=mo_is_anaerobic]{mo_is_anaerobic()}} only returns \code{TRUE} if the oxygen tolerance is \code{"anaerobe"}, indicting an obligate anaerobic species or genus. It always returns \code{FALSE} for species outside the taxonomic kingdom of Bacteria.
|
||||
|
||||
|
@ -47,7 +47,8 @@ test_that("test-eucast_rules.R", {
|
||||
MOs_test <- suppressWarnings(
|
||||
trimws(paste(
|
||||
mo_genus(MOs_mentioned, keep_synonyms = TRUE, language = NULL),
|
||||
mo_species(MOs_mentioned, keep_synonyms = TRUE, language = NULL)
|
||||
mo_species(MOs_mentioned, keep_synonyms = TRUE, language = NULL),
|
||||
mo_subspecies(MOs_mentioned, keep_synonyms = TRUE, language = NULL)
|
||||
))
|
||||
)
|
||||
MOs_test[MOs_test == ""] <- mo_fullname(MOs_mentioned[MOs_test == ""], keep_synonyms = TRUE, language = NULL)
|
||||
|
Loading…
x
Reference in New Issue
Block a user