mirror of
https://github.com/msberends/AMR.git
synced 2026-05-31 19:41:51 +02:00
Compare commits
3 Commits
claude/upd
...
cd23422a5f
| Author | SHA1 | Date | |
|---|---|---|---|
| cd23422a5f | |||
|
|
e981d5227d | ||
|
|
1d48012355 |
@@ -1,6 +1,6 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 3.0.1.9044
|
Version: 3.0.1.9045
|
||||||
Date: 2026-04-04
|
Date: 2026-04-05
|
||||||
Title: Antimicrobial Resistance Data Analysis
|
Title: Antimicrobial Resistance Data Analysis
|
||||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||||
data analysis and to work with microbial and antimicrobial properties by
|
data analysis and to work with microbial and antimicrobial properties by
|
||||||
|
|||||||
4
NEWS.md
4
NEWS.md
@@ -1,4 +1,4 @@
|
|||||||
# AMR 3.0.1.9044
|
# AMR 3.0.1.9045
|
||||||
|
|
||||||
### New
|
### New
|
||||||
* Support for clinical breakpoints of 2026 of both CLSI and EUCAST, by adding all of their over 5,700 new clinical breakpoints to the `clinical_breakpoints` data set for usage in `as.sir()`. EUCAST 2026 is now the new default guideline for all MIC and disk diffusion interpretations.
|
* Support for clinical breakpoints of 2026 of both CLSI and EUCAST, by adding all of their over 5,700 new clinical breakpoints to the `clinical_breakpoints` data set for usage in `as.sir()`. EUCAST 2026 is now the new default guideline for all MIC and disk diffusion interpretations.
|
||||||
@@ -16,7 +16,9 @@
|
|||||||
- Functions such as `susceptibility()` count WT as S and NWT as R
|
- Functions such as `susceptibility()` count WT as S and NWT as R
|
||||||
* Function `interpretive_rules()`, which allows future implementation of CLSI interpretive rules (#235)
|
* Function `interpretive_rules()`, which allows future implementation of CLSI interpretive rules (#235)
|
||||||
- `eucast_rules()` has become a wrapper around that function
|
- `eucast_rules()` has become a wrapper around that function
|
||||||
|
- Gained argument `add_if_missing` (default: `TRUE`). When set to `FALSE`, rules are only applied to cells that already contain an SIR value; `NA` cells are left untouched. This is useful with `overwrite = TRUE` to update reported results without imputing values for drugs that were not tested (#259)
|
||||||
* Function `amr_course()`, which allows for automated download and unpacking of a GitHub repository for e.g. webinar use
|
* Function `amr_course()`, which allows for automated download and unpacking of a GitHub repository for e.g. webinar use
|
||||||
|
* Two new `NA` objects, `NA_ab_` and `NA_mo_`, analogous to base R's `NA_character_` and `NA_integer_`, for use in pipelines that require typed missing values
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
* Fixed a bug in `as.sir()` where values that were purely numeric (e.g., `"1"`) and matched the broad SIR-matching regex would be incorrectly stripped of all content by the Unicode letter filter
|
* Fixed a bug in `as.sir()` where values that were purely numeric (e.g., `"1"`) and matched the broad SIR-matching regex would be incorrectly stripped of all content by the Unicode letter filter
|
||||||
|
|||||||
@@ -766,7 +766,7 @@ vector_or <- function(v, quotes = TRUE, reverse = FALSE, sort = TRUE, initial_ca
|
|||||||
}
|
}
|
||||||
if (isTRUE(quotes)) {
|
if (isTRUE(quotes)) {
|
||||||
if (isTRUE(documentation)) {
|
if (isTRUE(documentation)) {
|
||||||
quotes <- '"'
|
quotes <- c("`\"", "\"`")
|
||||||
} else {
|
} else {
|
||||||
# use cli to format as values
|
# use cli to format as values
|
||||||
quotes <- c("{.val ", "}")
|
quotes <- c("{.val ", "}")
|
||||||
|
|||||||
20
R/data.R
20
R/data.R
@@ -106,12 +106,12 @@
|
|||||||
#' @format A [tibble][tibble::tibble] with `r format(nrow(microorganisms), big.mark = " ")` observations and `r ncol(microorganisms)` variables:
|
#' @format A [tibble][tibble::tibble] with `r format(nrow(microorganisms), big.mark = " ")` observations and `r ncol(microorganisms)` variables:
|
||||||
#' - `mo`\cr ID of microorganism as used by this package. ***This is a unique identifier.***
|
#' - `mo`\cr ID of microorganism as used by this package. ***This is a unique identifier.***
|
||||||
#' - `fullname`\cr Full name, like `"Escherichia coli"`. For the taxonomic ranks genus, species and subspecies, this is the 'pasted' text of genus, species, and subspecies. For all taxonomic ranks higher than genus, this is the name of the taxon. ***This is a unique identifier.***
|
#' - `fullname`\cr Full name, like `"Escherichia coli"`. For the taxonomic ranks genus, species and subspecies, this is the 'pasted' text of genus, species, and subspecies. For all taxonomic ranks higher than genus, this is the name of the taxon. ***This is a unique identifier.***
|
||||||
#' - `status` \cr Status of the taxon, either `r vector_or(microorganisms$status)`
|
#' - `status` \cr Status of the taxon, either `r vector_or(microorganisms$status, documentation = TRUE)`
|
||||||
#' - `kingdom`, `phylum`, `class`, `order`, `family`, `genus`, `species`, `subspecies`\cr Taxonomic rank of the microorganism. Note that for fungi, *phylum* is equal to their taxonomic *division*. Also, for fungi, *subkingdom* and *subdivision* were left out since they do not occur in the bacterial taxonomy.
|
#' - `kingdom`, `phylum`, `class`, `order`, `family`, `genus`, `species`, `subspecies`\cr Taxonomic rank of the microorganism. Note that for fungi, *phylum* is equal to their taxonomic *division*. Also, for fungi, *subkingdom* and *subdivision* were left out since they do not occur in the bacterial taxonomy.
|
||||||
#' - `rank`\cr Text of the taxonomic rank of the microorganism, such as `"species"` or `"genus"`
|
#' - `rank`\cr Text of the taxonomic rank of the microorganism, such as `"species"` or `"genus"`
|
||||||
#' - `ref`\cr Author(s) and year of related scientific publication. This contains only the *first surname* and year of the *latest* authors, e.g. "Wallis *et al.* 2006 *emend.* Smith and Jones 2018" becomes "Smith *et al.*, 2018". This field is directly retrieved from the source specified in the column `source`. Moreover, accents were removed to comply with CRAN that only allows ASCII characters.
|
#' - `ref`\cr Author(s) and year of related scientific publication. This contains only the *first surname* and year of the *latest* authors, e.g. "Wallis *et al.* 2006 *emend.* Smith and Jones 2018" becomes "Smith *et al.*, 2018". This field is directly retrieved from the source specified in the column `source`. Moreover, accents were removed to comply with CRAN that only allows ASCII characters.
|
||||||
#' - `oxygen_tolerance` \cr Oxygen tolerance, either `r vector_or(microorganisms$oxygen_tolerance)`. These data were retrieved from BacDive (see *Source*). Items that contain "likely" are missing from BacDive and were extrapolated from other species within the same genus to guess the oxygen tolerance. Currently `r round(length(microorganisms$oxygen_tolerance[which(!is.na(microorganisms$oxygen_tolerance))]) / nrow(microorganisms[which(microorganisms$kingdom == "Bacteria"), ]) * 100, 1)`% of all `r format_included_data_number(nrow(microorganisms[which(microorganisms$kingdom == "Bacteria"), ]))` bacteria in the data set contain an oxygen tolerance.
|
#' - `oxygen_tolerance` \cr Oxygen tolerance, either `r vector_or(microorganisms$oxygen_tolerance, documentation = TRUE)`. These data were retrieved from BacDive (see *Source*). Items that contain "likely" are missing from BacDive and were extrapolated from other species within the same genus to guess the oxygen tolerance. Currently `r round(length(microorganisms$oxygen_tolerance[which(!is.na(microorganisms$oxygen_tolerance))]) / nrow(microorganisms[which(microorganisms$kingdom == "Bacteria"), ]) * 100, 1)`% of all `r format_included_data_number(nrow(microorganisms[which(microorganisms$kingdom == "Bacteria"), ]))` bacteria in the data set contain an oxygen tolerance.
|
||||||
#' - `source`\cr Either `r vector_or(microorganisms$source)` (see *Source*)
|
#' - `source`\cr Either `r vector_or(microorganisms$source, documentation = TRUE)` (see *Source*)
|
||||||
#' - `lpsn`\cr Identifier ('Record number') of `r TAXONOMY_VERSION$LPSN$name`. This will be the first/highest LPSN identifier to keep one identifier per row. For example, *Acetobacter ascendens* has LPSN Record number 7864 and 11011. Only the first is available in the `microorganisms` data set. ***This is a unique identifier***, though available for only `r format_included_data_number(sum(!is.na(microorganisms$lpsn)))` records.
|
#' - `lpsn`\cr Identifier ('Record number') of `r TAXONOMY_VERSION$LPSN$name`. This will be the first/highest LPSN identifier to keep one identifier per row. For example, *Acetobacter ascendens* has LPSN Record number 7864 and 11011. Only the first is available in the `microorganisms` data set. ***This is a unique identifier***, though available for only `r format_included_data_number(sum(!is.na(microorganisms$lpsn)))` records.
|
||||||
#' - `lpsn_parent`\cr LPSN identifier of the parent taxon
|
#' - `lpsn_parent`\cr LPSN identifier of the parent taxon
|
||||||
#' - `lpsn_renamed_to`\cr LPSN identifier of the currently valid taxon
|
#' - `lpsn_renamed_to`\cr LPSN identifier of the currently valid taxon
|
||||||
@@ -222,8 +222,8 @@
|
|||||||
#' - `date`\cr Date of receipt at the laboratory
|
#' - `date`\cr Date of receipt at the laboratory
|
||||||
#' - `patient`\cr ID of the patient
|
#' - `patient`\cr ID of the patient
|
||||||
#' - `age`\cr Age of the patient
|
#' - `age`\cr Age of the patient
|
||||||
#' - `gender`\cr Gender of the patient, either `r vector_or(example_isolates$gender)`
|
#' - `gender`\cr Gender of the patient, either `r vector_or(example_isolates$gender, documentation = TRUE)`
|
||||||
#' - `ward`\cr Ward type where the patient was admitted, either `r vector_or(example_isolates$ward)`
|
#' - `ward`\cr Ward type where the patient was admitted, either `r vector_or(example_isolates$ward, documentation = TRUE)`
|
||||||
#' - `mo`\cr ID of microorganism created with [as.mo()], see also the [microorganisms] data set
|
#' - `mo`\cr ID of microorganism created with [as.mo()], see also the [microorganisms] data set
|
||||||
#' - `PEN:RIF`\cr `r sum(vapply(FUN.VALUE = logical(1), example_isolates, is.sir))` different antimicrobials with class [`sir`] (see [as.sir()]); these column names occur in the [antimicrobials] data set and can be translated with [set_ab_names()] or [ab_name()]
|
#' - `PEN:RIF`\cr `r sum(vapply(FUN.VALUE = logical(1), example_isolates, is.sir))` different antimicrobials with class [`sir`] (see [as.sir()]); these column names occur in the [antimicrobials] data set and can be translated with [set_ab_names()] or [ab_name()]
|
||||||
#' @inheritSection AMR Download Our Reference Data
|
#' @inheritSection AMR Download Our Reference Data
|
||||||
@@ -292,9 +292,9 @@
|
|||||||
#' Use [as.sir()] to transform MICs or disks measurements to SIR values.
|
#' Use [as.sir()] to transform MICs or disks measurements to SIR values.
|
||||||
#' @format A [tibble][tibble::tibble] with `r format(nrow(clinical_breakpoints), big.mark = " ")` observations and `r ncol(clinical_breakpoints)` variables:
|
#' @format A [tibble][tibble::tibble] with `r format(nrow(clinical_breakpoints), big.mark = " ")` observations and `r ncol(clinical_breakpoints)` variables:
|
||||||
#' - `guideline`\cr Name of the guideline
|
#' - `guideline`\cr Name of the guideline
|
||||||
#' - `type`\cr Breakpoint type, either `r vector_or(clinical_breakpoints$type)`
|
#' - `type`\cr Breakpoint type, either `r vector_or(clinical_breakpoints$type, documentation = TRUE)`
|
||||||
#' - `host`\cr Host of infectious agent. This is mostly useful for veterinary breakpoints and is either `r vector_or(clinical_breakpoints$host)`
|
#' - `host`\cr Host of infectious agent. This is mostly useful for veterinary breakpoints and is either `r vector_or(clinical_breakpoints$host, documentation = TRUE)`
|
||||||
#' - `method`\cr Testing method, either `r vector_or(clinical_breakpoints$method)`
|
#' - `method`\cr Testing method, either `r vector_or(clinical_breakpoints$method, documentation = TRUE)`
|
||||||
#' - `site`\cr Body site for which the breakpoint must be applied, e.g. "Oral" or "Respiratory"
|
#' - `site`\cr Body site for which the breakpoint must be applied, e.g. "Oral" or "Respiratory"
|
||||||
#' - `mo`\cr Microbial ID, see [as.mo()]
|
#' - `mo`\cr Microbial ID, see [as.mo()]
|
||||||
#' - `rank_index`\cr Taxonomic rank index of `mo` from 1 (subspecies/infraspecies) to 5 (unknown microorganism)
|
#' - `rank_index`\cr Taxonomic rank index of `mo` from 1 (subspecies/infraspecies) to 5 (unknown microorganism)
|
||||||
@@ -350,10 +350,10 @@
|
|||||||
#' @format A [tibble][tibble::tibble] with `r format(nrow(dosage), big.mark = " ")` observations and `r ncol(dosage)` variables:
|
#' @format A [tibble][tibble::tibble] with `r format(nrow(dosage), big.mark = " ")` observations and `r ncol(dosage)` variables:
|
||||||
#' - `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
|
#' - `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
|
#' - `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)`
|
#' - `type`\cr Type of the dosage, either `r vector_or(dosage$type, documentation = TRUE)`
|
||||||
#' - `dose`\cr Dose, such as "2 g" or "25 mg/kg"
|
#' - `dose`\cr Dose, such as "2 g" or "25 mg/kg"
|
||||||
#' - `dose_times`\cr Number of times a dose must be administered
|
#' - `dose_times`\cr Number of times a dose must be administered
|
||||||
#' - `administration`\cr Route of administration, either `r vector_or(dosage$administration)`
|
#' - `administration`\cr Route of administration, either `r vector_or(dosage$administration, documentation = TRUE)`
|
||||||
#' - `notes`\cr Additional dosage notes
|
#' - `notes`\cr Additional dosage notes
|
||||||
#' - `original_txt`\cr Original text in the PDF file of EUCAST
|
#' - `original_txt`\cr Original text in the PDF file of EUCAST
|
||||||
#' - `eucast_version`\cr Version number of the EUCAST Clinical Breakpoints guideline to which these dosages apply, either `r vector_or(dosage$eucast_version, quotes = FALSE, sort = TRUE, reverse = TRUE)`
|
#' - `eucast_version`\cr Version number of the EUCAST Clinical Breakpoints guideline to which these dosages apply, either `r vector_or(dosage$eucast_version, quotes = FALSE, sort = TRUE, reverse = TRUE)`
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ format_eucast_version_nr <- function(version, markdown = TRUE) {
|
|||||||
#' @param guideline A guideline name, either "EUCAST" (default) or "CLSI". This can be set with the package option [`AMR_guideline`][AMR-options].
|
#' @param guideline A guideline name, either "EUCAST" (default) or "CLSI". This can be set with the package option [`AMR_guideline`][AMR-options].
|
||||||
#' @param rules A [character] vector that specifies which rules should be applied. Must be one or more of `"breakpoints"`, `"expected_phenotypes"`, `"expert"`, `"other"`, `"custom"`, `"all"`, and defaults to `c("breakpoints", "expected_phenotypes")`. The default value can be set to another value using the package option [`AMR_interpretive_rules`][AMR-options]: `options(AMR_interpretive_rules = "all")`. If using `"custom"`, be sure to fill in argument `custom_rules` too. Custom rules can be created with [custom_eucast_rules()].
|
#' @param rules A [character] vector that specifies which rules should be applied. Must be one or more of `"breakpoints"`, `"expected_phenotypes"`, `"expert"`, `"other"`, `"custom"`, `"all"`, and defaults to `c("breakpoints", "expected_phenotypes")`. The default value can be set to another value using the package option [`AMR_interpretive_rules`][AMR-options]: `options(AMR_interpretive_rules = "all")`. If using `"custom"`, be sure to fill in argument `custom_rules` too. Custom rules can be created with [custom_eucast_rules()].
|
||||||
#' @param verbose A [logical] to turn Verbose mode on and off (default is off). In Verbose mode, the function does not apply rules to the data, but instead returns a data set in logbook form with extensive info about which rows and columns would be effected and in which way. Using Verbose mode takes a lot more time.
|
#' @param verbose A [logical] to turn Verbose mode on and off (default is off). In Verbose mode, the function does not apply rules to the data, but instead returns a data set in logbook form with extensive info about which rows and columns would be effected and in which way. Using Verbose mode takes a lot more time.
|
||||||
#' @param version_breakpoints The version number to use for the EUCAST Clinical Breakpoints guideline. Can be `r vector_or(names(EUCAST_VERSION_BREAKPOINTS), reverse = TRUE)`.
|
#' @param version_breakpoints The version number to use for the EUCAST Clinical Breakpoints guideline. Can be `r vector_or(names(EUCAST_VERSION_BREAKPOINTS), documentation = TRUE, reverse = TRUE)`.
|
||||||
#' @param version_expected_phenotypes The version number to use for the EUCAST Expected Phenotypes. Can be `r vector_or(names(EUCAST_VERSION_EXPECTED_PHENOTYPES), reverse = TRUE)`.
|
#' @param version_expected_phenotypes The version number to use for the EUCAST Expected Phenotypes. Can be `r vector_or(names(EUCAST_VERSION_EXPECTED_PHENOTYPES), reverse = TRUE)`.
|
||||||
#' @param version_expertrules The version number to use for the EUCAST Expert Rules and Intrinsic Resistance guideline. Can be `r vector_or(names(EUCAST_VERSION_EXPERT_RULES), reverse = TRUE)`.
|
#' @param version_expertrules The version number to use for the EUCAST Expert Rules and Intrinsic Resistance guideline. Can be `r vector_or(names(EUCAST_VERSION_EXPERT_RULES), reverse = TRUE)`.
|
||||||
#' @param ampc_cephalosporin_resistance (only applies when `rules` contains `"expert"` or `"all"`) a [character] value that should be applied to cefotaxime, ceftriaxone and ceftazidime for AmpC de-repressed cephalosporin-resistant mutants - the default is `NA`. Currently only works when `version_expertrules` is `3.2` and higher; these versions of '*EUCAST Expert Rules on Enterobacterales*' state that results of cefotaxime, ceftriaxone and ceftazidime should be reported with a note, or results should be suppressed (emptied) for these three drugs. A value of `NA` (the default) for this argument will remove results for these three drugs, while e.g. a value of `"R"` will make the results for these drugs resistant. Use `NULL` or `FALSE` to not alter results for these three drugs of AmpC de-repressed cephalosporin-resistant mutants. Using `TRUE` is equal to using `"R"`. \cr For *EUCAST Expert Rules* v3.2, this rule applies to: `r vector_and(gsub("[^a-zA-Z ]+", "", unlist(strsplit(EUCAST_RULES_DF[which(EUCAST_RULES_DF$reference.version %in% c(3.2, 3.3) & EUCAST_RULES_DF$reference.rule %like% "ampc"), "this_value"][1], "|", fixed = TRUE))), quotes = "*")`.
|
#' @param ampc_cephalosporin_resistance (only applies when `rules` contains `"expert"` or `"all"`) a [character] value that should be applied to cefotaxime, ceftriaxone and ceftazidime for AmpC de-repressed cephalosporin-resistant mutants - the default is `NA`. Currently only works when `version_expertrules` is `3.2` and higher; these versions of '*EUCAST Expert Rules on Enterobacterales*' state that results of cefotaxime, ceftriaxone and ceftazidime should be reported with a note, or results should be suppressed (emptied) for these three drugs. A value of `NA` (the default) for this argument will remove results for these three drugs, while e.g. a value of `"R"` will make the results for these drugs resistant. Use `NULL` or `FALSE` to not alter results for these three drugs of AmpC de-repressed cephalosporin-resistant mutants. Using `TRUE` is equal to using `"R"`. \cr For *EUCAST Expert Rules* v3.2, this rule applies to: `r vector_and(gsub("[^a-zA-Z ]+", "", unlist(strsplit(EUCAST_RULES_DF[which(EUCAST_RULES_DF$reference.version %in% c(3.2, 3.3) & EUCAST_RULES_DF$reference.rule %like% "ampc"), "this_value"][1], "|", fixed = TRUE))), quotes = "*")`.
|
||||||
@@ -74,6 +74,7 @@ format_eucast_version_nr <- function(version, markdown = TRUE) {
|
|||||||
#' @param only_sir_columns A [logical] to indicate whether only antimicrobial columns must be included that were transformed to class [sir][as.sir()] on beforehand. Defaults to `FALSE` if no columns of `x` have a class [sir][as.sir()].
|
#' @param only_sir_columns A [logical] to indicate whether only antimicrobial columns must be included that were transformed to class [sir][as.sir()] on beforehand. Defaults to `FALSE` if no columns of `x` have a class [sir][as.sir()].
|
||||||
#' @param custom_rules Custom rules to apply, created with [custom_eucast_rules()].
|
#' @param custom_rules Custom rules to apply, created with [custom_eucast_rules()].
|
||||||
#' @param overwrite A [logical] indicating whether to overwrite existing SIR values (default: `FALSE`). When `FALSE`, only non-SIR values are modified (i.e., any value that is not already S, I or R). To ensure compliance with EUCAST guidelines, **this should remain** `FALSE`, as EUCAST notes often state that an organism "should be tested for susceptibility to individual agents or be reported resistant".
|
#' @param overwrite A [logical] indicating whether to overwrite existing SIR values (default: `FALSE`). When `FALSE`, only non-SIR values are modified (i.e., any value that is not already S, I or R). To ensure compliance with EUCAST guidelines, **this should remain** `FALSE`, as EUCAST notes often state that an organism "should be tested for susceptibility to individual agents or be reported resistant".
|
||||||
|
#' @param add_if_missing A [logical] indicating whether rules should also be applied to missing (`NA`) values (default: `TRUE`). When `FALSE`, rules are only applied to cells that already contain an SIR value; cells with `NA` are left untouched. This is particularly useful when using `overwrite = TRUE` with custom rules and you want to update reported results without imputing values for untested drugs.
|
||||||
#' @inheritParams first_isolate
|
#' @inheritParams first_isolate
|
||||||
#' @details
|
#' @details
|
||||||
#' **Note:** This function does not translate MIC or disk values to SIR values. Use [as.sir()] for that. \cr
|
#' **Note:** This function does not translate MIC or disk values to SIR values. Use [as.sir()] for that. \cr
|
||||||
@@ -170,6 +171,7 @@ interpretive_rules <- function(x,
|
|||||||
only_sir_columns = any(is.sir(x)),
|
only_sir_columns = any(is.sir(x)),
|
||||||
custom_rules = NULL,
|
custom_rules = NULL,
|
||||||
overwrite = FALSE,
|
overwrite = FALSE,
|
||||||
|
add_if_missing = TRUE,
|
||||||
...) {
|
...) {
|
||||||
meet_criteria(x, allow_class = "data.frame")
|
meet_criteria(x, allow_class = "data.frame")
|
||||||
meet_criteria(col_mo, allow_class = "character", has_length = 1, is_in = colnames(x), allow_NULL = TRUE)
|
meet_criteria(col_mo, allow_class = "character", has_length = 1, is_in = colnames(x), allow_NULL = TRUE)
|
||||||
@@ -184,6 +186,12 @@ interpretive_rules <- function(x,
|
|||||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||||
meet_criteria(custom_rules, allow_class = "custom_eucast_rules", allow_NULL = TRUE)
|
meet_criteria(custom_rules, allow_class = "custom_eucast_rules", allow_NULL = TRUE)
|
||||||
meet_criteria(overwrite, allow_class = "logical", has_length = 1)
|
meet_criteria(overwrite, allow_class = "logical", has_length = 1)
|
||||||
|
meet_criteria(add_if_missing, allow_class = "logical", has_length = 1)
|
||||||
|
|
||||||
|
stop_if(
|
||||||
|
!overwrite && !add_if_missing,
|
||||||
|
"Either set {.arg overwrite} or {.arg add_if_missing} to {.code TRUE}, or both."
|
||||||
|
)
|
||||||
|
|
||||||
stop_if(
|
stop_if(
|
||||||
guideline == "CLSI",
|
guideline == "CLSI",
|
||||||
@@ -533,7 +541,8 @@ interpretive_rules <- function(x,
|
|||||||
warned = warned,
|
warned = warned,
|
||||||
info = info,
|
info = info,
|
||||||
verbose = verbose,
|
verbose = verbose,
|
||||||
overwrite = overwrite
|
overwrite = overwrite,
|
||||||
|
add_if_missing = add_if_missing
|
||||||
)
|
)
|
||||||
n_added <- n_added + run_changes$added
|
n_added <- n_added + run_changes$added
|
||||||
n_changed <- n_changed + run_changes$changed
|
n_changed <- n_changed + run_changes$changed
|
||||||
@@ -575,7 +584,8 @@ interpretive_rules <- function(x,
|
|||||||
warned = warned,
|
warned = warned,
|
||||||
info = info,
|
info = info,
|
||||||
verbose = verbose,
|
verbose = verbose,
|
||||||
overwrite = overwrite
|
overwrite = overwrite,
|
||||||
|
add_if_missing = add_if_missing
|
||||||
)
|
)
|
||||||
n_added <- n_added + run_changes$added
|
n_added <- n_added + run_changes$added
|
||||||
n_changed <- n_changed + run_changes$changed
|
n_changed <- n_changed + run_changes$changed
|
||||||
@@ -595,7 +605,7 @@ interpretive_rules <- function(x,
|
|||||||
} else {
|
} else {
|
||||||
if (isTRUE(info)) {
|
if (isTRUE(info)) {
|
||||||
cat("\n")
|
cat("\n")
|
||||||
message_("Skipping inhibitor-inheritance rules defined by this AMR package: setting S to drug+inhibitor where drug is S, and setting R to drug where drug+inhibitor is R. Add \"other\" or \"all\" to the {.arg rules} argument to apply those rules.")
|
message_("Skipping inhibitor-inheritance rules defined by this AMR package: setting S to drug+inhibitor where drug is S, and setting R to drug where drug+inhibitor is R. Add {.val other} or {.val all} to the {.arg rules} argument to apply those rules.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -862,7 +872,8 @@ interpretive_rules <- function(x,
|
|||||||
warned = warned,
|
warned = warned,
|
||||||
info = info,
|
info = info,
|
||||||
verbose = verbose,
|
verbose = verbose,
|
||||||
overwrite = overwrite
|
overwrite = overwrite,
|
||||||
|
add_if_missing = add_if_missing
|
||||||
)
|
)
|
||||||
n_added <- n_added + run_changes$added
|
n_added <- n_added + run_changes$added
|
||||||
n_changed <- n_changed + run_changes$changed
|
n_changed <- n_changed + run_changes$changed
|
||||||
@@ -932,7 +943,8 @@ interpretive_rules <- function(x,
|
|||||||
warned = warned,
|
warned = warned,
|
||||||
info = info,
|
info = info,
|
||||||
verbose = verbose,
|
verbose = verbose,
|
||||||
overwrite = overwrite
|
overwrite = overwrite,
|
||||||
|
add_if_missing = add_if_missing
|
||||||
)
|
)
|
||||||
n_added <- n_added + run_changes$added
|
n_added <- n_added + run_changes$added
|
||||||
n_changed <- n_changed + run_changes$changed
|
n_changed <- n_changed + run_changes$changed
|
||||||
@@ -1124,7 +1136,8 @@ edit_sir <- function(x,
|
|||||||
warned,
|
warned,
|
||||||
info,
|
info,
|
||||||
verbose,
|
verbose,
|
||||||
overwrite) {
|
overwrite,
|
||||||
|
add_if_missing) {
|
||||||
cols <- unique(cols[!is.na(cols) & !is.null(cols)])
|
cols <- unique(cols[!is.na(cols) & !is.null(cols)])
|
||||||
|
|
||||||
# for Verbose Mode, keep track of all changes and return them
|
# for Verbose Mode, keep track of all changes and return them
|
||||||
@@ -1157,13 +1170,16 @@ edit_sir <- function(x,
|
|||||||
if (isFALSE(overwrite) && any(isSIR) && message_not_thrown_before("edit_sir.warning_overwrite")) {
|
if (isFALSE(overwrite) && any(isSIR) && message_not_thrown_before("edit_sir.warning_overwrite")) {
|
||||||
warning_("Some values had SIR values and were not overwritten, since {.code overwrite = FALSE}.")
|
warning_("Some values had SIR values and were not overwritten, since {.code overwrite = FALSE}.")
|
||||||
}
|
}
|
||||||
|
# determine which cells to modify based on overwrite and add_if_missing
|
||||||
|
apply_mask <- if (isTRUE(overwrite)) {
|
||||||
|
if (isFALSE(add_if_missing)) !isNA else rep(TRUE, length(isNA))
|
||||||
|
} else {
|
||||||
|
if (isFALSE(add_if_missing)) isSIR else non_SIR
|
||||||
|
}
|
||||||
|
warning_("test", call = T) # aaaaaaa
|
||||||
tryCatch(
|
tryCatch(
|
||||||
# insert into original table
|
# insert into original table
|
||||||
if (isTRUE(overwrite)) {
|
new_edits[rows, cols][apply_mask] <- to,
|
||||||
new_edits[rows, cols] <- to
|
|
||||||
} else {
|
|
||||||
new_edits[rows, cols][non_SIR] <- to
|
|
||||||
},
|
|
||||||
warning = function(w) {
|
warning = function(w) {
|
||||||
if (w$message %like% "invalid factor level") {
|
if (w$message %like% "invalid factor level") {
|
||||||
xyz <- vapply(FUN.VALUE = logical(1), cols, function(col) {
|
xyz <- vapply(FUN.VALUE = logical(1), cols, function(col) {
|
||||||
@@ -1173,11 +1189,7 @@ edit_sir <- function(x,
|
|||||||
)
|
)
|
||||||
TRUE
|
TRUE
|
||||||
})
|
})
|
||||||
if (isTRUE(overwrite)) {
|
suppressWarnings(new_edits[rows, cols][apply_mask] <<- to)
|
||||||
suppressWarnings(new_edits[rows, cols] <<- to)
|
|
||||||
} else {
|
|
||||||
suppressWarnings(new_edits[rows, cols][non_SIR] <<- to)
|
|
||||||
}
|
|
||||||
warning_(
|
warning_(
|
||||||
"in {.help [{.fun eucast_rules}](AMR::eucast_rules)}: value \"", to, "\" added to the factor levels of column",
|
"in {.help [{.fun eucast_rules}](AMR::eucast_rules)}: value \"", to, "\" added to the factor levels of column",
|
||||||
ifelse(length(cols) == 1, "", "s"),
|
ifelse(length(cols) == 1, "", "s"),
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
A \link[tibble:tibble]{tibble} with 45 730 observations and 14 variables:
|
A \link[tibble:tibble]{tibble} with 45 730 observations and 14 variables:
|
||||||
\itemize{
|
\itemize{
|
||||||
\item \code{guideline}\cr Name of the guideline
|
\item \code{guideline}\cr Name of the guideline
|
||||||
\item \code{type}\cr Breakpoint type, either {.val ECOFF}, {.val animal}, or {.val human}
|
\item \code{type}\cr Breakpoint type, either \code{"ECOFF"}, \code{"animal"}, or \code{"human"}
|
||||||
\item \code{host}\cr Host of infectious agent. This is mostly useful for veterinary breakpoints and is either {.val ECOFF}, {.val aquatic}, {.val cats}, {.val cattle}, {.val dogs}, {.val horse}, {.val human}, {.val poultry}, or {.val swine}
|
\item \code{host}\cr Host of infectious agent. This is mostly useful for veterinary breakpoints and is either \code{"ECOFF"}, \code{"aquatic"}, \code{"cats"}, \code{"cattle"}, \code{"dogs"}, \code{"horse"}, \code{"human"}, \code{"poultry"}, or \code{"swine"}
|
||||||
\item \code{method}\cr Testing method, either {.val DISK} or {.val MIC}
|
\item \code{method}\cr Testing method, either \code{"DISK"} or \code{"MIC"}
|
||||||
\item \code{site}\cr Body site for which the breakpoint must be applied, e.g. "Oral" or "Respiratory"
|
\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{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{rank_index}\cr Taxonomic rank index of \code{mo} from 1 (subspecies/infraspecies) to 5 (unknown microorganism)
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ eucast_rules(df,
|
|||||||
|
|
||||||
\subsection{Using taxonomic properties in rules}{
|
\subsection{Using taxonomic properties in rules}{
|
||||||
|
|
||||||
There is one exception in columns used for the rules: all column names of the \link{microorganisms} data set can also be used, but do not have to exist in the data set. These column names are: "mo", "fullname", "status", "kingdom", "phylum", "class", "order", "family", "genus", "species", "subspecies", "rank", "ref", "oxygen_tolerance", "source", "lpsn", "lpsn_parent", "lpsn_renamed_to", "mycobank", "mycobank_parent", "mycobank_renamed_to", "gbif", "gbif_parent", "gbif_renamed_to", "prevalence", and "snomed". Thus, this next example will work as well, despite the fact that the \code{df} data set does not contain a column \code{genus}:
|
There is one exception in columns used for the rules: all column names of the \link{microorganisms} data set can also be used, but do not have to exist in the data set. These column names are: \code{"mo"}, \code{"fullname"}, \code{"status"}, \code{"kingdom"}, \code{"phylum"}, \code{"class"}, \code{"order"}, \code{"family"}, \code{"genus"}, \code{"species"}, \code{"subspecies"}, \code{"rank"}, \code{"ref"}, \code{"oxygen_tolerance"}, \code{"source"}, \code{"lpsn"}, \code{"lpsn_parent"}, \code{"lpsn_renamed_to"}, \code{"mycobank"}, \code{"mycobank_parent"}, \code{"mycobank_renamed_to"}, \code{"gbif"}, \code{"gbif_parent"}, \code{"gbif_renamed_to"}, \code{"prevalence"}, and \code{"snomed"}. Thus, this next example will work as well, despite the fact that the \code{df} data set does not contain a column \code{genus}:
|
||||||
|
|
||||||
\if{html}{\out{<div class="sourceCode r">}}\preformatted{y <- custom_eucast_rules(
|
\if{html}{\out{<div class="sourceCode r">}}\preformatted{y <- custom_eucast_rules(
|
||||||
TZP == "S" & genus == "Klebsiella" ~ aminopenicillins == "S",
|
TZP == "S" & genus == "Klebsiella" ~ aminopenicillins == "S",
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ A \link[tibble:tibble]{tibble} with 759 observations and 9 variables:
|
|||||||
\itemize{
|
\itemize{
|
||||||
\item \code{ab}\cr Antimicrobial ID as used in this package (such as \code{AMC}), using the official EARS-Net (European Antimicrobial Resistance Surveillance Network) codes where available
|
\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{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 {.val high_dosage}, {.val standard_dosage}, or {.val uncomplicated_uti}
|
\item \code{type}\cr Type of the dosage, either \code{"high_dosage"}, \code{"standard_dosage"}, or \code{"uncomplicated_uti"}
|
||||||
\item \code{dose}\cr Dose, such as "2 g" or "25 mg/kg"
|
\item \code{dose}\cr Dose, such as "2 g" or "25 mg/kg"
|
||||||
\item \code{dose_times}\cr Number of times a dose must be administered
|
\item \code{dose_times}\cr Number of times a dose must be administered
|
||||||
\item \code{administration}\cr Route of administration, either {.val }, {.val im}, {.val iv}, {.val oral}, or NA
|
\item \code{administration}\cr Route of administration, either \code{""}, \code{"im"}, \code{"iv"}, \code{"oral"}, or NA
|
||||||
\item \code{notes}\cr Additional dosage notes
|
\item \code{notes}\cr Additional dosage notes
|
||||||
\item \code{original_txt}\cr Original text in the PDF file of EUCAST
|
\item \code{original_txt}\cr Original text in the PDF file of EUCAST
|
||||||
\item \code{eucast_version}\cr Version number of the EUCAST Clinical Breakpoints guideline to which these dosages apply, either 15, 14, 13.1, 12, or 11
|
\item \code{eucast_version}\cr Version number of the EUCAST Clinical Breakpoints guideline to which these dosages apply, either 15, 14, 13.1, 12, or 11
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ A \link[tibble:tibble]{tibble} with 2 000 observations and 46 variables:
|
|||||||
\item \code{date}\cr Date of receipt at the laboratory
|
\item \code{date}\cr Date of receipt at the laboratory
|
||||||
\item \code{patient}\cr ID of the patient
|
\item \code{patient}\cr ID of the patient
|
||||||
\item \code{age}\cr Age of the patient
|
\item \code{age}\cr Age of the patient
|
||||||
\item \code{gender}\cr Gender of the patient, either {.val F} or {.val M}
|
\item \code{gender}\cr Gender of the patient, either \code{"F"} or \code{"M"}
|
||||||
\item \code{ward}\cr Ward type where the patient was admitted, either {.val Clinical}, {.val ICU}, or {.val Outpatient}
|
\item \code{ward}\cr Ward type where the patient was admitted, either \code{"Clinical"}, \code{"ICU"}, or \code{"Outpatient"}
|
||||||
\item \code{mo}\cr ID of microorganism created with \code{\link[=as.mo]{as.mo()}}, see also the \link{microorganisms} data set
|
\item \code{mo}\cr ID of microorganism created with \code{\link[=as.mo]{as.mo()}}, see also the \link{microorganisms} data set
|
||||||
\item \code{PEN:RIF}\cr 40 different antimicrobials with class \code{\link{sir}} (see \code{\link[=as.sir]{as.sir()}}); these column names occur in the \link{antimicrobials} data set and can be translated with \code{\link[=set_ab_names]{set_ab_names()}} or \code{\link[=ab_name]{ab_name()}}
|
\item \code{PEN:RIF}\cr 40 different antimicrobials with class \code{\link{sir}} (see \code{\link[=as.sir]{as.sir()}}); these column names occur in the \link{antimicrobials} data set and can be translated with \code{\link[=set_ab_names]{set_ab_names()}} or \code{\link[=ab_name]{ab_name()}}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ interpretive_rules(x, col_mo = NULL, info = interactive(),
|
|||||||
verbose = FALSE, version_breakpoints = 16,
|
verbose = FALSE, version_breakpoints = 16,
|
||||||
version_expected_phenotypes = 1.2, version_expertrules = 3.3,
|
version_expected_phenotypes = 1.2, version_expertrules = 3.3,
|
||||||
ampc_cephalosporin_resistance = NA, only_sir_columns = any(is.sir(x)),
|
ampc_cephalosporin_resistance = NA, only_sir_columns = any(is.sir(x)),
|
||||||
custom_rules = NULL, overwrite = FALSE, ...)
|
custom_rules = NULL, overwrite = FALSE, add_if_missing = TRUE, ...)
|
||||||
|
|
||||||
eucast_rules(x, col_mo = NULL, info = interactive(),
|
eucast_rules(x, col_mo = NULL, info = interactive(),
|
||||||
rules = getOption("AMR_interpretive_rules", default = c("breakpoints",
|
rules = getOption("AMR_interpretive_rules", default = c("breakpoints",
|
||||||
@@ -52,7 +52,7 @@ eucast_dosage(ab, administration = "iv", version_breakpoints = 15)
|
|||||||
|
|
||||||
\item{verbose}{A \link{logical} to turn Verbose mode on and off (default is off). In Verbose mode, the function does not apply rules to the data, but instead returns a data set in logbook form with extensive info about which rows and columns would be effected and in which way. Using Verbose mode takes a lot more time.}
|
\item{verbose}{A \link{logical} to turn Verbose mode on and off (default is off). In Verbose mode, the function does not apply rules to the data, but instead returns a data set in logbook form with extensive info about which rows and columns would be effected and in which way. Using Verbose mode takes a lot more time.}
|
||||||
|
|
||||||
\item{version_breakpoints}{The version number to use for the EUCAST Clinical Breakpoints guideline. Can be {.val 16.0}, {.val 15.0}, {.val 14.0}, {.val 13.1}, {.val 12.0}, {.val 11.0}, or {.val 10.0}.}
|
\item{version_breakpoints}{The version number to use for the EUCAST Clinical Breakpoints guideline. Can be \code{"16.0"}, \code{"15.0"}, \code{"14.0"}, \code{"13.1"}, \code{"12.0"}, \code{"11.0"}, or \code{"10.0"}.}
|
||||||
|
|
||||||
\item{version_expected_phenotypes}{The version number to use for the EUCAST Expected Phenotypes. Can be {.val 1.2}.}
|
\item{version_expected_phenotypes}{The version number to use for the EUCAST Expected Phenotypes. Can be {.val 1.2}.}
|
||||||
|
|
||||||
@@ -66,6 +66,8 @@ eucast_dosage(ab, administration = "iv", version_breakpoints = 15)
|
|||||||
|
|
||||||
\item{overwrite}{A \link{logical} indicating whether to overwrite existing SIR values (default: \code{FALSE}). When \code{FALSE}, only non-SIR values are modified (i.e., any value that is not already S, I or R). To ensure compliance with EUCAST guidelines, \strong{this should remain} \code{FALSE}, as EUCAST notes often state that an organism "should be tested for susceptibility to individual agents or be reported resistant".}
|
\item{overwrite}{A \link{logical} indicating whether to overwrite existing SIR values (default: \code{FALSE}). When \code{FALSE}, only non-SIR values are modified (i.e., any value that is not already S, I or R). To ensure compliance with EUCAST guidelines, \strong{this should remain} \code{FALSE}, as EUCAST notes often state that an organism "should be tested for susceptibility to individual agents or be reported resistant".}
|
||||||
|
|
||||||
|
\item{add_if_missing}{A \link{logical} indicating whether rules should also be applied to missing (\code{NA}) values (default: \code{TRUE}). When \code{FALSE}, rules are only applied to cells that already contain an SIR value; cells with \code{NA} are left untouched. This is particularly useful when using \code{overwrite = TRUE} with custom rules and you want to update reported results without imputing values for untested drugs.}
|
||||||
|
|
||||||
\item{...}{Column names of antimicrobials. To automatically detect antimicrobial column names, do not provide any named arguments; \code{\link[=guess_ab_col]{guess_ab_col()}} will then be used for detection. To manually specify a column, provide its name (case-insensitive) as an argument, e.g. \code{AMX = "amoxicillin"}. To skip a specific antimicrobial, set it to \code{NULL}, e.g. \code{TIC = NULL} to exclude ticarcillin. If a manually defined column does not exist in the data, it will be skipped with a warning.}
|
\item{...}{Column names of antimicrobials. To automatically detect antimicrobial column names, do not provide any named arguments; \code{\link[=guess_ab_col]{guess_ab_col()}} will then be used for detection. To manually specify a column, provide its name (case-insensitive) as an argument, e.g. \code{AMX = "amoxicillin"}. To skip a specific antimicrobial, set it to \code{NULL}, e.g. \code{TIC = NULL} to exclude ticarcillin. If a manually defined column does not exist in the data, it will be skipped with a warning.}
|
||||||
|
|
||||||
\item{ab}{Any (vector of) text that can be coerced to a valid antimicrobial drug code with \code{\link[=as.ab]{as.ab()}}.}
|
\item{ab}{Any (vector of) text that can be coerced to a valid antimicrobial drug code with \code{\link[=as.ab]{as.ab()}}.}
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ A \link[tibble:tibble]{tibble} with 78 679 observations and 26 variables:
|
|||||||
\itemize{
|
\itemize{
|
||||||
\item \code{mo}\cr ID of microorganism as used by this package. \emph{\strong{This is a unique identifier.}}
|
\item \code{mo}\cr ID of microorganism as used by this package. \emph{\strong{This is a unique identifier.}}
|
||||||
\item \code{fullname}\cr Full name, like \code{"Escherichia coli"}. For the taxonomic ranks genus, species and subspecies, this is the 'pasted' text of genus, species, and subspecies. For all taxonomic ranks higher than genus, this is the name of the taxon. \emph{\strong{This is a unique identifier.}}
|
\item \code{fullname}\cr Full name, like \code{"Escherichia coli"}. For the taxonomic ranks genus, species and subspecies, this is the 'pasted' text of genus, species, and subspecies. For all taxonomic ranks higher than genus, this is the name of the taxon. \emph{\strong{This is a unique identifier.}}
|
||||||
\item \code{status} \cr Status of the taxon, either {.val accepted}, {.val not validly published}, {.val synonym}, or {.val unknown}
|
\item \code{status} \cr Status of the taxon, either \code{"accepted"}, \code{"not validly published"}, \code{"synonym"}, or \code{"unknown"}
|
||||||
\item \code{kingdom}, \code{phylum}, \code{class}, \code{order}, \code{family}, \code{genus}, \code{species}, \code{subspecies}\cr Taxonomic rank of the microorganism. Note that for fungi, \emph{phylum} is equal to their taxonomic \emph{division}. Also, for fungi, \emph{subkingdom} and \emph{subdivision} were left out since they do not occur in the bacterial taxonomy.
|
\item \code{kingdom}, \code{phylum}, \code{class}, \code{order}, \code{family}, \code{genus}, \code{species}, \code{subspecies}\cr Taxonomic rank of the microorganism. Note that for fungi, \emph{phylum} is equal to their taxonomic \emph{division}. Also, for fungi, \emph{subkingdom} and \emph{subdivision} were left out since they do not occur in the bacterial taxonomy.
|
||||||
\item \code{rank}\cr Text of the taxonomic rank of the microorganism, such as \code{"species"} or \code{"genus"}
|
\item \code{rank}\cr Text of the taxonomic rank of the microorganism, such as \code{"species"} or \code{"genus"}
|
||||||
\item \code{ref}\cr Author(s) and year of related scientific publication. This contains only the \emph{first surname} and year of the \emph{latest} authors, e.g. "Wallis \emph{et al.} 2006 \emph{emend.} Smith and Jones 2018" becomes "Smith \emph{et al.}, 2018". This field is directly retrieved from the source specified in the column \code{source}. Moreover, accents were removed to comply with CRAN that only allows ASCII characters.
|
\item \code{ref}\cr Author(s) and year of related scientific publication. This contains only the \emph{first surname} and year of the \emph{latest} authors, e.g. "Wallis \emph{et al.} 2006 \emph{emend.} Smith and Jones 2018" becomes "Smith \emph{et al.}, 2018". This field is directly retrieved from the source specified in the column \code{source}. Moreover, accents were removed to comply with CRAN that only allows ASCII characters.
|
||||||
\item \code{oxygen_tolerance} \cr Oxygen tolerance, either {.val aerobe}, {.val anaerobe}, {.val anaerobe/microaerophile}, {.val facultative anaerobe}, {.val likely facultative anaerobe}, {.val microaerophile}, or NA. These data were retrieved from BacDive (see \emph{Source}). Items that contain "likely" are missing from BacDive and were extrapolated from other species within the same genus to guess the oxygen tolerance. Currently 68.3\% of all ~39 000 bacteria in the data set contain an oxygen tolerance.
|
\item \code{oxygen_tolerance} \cr Oxygen tolerance, either \code{"aerobe"}, \code{"anaerobe"}, \code{"anaerobe/microaerophile"}, \code{"facultative anaerobe"}, \code{"likely facultative anaerobe"}, \code{"microaerophile"}, or NA. These data were retrieved from BacDive (see \emph{Source}). Items that contain "likely" are missing from BacDive and were extrapolated from other species within the same genus to guess the oxygen tolerance. Currently 68.3\% of all ~39 000 bacteria in the data set contain an oxygen tolerance.
|
||||||
\item \code{source}\cr Either {.val GBIF}, {.val LPSN}, {.val Manually added}, {.val MycoBank}, or {.val manually added} (see \emph{Source})
|
\item \code{source}\cr Either \code{"GBIF"}, \code{"LPSN"}, \code{"Manually added"}, \code{"MycoBank"}, or \code{"manually added"} (see \emph{Source})
|
||||||
\item \code{lpsn}\cr Identifier ('Record number') of List of Prokaryotic names with Standing in Nomenclature (LPSN). This will be the first/highest LPSN identifier to keep one identifier per row. For example, \emph{Acetobacter ascendens} has LPSN Record number 7864 and 11011. Only the first is available in the \code{microorganisms} data set. \emph{\strong{This is a unique identifier}}, though available for only ~33 000 records.
|
\item \code{lpsn}\cr Identifier ('Record number') of List of Prokaryotic names with Standing in Nomenclature (LPSN). This will be the first/highest LPSN identifier to keep one identifier per row. For example, \emph{Acetobacter ascendens} has LPSN Record number 7864 and 11011. Only the first is available in the \code{microorganisms} data set. \emph{\strong{This is a unique identifier}}, though available for only ~33 000 records.
|
||||||
\item \code{lpsn_parent}\cr LPSN identifier of the parent taxon
|
\item \code{lpsn_parent}\cr LPSN identifier of the parent taxon
|
||||||
\item \code{lpsn_renamed_to}\cr LPSN identifier of the currently valid taxon
|
\item \code{lpsn_renamed_to}\cr LPSN identifier of the currently valid taxon
|
||||||
|
|||||||
Reference in New Issue
Block a user