mirror of
https://github.com/msberends/AMR.git
synced 2026-09-25 02:18:20 +02:00
Compare commits
56
Commits
af139a3c82
...
v2.0.0
@@ -36,7 +36,7 @@ if command -v Rscript > /dev/null; then
|
||||
if [ "$(Rscript -e 'cat(all(c('"'pkgload'"', '"'devtools'"', '"'dplyr'"') %in% rownames(installed.packages())))')" = "TRUE" ]; then
|
||||
Rscript -e "source('data-raw/_pre_commit_hook.R')"
|
||||
currentpkg=$(Rscript -e "cat(pkgload::pkg_name())")
|
||||
echo "-> Adding files in 'data-raw' and 'man' to this commit"
|
||||
echo "- Adding changed files in ./data-raw and ./man to this commit"
|
||||
git add data-raw/*
|
||||
git add man/*
|
||||
git add R/sysdata.rda
|
||||
@@ -65,7 +65,7 @@ if [ "$currenttag" = "" ]; then
|
||||
# there is no tag, so set tag to 0.0.1 and commit index to current count
|
||||
currenttag="0.0.1"
|
||||
currentcommit=$(git rev-list --count ${defaultbranch})
|
||||
echo "- no git tags found, create one in format 'v(x).(y).(z)' - curently ${currentcommit} previous commits in ${defaultbranch}"
|
||||
echo "- no git tags found, create one in format 'v(x).(y).(z)' - curently ${currentcommit} previous commits in '${defaultbranch}'"
|
||||
else
|
||||
# there is a tag, so base version number on that
|
||||
currentcommit=$(git rev-list --count ${currenttagfull}..${defaultbranch})
|
||||
@@ -73,7 +73,7 @@ else
|
||||
# tag is new, so this must become the version number
|
||||
currentversion="$currenttag"
|
||||
fi
|
||||
echo "- latest tag is '${currenttagfull}', with ${currentcommit} previous commits in ${defaultbranch}"
|
||||
echo "- latest tag is '${currenttagfull}', with ${currentcommit} previous commits in '${defaultbranch}'"
|
||||
fi
|
||||
if [ "$currentversion" = "" ]; then
|
||||
# combine tag (e.g. 1.2.3) and commit number (like 5) increased by 9000 to indicate beta version
|
||||
@@ -84,7 +84,7 @@ echo "- ${currentpkg} pkg version set to ${currentversion}"
|
||||
# set version number and date to DESCRIPTION file
|
||||
sed -i -- "s/^Version: .*/Version: ${currentversion}/" DESCRIPTION
|
||||
sed -i -- "s/^Date: .*/Date: $(date '+%Y-%m-%d')/" DESCRIPTION
|
||||
echo "- updated DESCRIPTION"
|
||||
echo "- updated version number and date in ./DESCRIPTION"
|
||||
# remove leftover on macOS
|
||||
rm -f DESCRIPTION--
|
||||
# add to commit
|
||||
@@ -96,7 +96,7 @@ if [ -e "NEWS.md" ]; then
|
||||
currentpkg=""
|
||||
fi
|
||||
sed -i -- "1s/.*/# ${currentpkg} ${currentversion}/" NEWS.md
|
||||
echo "- updated NEWS.md"
|
||||
echo "- updated version number in ./NEWS.md"
|
||||
# remove leftover on macOS
|
||||
rm -f NEWS.md--
|
||||
# add to commit
|
||||
|
||||
+1
-1
@@ -25,4 +25,4 @@ data-raw/DSMZ_bactnames.xlsx
|
||||
data-raw/country_analysis_url_token.R
|
||||
data-raw/country_analysis2.R
|
||||
data-raw/taxonomy.csv
|
||||
data-raw/WHONET
|
||||
data-raw/WHONET/*
|
||||
|
||||
+3
-3
@@ -1,3 +1,3 @@
|
||||
Version: 1.8.2
|
||||
Date: 2022-09-27 12:18:42 UTC
|
||||
SHA: ccb09706e4f168ab6133de3d2294bcaeed0d3fc8
|
||||
Version: 2.0.0
|
||||
Date: 2023-03-12 12:42:08 UTC
|
||||
SHA: 80cfc503c29ad48806e526b97d4570600bbd5420
|
||||
|
||||
+4
-3
@@ -1,6 +1,6 @@
|
||||
Package: AMR
|
||||
Version: 1.8.2.9096
|
||||
Date: 2023-01-21
|
||||
Version: 2.0.0
|
||||
Date: 2023-03-12
|
||||
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
|
||||
@@ -26,7 +26,8 @@ Authors@R: c(
|
||||
person(family = "Salm", c("Jonas"), role = "ctb"),
|
||||
person(family = "Schade", c("Rogier", "P."), role = "ctb"),
|
||||
person(family = "Sinha", c("Bhanu", "N.", "M."), role = "ths", comment = c(ORCID = "0000-0003-1634-0010")),
|
||||
person(family = "Underwood", c("Anthony"), role = "ctb", comment = c(ORCID = "0000-0002-8547-4277")))
|
||||
person(family = "Underwood", c("Anthony"), role = "ctb", comment = c(ORCID = "0000-0002-8547-4277")),
|
||||
person(family = "Williams", c("Anita"), role = "ctb", comment = c(ORCID = "0000-0002-5295-8451")))
|
||||
Depends: R (>= 3.0.0)
|
||||
Enhances:
|
||||
cleaner,
|
||||
|
||||
@@ -73,6 +73,7 @@ S3method(asin,mic)
|
||||
S3method(asinh,mic)
|
||||
S3method(atan,mic)
|
||||
S3method(atanh,mic)
|
||||
S3method(barplot,antibiogram)
|
||||
S3method(barplot,disk)
|
||||
S3method(barplot,mic)
|
||||
S3method(barplot,rsi)
|
||||
@@ -123,6 +124,7 @@ S3method(mean_amr_distance,mic)
|
||||
S3method(mean_amr_distance,sir)
|
||||
S3method(median,mic)
|
||||
S3method(min,mic)
|
||||
S3method(plot,antibiogram)
|
||||
S3method(plot,disk)
|
||||
S3method(plot,mic)
|
||||
S3method(plot,resistance_predict)
|
||||
@@ -216,6 +218,7 @@ export(aminoglycosides)
|
||||
export(aminopenicillins)
|
||||
export(amr_distance_from_row)
|
||||
export(anti_join_microorganisms)
|
||||
export(antibiogram)
|
||||
export(antifungals)
|
||||
export(antimicrobials_equal)
|
||||
export(antimycobacterials)
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
# AMR 1.8.2.9096
|
||||
|
||||
*(this beta version will eventually become v2.0! We're happy to reach a new major milestone soon!)*
|
||||
# AMR 2.0.0
|
||||
|
||||
This is a new major release of the AMR package, with great new additions but also some breaking changes for current users. These are all listed below.
|
||||
|
||||
**[TL;DR](https://en.wikipedia.org/wiki/TL;DR)**
|
||||
|
||||
* All functions and arguments with 'rsi' were replaced with 'sir', such as the interpretation of MIC values (now `as.sir()` instead of `as.rsi()`) - all old functions still work for now
|
||||
* Many new interesting functions, such as `antibiogram()` (for generating traditional/combined/syndromic/WISCA antibiograms), `sir_confidence_interval()` and `mean_amr_distance()`, and `add_custom_microorganisms()` to add custom microorganisms to this package
|
||||
* Clinical breakpoints added for EUCAST 2022 and CLSI 2022
|
||||
* Microbiological taxonomy (`microorganisms` data set) updated to 2022 and now based on LPSN and GBIF
|
||||
* Much increased algorithms to translate user input to valid taxonomy, e.g. by using [recent scientific work](https://doi.org/10.1099/mic.0.001269) about per-species human pathogenicity
|
||||
* Clinical breakpoints added for EUCAST 2022 and CLSI 2022
|
||||
* 20 new antibiotics added and updated all DDDs and ATC codes
|
||||
* Extended support for antiviral agents (`antivirals` data set), with many new functions
|
||||
* Now available in 16 languages
|
||||
* Many new interesting functions, such as `sir_confidence_interval()` and `mean_amr_distance()`, and `add_custom_microorganisms()` to add custom microorganisms to this package
|
||||
* Now available in 20 languages
|
||||
* Many small bug fixes
|
||||
|
||||
## New
|
||||
@@ -26,17 +24,33 @@ While existing functions such as `as.rsi()`, `rsi_df()` and `ggplot_rsi()` still
|
||||
|
||||
The 'RSI functions' will be removed in a future version, but not before late 2023 / early 2024.
|
||||
|
||||
### New antibiogram function
|
||||
|
||||
With the new `antibiogram()` function, users can now generate traditional, combined, syndromic, and even weighted-incidence syndromic combination antibiograms (WISCA). With this, we follow the logic in the previously described work of Klinker *et al.* (2021, DOI [10.1177/20499361211011373](https://doi.org/10.1177/20499361211011373)) and Barbieri *et al.* (2021, DOI [10.1186/s13756-021-00939-2](https://doi.org/10.1186/s13756-021-00939-2)).
|
||||
|
||||
The help page for `antibiogram()` extensively elaborates on use cases, and `antibiogram()` also supports printing in R Markdown and Quarto, with support for 20 languages.
|
||||
|
||||
Furthermore, different plotting methods were implemented to allow for graphical visualisations as well.
|
||||
|
||||
### Interpretation of MIC and disk diffusion values
|
||||
|
||||
The clinical breakpoints and intrinsic resistance of EUCAST 2022 and CLSI 2022 have been added for `as.sir()`. EUCAST 2022 (v12.0) is now the new default guideline for all MIC and disks diffusion interpretations, and for `eucast_rules()` to apply EUCAST Expert Rules. The default guideline (EUCAST) can now be changed with the new `AMR_guideline` option, such as: `options(AMR_guideline = "CLSI 2020")`.
|
||||
|
||||
With the new arguments `include_PKPD` (default: `TRUE`) and `include_screening` (default: `FALSE`), users can now specify whether breakpoints for screening and from the PK/PD table should be included when interpreting MICs and disks diffusion values. These options can be set globally, which can be read in [our new manual](https://msberends.github.io/AMR/reference/AMR-options.html).
|
||||
|
||||
Interpretation guidelines older than 10 years were removed, the oldest now included guidelines of EUCAST and CLSI are from 2013.
|
||||
|
||||
### Supported languages
|
||||
|
||||
We added support for the following languages: Chinese, Greek, Japanese, Polish, Turkish and Ukrainian. All antibiotic names are now available in these languages, and the AMR package will automatically determine a supported language based on the user system language.
|
||||
We added support for the following ten languages: Chinese (simplified), Czech, Finnish, Greek, Japanese, Norwegian (bokmål), Polish, Romanian, Turkish and Ukrainian. All antibiotic names are now available in these languages, and the AMR package will automatically determine a supported language based on the user's system language.
|
||||
|
||||
We are very grateful for the valuable input by our colleagues from other countries. The `AMR` package is now available in 16 languages and according to download stats used in almost all countries in the world!
|
||||
We are very grateful for the valuable input by our colleagues from other countries. The `AMR` package is now available in 20 languages in total, and according to download stats used in almost all countries in the world!
|
||||
|
||||
### Outbreak management
|
||||
|
||||
For analysis in outbreak management, we updated the `get_episode()` and `is_new_episode()` functions: they now contain an argument `case_free_days`. This argument can be used to quantify the duration of case-free days (the inter-epidemic interval), after which a new episode will start.
|
||||
|
||||
This is common requirement in outbreak management, e.g. when determining the number of norovirus outbreaks in a hospital. The case-free period could then be 14 or 28 days, so that new norovirus cases after that time will be considered a different (or new) episode.
|
||||
|
||||
### Microbiological taxonomy
|
||||
|
||||
@@ -49,6 +63,7 @@ The new function `add_custom_microorganisms()` allows users to add custom microo
|
||||
We also made the following changes regarding the included taxonomy or microorganisms functions:
|
||||
|
||||
* Updated full microbiological taxonomy according to the latest daily LPSN data set (December 2022) and latest yearly GBIF taxonomy backbone (November 2022)
|
||||
* Added function `mo_current()` to get the currently valid taxonomic name of a microorganism
|
||||
* Support for all 1,516 city-like serovars of *Salmonella*, such as *Salmonella* Goldcoast. Formally, these are serovars belonging to the *S. enterica* species, but they are reported with only the name of the genus and the city. For this reason, the serovars are in the `subspecies` column of the `microorganisms` data set and "enterica" is in the `species` column, but the full name does not contain the species name (*enterica*).
|
||||
* All new algorithm for `as.mo()` (and thus all `mo_*()` functions) while still following our original set-up as described in our recently published JSS paper (DOI [10.18637/jss.v104.i03](https://doi.org/10.18637/jss.v104.i03)).
|
||||
* A new argument `keep_synonyms` allows to *not* correct for updated taxonomy, in favour of the now deleted argument `allow_uncertain`
|
||||
@@ -90,11 +105,14 @@ We now added extensive support for antiviral agents! For the first time, the `AM
|
||||
* Function `sir_confidence_interval()` to add confidence intervals in AMR calculation. This is now also included in `sir_df()` and `proportion_df()`.
|
||||
* Function `mean_amr_distance()` to calculate the mean AMR distance. The mean AMR distance is a normalised numeric value to compare AMR test results and can help to identify similar isolates, without comparing antibiograms by hand.
|
||||
* Function `sir_interpretation_history()` to view the history of previous runs of `as.sir()` (previously `as.rsi()`). This returns a 'logbook' with the selected guideline, reference table and specific interpretation of each row in a data set on which `as.sir()` was run.
|
||||
* Function `mo_current()` to get the currently valid taxonomic name of a microorganism
|
||||
* Function `add_custom_antimicrobials()` to add custom antimicrobial codes and names to the `AMR` package
|
||||
|
||||
|
||||
## Changes
|
||||
|
||||
* `get_episode()` (and its wrapper `is_new_episode()`):
|
||||
* Fix for working with `NA` values
|
||||
* Fix for unsorted dates of length 2
|
||||
* Now returns class `integer` instead of `numeric` since they are always whole numbers
|
||||
* Argument `combine_IR` has been removed from this package (affecting functions `count_df()`, `proportion_df()`, and `sir_df()` and some plotting functions), since it was replaced with `combine_SI` three years ago
|
||||
* Using `units` in `ab_ddd(..., units = "...")` had been deprecated for some time and is now not supported anymore. Use `ab_ddd_units()` instead.
|
||||
* Support for `data.frame`-enhancing R packages, more specifically: `data.table::data.table`, `janitor::tabyl`, `tibble::tibble`, and `tsibble::tsibble`. AMR package functions that have a data set as output (such as `sir_df()` and `bug_drug_combinations()`), will now return the same data type as the input.
|
||||
@@ -123,14 +141,16 @@ We now added extensive support for antiviral agents! For the first time, the `AM
|
||||
* Antimicrobial interpretation 'SDD' (susceptible dose-dependent, coined by CLSI) will be interpreted as 'I' to comply with EUCAST's 'I' in `as.sir()`
|
||||
* Fix for `mo_shortname()` in case of higher taxonomic ranks (order, class, phylum)
|
||||
* Cleaning columns with `as.sir()`, `as.mic()`, or `as.disk()` will now show the column name in the warning for invalid results
|
||||
* Fix for using `g.test()` with zeroes in a 2x2 table
|
||||
* `mo_synonyns()` now contains the scientific reference as names
|
||||
|
||||
## Other
|
||||
|
||||
* Added Peter Dutey-Magni, Dmytro Mykhailenko, Anton Mymrikov, Andrew Norgan, and Jonas Salm as contributors, to thank them for their valuable input
|
||||
* Added Peter Dutey-Magni, Dmytro Mykhailenko, Anton Mymrikov, Andrew Norgan, Jonas Salm, and Anita Williams as contributors, to thank them for their valuable input
|
||||
* New website to make use of the new Bootstrap 5 and pkgdown 2.0. The website now contains results for all examples and will be automatically regenerated with every change to our repository, using GitHub Actions
|
||||
* All R and Rmd files in this project are now styled using the `styler` package
|
||||
* Set scalar conditional expressions (`&&` and `||`) where possible to comply with the upcoming R 4.3
|
||||
* An enormous lot of code cleaning, fixing some small bugs on the way
|
||||
* An enormous lot of code cleaning, fixing some small bugs along the way
|
||||
|
||||
----
|
||||
|
||||
|
||||
+6
-6
@@ -33,12 +33,12 @@
|
||||
#' Welcome to the `AMR` package.
|
||||
#'
|
||||
#' The `AMR` package is a [free and open-source](https://msberends.github.io/AMR/#copyright) R package with [zero dependencies](https://en.wikipedia.org/wiki/Dependency_hell) to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. **Our aim is to provide a standard** for clean and reproducible AMR data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting. [Many different researchers](https://msberends.github.io/AMR/authors.html) from around the globe are continually helping us to make this a successful and durable project!
|
||||
#'
|
||||
#' This work was published in the Journal of Statistical Software (Volume 104(3); [DOI 10.18637/jss.v104.i03](https://doi.org/10.18637/jss.v104.i03)) and formed the basis of two PhD theses ([DOI 10.33612/diss.177417131](https://doi.org/10.33612/diss.177417131) and [DOI 10.33612/diss.192486375](https://doi.org/10.33612/diss.192486375)).
|
||||
#'
|
||||
#' After installing this package, R knows [**`r format_included_data_number(AMR::microorganisms)`**](https://msberends.github.io/AMR/reference/microorganisms.html) (updated December 2022) and all [**~600 antibiotic, antimycotic and antiviral drugs**](https://msberends.github.io/AMR/reference/antibiotics.html) by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral breakpoint guidelines from CLSI and EUCAST are included from the last 10 years. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). **It was designed to work in any setting, including those with very limited resources**. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the [University of Groningen](https://www.rug.nl), in collaboration with non-profit organisations [Certe Medical Diagnostics and Advice Foundation](https://www.certe.nl) and [University Medical Center Groningen](https://www.umcg.nl).
|
||||
#'
|
||||
#' The `AMR` package is available in English, Chinese, Danish, Dutch, French, German, Greek, Italian, Japanese, Polish, Portuguese, Russian, Spanish, Swedish, Turkish and Ukrainian. Antimicrobial drug (group) names and colloquial microorganism names are provided in these languages.
|
||||
#'
|
||||
#' This work was published in the Journal of Statistical Software (Volume 104(3); \doi{jss.v104.i03}) and formed the basis of two PhD theses (\doi{10.33612/diss.177417131} and \doi{10.33612/diss.192486375}).
|
||||
#'
|
||||
#' After installing this package, R knows [**`r format_included_data_number(AMR::microorganisms)` microorganisms**](https://msberends.github.io/AMR/reference/microorganisms.html) (updated `r format(TAXONOMY_VERSION$GBIF$accessed_date, "%B %Y")`) and all [**`r format_included_data_number(nrow(AMR::antibiotics) + nrow(AMR::antivirals))` antibiotic, antimycotic and antiviral drugs**](https://msberends.github.io/AMR/reference/antibiotics.html) by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral breakpoint guidelines from CLSI and EUCAST are included from the last 10 years. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). **It was designed to work in any setting, including those with very limited resources**. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the [University of Groningen](https://www.rug.nl), in collaboration with non-profit organisations [Certe Medical Diagnostics and Advice Foundation](https://www.certe.nl) and [University Medical Center Groningen](https://www.umcg.nl).
|
||||
#'
|
||||
#' The `AMR` package is available in `r vector_and(vapply(FUN.VALUE = character(1), LANGUAGES_SUPPORTED_NAMES, function(x) x$exonym), quotes = FALSE, sort = FALSE)`. Antimicrobial drug (group) names and colloquial microorganism names are provided in these languages.
|
||||
#' @section Reference Data Publicly Available:
|
||||
#' All data sets in this `AMR` package (about microorganisms, antibiotics, SIR interpretation, EUCAST rules, etc.) are publicly and freely available for download in the following formats: R, MS Excel, Apache Feather, Apache Parquet, SPSS, SAS, and Stata. We also provide tab-separated plain text files that are machine-readable and suitable for input in any software program, such as laboratory information systems. 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).
|
||||
#' @source
|
||||
|
||||
+10
-4
@@ -94,7 +94,9 @@ TAXONOMY_VERSION <- list(
|
||||
)
|
||||
|
||||
globalVariables(c(
|
||||
".mo",
|
||||
".rowid",
|
||||
".syndromic_group",
|
||||
"ab",
|
||||
"ab_txt",
|
||||
"affect_ab_name",
|
||||
@@ -105,8 +107,9 @@ globalVariables(c(
|
||||
"atc_group1",
|
||||
"atc_group2",
|
||||
"base_ab",
|
||||
"ci_min",
|
||||
"ci_max",
|
||||
"ci_min",
|
||||
"clinical_breakpoints",
|
||||
"code",
|
||||
"cols",
|
||||
"count",
|
||||
@@ -130,31 +133,34 @@ globalVariables(c(
|
||||
"language",
|
||||
"lookup",
|
||||
"method",
|
||||
"mic",
|
||||
"mic ",
|
||||
"mic",
|
||||
"microorganism",
|
||||
"microorganisms",
|
||||
"microorganisms.codes",
|
||||
"mo",
|
||||
"name",
|
||||
"new",
|
||||
"numerator",
|
||||
"observations",
|
||||
"old",
|
||||
"old_name",
|
||||
"pattern",
|
||||
"R",
|
||||
"rank_index",
|
||||
"ref_tbl",
|
||||
"reference.rule",
|
||||
"reference.rule_group",
|
||||
"reference.version",
|
||||
"rowid",
|
||||
"sir",
|
||||
"clinical_breakpoints",
|
||||
"rule_group",
|
||||
"rule_name",
|
||||
"se_max",
|
||||
"se_min",
|
||||
"SI",
|
||||
"sir",
|
||||
"species",
|
||||
"syndromic_group",
|
||||
"total",
|
||||
"txt",
|
||||
"type",
|
||||
|
||||
+229
-143
@@ -49,12 +49,13 @@ pm_left_join <- function(x, y, by = NULL, suffix = c(".x", ".y")) {
|
||||
|
||||
merged <- cbind(
|
||||
x,
|
||||
y[match(
|
||||
x[, by[1], drop = TRUE],
|
||||
y[, by[2], drop = TRUE]
|
||||
),
|
||||
colnames(y)[!colnames(y) %in% colnames(x) & !colnames(y) == by[2]],
|
||||
drop = FALSE
|
||||
y[
|
||||
match(
|
||||
x[, by[1], drop = TRUE],
|
||||
y[, by[2], drop = TRUE]
|
||||
),
|
||||
colnames(y)[!colnames(y) %in% colnames(x) & !colnames(y) == by[2]],
|
||||
drop = FALSE
|
||||
]
|
||||
)
|
||||
|
||||
@@ -62,27 +63,34 @@ pm_left_join <- function(x, y, by = NULL, suffix = c(".x", ".y")) {
|
||||
merged
|
||||
}
|
||||
|
||||
# support where() like tidyverse:
|
||||
# adapted from https://github.com/nathaneastwood/poorman/blob/52eb6947e0b4430cd588976ed8820013eddf955f/R/where.R#L17-L32
|
||||
# support where() like tidyverse (this function will also be used when running `antibiogram()`):
|
||||
where <- function(fn) {
|
||||
# based on https://github.com/nathaneastwood/poorman/blob/52eb6947e0b4430cd588976ed8820013eddf955f/R/where.R#L17-L32
|
||||
if (!is.function(fn)) {
|
||||
stop(pm_deparse_var(fn), " is not a valid predicate function.")
|
||||
stop_("`", deparse(substitute(fn)), "()` is not a valid predicate function.")
|
||||
}
|
||||
df <- pm_select_env$.data
|
||||
cols <- pm_select_env$get_colnames()
|
||||
if (is.null(df)) {
|
||||
df <- get_current_data("where", call = FALSE)
|
||||
cols <- colnames(df)
|
||||
}
|
||||
preds <- unlist(lapply(
|
||||
pm_select_env$.data,
|
||||
df,
|
||||
function(x, fn) {
|
||||
do.call("fn", list(x))
|
||||
},
|
||||
fn
|
||||
))
|
||||
if (!is.logical(preds)) stop("`where()` must be used with functions that return `TRUE` or `FALSE`.")
|
||||
data_cols <- pm_select_env$get_colnames()
|
||||
if (!is.logical(preds)) stop_("`where()` must be used with functions that return `TRUE` or `FALSE`.")
|
||||
data_cols <- cols
|
||||
cols <- data_cols[preds]
|
||||
which(data_cols %in% cols)
|
||||
}
|
||||
|
||||
# copied and slightly rewritten from poorman under same license (2021-10-15)
|
||||
quick_case_when <- function(...) {
|
||||
# copied and slightly rewritten from {poorman} under permissive license (2021-10-15)
|
||||
# https://github.com/nathaneastwood/poorman, MIT licensed, Nathan Eastwood, 2020
|
||||
case_when_AMR <- function(...) {
|
||||
fs <- list(...)
|
||||
lapply(fs, function(x) {
|
||||
if (!inherits(x, "formula")) {
|
||||
@@ -155,6 +163,22 @@ quick_case_when <- function(...) {
|
||||
out
|
||||
}
|
||||
|
||||
rbind_AMR <- function(...) {
|
||||
# this is just rbind(), but with the functionality of dplyr::bind_rows(),
|
||||
# to allow differences in available columns
|
||||
l <- list(...)
|
||||
l_names <- unique(unlist(lapply(l, names)))
|
||||
l_new <- lapply(l, function(df) {
|
||||
rownames(df) <- NULL
|
||||
for (col in l_names[!l_names %in% colnames(df)]) {
|
||||
# create the new column, could also be length 0
|
||||
df[, col] <- rep(NA, NROW(df))
|
||||
}
|
||||
df
|
||||
})
|
||||
do.call(rbind, l_new)
|
||||
}
|
||||
|
||||
# No export, no Rd
|
||||
addin_insert_in <- function() {
|
||||
import_fn("insertText", "rstudioapi")(" %in% ")
|
||||
@@ -190,12 +214,13 @@ addin_insert_like <- function() {
|
||||
)
|
||||
}
|
||||
replace_pos <- function(old, with) {
|
||||
modifyRange(document_range(
|
||||
document_position(current_row, current_col - nchar(old)),
|
||||
document_position(current_row, current_col)
|
||||
),
|
||||
text = with,
|
||||
id = context$id
|
||||
modifyRange(
|
||||
document_range(
|
||||
document_position(current_row, current_col - nchar(old)),
|
||||
document_position(current_row, current_col)
|
||||
),
|
||||
text = with,
|
||||
id = context$id
|
||||
)
|
||||
}
|
||||
|
||||
@@ -226,7 +251,7 @@ search_type_in_df <- function(x, type, info = TRUE) {
|
||||
# -- mo
|
||||
if (type == "mo") {
|
||||
add_MO_lookup_to_AMR_env()
|
||||
|
||||
|
||||
if (any(vapply(FUN.VALUE = logical(1), x, is.mo))) {
|
||||
# take first 'mo' column
|
||||
found <- colnames(x)[vapply(FUN.VALUE = logical(1), x, is.mo)]
|
||||
@@ -253,11 +278,12 @@ search_type_in_df <- function(x, type, info = TRUE) {
|
||||
# WHONET support
|
||||
found <- sort(colnames(x)[colnames_formatted %like_case% "^(specimen date|specimen_date|spec_date)"])
|
||||
if (!inherits(pm_pull(x, found), c("Date", "POSIXct"))) {
|
||||
stop(font_red(paste0(
|
||||
"Found column '", font_bold(found), "' to be used as input for `col_", type,
|
||||
"`, but this column contains no valid dates. Transform its values to valid dates first."
|
||||
)),
|
||||
call. = FALSE
|
||||
stop(
|
||||
font_red(paste0(
|
||||
"Found column '", font_bold(found), "' to be used as input for `col_", type,
|
||||
"`, but this column contains no valid dates. Transform its values to valid dates first."
|
||||
)),
|
||||
call. = FALSE
|
||||
)
|
||||
}
|
||||
} else if (any(vapply(FUN.VALUE = logical(1), x, function(x) inherits(x, c("Date", "POSIXct"))))) {
|
||||
@@ -319,21 +345,23 @@ search_type_in_df <- function(x, type, info = TRUE) {
|
||||
}
|
||||
|
||||
is_valid_regex <- function(x) {
|
||||
regex_at_all <- tryCatch(vapply(
|
||||
FUN.VALUE = logical(1),
|
||||
X = strsplit(x, "", fixed = TRUE),
|
||||
FUN = function(y) {
|
||||
any(y %in% c(
|
||||
"$", "(", ")", "*", "+", "-",
|
||||
".", "?", "[", "]", "^", "{",
|
||||
"|", "}", "\\"
|
||||
),
|
||||
na.rm = TRUE
|
||||
)
|
||||
},
|
||||
USE.NAMES = FALSE
|
||||
),
|
||||
error = function(e) rep(TRUE, length(x))
|
||||
regex_at_all <- tryCatch(
|
||||
vapply(
|
||||
FUN.VALUE = logical(1),
|
||||
X = strsplit(x, "", fixed = TRUE),
|
||||
FUN = function(y) {
|
||||
any(
|
||||
y %in% c(
|
||||
"$", "(", ")", "*", "+", "-",
|
||||
".", "?", "[", "]", "^", "{",
|
||||
"|", "}", "\\"
|
||||
),
|
||||
na.rm = TRUE
|
||||
)
|
||||
},
|
||||
USE.NAMES = FALSE
|
||||
),
|
||||
error = function(e) rep(TRUE, length(x))
|
||||
)
|
||||
regex_valid <- vapply(
|
||||
FUN.VALUE = logical(1),
|
||||
@@ -360,7 +388,7 @@ stop_ifnot_installed <- function(package) {
|
||||
}
|
||||
}
|
||||
|
||||
pkg_is_available <- function(pkg, also_load = TRUE, min_version = NULL) {
|
||||
pkg_is_available <- function(pkg, also_load = FALSE, min_version = NULL) {
|
||||
if (also_load == TRUE) {
|
||||
out <- suppressWarnings(require(pkg, character.only = TRUE, warn.conflicts = FALSE))
|
||||
} else {
|
||||
@@ -381,7 +409,7 @@ import_fn <- function(name, pkg, error_on_fail = TRUE) {
|
||||
getExportedValue(name = name, ns = asNamespace(pkg)),
|
||||
error = function(e) {
|
||||
if (isTRUE(error_on_fail)) {
|
||||
stop_("function ", name, "() is not an exported object from package '", pkg,
|
||||
stop_("function `", name, "()` is not an exported object from package '", pkg,
|
||||
"'. Please create an issue at ", font_url("https://github.com/msberends/AMR/issues"), ". Many thanks!",
|
||||
call = FALSE
|
||||
)
|
||||
@@ -410,16 +438,17 @@ word_wrap <- function(...,
|
||||
|
||||
if (msg %like% "\n") {
|
||||
# run word_wraps() over every line here, bind them and return again
|
||||
return(paste0(vapply(
|
||||
FUN.VALUE = character(1),
|
||||
trimws(unlist(strsplit(msg, "\n", fixed = TRUE)), which = "right"),
|
||||
word_wrap,
|
||||
add_fn = add_fn,
|
||||
as_note = FALSE,
|
||||
width = width,
|
||||
extra_indent = extra_indent
|
||||
),
|
||||
collapse = "\n"
|
||||
return(paste0(
|
||||
vapply(
|
||||
FUN.VALUE = character(1),
|
||||
trimws(unlist(strsplit(msg, "\n", fixed = TRUE)), which = "right"),
|
||||
word_wrap,
|
||||
add_fn = add_fn,
|
||||
as_note = FALSE,
|
||||
width = width,
|
||||
extra_indent = extra_indent
|
||||
),
|
||||
collapse = "\n"
|
||||
))
|
||||
}
|
||||
|
||||
@@ -429,11 +458,12 @@ word_wrap <- function(...,
|
||||
# we need to correct for already applied style, that adds text like "\033[31m\"
|
||||
msg_stripped <- font_stripstyle(msg)
|
||||
# where are the spaces now?
|
||||
msg_stripped_wrapped <- paste0(strwrap(msg_stripped,
|
||||
simplify = TRUE,
|
||||
width = width
|
||||
),
|
||||
collapse = "\n"
|
||||
msg_stripped_wrapped <- paste0(
|
||||
strwrap(msg_stripped,
|
||||
simplify = TRUE,
|
||||
width = width
|
||||
),
|
||||
collapse = "\n"
|
||||
)
|
||||
msg_stripped_wrapped <- paste0(unlist(strsplit(msg_stripped_wrapped, "(\n|\\*\\|\\*)")),
|
||||
collapse = "\n"
|
||||
@@ -487,11 +517,12 @@ message_ <- function(...,
|
||||
appendLF = TRUE,
|
||||
add_fn = list(font_blue),
|
||||
as_note = TRUE) {
|
||||
message(word_wrap(...,
|
||||
add_fn = add_fn,
|
||||
as_note = as_note
|
||||
),
|
||||
appendLF = appendLF
|
||||
message(
|
||||
word_wrap(...,
|
||||
add_fn = add_fn,
|
||||
as_note = as_note
|
||||
),
|
||||
appendLF = appendLF
|
||||
)
|
||||
}
|
||||
|
||||
@@ -499,12 +530,13 @@ warning_ <- function(...,
|
||||
add_fn = list(),
|
||||
immediate = FALSE,
|
||||
call = FALSE) {
|
||||
warning(word_wrap(...,
|
||||
add_fn = add_fn,
|
||||
as_note = FALSE
|
||||
),
|
||||
immediate. = immediate,
|
||||
call. = call
|
||||
warning(
|
||||
trimws2(word_wrap(...,
|
||||
add_fn = add_fn,
|
||||
as_note = FALSE
|
||||
)),
|
||||
immediate. = immediate,
|
||||
call. = call
|
||||
)
|
||||
}
|
||||
|
||||
@@ -522,7 +554,7 @@ stop_ <- function(..., call = TRUE) {
|
||||
}
|
||||
msg <- paste0("in ", call, "(): ", msg)
|
||||
}
|
||||
msg <- word_wrap(msg, add_fn = list(), as_note = FALSE)
|
||||
msg <- trimws2(word_wrap(msg, add_fn = list(), as_note = FALSE))
|
||||
stop(msg, call. = FALSE)
|
||||
}
|
||||
|
||||
@@ -601,7 +633,9 @@ documentation_date <- function(d) {
|
||||
}
|
||||
|
||||
format_included_data_number <- function(data) {
|
||||
if (is.data.frame(data)) {
|
||||
if (is.numeric(data) && length(data) == 1) {
|
||||
n <- data
|
||||
} else if (is.data.frame(data)) {
|
||||
n <- nrow(data)
|
||||
} else {
|
||||
n <- length(unique(data))
|
||||
@@ -613,7 +647,7 @@ format_included_data_number <- function(data) {
|
||||
} else {
|
||||
rounder <- -1 # round on tens
|
||||
}
|
||||
paste0("~", format(round(n, rounder), decimal.mark = ".", big.mark = ","))
|
||||
paste0("~", format(round(n, rounder), decimal.mark = ".", big.mark = " "))
|
||||
}
|
||||
|
||||
# for eucast_rules() and mdro(), creates markdown output with URLs and names
|
||||
@@ -671,6 +705,10 @@ vector_or <- function(v, quotes = TRUE, reverse = FALSE, sort = TRUE, initial_ca
|
||||
# class 'sir' should be sorted like this
|
||||
v <- c("S", "I", "R")
|
||||
}
|
||||
# oxford comma
|
||||
if (last_sep %in% c(" or ", " and ") && length(v) > 2) {
|
||||
last_sep <- paste0(",", last_sep)
|
||||
}
|
||||
# all commas except for last item, so will become '"val1", "val2", "val3" or "val4"'
|
||||
paste0(
|
||||
paste0(quotes, v[seq_len(length(v) - 1)], quotes, collapse = ", "),
|
||||
@@ -713,15 +751,15 @@ format_class <- function(class, plural = FALSE) {
|
||||
class <- "input created with `custom_eucast_rules()`"
|
||||
}
|
||||
if (any(c("mo", "ab", "sir") %in% class)) {
|
||||
class <- paste0("of class <", class[1L], ">")
|
||||
class <- paste0("of class '", class[1L], "'")
|
||||
}
|
||||
class[class == class.bak] <- paste0("of class <", class[class == class.bak], ">")
|
||||
class[class == class.bak] <- paste0("of class '", class[class == class.bak], "'")
|
||||
# output
|
||||
vector_or(class, quotes = FALSE, sort = FALSE)
|
||||
}
|
||||
|
||||
# a check for every single argument in all functions
|
||||
meet_criteria <- function(object,
|
||||
meet_criteria <- function(object, # can be literally `list(...)` for `allow_arguments_from`
|
||||
allow_class = NULL,
|
||||
has_length = NULL,
|
||||
looks_like = NULL,
|
||||
@@ -733,6 +771,7 @@ meet_criteria <- function(object,
|
||||
allow_NULL = FALSE,
|
||||
allow_NA = FALSE,
|
||||
ignore.case = FALSE,
|
||||
allow_arguments_from = NULL, # 1 function, or a list of functions
|
||||
.call_depth = 0) { # depth in calling
|
||||
|
||||
obj_name <- deparse(substitute(object))
|
||||
@@ -836,17 +875,36 @@ meet_criteria <- function(object,
|
||||
)
|
||||
}
|
||||
if (!is.null(contains_column_class)) {
|
||||
stop_ifnot(any(vapply(
|
||||
FUN.VALUE = logical(1),
|
||||
object,
|
||||
function(col, columns_class = contains_column_class) {
|
||||
inherits(col, columns_class)
|
||||
}
|
||||
), na.rm = TRUE),
|
||||
"the data provided in argument `", obj_name,
|
||||
"` must contain at least one column of class <", contains_column_class, ">. ",
|
||||
"See ?as.", contains_column_class, ".",
|
||||
call = call_depth
|
||||
stop_ifnot(
|
||||
any(vapply(
|
||||
FUN.VALUE = logical(1),
|
||||
object,
|
||||
function(col, columns_class = contains_column_class) {
|
||||
inherits(col, columns_class)
|
||||
}
|
||||
), na.rm = TRUE),
|
||||
"the data provided in argument `", obj_name,
|
||||
"` must contain at least one column of class '", contains_column_class[1L], "'. ",
|
||||
"See `?as.", contains_column_class[1L], "`.",
|
||||
call = call_depth
|
||||
)
|
||||
}
|
||||
if (!is.null(allow_arguments_from) && !is.null(names(object))) {
|
||||
args_given <- names(object)
|
||||
if (is.function(allow_arguments_from)) {
|
||||
allow_arguments_from <- list(allow_arguments_from)
|
||||
}
|
||||
args_allowed <- sort(unique(unlist(lapply(allow_arguments_from, function(x) names(formals(x))))))
|
||||
args_allowed <- args_allowed[args_allowed != "..."]
|
||||
disallowed <- args_given[!args_given %in% args_allowed]
|
||||
stop_if(length(disallowed) > 0,
|
||||
ifelse(length(disallowed) == 1,
|
||||
paste("the argument", vector_and(disallowed), "is"),
|
||||
paste("the arguments", vector_and(disallowed), "are")
|
||||
),
|
||||
" not valid. Valid arguments are: ",
|
||||
vector_and(args_allowed), ".",
|
||||
call = call_depth
|
||||
)
|
||||
}
|
||||
return(invisible())
|
||||
@@ -856,35 +914,48 @@ get_current_data <- function(arg_name, call) {
|
||||
valid_df <- function(x) {
|
||||
!is.null(x) && is.data.frame(x)
|
||||
}
|
||||
# try dplyr::cur_data_all() first to support dplyr groups
|
||||
# only useful for e.g. dplyr::filter(), dplyr::mutate() and dplyr::summarise()
|
||||
# not useful (throws error) with e.g. dplyr::select(), dplyr::across(), or dplyr::vars(),
|
||||
# but that will be caught later on in this function
|
||||
cur_data_all <- import_fn("cur_data_all", "dplyr", error_on_fail = FALSE)
|
||||
if (!is.null(cur_data_all)) {
|
||||
out <- tryCatch(cur_data_all(), error = function(e) NULL)
|
||||
if (valid_df(out)) {
|
||||
return(out)
|
||||
|
||||
frms <- sys.frames()
|
||||
|
||||
# check dplyr environments to support dplyr groups
|
||||
with_mask <- vapply(FUN.VALUE = logical(1), frms, function(e) !is.null(e$mask))
|
||||
for (env in frms[which(with_mask)]) {
|
||||
if (is.function(env$mask$current_rows) && (valid_df(env$data) || valid_df(env$`.data`))) {
|
||||
# an element `.data` or `data` (containing all data) and `mask` (containing functions) will be in the environment when using dplyr verbs
|
||||
# we use their mask$current_rows() to get the group rows, since dplyr::cur_data_all() is deprecated and will be removed in the future
|
||||
# e.g. for `example_isolates %>% group_by(ward) %>% mutate(first = first_isolate(.))`
|
||||
if (valid_df(env$data)) {
|
||||
# support for dplyr 1.1.x
|
||||
df <- env$data
|
||||
} else {
|
||||
# support for dplyr 1.0.x
|
||||
df <- env$`.data`
|
||||
}
|
||||
rows <- tryCatch(env$mask$current_rows(), error = function(e) seq_len(NROW(df)))
|
||||
return(df[rows, , drop = FALSE])
|
||||
}
|
||||
}
|
||||
|
||||
# try a manual (base R) method, by going over all underlying environments with sys.frames()
|
||||
for (env in sys.frames()) {
|
||||
if (!is.null(env$`.Generic`)) {
|
||||
# don't check `".Generic" %in% names(env)`, because in R < 3.2, `names(env)` is always NULL
|
||||
# now go over all underlying environments looking for other dplyr, data.table and base R selection environments
|
||||
with_generic <- vapply(FUN.VALUE = logical(1), frms, function(e) !is.null(e$`.Generic`))
|
||||
for (env in frms[which(with_generic)]) {
|
||||
if (valid_df(env$`.data`)) {
|
||||
# an element `.data` will be in the environment when using dplyr::select()
|
||||
return(env$`.data`)
|
||||
} else if (valid_df(env$xx)) {
|
||||
# an element `xx` will be in the environment for rows + cols in base R, e.g. `example_isolates[c(1:3), carbapenems()]`
|
||||
return(env$xx)
|
||||
} else if (valid_df(env$x)) {
|
||||
# an element `x` will be in the environment for only cols in base R, e.g. `example_isolates[, carbapenems()]`
|
||||
# this element will also be present in data.table environments where there's a .Generic available
|
||||
return(env$x)
|
||||
}
|
||||
}
|
||||
|
||||
if (valid_df(env$`.data`)) {
|
||||
# an element `.data` will be in the environment when using `dplyr::select()`
|
||||
# (but not when using `dplyr::filter()`, `dplyr::mutate()` or `dplyr::summarise()`)
|
||||
return(env$`.data`)
|
||||
} else if (valid_df(env$xx)) {
|
||||
# an element `xx` will be in the environment for rows + cols, e.g. `example_isolates[c(1:3), carbapenems()]`
|
||||
return(env$xx)
|
||||
} else if (valid_df(env$x)) {
|
||||
# an element `x` will be in the environment for only cols, e.g. `example_isolates[, carbapenems()]`
|
||||
return(env$x)
|
||||
}
|
||||
} else if (!is.null(names(env)) && all(c(".tbl", ".vars", ".cols") %in% names(env), na.rm = TRUE) && valid_df(env$`.tbl`)) {
|
||||
# now a special case for dplyr's 'scoped' variants
|
||||
with_tbl <- vapply(FUN.VALUE = logical(1), frms, function(e) valid_df(e$`.tbl`))
|
||||
for (env in frms[which(with_tbl)]) {
|
||||
if (!is.null(names(env)) && all(c(".tbl", ".vars", ".cols") %in% names(env), na.rm = TRUE)) {
|
||||
# an element `.tbl` will be in the environment when using scoped dplyr variants, with or without `dplyr::vars()`
|
||||
# (e.g. `dplyr::summarise_at()` or `dplyr::mutate_at()`)
|
||||
return(env$`.tbl`)
|
||||
@@ -918,11 +989,9 @@ get_current_data <- function(arg_name, call) {
|
||||
get_current_column <- function() {
|
||||
# try dplyr::cur_columns() first
|
||||
cur_column <- import_fn("cur_column", "dplyr", error_on_fail = FALSE)
|
||||
if (!is.null(cur_column)) {
|
||||
out <- tryCatch(cur_column(), error = function(e) NULL)
|
||||
if (!is.null(out)) {
|
||||
return(out)
|
||||
}
|
||||
out <- tryCatch(cur_column(), error = function(e) NULL)
|
||||
if (!is.null(out)) {
|
||||
return(out)
|
||||
}
|
||||
|
||||
# cur_column() doesn't always work (only allowed for certain conditions set by dplyr), but it's probably still possible:
|
||||
@@ -955,8 +1024,20 @@ get_current_column <- function() {
|
||||
}
|
||||
|
||||
is_null_or_grouped_tbl <- function(x) {
|
||||
# class "grouped_df" might change at one point, so only set in one place; here.
|
||||
is.null(x) || inherits(x, "grouped_df")
|
||||
# class "grouped_data" is from {poorman}, see aa_helper_pm_functions.R
|
||||
# class "grouped_df" is from {dplyr} and might change at one point, so only set in one place; here.
|
||||
is.null(x) || inherits(x, "grouped_data") || inherits(x, "grouped_df")
|
||||
}
|
||||
|
||||
get_group_names <- function(x) {
|
||||
if ("pm_groups" %in% names(attributes(x))) {
|
||||
pm_get_groups(x)
|
||||
} else if (!is.null(x) && is_null_or_grouped_tbl(x)) {
|
||||
grps <- colnames(attributes(x)$groups)
|
||||
grps[!grps %in% c(".group_id", ".rows")]
|
||||
} else {
|
||||
character(0)
|
||||
}
|
||||
}
|
||||
|
||||
unique_call_id <- function(entire_session = FALSE, match_fn = NULL) {
|
||||
@@ -1084,7 +1165,7 @@ try_colour <- function(..., before, after, collapse = " ") {
|
||||
}
|
||||
is_dark <- function() {
|
||||
if (is.null(AMR_env$is_dark_theme)) {
|
||||
AMR_env$is_dark_theme <- tryCatch(isTRUE(getExportedValue("getThemeInfo", ns = asNamespace("rstudioapi"))()$dark), error = function(e) FALSE)
|
||||
AMR_env$is_dark_theme <- !has_colour() || tryCatch(isTRUE(getExportedValue("getThemeInfo", ns = asNamespace("rstudioapi"))()$dark), error = function(e) FALSE)
|
||||
}
|
||||
isTRUE(AMR_env$is_dark_theme)
|
||||
}
|
||||
@@ -1262,20 +1343,24 @@ create_pillar_column <- function(x, ...) {
|
||||
new_pillar_shaft_simple(x, ...)
|
||||
}
|
||||
|
||||
as_original_data_class <- function(df, old_class = NULL) {
|
||||
if ("tbl_df" %in% old_class && pkg_is_available("tibble", also_load = FALSE)) {
|
||||
as_original_data_class <- function(df, old_class = NULL, extra_class = NULL) {
|
||||
if ("tbl_df" %in% old_class && pkg_is_available("tibble")) {
|
||||
# this will then also remove groups
|
||||
fn <- import_fn("as_tibble", "tibble")
|
||||
} else if ("tbl_ts" %in% old_class && pkg_is_available("tsibble", also_load = FALSE)) {
|
||||
} else if ("tbl_ts" %in% old_class && pkg_is_available("tsibble")) {
|
||||
fn <- import_fn("as_tsibble", "tsibble")
|
||||
} else if ("data.table" %in% old_class && pkg_is_available("data.table", also_load = FALSE)) {
|
||||
} else if ("data.table" %in% old_class && pkg_is_available("data.table")) {
|
||||
fn <- import_fn("as.data.table", "data.table")
|
||||
} else if ("tabyl" %in% old_class && pkg_is_available("janitor", also_load = FALSE)) {
|
||||
} else if ("tabyl" %in% old_class && pkg_is_available("janitor")) {
|
||||
fn <- import_fn("as_tabyl", "janitor")
|
||||
} else {
|
||||
fn <- function(x) base::as.data.frame(df, stringsAsFactors = FALSE)
|
||||
}
|
||||
fn(df)
|
||||
out <- fn(df)
|
||||
if (!is.null(extra_class)) {
|
||||
class(out) <- c(extra_class, class(out))
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
# works exactly like round(), but rounds `round2(44.55, 1)` to 44.6 instead of 44.5
|
||||
@@ -1314,7 +1399,6 @@ round2 <- function(x, digits = 1, force_zero = TRUE) {
|
||||
|
||||
# percentage from our other package: 'cleaner'
|
||||
percentage <- function(x, digits = NULL, ...) {
|
||||
|
||||
# getdecimalplaces() function
|
||||
getdecimalplaces <- function(x, minimum = 0, maximum = 3) {
|
||||
if (maximum < minimum) {
|
||||
@@ -1330,12 +1414,13 @@ percentage <- function(x, digits = NULL, ...) {
|
||||
), ".", fixed = TRUE),
|
||||
function(y) ifelse(length(y) == 2, nchar(y[2]), 0)
|
||||
)), na.rm = TRUE)
|
||||
max(min(max_places,
|
||||
maximum,
|
||||
max(
|
||||
min(max_places,
|
||||
maximum,
|
||||
na.rm = TRUE
|
||||
),
|
||||
minimum,
|
||||
na.rm = TRUE
|
||||
),
|
||||
minimum,
|
||||
na.rm = TRUE
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1366,11 +1451,12 @@ percentage <- function(x, digits = NULL, ...) {
|
||||
# max one digit if undefined
|
||||
digits <- getdecimalplaces(x, minimum = 0, maximum = 1)
|
||||
}
|
||||
format_percentage(structure(
|
||||
.Data = as.double(x),
|
||||
class = c("percentage", "numeric")
|
||||
),
|
||||
digits = digits, ...
|
||||
format_percentage(
|
||||
structure(
|
||||
.Data = as.double(x),
|
||||
class = c("percentage", "numeric")
|
||||
),
|
||||
digits = digits, ...
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1385,7 +1471,7 @@ add_MO_lookup_to_AMR_env <- function() {
|
||||
# for all MO functions, saves a lot of time on package load and in package size
|
||||
if (is.null(AMR_env$MO_lookup)) {
|
||||
MO_lookup <- AMR::microorganisms
|
||||
|
||||
|
||||
MO_lookup$kingdom_index <- NA_real_
|
||||
MO_lookup[which(MO_lookup$kingdom == "Bacteria" | MO_lookup$mo == "UNKNOWN"), "kingdom_index"] <- 1
|
||||
MO_lookup[which(MO_lookup$kingdom == "Fungi"), "kingdom_index"] <- 2
|
||||
@@ -1393,7 +1479,7 @@ add_MO_lookup_to_AMR_env <- function() {
|
||||
MO_lookup[which(MO_lookup$kingdom == "Archaea"), "kingdom_index"] <- 4
|
||||
# all the rest
|
||||
MO_lookup[which(is.na(MO_lookup$kingdom_index)), "kingdom_index"] <- 5
|
||||
|
||||
|
||||
# the fullname lowercase, important for the internal algorithms in as.mo()
|
||||
MO_lookup$fullname_lower <- tolower(trimws(paste(
|
||||
MO_lookup$genus,
|
||||
@@ -1405,7 +1491,7 @@ add_MO_lookup_to_AMR_env <- function() {
|
||||
MO_lookup$fullname_lower <- trimws(gsub("[^.a-z0-9/ \\-]+", "", MO_lookup$fullname_lower, perl = TRUE))
|
||||
# special for Salmonella - they have cities as subspecies but not the species (enterica) in the fullname:
|
||||
MO_lookup$fullname_lower[which(MO_lookup$subspecies %like_case% "^[A-Z]")] <- gsub(" enterica ", " ", MO_lookup$fullname_lower[which(MO_lookup$subspecies %like_case% "^[A-Z]")], fixed = TRUE)
|
||||
|
||||
|
||||
MO_lookup$full_first <- substr(MO_lookup$fullname_lower, 1, 1)
|
||||
MO_lookup$species_first <- tolower(substr(MO_lookup$species, 1, 1)) # tolower for groups (Streptococcus, Salmonella)
|
||||
MO_lookup$subspecies_first <- tolower(substr(MO_lookup$subspecies, 1, 1)) # tolower for Salmonella serovars
|
||||
@@ -1414,11 +1500,11 @@ add_MO_lookup_to_AMR_env <- function() {
|
||||
}
|
||||
|
||||
trimws2 <- function(..., whitespace = "[\u0009\u000A\u000B\u000C\u000D\u0020\u0085\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u200B\u200C\u200D\u2028\u2029\u202F\u205F\u2060\u3000\uFEFF]") {
|
||||
# this is even faster than trimws() itself which sets " \t\n\r".
|
||||
# this is even faster than trimws() itself which sets "[ \t\r\n]".
|
||||
trimws(..., whitespace = whitespace)
|
||||
}
|
||||
|
||||
readRDS2 <- function(file, refhook = NULL) {
|
||||
readRDS_AMR <- function(file, refhook = NULL) {
|
||||
# this is readRDS with remote file support
|
||||
con <- file(file)
|
||||
on.exit(close(con))
|
||||
@@ -1430,7 +1516,7 @@ readRDS2 <- function(file, refhook = NULL) {
|
||||
match <- function(x, table, ...) {
|
||||
chmatch <- import_fn("chmatch", "data.table", error_on_fail = FALSE)
|
||||
if (!is.null(chmatch) && is.character(x) && is.character(table)) {
|
||||
# data.table::chmatch() is 35% faster than base::match() for character
|
||||
# data.table::chmatch() is much faster than base::match() for character
|
||||
chmatch(x, table, ...)
|
||||
} else {
|
||||
base::match(x, table, ...)
|
||||
@@ -1439,7 +1525,7 @@ match <- function(x, table, ...) {
|
||||
`%in%` <- function(x, table) {
|
||||
chin <- import_fn("%chin%", "data.table", error_on_fail = FALSE)
|
||||
if (!is.null(chin) && is.character(x) && is.character(table)) {
|
||||
# data.table::`%chin%`() is 20-50% faster than base::`%in%`() for character
|
||||
# data.table::`%chin%`() is much faster than base::`%in%`() for character
|
||||
chin(x, table)
|
||||
} else {
|
||||
base::`%in%`(x, table)
|
||||
|
||||
@@ -988,7 +988,7 @@ pm_summarise.default <- function(.data, ...) {
|
||||
if (is.list(x_res)) I(x_res) else x_res
|
||||
}
|
||||
)
|
||||
res <- as.data.frame(res)
|
||||
res <- as.data.frame(res, stringsAsFactors = FALSE)
|
||||
fn_names <- names(fns)
|
||||
colnames(res) <- if (is.null(fn_names)) fns else fn_names
|
||||
if (pm_groups_exist) res <- cbind(group, res, row.names = NULL)
|
||||
|
||||
Executable
+79
@@ -0,0 +1,79 @@
|
||||
# ==================================================================== #
|
||||
# TITLE #
|
||||
# AMR: An R Package for Working with Antimicrobial Resistance Data #
|
||||
# #
|
||||
# SOURCE #
|
||||
# https://github.com/msberends/AMR #
|
||||
# #
|
||||
# CITE AS #
|
||||
# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C #
|
||||
# (2022). AMR: An R Package for Working with Antimicrobial Resistance #
|
||||
# Data. Journal of Statistical Software, 104(3), 1-31. #
|
||||
# doi:10.18637/jss.v104.i03 #
|
||||
# #
|
||||
# Developed at the University of Groningen and the University Medical #
|
||||
# Center Groningen in The Netherlands, in collaboration with many #
|
||||
# colleagues from around the world, see our website. #
|
||||
# #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# We created this package for both routine data analysis and academic #
|
||||
# research and it was publicly released in the hope that it will be #
|
||||
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
|
||||
# #
|
||||
# Visit our website for the full manual and a complete tutorial about #
|
||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Options for the AMR package
|
||||
#'
|
||||
#' This is an overview of all the package-specific [options()] you can set in the `AMR` package.
|
||||
#' @section Options:
|
||||
#' * `AMR_custom_ab` \cr Allows to use custom antimicrobial drugs with this package. This is explained in [add_custom_antimicrobials()].
|
||||
#' * `AMR_custom_mo` \cr Allows to use custom microorganisms with this package. This is explained in [add_custom_microorganisms()].
|
||||
#' * `AMR_eucastrules` \cr Used for setting the default types of rules for [eucast_rules()] function, must be one or more of: `"breakpoints"`, `"expert"`, `"other"`, `"custom"`, `"all"`, and defaults to `c("breakpoints", "expert")`.
|
||||
#' * `AMR_guideline` \cr Used for setting the default guideline for interpreting MIC values and disk diffusion diameters with [as.sir()]. Can be only the guideline name (e.g., `"CLSI"`) or the name with a year (e.g. `"CLSI 2019"`). The default to the latest implemented EUCAST guideline, currently \code{"`r clinical_breakpoints$guideline[1]`"}. Supported guideline are currently EUCAST (`r min(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`) and CLSI (`r min(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "CLSI")$guideline)))`).
|
||||
#' * `AMR_ignore_pattern` \cr A [regular expression][base::regex] to ignore (i.e., make `NA`) any match given in [as.mo()] and all [`mo_*`][mo_property()] functions.
|
||||
#' * `AMR_include_PKPD` \cr A [logical] to use in [as.sir()], to indicate that PK/PD clinical breakpoints must be applied as a last resort - the default is `TRUE`.
|
||||
#' * `AMR_include_screening` \cr A [logical] to use in [as.sir()], to indicate that clinical breakpoints for screening are allowed - the default is `FALSE`.
|
||||
#' * `AMR_keep_synonyms` \cr A [logical] to use in [as.mo()] and all [`mo_*`][mo_property()] functions, to indicate if old, previously valid taxonomic names must be preserved and not be corrected to currently accepted names. The default is `FALSE`.
|
||||
#' * `AMR_cleaning_regex` \cr A [regular expression][base::regex] (case-insensitive) to use in [as.mo()] and all [`mo_*`][mo_property()] functions, to clean the user input. The default is the outcome of [mo_cleaning_regex()], which removes texts between brackets and texts such as "species" and "serovar".
|
||||
#' * `AMR_locale` \cr A language to use for the `AMR` package, can be one of these supported language names or ISO-639-1 codes: `r vector_or(paste0(sapply(LANGUAGES_SUPPORTED_NAMES, function(x) x[[1]]), " (" , LANGUAGES_SUPPORTED, ")"), quotes = FALSE, sort = FALSE)`. The default is the current system language (if supported).
|
||||
#' * `AMR_mo_source` \cr A file location for a manual code list to be used in [as.mo()] and all [`mo_*`][mo_property()] functions. This is explained in [set_mo_source()].
|
||||
#'
|
||||
#' @section Saving Settings Between Sessions:
|
||||
#' Settings in \R are not saved globally and are thus lost when \R is exited. You can save your options to your own `.Rprofile` file, which is a user-specific file. You can edit it using:
|
||||
#'
|
||||
#' ```r
|
||||
#' utils::file.edit("~/.Rprofile")
|
||||
#' ```
|
||||
#'
|
||||
#' In this file, you can set options such as:
|
||||
#'
|
||||
#' ```r
|
||||
#' options(AMR_locale = "pt")
|
||||
#' options(AMR_include_PKPD = TRUE)
|
||||
#' ```
|
||||
#'
|
||||
#' to add Portuguese language support of antibiotics, and allow PK/PD rules when interpreting MIC values with [as.sir()].
|
||||
#'
|
||||
#' ### Share Options Within Team
|
||||
#'
|
||||
#' For a more global approach, e.g. within a data team, save an options file to a remote file location, such as a shared network drive. This would work in this way:
|
||||
#'
|
||||
#' 1. Save a plain text file to e.g. "X:/team_folder/R_options.R" and fill it with preferred settings.
|
||||
#'
|
||||
#' 2. For each user, open the `.Rprofile` file using `utils::file.edit("~/.Rprofile")` and put in there:
|
||||
#'
|
||||
#' ```r
|
||||
#' source("X:/team_folder/R_options.R")
|
||||
#' ```
|
||||
#'
|
||||
#' 3. Reload R/RStudio and check the settings with [getOption()], e.g. `getOption("AMR_locale")` if you have set that value.
|
||||
#'
|
||||
#' Now the team settings are configured in only one place, and can be maintained there.
|
||||
#' @keywords internal
|
||||
#' @name AMR-options
|
||||
NULL
|
||||
@@ -32,7 +32,7 @@
|
||||
#' Use this function to determine the antibiotic drug code of one or more antibiotics. The data set [antibiotics] will be searched for abbreviations, official names and synonyms (brand names).
|
||||
#' @param x a [character] vector to determine to antibiotic ID
|
||||
#' @param flag_multiple_results a [logical] to indicate whether a note should be printed to the console that probably more than one antibiotic drug code or name can be retrieved from a single input value.
|
||||
#' @param info a [logical] to indicate whether a progress bar should be printed, defaults to `TRUE` only in interactive mode
|
||||
#' @param info a [logical] to indicate whether a progress bar should be printed - the default is `TRUE` only in interactive mode
|
||||
#' @param ... arguments passed on to internal functions
|
||||
#' @rdname as.ab
|
||||
#' @inheritSection WHOCC WHOCC
|
||||
@@ -87,7 +87,6 @@
|
||||
#'
|
||||
#' \donttest{
|
||||
#' if (require("dplyr")) {
|
||||
#'
|
||||
#' # you can quickly rename 'sir' columns using set_ab_names() with dplyr:
|
||||
#' example_isolates %>%
|
||||
#' set_ab_names(where(is.sir), property = "atc")
|
||||
@@ -134,11 +133,11 @@ as.ab <- function(x, flag_multiple_results = TRUE, info = interactive(), ...) {
|
||||
note_if_more_than_one_found <- function(found, index, from_text) {
|
||||
if (isTRUE(initial_search) && isTRUE(length(from_text) > 1)) {
|
||||
abnames <- ab_name(from_text, tolower = TRUE, initial_search = FALSE)
|
||||
if (ab_name(found[1L], language = NULL) %like% "(clavulanic acid|avibactam)") {
|
||||
abnames <- abnames[!abnames %in% c("clavulanic acid", "avibactam")]
|
||||
if (ab_name(found[1L], language = NULL) %like% "(clavulanic acid|(avi|tazo|mono|vabor)bactam)") {
|
||||
abnames <- abnames[!abnames %in% c("clavulanic acid", "avibactam", "tazobactam", "vaborbactam", "monobactam")]
|
||||
}
|
||||
if (length(abnames) > 1) {
|
||||
warning_(
|
||||
message_(
|
||||
"More than one result was found for item ", index, ": ",
|
||||
vector_and(abnames, quotes = FALSE)
|
||||
)
|
||||
@@ -338,22 +337,23 @@ as.ab <- function(x, flag_multiple_results = TRUE, info = interactive(), ...) {
|
||||
}
|
||||
|
||||
# transform back from other languages and try again
|
||||
x_translated <- paste(lapply(
|
||||
strsplit(x[i], "[^A-Z0-9]"),
|
||||
function(y) {
|
||||
for (i in seq_len(length(y))) {
|
||||
for (lang in LANGUAGES_SUPPORTED[LANGUAGES_SUPPORTED != "en"]) {
|
||||
y[i] <- ifelse(tolower(y[i]) %in% tolower(TRANSLATIONS[, lang, drop = TRUE]),
|
||||
TRANSLATIONS[which(tolower(TRANSLATIONS[, lang, drop = TRUE]) == tolower(y[i]) &
|
||||
!isFALSE(TRANSLATIONS$fixed)), "pattern"],
|
||||
y[i]
|
||||
)
|
||||
x_translated <- paste(
|
||||
lapply(
|
||||
strsplit(x[i], "[^A-Z0-9]"),
|
||||
function(y) {
|
||||
for (i in seq_len(length(y))) {
|
||||
for (lang in LANGUAGES_SUPPORTED[LANGUAGES_SUPPORTED != "en"]) {
|
||||
y[i] <- ifelse(tolower(y[i]) %in% tolower(TRANSLATIONS[, lang, drop = TRUE]),
|
||||
TRANSLATIONS[which(tolower(TRANSLATIONS[, lang, drop = TRUE]) == tolower(y[i]) &
|
||||
!isFALSE(TRANSLATIONS$fixed)), "pattern"],
|
||||
y[i]
|
||||
)
|
||||
}
|
||||
}
|
||||
generalise_antibiotic_name(y)
|
||||
}
|
||||
generalise_antibiotic_name(y)
|
||||
}
|
||||
)[[1]],
|
||||
collapse = "/"
|
||||
)[[1]],
|
||||
collapse = "/"
|
||||
)
|
||||
x_translated_guess <- suppressWarnings(as.ab(x_translated, initial_search = FALSE))
|
||||
if (!is.na(x_translated_guess)) {
|
||||
@@ -362,20 +362,21 @@ as.ab <- function(x, flag_multiple_results = TRUE, info = interactive(), ...) {
|
||||
}
|
||||
|
||||
# now also try to coerce brandname combinations like "Amoxy/clavulanic acid"
|
||||
x_translated <- paste(lapply(
|
||||
strsplit(x_translated, "[^A-Z0-9 ]"),
|
||||
function(y) {
|
||||
for (i in seq_len(length(y))) {
|
||||
y_name <- suppressWarnings(ab_name(y[i], language = NULL, initial_search = FALSE))
|
||||
y[i] <- ifelse(!is.na(y_name),
|
||||
y_name,
|
||||
y[i]
|
||||
)
|
||||
x_translated <- paste(
|
||||
lapply(
|
||||
strsplit(x_translated, "[^A-Z0-9 ]"),
|
||||
function(y) {
|
||||
for (i in seq_len(length(y))) {
|
||||
y_name <- suppressWarnings(ab_name(y[i], language = NULL, initial_search = FALSE))
|
||||
y[i] <- ifelse(!is.na(y_name),
|
||||
y_name,
|
||||
y[i]
|
||||
)
|
||||
}
|
||||
generalise_antibiotic_name(y)
|
||||
}
|
||||
generalise_antibiotic_name(y)
|
||||
}
|
||||
)[[1]],
|
||||
collapse = "/"
|
||||
)[[1]],
|
||||
collapse = "/"
|
||||
)
|
||||
x_translated_guess <- suppressWarnings(as.ab(x_translated, initial_search = FALSE))
|
||||
if (!is.na(x_translated_guess)) {
|
||||
@@ -494,14 +495,14 @@ as.ab <- function(x, flag_multiple_results = TRUE, info = interactive(), ...) {
|
||||
# save to package env to save time for next time
|
||||
if (isTRUE(initial_search)) {
|
||||
AMR_env$ab_previously_coerced <- AMR_env$ab_previously_coerced[which(!AMR_env$ab_previously_coerced$x %in% x), , drop = FALSE]
|
||||
AMR_env$ab_previously_coerced <- unique(rbind(AMR_env$ab_previously_coerced,
|
||||
AMR_env$ab_previously_coerced <- unique(rbind_AMR(
|
||||
AMR_env$ab_previously_coerced,
|
||||
data.frame(
|
||||
x = x,
|
||||
ab = x_new,
|
||||
x_bak = x_bak[match(x, x_bak_clean)],
|
||||
stringsAsFactors = FALSE
|
||||
),
|
||||
stringsAsFactors = FALSE
|
||||
)
|
||||
))
|
||||
}
|
||||
|
||||
@@ -513,8 +514,10 @@ as.ab <- function(x, flag_multiple_results = TRUE, info = interactive(), ...) {
|
||||
)
|
||||
}
|
||||
x_unknown <- x_unknown[!x_unknown %in% x_unknown_ATCs]
|
||||
x_unknown <- c(x_unknown,
|
||||
AMR_env$ab_previously_coerced$x_bak[which(AMR_env$ab_previously_coerced$x %in% x & is.na(AMR_env$ab_previously_coerced$ab))])
|
||||
x_unknown <- c(
|
||||
x_unknown,
|
||||
AMR_env$ab_previously_coerced$x_bak[which(AMR_env$ab_previously_coerced$x %in% x & is.na(AMR_env$ab_previously_coerced$ab))]
|
||||
)
|
||||
if (length(x_unknown) > 0 && fast_mode == FALSE) {
|
||||
warning_(
|
||||
"in `as.ab()`: these values could not be coerced to a valid antimicrobial ID: ",
|
||||
@@ -660,9 +663,9 @@ get_translate_ab <- function(translate_ab) {
|
||||
} else {
|
||||
translate_ab <- tolower(translate_ab)
|
||||
stop_ifnot(translate_ab %in% colnames(AMR::antibiotics),
|
||||
"invalid value for 'translate_ab', this must be a column name of the antibiotics data set\n",
|
||||
"or TRUE (equals 'name') or FALSE to not translate at all.",
|
||||
call = FALSE
|
||||
"invalid value for 'translate_ab', this must be a column name of the antibiotics data set\n",
|
||||
"or TRUE (equals 'name') or FALSE to not translate at all.",
|
||||
call = FALSE
|
||||
)
|
||||
translate_ab
|
||||
}
|
||||
|
||||
+2
-2
@@ -33,9 +33,9 @@
|
||||
#' @param text text to analyse
|
||||
#' @param type type of property to search for, either `"drug"`, `"dose"` or `"administration"`, see *Examples*
|
||||
#' @param collapse a [character] to pass on to `paste(, collapse = ...)` to only return one [character] per element of `text`, see *Examples*
|
||||
#' @param translate_ab if `type = "drug"`: a column name of the [antibiotics] data set to translate the antibiotic abbreviations to, using [ab_property()]. Defaults to `FALSE`. Using `TRUE` is equal to using "name".
|
||||
#' @param translate_ab if `type = "drug"`: a column name of the [antibiotics] data set to translate the antibiotic abbreviations to, using [ab_property()]. The default is `FALSE`. Using `TRUE` is equal to using "name".
|
||||
#' @param thorough_search a [logical] to indicate whether the input must be extensively searched for misspelling and other faulty input values. Setting this to `TRUE` will take considerably more time than when using `FALSE`. At default, it will turn `TRUE` when all input elements contain a maximum of three words.
|
||||
#' @param info a [logical] to indicate whether a progress bar should be printed, defaults to `TRUE` only in interactive mode
|
||||
#' @param info a [logical] to indicate whether a progress bar should be printed - the default is `TRUE` only in interactive mode
|
||||
#' @param ... arguments passed on to [as.ab()]
|
||||
#' @details This function is also internally used by [as.ab()], although it then only searches for the first drug name and will throw a note if more drug names could have been returned. Note: the [as.ab()] function may use very long regular expression to match brand names of antimicrobial drugs. This may fail on some systems.
|
||||
#'
|
||||
|
||||
+13
-15
@@ -33,7 +33,7 @@
|
||||
#' @param x any (vector of) text that can be coerced to a valid antibiotic drug code with [as.ab()]
|
||||
#' @param tolower a [logical] to indicate whether the first [character] of every output should be transformed to a lower case [character]. This will lead to e.g. "polymyxin B" and not "polymyxin b".
|
||||
#' @param property one of the column names of one of the [antibiotics] data set: `vector_or(colnames(antibiotics), sort = FALSE)`.
|
||||
#' @param language language of the returned text, defaults to system language (see [get_AMR_locale()]) and can also be set with `getOption("AMR_locale")`. Use `language = NULL` or `language = ""` to prevent translation.
|
||||
#' @param language language of the returned text - the default is the current system language (see [get_AMR_locale()]) and can also be set with the [package option][AMR-options] [`AMR_locale`][AMR-options]. Use `language = NULL` or `language = ""` to prevent translation.
|
||||
#' @param administration way of administration, either `"oral"` or `"iv"`
|
||||
#' @param open browse the URL using [utils::browseURL()]
|
||||
#' @param ... in case of [set_ab_names()] and `data` is a [data.frame]: columns to select (supports tidy selection such as `column1:column4`), otherwise other arguments passed on to [as.ab()]
|
||||
@@ -102,18 +102,15 @@
|
||||
#' \donttest{
|
||||
#' if (require("dplyr")) {
|
||||
#' example_isolates %>%
|
||||
#' set_ab_names() %>%
|
||||
#' head()
|
||||
#' set_ab_names()
|
||||
#'
|
||||
#' # this does the same:
|
||||
#' example_isolates %>%
|
||||
#' rename_with(set_ab_names) %>%
|
||||
#' head()
|
||||
#' rename_with(set_ab_names)
|
||||
#'
|
||||
#' # set_ab_names() works with any AB property:
|
||||
#' example_isolates %>%
|
||||
#' set_ab_names(property = "atc") %>%
|
||||
#' head()
|
||||
#' set_ab_names(property = "atc")
|
||||
#'
|
||||
#' example_isolates %>%
|
||||
#' set_ab_names(where(is.sir)) %>%
|
||||
@@ -338,7 +335,7 @@ ab_url <- function(x, open = FALSE, ...) {
|
||||
ab_property <- function(x, property = "name", language = get_AMR_locale(), ...) {
|
||||
meet_criteria(x, allow_NA = TRUE)
|
||||
meet_criteria(property, is_in = colnames(AMR::antibiotics), has_length = 1)
|
||||
meet_criteria(language, is_in = c(LANGUAGES_SUPPORTED, ""), has_length = 1, allow_NULL = TRUE, allow_NA = TRUE)
|
||||
language <- validate_language(language)
|
||||
translate_into_language(ab_validate(x = x, property = property, ...), language = language)
|
||||
}
|
||||
|
||||
@@ -362,13 +359,14 @@ set_ab_names <- function(data, ..., property = "name", language = get_AMR_locale
|
||||
}
|
||||
|
||||
if (is.data.frame(data)) {
|
||||
if (tryCatch(length(list(...)) > 0, error = function(e) TRUE)) {
|
||||
out <- tryCatch(suppressWarnings(c(...)), error = function(e) NULL)
|
||||
if (!is.null(out)) {
|
||||
df <- data[, out, drop = FALSE]
|
||||
} else {
|
||||
df <- pm_select(data, ...)
|
||||
}
|
||||
if (tryCatch(length(c(...)) > 1, error = function(e) TRUE)) {
|
||||
df <- tryCatch(suppressWarnings(pm_select(data, ...)),
|
||||
error = function(e) {
|
||||
data[, c(...), drop = FALSE]
|
||||
}
|
||||
)
|
||||
} else if (tryCatch(is.character(c(...)), error = function(e) FALSE)) {
|
||||
df <- data[, c(...), drop = FALSE]
|
||||
} else {
|
||||
df <- data
|
||||
}
|
||||
|
||||
+206
-60
@@ -29,14 +29,16 @@
|
||||
|
||||
#' Antibiotic Selectors
|
||||
#'
|
||||
#' These functions allow for filtering rows and selecting columns based on antibiotic test results that are of a specific antibiotic class or group, without the need to define the columns or antibiotic abbreviations. In short, if you have a column name that resembles an antimicrobial drug, it will be picked up by any of these functions that matches its pharmaceutical class: "cefazolin", "CZO" and "J01DB04" will all be picked up by [cephalosporins()].
|
||||
#' @description These functions allow for filtering rows and selecting columns based on antibiotic test results that are of a specific antibiotic class or group (according to the [antibiotics] data set), without the need to define the columns or antibiotic abbreviations.
|
||||
#'
|
||||
#' In short, if you have a column name that resembles an antimicrobial drug, it will be picked up by any of these functions that matches its pharmaceutical class: "cefazolin", "kefzol", "CZO" and "J01DB04" will all be picked up by [cephalosporins()].
|
||||
#' @param ab_class an antimicrobial class or a part of it, such as `"carba"` and `"carbapenems"`. The columns `group`, `atc_group1` and `atc_group2` of the [antibiotics] data set will be searched (case-insensitive) for this value.
|
||||
#' @param filter an [expression] to be evaluated in the [antibiotics] data set, such as `name %like% "trim"`
|
||||
#' @param only_sir_columns a [logical] to indicate whether only columns of class `sir` must be selected (defaults to `FALSE`), see [as.sir()]
|
||||
#' @param only_treatable a [logical] to indicate whether antimicrobial drugs should be excluded that are only for laboratory tests (defaults to `TRUE`), such as gentamicin-high (`GEH`) and imipenem/EDTA (`IPE`)
|
||||
#' @param only_sir_columns a [logical] to indicate whether only columns of class `sir` must be selected (default is `FALSE`), see [as.sir()]
|
||||
#' @param only_treatable a [logical] to indicate whether antimicrobial drugs should be excluded that are only for laboratory tests (default is `TRUE`), such as gentamicin-high (`GEH`) and imipenem/EDTA (`IPE`)
|
||||
#' @param ... ignored, only in place to allow future extensions
|
||||
#' @details
|
||||
#' These functions can be used in data set calls for selecting columns and filtering rows. They are heavily inspired by the [Tidyverse selection helpers][tidyselect::language] such as [`everything()`][tidyselect::everything()], but also work in base \R and not only in `dplyr` verbs. Nonetheless, they are very convenient to use with `dplyr` functions such as [`select()`][dplyr::select()], [`filter()`][dplyr::filter()] and [`summarise()`][dplyr::summarise()], see *Examples*.
|
||||
#' These functions can be used in data set calls for selecting columns and filtering rows. They work with base \R, the Tidyverse, and `data.table`. They are heavily inspired by the [Tidyverse selection helpers][tidyselect::language] such as [`everything()`][tidyselect::everything()], but are not limited to `dplyr` verbs. Nonetheless, they are very convenient to use with `dplyr` functions such as [`select()`][dplyr::select()], [`filter()`][dplyr::filter()] and [`summarise()`][dplyr::summarise()], see *Examples*.
|
||||
#'
|
||||
#' All columns in the data in which these functions are called will be searched for known antibiotic names, abbreviations, brand names, and codes (ATC, EARS-Net, WHO, etc.) according to the [antibiotics] data set. This means that a selector such as [aminoglycosides()] will pick up column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc.
|
||||
#'
|
||||
@@ -49,12 +51,15 @@
|
||||
#' @return (internally) a [character] vector of column names, with additional class `"ab_selector"`
|
||||
#' @export
|
||||
#' @inheritSection AMR Reference Data Publicly Available
|
||||
|
||||
#' @examples
|
||||
#' # `example_isolates` is a data set available in the AMR package.
|
||||
#' # See ?example_isolates.
|
||||
#' example_isolates
|
||||
#'
|
||||
#'
|
||||
#' # Examples sections below are split into 'base R', 'dplyr', and 'data.table':
|
||||
#'
|
||||
#'
|
||||
#' # base R ------------------------------------------------------------------
|
||||
#'
|
||||
#' # select columns 'IPM' (imipenem) and 'MEM' (meropenem)
|
||||
@@ -77,7 +82,7 @@
|
||||
#' # filter with multiple antibiotic selectors using c()
|
||||
#' example_isolates[all(c(carbapenems(), aminoglycosides()) == "R"), ]
|
||||
#'
|
||||
#' # filter + select in one go: get penicillins in carbapenems-resistant strains
|
||||
#' # filter + select in one go: get penicillins in carbapenem-resistant strains
|
||||
#' example_isolates[any(carbapenems() == "R"), penicillins()]
|
||||
#'
|
||||
#' # You can combine selectors with '&' to be more specific. For example,
|
||||
@@ -87,28 +92,31 @@
|
||||
#' # and erythromycin is not a penicillin:
|
||||
#' example_isolates[, penicillins() & administrable_per_os()]
|
||||
#'
|
||||
#' # ab_selector() applies a filter in the `antibiotics` data set and is thus very
|
||||
#' # flexible. For instance, to select antibiotic columns with an oral DDD of at
|
||||
#' # least 1 gram:
|
||||
#' # ab_selector() applies a filter in the `antibiotics` data set and is thus
|
||||
#' # very flexible. For instance, to select antibiotic columns with an oral DDD
|
||||
#' # of at least 1 gram:
|
||||
#' example_isolates[, ab_selector(oral_ddd > 1 & oral_units == "g")]
|
||||
#'
|
||||
#' # dplyr -------------------------------------------------------------------
|
||||
#' \donttest{
|
||||
#' if (require("dplyr")) {
|
||||
#' # dplyr -------------------------------------------------------------------
|
||||
#'
|
||||
#' if (require("dplyr")) {
|
||||
#' tibble(kefzol = random_sir(5)) %>%
|
||||
#' select(cephalosporins())
|
||||
#' }
|
||||
#'
|
||||
#' if (require("dplyr")) {
|
||||
#' # get AMR for all aminoglycosides e.g., per ward:
|
||||
#' example_isolates %>%
|
||||
#' group_by(ward) %>%
|
||||
#' summarise(across(aminoglycosides(), resistance))
|
||||
#' }
|
||||
#' if (require("dplyr")) {
|
||||
#'
|
||||
#' # You can combine selectors with '&' to be more specific:
|
||||
#' example_isolates %>%
|
||||
#' select(penicillins() & administrable_per_os())
|
||||
#' }
|
||||
#' if (require("dplyr")) {
|
||||
#'
|
||||
#' # get AMR for only drugs that matter - no intrinsic resistance:
|
||||
#' example_isolates %>%
|
||||
#' filter(mo_genus() %in% c("Escherichia", "Klebsiella")) %>%
|
||||
@@ -116,7 +124,6 @@
|
||||
#' summarise(across(not_intrinsic_resistant(), resistance))
|
||||
#' }
|
||||
#' if (require("dplyr")) {
|
||||
#'
|
||||
#' # get susceptibility for antibiotics whose name contains "trim":
|
||||
#' example_isolates %>%
|
||||
#' filter(first_isolate()) %>%
|
||||
@@ -124,19 +131,16 @@
|
||||
#' summarise(across(ab_selector(name %like% "trim"), susceptibility))
|
||||
#' }
|
||||
#' if (require("dplyr")) {
|
||||
#'
|
||||
#' # this will select columns 'IPM' (imipenem) and 'MEM' (meropenem):
|
||||
#' example_isolates %>%
|
||||
#' select(carbapenems())
|
||||
#' }
|
||||
#' if (require("dplyr")) {
|
||||
#'
|
||||
#' # this will select columns 'mo', 'AMK', 'GEN', 'KAN' and 'TOB':
|
||||
#' example_isolates %>%
|
||||
#' select(mo, aminoglycosides())
|
||||
#' }
|
||||
#' if (require("dplyr")) {
|
||||
#'
|
||||
#' # any() and all() work in dplyr's filter() too:
|
||||
#' example_isolates %>%
|
||||
#' filter(
|
||||
@@ -145,25 +149,21 @@
|
||||
#' )
|
||||
#' }
|
||||
#' if (require("dplyr")) {
|
||||
#'
|
||||
#' # also works with c():
|
||||
#' example_isolates %>%
|
||||
#' filter(any(c(carbapenems(), aminoglycosides()) == "R"))
|
||||
#' }
|
||||
#' if (require("dplyr")) {
|
||||
#'
|
||||
#' # not setting any/all will automatically apply all():
|
||||
#' example_isolates %>%
|
||||
#' filter(aminoglycosides() == "R")
|
||||
#' }
|
||||
#' if (require("dplyr")) {
|
||||
#'
|
||||
#' # this will select columns 'mo' and all antimycobacterial drugs ('RIF'):
|
||||
#' example_isolates %>%
|
||||
#' select(mo, ab_class("mycobact"))
|
||||
#' }
|
||||
#' if (require("dplyr")) {
|
||||
#'
|
||||
#' # get bug/drug combinations for only glycopeptides in Gram-positives:
|
||||
#' example_isolates %>%
|
||||
#' filter(mo_is_gram_positive()) %>%
|
||||
@@ -179,13 +179,45 @@
|
||||
#' select(penicillins()) # only the 'J01CA01' column will be selected
|
||||
#' }
|
||||
#' if (require("dplyr")) {
|
||||
#'
|
||||
#' # with recent versions of dplyr this is all equal:
|
||||
#' # with recent versions of dplyr, this is all equal:
|
||||
#' x <- example_isolates[carbapenems() == "R", ]
|
||||
#' y <- example_isolates %>% filter(carbapenems() == "R")
|
||||
#' z <- example_isolates %>% filter(if_all(carbapenems(), ~ .x == "R"))
|
||||
#' identical(x, y) && identical(y, z)
|
||||
#' }
|
||||
#'
|
||||
#'
|
||||
#' # data.table --------------------------------------------------------------
|
||||
#'
|
||||
#' # data.table is supported as well, just use it in the same way as with
|
||||
#' # base R, but add `with = FALSE` if using a single AB selector.
|
||||
#'
|
||||
#' if (require("data.table")) {
|
||||
#' dt <- as.data.table(example_isolates)
|
||||
#'
|
||||
#' # this does not work, it returns column *names*
|
||||
#' dt[, carbapenems()]
|
||||
#' }
|
||||
#' if (require("data.table")) {
|
||||
#' # so `with = FALSE` is required
|
||||
#' dt[, carbapenems(), with = FALSE]
|
||||
#' }
|
||||
#'
|
||||
#' # for multiple selections or AB selectors, `with = FALSE` is not needed:
|
||||
#' if (require("data.table")) {
|
||||
#' dt[, c("mo", aminoglycosides())]
|
||||
#' }
|
||||
#' if (require("data.table")) {
|
||||
#' dt[, c(carbapenems(), aminoglycosides())]
|
||||
#' }
|
||||
#'
|
||||
#' # row filters are also supported:
|
||||
#' if (require("data.table")) {
|
||||
#' dt[any(carbapenems() == "S"), ]
|
||||
#' }
|
||||
#' if (require("data.table")) {
|
||||
#' dt[any(carbapenems() == "S"), penicillins(), with = FALSE]
|
||||
#' }
|
||||
#' }
|
||||
ab_class <- function(ab_class,
|
||||
only_sir_columns = FALSE,
|
||||
@@ -194,6 +226,10 @@ ab_class <- function(ab_class,
|
||||
meet_criteria(ab_class, allow_class = "character", has_length = 1, allow_NULL = TRUE)
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(only_treatable, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec(NULL, only_sir_columns = only_sir_columns, ab_class_args = ab_class, only_treatable = only_treatable)
|
||||
}
|
||||
|
||||
@@ -206,6 +242,10 @@ ab_selector <- function(filter,
|
||||
...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(only_treatable, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
|
||||
# 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
|
||||
@@ -237,6 +277,10 @@ ab_selector <- function(filter,
|
||||
aminoglycosides <- function(only_sir_columns = FALSE, only_treatable = TRUE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(only_treatable, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("aminoglycosides", only_sir_columns = only_sir_columns, only_treatable = only_treatable)
|
||||
}
|
||||
|
||||
@@ -244,6 +288,10 @@ aminoglycosides <- function(only_sir_columns = FALSE, only_treatable = TRUE, ...
|
||||
#' @export
|
||||
aminopenicillins <- function(only_sir_columns = FALSE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("aminopenicillins", only_sir_columns = only_sir_columns)
|
||||
}
|
||||
|
||||
@@ -251,6 +299,10 @@ aminopenicillins <- function(only_sir_columns = FALSE, ...) {
|
||||
#' @export
|
||||
antifungals <- function(only_sir_columns = FALSE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("antifungals", only_sir_columns = only_sir_columns)
|
||||
}
|
||||
|
||||
@@ -258,6 +310,10 @@ antifungals <- function(only_sir_columns = FALSE, ...) {
|
||||
#' @export
|
||||
antimycobacterials <- function(only_sir_columns = FALSE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("antimycobacterials", only_sir_columns = only_sir_columns)
|
||||
}
|
||||
|
||||
@@ -266,6 +322,10 @@ antimycobacterials <- function(only_sir_columns = FALSE, ...) {
|
||||
betalactams <- function(only_sir_columns = FALSE, only_treatable = TRUE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(only_treatable, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("betalactams", only_sir_columns = only_sir_columns, only_treatable = only_treatable)
|
||||
}
|
||||
|
||||
@@ -274,6 +334,10 @@ betalactams <- function(only_sir_columns = FALSE, only_treatable = TRUE, ...) {
|
||||
carbapenems <- function(only_sir_columns = FALSE, only_treatable = TRUE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(only_treatable, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("carbapenems", only_sir_columns = only_sir_columns, only_treatable = only_treatable)
|
||||
}
|
||||
|
||||
@@ -281,6 +345,10 @@ carbapenems <- function(only_sir_columns = FALSE, only_treatable = TRUE, ...) {
|
||||
#' @export
|
||||
cephalosporins <- function(only_sir_columns = FALSE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("cephalosporins", only_sir_columns = only_sir_columns)
|
||||
}
|
||||
|
||||
@@ -288,6 +356,10 @@ cephalosporins <- function(only_sir_columns = FALSE, ...) {
|
||||
#' @export
|
||||
cephalosporins_1st <- function(only_sir_columns = FALSE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("cephalosporins_1st", only_sir_columns = only_sir_columns)
|
||||
}
|
||||
|
||||
@@ -295,6 +367,10 @@ cephalosporins_1st <- function(only_sir_columns = FALSE, ...) {
|
||||
#' @export
|
||||
cephalosporins_2nd <- function(only_sir_columns = FALSE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("cephalosporins_2nd", only_sir_columns = only_sir_columns)
|
||||
}
|
||||
|
||||
@@ -302,6 +378,10 @@ cephalosporins_2nd <- function(only_sir_columns = FALSE, ...) {
|
||||
#' @export
|
||||
cephalosporins_3rd <- function(only_sir_columns = FALSE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("cephalosporins_3rd", only_sir_columns = only_sir_columns)
|
||||
}
|
||||
|
||||
@@ -309,6 +389,10 @@ cephalosporins_3rd <- function(only_sir_columns = FALSE, ...) {
|
||||
#' @export
|
||||
cephalosporins_4th <- function(only_sir_columns = FALSE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("cephalosporins_4th", only_sir_columns = only_sir_columns)
|
||||
}
|
||||
|
||||
@@ -316,6 +400,10 @@ cephalosporins_4th <- function(only_sir_columns = FALSE, ...) {
|
||||
#' @export
|
||||
cephalosporins_5th <- function(only_sir_columns = FALSE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("cephalosporins_5th", only_sir_columns = only_sir_columns)
|
||||
}
|
||||
|
||||
@@ -323,6 +411,10 @@ cephalosporins_5th <- function(only_sir_columns = FALSE, ...) {
|
||||
#' @export
|
||||
fluoroquinolones <- function(only_sir_columns = FALSE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("fluoroquinolones", only_sir_columns = only_sir_columns)
|
||||
}
|
||||
|
||||
@@ -330,6 +422,10 @@ fluoroquinolones <- function(only_sir_columns = FALSE, ...) {
|
||||
#' @export
|
||||
glycopeptides <- function(only_sir_columns = FALSE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("glycopeptides", only_sir_columns = only_sir_columns)
|
||||
}
|
||||
|
||||
@@ -337,6 +433,10 @@ glycopeptides <- function(only_sir_columns = FALSE, ...) {
|
||||
#' @export
|
||||
lincosamides <- function(only_sir_columns = FALSE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("lincosamides", only_sir_columns = only_sir_columns)
|
||||
}
|
||||
|
||||
@@ -344,6 +444,10 @@ lincosamides <- function(only_sir_columns = FALSE, ...) {
|
||||
#' @export
|
||||
lipoglycopeptides <- function(only_sir_columns = FALSE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("lipoglycopeptides", only_sir_columns = only_sir_columns)
|
||||
}
|
||||
|
||||
@@ -351,6 +455,10 @@ lipoglycopeptides <- function(only_sir_columns = FALSE, ...) {
|
||||
#' @export
|
||||
macrolides <- function(only_sir_columns = FALSE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("macrolides", only_sir_columns = only_sir_columns)
|
||||
}
|
||||
|
||||
@@ -358,6 +466,10 @@ macrolides <- function(only_sir_columns = FALSE, ...) {
|
||||
#' @export
|
||||
oxazolidinones <- function(only_sir_columns = FALSE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("oxazolidinones", only_sir_columns = only_sir_columns)
|
||||
}
|
||||
|
||||
@@ -365,6 +477,10 @@ oxazolidinones <- function(only_sir_columns = FALSE, ...) {
|
||||
#' @export
|
||||
penicillins <- function(only_sir_columns = FALSE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("penicillins", only_sir_columns = only_sir_columns)
|
||||
}
|
||||
|
||||
@@ -373,6 +489,10 @@ penicillins <- function(only_sir_columns = FALSE, ...) {
|
||||
polymyxins <- function(only_sir_columns = FALSE, only_treatable = TRUE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(only_treatable, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("polymyxins", only_sir_columns = only_sir_columns, only_treatable = only_treatable)
|
||||
}
|
||||
|
||||
@@ -380,6 +500,10 @@ polymyxins <- function(only_sir_columns = FALSE, only_treatable = TRUE, ...) {
|
||||
#' @export
|
||||
streptogramins <- function(only_sir_columns = FALSE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("streptogramins", only_sir_columns = only_sir_columns)
|
||||
}
|
||||
|
||||
@@ -387,6 +511,10 @@ streptogramins <- function(only_sir_columns = FALSE, ...) {
|
||||
#' @export
|
||||
quinolones <- function(only_sir_columns = FALSE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("quinolones", only_sir_columns = only_sir_columns)
|
||||
}
|
||||
|
||||
@@ -394,6 +522,10 @@ quinolones <- function(only_sir_columns = FALSE, ...) {
|
||||
#' @export
|
||||
tetracyclines <- function(only_sir_columns = FALSE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("tetracyclines", only_sir_columns = only_sir_columns)
|
||||
}
|
||||
|
||||
@@ -401,6 +533,10 @@ tetracyclines <- function(only_sir_columns = FALSE, ...) {
|
||||
#' @export
|
||||
trimethoprims <- function(only_sir_columns = FALSE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("trimethoprims", only_sir_columns = only_sir_columns)
|
||||
}
|
||||
|
||||
@@ -408,6 +544,10 @@ trimethoprims <- function(only_sir_columns = FALSE, ...) {
|
||||
#' @export
|
||||
ureidopenicillins <- function(only_sir_columns = FALSE, ...) {
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
ab_select_exec("ureidopenicillins", only_sir_columns = only_sir_columns)
|
||||
}
|
||||
|
||||
@@ -433,14 +573,16 @@ administrable_per_os <- function(only_sir_columns = FALSE, ...) {
|
||||
ab_group = "administrable_per_os",
|
||||
examples = paste0(
|
||||
" (such as ",
|
||||
vector_or(ab_name(sample(agents_all,
|
||||
size = min(5, length(agents_all)),
|
||||
replace = FALSE
|
||||
),
|
||||
tolower = TRUE,
|
||||
language = NULL
|
||||
),
|
||||
quotes = FALSE
|
||||
vector_or(
|
||||
ab_name(
|
||||
sample(agents_all,
|
||||
size = min(5, length(agents_all)),
|
||||
replace = FALSE
|
||||
),
|
||||
tolower = TRUE,
|
||||
language = NULL
|
||||
),
|
||||
quotes = FALSE
|
||||
),
|
||||
")"
|
||||
)
|
||||
@@ -491,20 +633,21 @@ not_intrinsic_resistant <- function(only_sir_columns = FALSE, col_mo = NULL, ver
|
||||
sort = FALSE, fn = "not_intrinsic_resistant"
|
||||
)
|
||||
# intrinsic vars
|
||||
vars_df_R <- tryCatch(sapply(
|
||||
eucast_rules(vars_df,
|
||||
col_mo = col_mo,
|
||||
version_expertrules = version_expertrules,
|
||||
rules = "expert",
|
||||
info = FALSE
|
||||
vars_df_R <- tryCatch(
|
||||
sapply(
|
||||
eucast_rules(vars_df,
|
||||
col_mo = col_mo,
|
||||
version_expertrules = version_expertrules,
|
||||
rules = "expert",
|
||||
info = FALSE
|
||||
),
|
||||
function(col) {
|
||||
tryCatch(!any(is.na(col)) && all(col == "R"),
|
||||
error = function(e) FALSE
|
||||
)
|
||||
}
|
||||
),
|
||||
function(col) {
|
||||
tryCatch(!any(is.na(col)) && all(col == "R"),
|
||||
error = function(e) FALSE
|
||||
)
|
||||
}
|
||||
),
|
||||
error = function(e) stop_("in not_intrinsic_resistant(): ", e$message, call = FALSE)
|
||||
error = function(e) stop_("in not_intrinsic_resistant(): ", e$message, call = FALSE)
|
||||
)
|
||||
|
||||
agents <- ab_in_data[ab_in_data %in% names(vars_df_R[which(vars_df_R)])]
|
||||
@@ -549,12 +692,13 @@ ab_select_exec <- function(function_name,
|
||||
if (message_not_thrown_before(function_name, "ab_class", "untreatable", entire_session = TRUE)) {
|
||||
warning_(
|
||||
"in `", function_name, "()`: some drugs were ignored since they cannot be used for treating patients: ",
|
||||
vector_and(ab_name(names(ab_in_data)[names(ab_in_data) %in% untreatable],
|
||||
language = NULL,
|
||||
tolower = TRUE
|
||||
),
|
||||
quotes = FALSE,
|
||||
sort = TRUE
|
||||
vector_and(
|
||||
ab_name(names(ab_in_data)[names(ab_in_data) %in% untreatable],
|
||||
language = NULL,
|
||||
tolower = TRUE
|
||||
),
|
||||
quotes = FALSE,
|
||||
sort = TRUE
|
||||
), ". They can be included using `", function_name, "(only_treatable = FALSE)`. ",
|
||||
"This warning will be shown once per session."
|
||||
)
|
||||
@@ -593,11 +737,12 @@ ab_select_exec <- function(function_name,
|
||||
}
|
||||
ab_group <- function_name
|
||||
}
|
||||
examples <- paste0(" (such as ", vector_or(ab_name(sample(abx, size = min(2, length(abx)), replace = FALSE),
|
||||
tolower = TRUE,
|
||||
language = NULL
|
||||
),
|
||||
quotes = FALSE
|
||||
examples <- paste0(" (such as ", vector_or(
|
||||
ab_name(sample(abx, size = min(2, length(abx)), replace = FALSE),
|
||||
tolower = TRUE,
|
||||
language = NULL
|
||||
),
|
||||
quotes = FALSE
|
||||
), ")")
|
||||
} else {
|
||||
# this for the 'manual' ab_class() function
|
||||
@@ -821,11 +966,12 @@ find_ab_names <- function(ab_group, n = 3) {
|
||||
if (length(drugs) == 0) {
|
||||
return("??")
|
||||
}
|
||||
vector_or(ab_name(sample(drugs, size = min(n, length(drugs)), replace = FALSE),
|
||||
tolower = TRUE,
|
||||
language = NULL
|
||||
),
|
||||
quotes = FALSE
|
||||
vector_or(
|
||||
ab_name(sample(drugs, size = min(n, length(drugs)), replace = FALSE),
|
||||
tolower = TRUE,
|
||||
language = NULL
|
||||
),
|
||||
quotes = FALSE
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#'
|
||||
#' Calculates age in years based on a reference date, which is the system date at default.
|
||||
#' @param x date(s), [character] (vectors) will be coerced with [as.POSIXlt()]
|
||||
#' @param reference reference date(s) (defaults to today), [character] (vectors) will be coerced with [as.POSIXlt()]
|
||||
#' @param reference reference date(s) (default is today), [character] (vectors) will be coerced with [as.POSIXlt()]
|
||||
#' @param exact a [logical] to indicate whether age calculation should be exact, i.e. with decimals. It divides the number of days of [year-to-date](https://en.wikipedia.org/wiki/Year-to-date) (YTD) of `x` by the number of days in the year of `reference` (either 365 or 366).
|
||||
#' @param na.rm a [logical] to indicate whether missing values should be removed
|
||||
#' @param ... arguments passed on to [as.POSIXlt()], such as `origin`
|
||||
@@ -83,11 +83,12 @@ age <- function(x, reference = Sys.Date(), exact = FALSE, na.rm = FALSE, ...) {
|
||||
# add decimals
|
||||
if (exact == TRUE) {
|
||||
# get dates of `x` when `x` would have the year of `reference`
|
||||
x_in_reference_year <- as.POSIXlt(paste0(
|
||||
format(as.Date(reference), "%Y"),
|
||||
format(as.Date(x), "-%m-%d")
|
||||
),
|
||||
format = "%Y-%m-%d"
|
||||
x_in_reference_year <- as.POSIXlt(
|
||||
paste0(
|
||||
format(as.Date(reference), "%Y"),
|
||||
format(as.Date(x), "-%m-%d")
|
||||
),
|
||||
format = "%Y-%m-%d"
|
||||
)
|
||||
# get differences in days
|
||||
n_days_x_rest <- as.double(difftime(as.Date(reference),
|
||||
@@ -129,7 +130,7 @@ age <- function(x, reference = Sys.Date(), exact = FALSE, na.rm = FALSE, ...) {
|
||||
#'
|
||||
#' Split ages into age groups defined by the `split` argument. This allows for easier demographic (antimicrobial resistance) analysis.
|
||||
#' @param x age, e.g. calculated with [age()]
|
||||
#' @param split_at values to split `x` at, defaults to age groups 0-11, 12-24, 25-54, 55-74 and 75+. See *Details*.
|
||||
#' @param split_at values to split `x` at - the default is age groups 0-11, 12-24, 25-54, 55-74 and 75+. See *Details*.
|
||||
#' @param na.rm a [logical] to indicate whether missing values should be removed
|
||||
#' @details To split ages, the input for the `split_at` argument can be:
|
||||
#'
|
||||
|
||||
Executable
+608
@@ -0,0 +1,608 @@
|
||||
# ==================================================================== #
|
||||
# TITLE #
|
||||
# AMR: An R Package for Working with Antimicrobial Resistance Data #
|
||||
# #
|
||||
# SOURCE #
|
||||
# https://github.com/msberends/AMR #
|
||||
# #
|
||||
# CITE AS #
|
||||
# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C #
|
||||
# (2022). AMR: An R Package for Working with Antimicrobial Resistance #
|
||||
# Data. Journal of Statistical Software, 104(3), 1-31. #
|
||||
# doi:10.18637/jss.v104.i03 #
|
||||
# #
|
||||
# Developed at the University of Groningen and the University Medical #
|
||||
# Center Groningen in The Netherlands, in collaboration with many #
|
||||
# colleagues from around the world, see our website. #
|
||||
# #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# We created this package for both routine data analysis and academic #
|
||||
# research and it was publicly released in the hope that it will be #
|
||||
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
|
||||
# #
|
||||
# Visit our website for the full manual and a complete tutorial about #
|
||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Generate Antibiogram: Traditional, Combined, Syndromic, or Weighted-Incidence Syndromic Combination (WISCA)
|
||||
#'
|
||||
#' Generate an antibiogram, and communicate the results in plots or tables. These functions follow the logic of Klinker *et al.* and Barbieri *et al.* (see *Source*), and allow reporting in e.g. R Markdown and Quarto as well.
|
||||
#' @param x a [data.frame] containing at least a column with microorganisms and columns with antibiotic results (class 'sir', see [as.sir()])
|
||||
#' @param antibiotics vector of any antibiotic name or code (will be evaluated with [as.ab()], column name of `x`, or (any combinations of) [antibiotic selectors][antibiotic_class_selectors] such as [aminoglycosides()] or [carbapenems()]. For combination antibiograms, this can also be set to values separated with `"+"`, such as "TZP+TOB" or "cipro + genta", given that columns resembling such antibiotics exist in `x`. See *Examples*.
|
||||
#' @param mo_transform a character to transform microorganism input - must be "name", "shortname", "gramstain", or one of the column names of the [microorganisms] data set: `r vector_or(colnames(microorganisms), sort = FALSE, quotes = TRUE)`. Can also be `NULL` to not transform the input.
|
||||
#' @param ab_transform a character to transform antibiotic input - must be one of the column names of the [antibiotics] data set: `r vector_or(colnames(antibiotics), sort = FALSE, quotes = TRUE)`. Can also be `NULL` to not transform the input.
|
||||
#' @param syndromic_group a column name of `x`, or values calculated to split rows of `x`, e.g. by using [ifelse()] or [`case_when()`][dplyr::case_when()]. See *Examples*.
|
||||
#' @param add_total_n a [logical] to indicate whether total available numbers per pathogen should be added to the table (default is `TRUE`). This will add the lowest and highest number of available isolate per antibiotic (e.g, if for *E. coli* 200 isolates are available for ciprofloxacin and 150 for amoxicillin, the returned number will be "150-200").
|
||||
#' @param only_all_tested (for combination antibiograms): a [logical] to indicate that isolates must be tested for all antibiotics, see *Details*
|
||||
#' @param digits number of digits to use for rounding
|
||||
#' @param col_mo column name of the names or codes of the microorganisms (see [as.mo()]) - the default is the first column of class [`mo`]. Values will be coerced using [as.mo()].
|
||||
#' @param language language to translate text, which defaults to the system language (see [get_AMR_locale()])
|
||||
#' @param minimum the minimum allowed number of available (tested) isolates. Any isolate count lower than `minimum` will return `NA` with a warning. The default number of `30` isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see *Source*.
|
||||
#' @param combine_SI a [logical] to indicate whether all susceptibility should be determined by results of either S or I, instead of only S (default is `TRUE`)
|
||||
#' @param sep a separating character for antibiotic columns in combination antibiograms
|
||||
#' @param info a [logical] to indicate info should be printed - the default is `TRUE` only in interactive mode
|
||||
#' @param object an [antibiogram()] object
|
||||
#' @param ... when used in [R Markdown or Quarto][knitr::kable()]: arguments passed on to [knitr::kable()] (otherwise, has no use)
|
||||
#' @details This function returns a table with values between 0 and 100 for *susceptibility*, not resistance.
|
||||
#'
|
||||
#' **Remember that you should filter your data to let it contain only first isolates!** This is needed to exclude duplicates and to reduce selection bias. Use [first_isolate()] to determine them in your data set with one of the four available algorithms.
|
||||
#'
|
||||
#' All types of antibiograms as listed below can be plotted (using [ggplot2::autoplot()] or base \R [plot()]/[barplot()]). The `antibiogram` object can also be used directly in R Markdown / Quarto (i.e., `knitr`) for reports. In this case, [knitr::kable()] will be applied automatically and microorganism names will even be printed in italics at default (see argument `italicise`). You can also use functions from specific 'table reporting' packages to transform the output of [antibiogram()] to your needs, e.g. with `flextable::as_flextable()` or `gt::gt()`.
|
||||
#'
|
||||
#' ### Antibiogram Types
|
||||
#'
|
||||
#' There are four antibiogram types, as proposed by Klinker *et al.* (2021, \doi{10.1177/20499361211011373}), and they are all supported by [antibiogram()]:
|
||||
#'
|
||||
#' 1. **Traditional Antibiogram**
|
||||
#'
|
||||
#' Case example: Susceptibility of *Pseudomonas aeruginosa* to piperacillin/tazobactam (TZP)
|
||||
#'
|
||||
#' Code example:
|
||||
#'
|
||||
#' ```r
|
||||
#' antibiogram(your_data,
|
||||
#' antibiotics = "TZP")
|
||||
#' ```
|
||||
#'
|
||||
#' 2. **Combination Antibiogram**
|
||||
#'
|
||||
#' Case example: Additional susceptibility of *Pseudomonas aeruginosa* to TZP + tobramycin versus TZP alone
|
||||
#'
|
||||
#' Code example:
|
||||
#'
|
||||
#' ```r
|
||||
#' antibiogram(your_data,
|
||||
#' antibiotics = c("TZP", "TZP+TOB", "TZP+GEN"))
|
||||
#' ```
|
||||
#'
|
||||
#' 3. **Syndromic Antibiogram**
|
||||
#'
|
||||
#' Case example: Susceptibility of *Pseudomonas aeruginosa* to TZP among respiratory specimens (obtained among ICU patients only)
|
||||
#'
|
||||
#' Code example:
|
||||
#'
|
||||
#' ```r
|
||||
#' antibiogram(your_data,
|
||||
#' antibiotics = penicillins(),
|
||||
#' syndromic_group = "ward")
|
||||
#' ```
|
||||
#'
|
||||
#' 4. **Weighted-Incidence Syndromic Combination Antibiogram (WISCA)**
|
||||
#'
|
||||
#' Case example: Susceptibility of *Pseudomonas aeruginosa* to TZP among respiratory specimens (obtained among ICU patients only) for male patients age >=65 years with heart failure
|
||||
#'
|
||||
#' Code example:
|
||||
#'
|
||||
#' ```r
|
||||
#' library(dplyr)
|
||||
#' your_data %>%
|
||||
#' filter(ward == "ICU" & specimen_type == "Respiratory") %>%
|
||||
#' antibiogram(antibiotics = c("TZP", "TZP+TOB", "TZP+GEN"),
|
||||
#' syndromic_group = ifelse(.$age >= 65 &
|
||||
#' .$gender == "Male" &
|
||||
#' .$condition == "Heart Disease",
|
||||
#' "Study Group", "Control Group"))
|
||||
#' ```
|
||||
#'
|
||||
#' Note that for combination antibiograms, it is important to realise that susceptibility can be calculated in two ways, which can be set with the `only_all_tested` argument (default is `FALSE`). See this example for two antibiotics, Drug A and Drug B, about how [antibiogram()] works to calculate the %SI:
|
||||
#'
|
||||
#' ```
|
||||
#' --------------------------------------------------------------------
|
||||
#' only_all_tested = FALSE only_all_tested = TRUE
|
||||
#' ----------------------- -----------------------
|
||||
#' Drug A Drug B include as include as include as include as
|
||||
#' numerator denominator numerator denominator
|
||||
#' -------- -------- ---------- ----------- ---------- -----------
|
||||
#' S or I S or I X X X X
|
||||
#' R S or I X X X X
|
||||
#' <NA> S or I X X - -
|
||||
#' S or I R X X X X
|
||||
#' R R - X - X
|
||||
#' <NA> R - - - -
|
||||
#' S or I <NA> X X - -
|
||||
#' R <NA> - - - -
|
||||
#' <NA> <NA> - - - -
|
||||
#' --------------------------------------------------------------------
|
||||
#' ```
|
||||
#'
|
||||
#' @source
|
||||
#' * Klinker KP *et al.* (2021). **Antimicrobial stewardship and antibiograms: importance of moving beyond traditional antibiograms**. *Therapeutic Advances in Infectious Disease*, May 5;8:20499361211011373; \doi{10.1177/20499361211011373}
|
||||
#' * Barbieri E *et al.* (2021). **Development of a Weighted-Incidence Syndromic Combination Antibiogram (WISCA) to guide the choice of the empiric antibiotic treatment for urinary tract infection in paediatric patients: a Bayesian approach** *Antimicrobial Resistance & Infection Control* May 1;10(1):74; \doi{10.1186/s13756-021-00939-2}
|
||||
#' * **M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 5th Edition**, 2022, *Clinical and Laboratory Standards Institute (CLSI)*. <https://clsi.org/standards/products/microbiology/documents/m39/>.
|
||||
#' @rdname antibiogram
|
||||
#' @name antibiogram
|
||||
#' @export
|
||||
#' @examples
|
||||
#' # example_isolates is a data set available in the AMR package.
|
||||
#' # run ?example_isolates for more info.
|
||||
#' example_isolates
|
||||
#'
|
||||
#' \donttest{
|
||||
#' # Traditional antibiogram ----------------------------------------------
|
||||
#'
|
||||
#' antibiogram(example_isolates,
|
||||
#' antibiotics = c(aminoglycosides(), carbapenems())
|
||||
#' )
|
||||
#'
|
||||
#' antibiogram(example_isolates,
|
||||
#' antibiotics = aminoglycosides(),
|
||||
#' ab_transform = "atc",
|
||||
#' mo_transform = "gramstain"
|
||||
#' )
|
||||
#'
|
||||
#' antibiogram(example_isolates,
|
||||
#' antibiotics = carbapenems(),
|
||||
#' ab_transform = "name",
|
||||
#' mo_transform = "name"
|
||||
#' )
|
||||
#'
|
||||
#'
|
||||
#' # Combined antibiogram -------------------------------------------------
|
||||
#'
|
||||
#' # combined antibiotics yield higher empiric coverage
|
||||
#' antibiogram(example_isolates,
|
||||
#' antibiotics = c("TZP", "TZP+TOB", "TZP+GEN"),
|
||||
#' mo_transform = "gramstain"
|
||||
#' )
|
||||
#'
|
||||
#' # names of antibiotics do not need to resemble columns exactly:
|
||||
#' antibiogram(example_isolates,
|
||||
#' antibiotics = c("Cipro", "cipro + genta"),
|
||||
#' mo_transform = "gramstain",
|
||||
#' ab_transform = "name",
|
||||
#' sep = " & "
|
||||
#' )
|
||||
#'
|
||||
#'
|
||||
#' # Syndromic antibiogram ------------------------------------------------
|
||||
#'
|
||||
#' # the data set could contain a filter for e.g. respiratory specimens
|
||||
#' antibiogram(example_isolates,
|
||||
#' antibiotics = c(aminoglycosides(), carbapenems()),
|
||||
#' syndromic_group = "ward"
|
||||
#' )
|
||||
#'
|
||||
#' # now define a data set with only E. coli
|
||||
#' ex1 <- example_isolates[which(mo_genus() == "Escherichia"), ]
|
||||
#'
|
||||
#' # with a custom language, though this will be determined automatically
|
||||
#' # (i.e., this table will be in Spanish on Spanish systems)
|
||||
#' antibiogram(ex1,
|
||||
#' antibiotics = aminoglycosides(),
|
||||
#' ab_transform = "name",
|
||||
#' syndromic_group = ifelse(ex1$ward == "ICU",
|
||||
#' "UCI", "No UCI"
|
||||
#' ),
|
||||
#' language = "es"
|
||||
#' )
|
||||
#'
|
||||
#'
|
||||
#' # Weighted-incidence syndromic combination antibiogram (WISCA) ---------
|
||||
#'
|
||||
#' # the data set could contain a filter for e.g. respiratory specimens/ICU
|
||||
#' antibiogram(example_isolates,
|
||||
#' antibiotics = c("AMC", "AMC+CIP", "TZP", "TZP+TOB"),
|
||||
#' mo_transform = "gramstain",
|
||||
#' minimum = 10, # this should be >=30, but now just as example
|
||||
#' syndromic_group = ifelse(example_isolates$age >= 65 &
|
||||
#' example_isolates$gender == "M",
|
||||
#' "WISCA Group 1", "WISCA Group 2"
|
||||
#' )
|
||||
#' )
|
||||
#'
|
||||
#'
|
||||
#' # Print the output for R Markdown / Quarto -----------------------------
|
||||
#'
|
||||
#' ureido <- antibiogram(example_isolates,
|
||||
#' antibiotics = ureidopenicillins(),
|
||||
#' ab_transform = "name"
|
||||
#' )
|
||||
#'
|
||||
#' # in an Rmd file, you would just need to return `ureido` in a chunk,
|
||||
#' # but to be explicit here:
|
||||
#' if (requireNamespace("knitr")) {
|
||||
#' knitr::knit_print(ureido)
|
||||
#' }
|
||||
#'
|
||||
#'
|
||||
#' # Generate plots with ggplot2 or base R --------------------------------
|
||||
#'
|
||||
#' ab1 <- antibiogram(example_isolates,
|
||||
#' antibiotics = c("AMC", "CIP", "TZP", "TZP+TOB"),
|
||||
#' mo_transform = "gramstain"
|
||||
#' )
|
||||
#' ab2 <- antibiogram(example_isolates,
|
||||
#' antibiotics = c("AMC", "CIP", "TZP", "TZP+TOB"),
|
||||
#' mo_transform = "gramstain",
|
||||
#' syndromic_group = "ward"
|
||||
#' )
|
||||
#'
|
||||
#' if (requireNamespace("ggplot2")) {
|
||||
#' ggplot2::autoplot(ab1)
|
||||
#' }
|
||||
#' if (requireNamespace("ggplot2")) {
|
||||
#' ggplot2::autoplot(ab2)
|
||||
#' }
|
||||
#'
|
||||
#' plot(ab1)
|
||||
#' plot(ab2)
|
||||
#' }
|
||||
antibiogram <- function(x,
|
||||
antibiotics = where(is.sir),
|
||||
mo_transform = "shortname",
|
||||
ab_transform = NULL,
|
||||
syndromic_group = NULL,
|
||||
add_total_n = TRUE,
|
||||
only_all_tested = FALSE,
|
||||
digits = 0,
|
||||
col_mo = NULL,
|
||||
language = get_AMR_locale(),
|
||||
minimum = 30,
|
||||
combine_SI = TRUE,
|
||||
sep = " + ",
|
||||
info = interactive()) {
|
||||
meet_criteria(x, allow_class = "data.frame", contains_column_class = c("sir", "rsi"))
|
||||
meet_criteria(mo_transform, allow_class = "character", has_length = 1, is_in = c("name", "shortname", "gramstain", colnames(AMR::microorganisms)), allow_NULL = TRUE)
|
||||
meet_criteria(ab_transform, allow_class = "character", has_length = 1, is_in = colnames(AMR::antibiotics), allow_NULL = TRUE)
|
||||
meet_criteria(syndromic_group, allow_class = "character", allow_NULL = TRUE, allow_NA = TRUE)
|
||||
meet_criteria(add_total_n, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(only_all_tested, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(digits, allow_class = c("numeric", "integer"), has_length = 1, is_finite = TRUE)
|
||||
meet_criteria(col_mo, allow_class = "character", has_length = 1, allow_NULL = TRUE, is_in = colnames(x))
|
||||
language <- validate_language(language)
|
||||
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_positive_or_zero = TRUE, is_finite = TRUE)
|
||||
meet_criteria(combine_SI, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(sep, allow_class = "character", has_length = 1)
|
||||
meet_criteria(info, allow_class = "logical", has_length = 1)
|
||||
|
||||
# try to find columns based on type
|
||||
if (is.null(col_mo)) {
|
||||
col_mo <- search_type_in_df(x = x, type = "mo", info = interactive())
|
||||
stop_if(is.null(col_mo), "`col_mo` must be set")
|
||||
}
|
||||
# transform MOs
|
||||
x$`.mo` <- x[, col_mo, drop = TRUE]
|
||||
if (is.null(mo_transform)) {
|
||||
# leave as is
|
||||
} else if (mo_transform == "gramstain") {
|
||||
x$`.mo` <- mo_gramstain(x$`.mo`, language = language)
|
||||
} else if (mo_transform == "shortname") {
|
||||
x$`.mo` <- mo_shortname(x$`.mo`, language = language)
|
||||
} else if (mo_transform == "name") {
|
||||
x$`.mo` <- mo_name(x$`.mo`, language = language)
|
||||
} else {
|
||||
x$`.mo` <- mo_property(x$`.mo`, language = language)
|
||||
}
|
||||
x$`.mo`[is.na(x$`.mo`)] <- "(??)"
|
||||
|
||||
# get syndromic groups
|
||||
if (!is.null(syndromic_group)) {
|
||||
if (length(syndromic_group) == 1 && syndromic_group %in% colnames(x)) {
|
||||
x$`.syndromic_group` <- x[, syndromic_group, drop = TRUE]
|
||||
} else if (!is.null(syndromic_group)) {
|
||||
x$`.syndromic_group` <- syndromic_group
|
||||
}
|
||||
x$`.syndromic_group`[is.na(x$`.syndromic_group`) | x$`.syndromic_group` == ""] <- paste0("(", translate_AMR("unknown", language = language), ")")
|
||||
has_syndromic_group <- TRUE
|
||||
} else {
|
||||
has_syndromic_group <- FALSE
|
||||
}
|
||||
|
||||
# get antibiotics
|
||||
if (tryCatch(is.character(antibiotics), error = function(e) FALSE)) {
|
||||
antibiotics.bak <- antibiotics
|
||||
# split antibiotics on separator and make it a list
|
||||
antibiotics <- strsplit(gsub(" ", "", antibiotics), "+", fixed = TRUE)
|
||||
# get available antibiotics in data set
|
||||
df_ab <- get_column_abx(x, verbose = FALSE, info = FALSE)
|
||||
# get antibiotics from user
|
||||
user_ab <- suppressMessages(suppressWarnings(lapply(antibiotics, as.ab, flag_multiple_results = FALSE, info = FALSE)))
|
||||
non_existing <- character(0)
|
||||
user_ab <- lapply(user_ab, function(x) {
|
||||
out <- unname(df_ab[match(x, names(df_ab))])
|
||||
non_existing <<- c(non_existing, x[is.na(out) & !is.na(x)])
|
||||
# remove non-existing columns
|
||||
out[!is.na(out)]
|
||||
})
|
||||
user_ab <- user_ab[unlist(lapply(user_ab, length)) > 0]
|
||||
|
||||
if (length(non_existing) > 0) {
|
||||
warning_("The following antibiotics were not available and ignored: ", vector_and(ab_name(non_existing, language = NULL, tolower = TRUE), quotes = FALSE))
|
||||
}
|
||||
|
||||
# make list unique
|
||||
antibiotics <- unique(user_ab)
|
||||
# go through list to set AMR in combinations
|
||||
for (i in seq_len(length(antibiotics))) {
|
||||
abx <- antibiotics[[i]]
|
||||
for (ab in abx) {
|
||||
# make sure they are SIR columns
|
||||
x[, ab] <- as.sir(x[, ab, drop = TRUE])
|
||||
}
|
||||
new_colname <- paste0(trimws(abx), collapse = sep)
|
||||
if (length(abx) == 1) {
|
||||
next
|
||||
} else {
|
||||
# determine whether this new column should contain S, I, R, or NA
|
||||
if (isTRUE(combine_SI)) {
|
||||
S_values <- c("S", "I")
|
||||
} else {
|
||||
S_values <- "S"
|
||||
}
|
||||
other_values <- setdiff(c("S", "I", "R"), S_values)
|
||||
x_transposed <- as.list(as.data.frame(t(x[, abx, drop = FALSE]), stringsAsFactors = FALSE))
|
||||
if (isTRUE(only_all_tested)) {
|
||||
x[new_colname] <- as.sir(vapply(FUN.VALUE = character(1), x_transposed, function(x) ifelse(anyNA(x), NA_character_, ifelse(any(x %in% S_values), "S", "R")), USE.NAMES = FALSE))
|
||||
} else {
|
||||
x[new_colname] <- as.sir(vapply(
|
||||
FUN.VALUE = character(1), x_transposed, function(x) ifelse(any(x %in% S_values, na.rm = TRUE), "S", ifelse(anyNA(x), NA_character_, "R")),
|
||||
USE.NAMES = FALSE
|
||||
))
|
||||
}
|
||||
}
|
||||
antibiotics[[i]] <- new_colname
|
||||
}
|
||||
antibiotics <- unlist(antibiotics)
|
||||
} else {
|
||||
antibiotics <- colnames(suppressWarnings(x[, antibiotics, drop = FALSE]))
|
||||
}
|
||||
|
||||
if (isTRUE(has_syndromic_group)) {
|
||||
out <- x %pm>%
|
||||
pm_select(.syndromic_group, .mo, antibiotics) %pm>%
|
||||
pm_group_by(.syndromic_group)
|
||||
} else {
|
||||
out <- x %pm>%
|
||||
pm_select(.mo, antibiotics)
|
||||
}
|
||||
|
||||
# get numbers of S, I, R (per group)
|
||||
out <- out %pm>%
|
||||
bug_drug_combinations(
|
||||
col_mo = ".mo",
|
||||
FUN = function(x) x
|
||||
)
|
||||
counts <- out
|
||||
|
||||
if (isTRUE(combine_SI)) {
|
||||
out$numerator <- out$S + out$I
|
||||
} else {
|
||||
out$numerator <- out$S
|
||||
}
|
||||
if (any(out$total < minimum, na.rm = TRUE)) {
|
||||
if (isTRUE(info)) {
|
||||
message_("NOTE: ", sum(out$total < minimum, na.rm = TRUE), " combinations had less than `minimum = ", minimum, "` results and were ignored", add_fn = font_red)
|
||||
}
|
||||
out <- out %pm>%
|
||||
subset(total >= minimum)
|
||||
}
|
||||
|
||||
# regroup for summarising
|
||||
if (isTRUE(has_syndromic_group)) {
|
||||
colnames(out)[1] <- "syndromic_group"
|
||||
out <- out %pm>%
|
||||
pm_group_by(syndromic_group, mo, ab)
|
||||
} else {
|
||||
out <- out %pm>%
|
||||
pm_group_by(mo, ab)
|
||||
}
|
||||
out <- out %pm>%
|
||||
pm_summarise(SI = numerator / total)
|
||||
|
||||
# transform names of antibiotics
|
||||
ab_naming_function <- function(x, t, l, s) {
|
||||
x <- strsplit(x, s, fixed = TRUE)
|
||||
out <- character(length = length(x))
|
||||
for (i in seq_len(length(x))) {
|
||||
a <- x[[i]]
|
||||
if (is.null(t)) {
|
||||
# leave as is
|
||||
} else if (t == "atc") {
|
||||
a <- ab_atc(a, only_first = TRUE, language = l)
|
||||
} else {
|
||||
a <- ab_property(a, property = t, language = l)
|
||||
}
|
||||
if (length(a) > 1) {
|
||||
a <- paste0(trimws(a), collapse = sep)
|
||||
}
|
||||
out[i] <- a
|
||||
}
|
||||
out
|
||||
}
|
||||
out$ab <- ab_naming_function(out$ab, t = ab_transform, l = language, s = sep)
|
||||
|
||||
# transform long to wide
|
||||
long_to_wide <- function(object, digs) {
|
||||
object$SI <- round(object$SI * 100, digits = digs)
|
||||
object <- object %pm>%
|
||||
# an unclassed data.frame is required for stats::reshape()
|
||||
as.data.frame(stringsAsFactors = FALSE) %pm>%
|
||||
stats::reshape(direction = "wide", idvar = "mo", timevar = "ab", v.names = "SI")
|
||||
colnames(object) <- gsub("^SI?[.]", "", colnames(object))
|
||||
return(object)
|
||||
}
|
||||
|
||||
# ungroup for long -> wide transformation
|
||||
attr(out, "pm_groups") <- NULL
|
||||
attr(out, "groups") <- NULL
|
||||
class(out) <- class(out)[!class(out) %in% c("grouped_df", "grouped_data")]
|
||||
long <- out
|
||||
|
||||
if (isTRUE(has_syndromic_group)) {
|
||||
grps <- unique(out$syndromic_group)
|
||||
for (i in seq_len(length(grps))) {
|
||||
grp <- grps[i]
|
||||
if (i == 1) {
|
||||
new_df <- long_to_wide(out[which(out$syndromic_group == grp), , drop = FALSE], digs = digits)
|
||||
} else {
|
||||
new_df <- rbind_AMR(
|
||||
new_df,
|
||||
long_to_wide(out[which(out$syndromic_group == grp), , drop = FALSE], digs = digits)
|
||||
)
|
||||
}
|
||||
}
|
||||
# sort rows
|
||||
new_df <- new_df %pm>% pm_arrange(mo, syndromic_group)
|
||||
# sort columns
|
||||
new_df <- new_df[, c("syndromic_group", "mo", sort(colnames(new_df)[!colnames(new_df) %in% c("syndromic_group", "mo")])), drop = FALSE]
|
||||
colnames(new_df)[1:2] <- translate_AMR(c("Syndromic Group", "Pathogen"), language = language)
|
||||
} else {
|
||||
new_df <- long_to_wide(out, digs = digits)
|
||||
# sort rows
|
||||
new_df <- new_df %pm>% pm_arrange(mo)
|
||||
# sort columns
|
||||
new_df <- new_df[, c("mo", sort(colnames(new_df)[colnames(new_df) != "mo"])), drop = FALSE]
|
||||
colnames(new_df)[1] <- translate_AMR("Pathogen", language = language)
|
||||
}
|
||||
|
||||
# add total N if indicated
|
||||
if (isTRUE(add_total_n)) {
|
||||
if (isTRUE(has_syndromic_group)) {
|
||||
n_per_mo <- counts %pm>%
|
||||
pm_group_by(mo, .syndromic_group) %pm>%
|
||||
pm_summarise(paste0(min(total, na.rm = TRUE), "-", max(total, na.rm = TRUE)))
|
||||
colnames(n_per_mo) <- c("mo", "syn", "count")
|
||||
count_group <- n_per_mo$count[match(paste(new_df[[2]], new_df[[1]]), paste(n_per_mo$mo, n_per_mo$syn))]
|
||||
edit_col <- 2
|
||||
} else {
|
||||
n_per_mo <- counts %pm>%
|
||||
pm_group_by(mo) %pm>%
|
||||
pm_summarise(paste0(min(total, na.rm = TRUE), "-", max(total, na.rm = TRUE)))
|
||||
colnames(n_per_mo) <- c("mo", "count")
|
||||
count_group <- n_per_mo$count[match(new_df[[1]], n_per_mo$mo)]
|
||||
edit_col <- 1
|
||||
}
|
||||
if (NCOL(new_df) == edit_col + 1) {
|
||||
# only 1 antibiotic
|
||||
new_df[[edit_col]] <- paste0(new_df[[edit_col]], " (", unlist(lapply(strsplit(x = count_group, split = "-", fixed = TRUE), function(x) x[1])), ")")
|
||||
colnames(new_df)[edit_col] <- paste(colnames(new_df)[edit_col], "(N)")
|
||||
} else {
|
||||
# more than 1 antibiotic
|
||||
new_df[[edit_col]] <- paste0(new_df[[edit_col]], " (", count_group, ")")
|
||||
colnames(new_df)[edit_col] <- paste(colnames(new_df)[edit_col], "(N min-max)")
|
||||
}
|
||||
}
|
||||
|
||||
out <- as_original_data_class(new_df, class(x), extra_class = "antibiogram")
|
||||
rownames(out) <- NULL
|
||||
structure(out,
|
||||
has_syndromic_group = has_syndromic_group,
|
||||
long = long,
|
||||
combine_SI = combine_SI
|
||||
)
|
||||
}
|
||||
|
||||
#' @export
|
||||
#' @rdname antibiogram
|
||||
plot.antibiogram <- function(x, ...) {
|
||||
df <- attributes(x)$long
|
||||
if ("syndromic_group" %in% colnames(df)) {
|
||||
# barplot in base R does not support facets - paste columns together
|
||||
df$mo <- paste(df$mo, "-", df$syndromic_group)
|
||||
df$syndromic_group <- NULL
|
||||
df <- df[order(df$mo), , drop = FALSE]
|
||||
}
|
||||
mo_levels <- unique(df$mo)
|
||||
mfrow_old <- graphics::par()$mfrow
|
||||
sqrt_levels <- sqrt(length(mo_levels))
|
||||
graphics::par(mfrow = c(ceiling(sqrt_levels), floor(sqrt_levels)))
|
||||
for (i in seq_along(mo_levels)) {
|
||||
mo <- mo_levels[i]
|
||||
df_sub <- df[df$mo == mo, , drop = FALSE]
|
||||
|
||||
barplot(
|
||||
height = df_sub$SI * 100,
|
||||
xlab = NULL,
|
||||
ylab = ifelse(isTRUE(attributes(x)$combine_SI), "%SI", "%S"),
|
||||
names.arg = df_sub$ab,
|
||||
col = "#aaaaaa",
|
||||
beside = TRUE,
|
||||
main = mo,
|
||||
legend = NULL
|
||||
)
|
||||
}
|
||||
graphics::par(mfrow = mfrow_old)
|
||||
}
|
||||
|
||||
#' @export
|
||||
#' @noRd
|
||||
barplot.antibiogram <- function(height, ...) {
|
||||
plot(height, ...)
|
||||
}
|
||||
|
||||
#' @method autoplot antibiogram
|
||||
#' @rdname antibiogram
|
||||
# will be exported using s3_register() in R/zzz.R
|
||||
autoplot.antibiogram <- function(object, ...) {
|
||||
df <- attributes(object)$long
|
||||
ggplot2::ggplot(df) +
|
||||
ggplot2::geom_col(
|
||||
ggplot2::aes(
|
||||
x = ab,
|
||||
y = SI * 100,
|
||||
fill = if ("syndromic_group" %in% colnames(df)) {
|
||||
syndromic_group
|
||||
} else {
|
||||
NULL
|
||||
}
|
||||
),
|
||||
position = ggplot2::position_dodge2(preserve = "single")
|
||||
) +
|
||||
ggplot2::facet_wrap("mo") +
|
||||
ggplot2::labs(
|
||||
y = ifelse(isTRUE(attributes(object)$combine_SI), "%SI", "%S"),
|
||||
x = NULL,
|
||||
fill = if ("syndromic_group" %in% colnames(df)) {
|
||||
colnames(object)[1]
|
||||
} else {
|
||||
NULL
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
# will be exported in zzz.R
|
||||
#' @method knit_print antibiogram
|
||||
#' @param italicise a [logical] to indicate whether the microorganism names in the [knitr][knitr::kable()] table should be made italic, using [italicise_taxonomy()].
|
||||
#' @param na character to use for showing `NA` values
|
||||
#' @rdname antibiogram
|
||||
knit_print.antibiogram <- function(x, italicise = TRUE, na = getOption("knitr.kable.NA", default = ""), ...) {
|
||||
stop_ifnot_installed("knitr")
|
||||
meet_criteria(italicise, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(na, allow_class = "character", has_length = 1, allow_NA = TRUE)
|
||||
|
||||
if (isTRUE(italicise)) {
|
||||
# make all microorganism names italic, according to nomenclature
|
||||
names_col <- ifelse(isTRUE(attributes(x)$has_syndromic_group), 2, 1)
|
||||
x[[names_col]] <- italicise_taxonomy(x[[names_col]], type = "markdown")
|
||||
}
|
||||
|
||||
old_option <- getOption("knitr.kable.NA")
|
||||
options(knitr.kable.NA = na)
|
||||
on.exit(options(knitr.kable.NA = old_option))
|
||||
|
||||
out <- paste(c("", "", knitr::kable(x, ..., output = FALSE)), collapse = "\n")
|
||||
knitr::asis_output(out)
|
||||
}
|
||||
@@ -32,7 +32,7 @@
|
||||
#' Use this function to determine the antiviral drug code of one or more antiviral drugs. The data set [antivirals] will be searched for abbreviations, official names and synonyms (brand names).
|
||||
#' @param x a [character] vector to determine to antiviral drug ID
|
||||
#' @param flag_multiple_results a [logical] to indicate whether a note should be printed to the console that probably more than one antiviral drug code or name can be retrieved from a single input value.
|
||||
#' @param info a [logical] to indicate whether a progress bar should be printed, defaults to `TRUE` only in interactive mode
|
||||
#' @param info a [logical] to indicate whether a progress bar should be printed - the default is `TRUE` only in interactive mode
|
||||
#' @param ... arguments passed on to internal functions
|
||||
#' @rdname as.av
|
||||
#' @inheritSection WHOCC WHOCC
|
||||
@@ -308,22 +308,23 @@ as.av <- function(x, flag_multiple_results = TRUE, info = interactive(), ...) {
|
||||
}
|
||||
|
||||
# transform back from other languages and try again
|
||||
x_translated <- paste(lapply(
|
||||
strsplit(x[i], "[^A-Z0-9]"),
|
||||
function(y) {
|
||||
for (i in seq_len(length(y))) {
|
||||
for (lang in LANGUAGES_SUPPORTED[LANGUAGES_SUPPORTED != "en"]) {
|
||||
y[i] <- ifelse(tolower(y[i]) %in% tolower(TRANSLATIONS[, lang, drop = TRUE]),
|
||||
TRANSLATIONS[which(tolower(TRANSLATIONS[, lang, drop = TRUE]) == tolower(y[i]) &
|
||||
!isFALSE(TRANSLATIONS$fixed)), "pattern"],
|
||||
y[i]
|
||||
)
|
||||
x_translated <- paste(
|
||||
lapply(
|
||||
strsplit(x[i], "[^A-Z0-9]"),
|
||||
function(y) {
|
||||
for (i in seq_len(length(y))) {
|
||||
for (lang in LANGUAGES_SUPPORTED[LANGUAGES_SUPPORTED != "en"]) {
|
||||
y[i] <- ifelse(tolower(y[i]) %in% tolower(TRANSLATIONS[, lang, drop = TRUE]),
|
||||
TRANSLATIONS[which(tolower(TRANSLATIONS[, lang, drop = TRUE]) == tolower(y[i]) &
|
||||
!isFALSE(TRANSLATIONS$fixed)), "pattern"],
|
||||
y[i]
|
||||
)
|
||||
}
|
||||
}
|
||||
generalise_antibiotic_name(y)
|
||||
}
|
||||
generalise_antibiotic_name(y)
|
||||
}
|
||||
)[[1]],
|
||||
collapse = "/"
|
||||
)[[1]],
|
||||
collapse = "/"
|
||||
)
|
||||
x_translated_guess <- suppressWarnings(as.av(x_translated, initial_search = FALSE))
|
||||
if (!is.na(x_translated_guess)) {
|
||||
@@ -332,20 +333,21 @@ as.av <- function(x, flag_multiple_results = TRUE, info = interactive(), ...) {
|
||||
}
|
||||
|
||||
# now also try to coerce brandname combinations like "Amoxy/clavulanic acid"
|
||||
x_translated <- paste(lapply(
|
||||
strsplit(x_translated, "[^A-Z0-9 ]"),
|
||||
function(y) {
|
||||
for (i in seq_len(length(y))) {
|
||||
y_name <- suppressWarnings(av_name(y[i], language = NULL, initial_search = FALSE))
|
||||
y[i] <- ifelse(!is.na(y_name),
|
||||
y_name,
|
||||
y[i]
|
||||
)
|
||||
x_translated <- paste(
|
||||
lapply(
|
||||
strsplit(x_translated, "[^A-Z0-9 ]"),
|
||||
function(y) {
|
||||
for (i in seq_len(length(y))) {
|
||||
y_name <- suppressWarnings(av_name(y[i], language = NULL, initial_search = FALSE))
|
||||
y[i] <- ifelse(!is.na(y_name),
|
||||
y_name,
|
||||
y[i]
|
||||
)
|
||||
}
|
||||
generalise_antibiotic_name(y)
|
||||
}
|
||||
generalise_antibiotic_name(y)
|
||||
}
|
||||
)[[1]],
|
||||
collapse = "/"
|
||||
)[[1]],
|
||||
collapse = "/"
|
||||
)
|
||||
x_translated_guess <- suppressWarnings(as.av(x_translated, initial_search = FALSE))
|
||||
if (!is.na(x_translated_guess)) {
|
||||
@@ -459,14 +461,14 @@ as.av <- function(x, flag_multiple_results = TRUE, info = interactive(), ...) {
|
||||
# save to package env to save time for next time
|
||||
if (isTRUE(initial_search)) {
|
||||
AMR_env$av_previously_coerced <- AMR_env$av_previously_coerced[which(!AMR_env$av_previously_coerced$x %in% x), , drop = FALSE]
|
||||
AMR_env$av_previously_coerced <- unique(rbind(AMR_env$av_previously_coerced,
|
||||
AMR_env$av_previously_coerced <- unique(rbind_AMR(
|
||||
AMR_env$av_previously_coerced,
|
||||
data.frame(
|
||||
x = x,
|
||||
av = x_new,
|
||||
x_bak = x_bak[match(x, x_bak_clean)],
|
||||
stringsAsFactors = FALSE
|
||||
),
|
||||
stringsAsFactors = FALSE
|
||||
)
|
||||
))
|
||||
}
|
||||
|
||||
@@ -478,8 +480,10 @@ as.av <- function(x, flag_multiple_results = TRUE, info = interactive(), ...) {
|
||||
)
|
||||
}
|
||||
x_unknown <- x_unknown[!x_unknown %in% x_unknown_ATCs]
|
||||
x_unknown <- c(x_unknown,
|
||||
AMR_env$av_previously_coerced$x_bak[which(AMR_env$av_previously_coerced$x %in% x & is.na(AMR_env$av_previously_coerced$av))])
|
||||
x_unknown <- c(
|
||||
x_unknown,
|
||||
AMR_env$av_previously_coerced$x_bak[which(AMR_env$av_previously_coerced$x %in% x & is.na(AMR_env$av_previously_coerced$av))]
|
||||
)
|
||||
if (length(x_unknown) > 0 && fast_mode == FALSE) {
|
||||
warning_(
|
||||
"in `as.av()`: these values could not be coerced to a valid antiviral drug ID: ",
|
||||
@@ -604,9 +608,9 @@ get_translate_av <- function(translate_av) {
|
||||
} else {
|
||||
translate_av <- tolower(translate_av)
|
||||
stop_ifnot(translate_av %in% colnames(AMR::antivirals),
|
||||
"invalid value for 'translate_av', this must be a column name of the antivirals data set\n",
|
||||
"or TRUE (equals 'name') or FALSE to not translate at all.",
|
||||
call = FALSE
|
||||
"invalid value for 'translate_av', this must be a column name of the antivirals data set\n",
|
||||
"or TRUE (equals 'name') or FALSE to not translate at all.",
|
||||
call = FALSE
|
||||
)
|
||||
translate_av
|
||||
}
|
||||
|
||||
+13
-13
@@ -33,9 +33,9 @@
|
||||
#' @param text text to analyse
|
||||
#' @param type type of property to search for, either `"drug"`, `"dose"` or `"administration"`, see *Examples*
|
||||
#' @param collapse a [character] to pass on to `paste(, collapse = ...)` to only return one [character] per element of `text`, see *Examples*
|
||||
#' @param translate_av if `type = "drug"`: a column name of the [antivirals] data set to translate the antibiotic abbreviations to, using [av_property()]. Defaults to `FALSE`. Using `TRUE` is equal to using "name".
|
||||
#' @param translate_av if `type = "drug"`: a column name of the [antivirals] data set to translate the antibiotic abbreviations to, using [av_property()]. The default is `FALSE`. Using `TRUE` is equal to using "name".
|
||||
#' @param thorough_search a [logical] to indicate whether the input must be extensively searched for misspelling and other faulty input values. Setting this to `TRUE` will take considerably more time than when using `FALSE`. At default, it will turn `TRUE` when all input elements contain a maximum of three words.
|
||||
#' @param info a [logical] to indicate whether a progress bar should be printed, defaults to `TRUE` only in interactive mode
|
||||
#' @param info a [logical] to indicate whether a progress bar should be printed - the default is `TRUE` only in interactive mode
|
||||
#' @param ... arguments passed on to [as.av()]
|
||||
#' @details This function is also internally used by [as.av()], although it then only searches for the first drug name and will throw a note if more drug names could have been returned. Note: the [as.av()] function may use very long regular expression to match brand names of antiviral drugs. This may fail on some systems.
|
||||
#'
|
||||
@@ -69,26 +69,26 @@ av_from_text <- function(text,
|
||||
if (missing(type)) {
|
||||
type <- type[1L]
|
||||
}
|
||||
|
||||
|
||||
meet_criteria(text)
|
||||
meet_criteria(type, allow_class = "character", has_length = 1)
|
||||
meet_criteria(collapse, has_length = 1, allow_NULL = TRUE)
|
||||
meet_criteria(translate_av, allow_NULL = FALSE) # get_translate_av() will be more informative about what's allowed
|
||||
meet_criteria(thorough_search, allow_class = "logical", has_length = 1, allow_NULL = TRUE)
|
||||
meet_criteria(info, allow_class = "logical", has_length = 1)
|
||||
|
||||
|
||||
type <- tolower(trimws2(type))
|
||||
|
||||
|
||||
text <- tolower(as.character(text))
|
||||
text_split_all <- strsplit(text, "[ ;.,:\\|]")
|
||||
progress <- progress_ticker(n = length(text_split_all), n_min = 5, print = info)
|
||||
on.exit(close(progress))
|
||||
|
||||
|
||||
if (type %like% "(drug|ab|anti)") {
|
||||
translate_av <- get_translate_av(translate_av)
|
||||
|
||||
|
||||
if (isTRUE(thorough_search) ||
|
||||
(isTRUE(is.null(thorough_search)) && max(vapply(FUN.VALUE = double(1), text_split_all, length), na.rm = TRUE) <= 3)) {
|
||||
(isTRUE(is.null(thorough_search)) && max(vapply(FUN.VALUE = double(1), text_split_all, length), na.rm = TRUE) <= 3)) {
|
||||
text_split_all <- text_split_all[nchar(text_split_all) >= 4 & grepl("[a-z]+", text_split_all)]
|
||||
result <- lapply(text_split_all, function(text_split) {
|
||||
progress$tick()
|
||||
@@ -125,9 +125,9 @@ av_from_text <- function(text,
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
close(progress)
|
||||
|
||||
|
||||
result <- lapply(result, function(out) {
|
||||
out <- out[!is.na(out)]
|
||||
if (length(out) == 0) {
|
||||
@@ -149,7 +149,7 @@ av_from_text <- function(text,
|
||||
text_split <- as.double(gsub("[^0-9.]", "", text_split))
|
||||
# minimal 100 units/mg and no years that unlikely doses
|
||||
text_split <- text_split[text_split >= 100 & !text_split %in% c(1951:1999, 2001:2049)]
|
||||
|
||||
|
||||
if (length(text_split) > 0) {
|
||||
text_split
|
||||
} else {
|
||||
@@ -170,7 +170,7 @@ av_from_text <- function(text,
|
||||
} else {
|
||||
stop_("`type` must be either 'drug', 'dose' or 'administration'")
|
||||
}
|
||||
|
||||
|
||||
# collapse text if needed
|
||||
if (!is.null(collapse)) {
|
||||
result <- vapply(FUN.VALUE = character(1), result, function(x) {
|
||||
@@ -181,6 +181,6 @@ av_from_text <- function(text,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
result
|
||||
}
|
||||
|
||||
+14
-14
@@ -33,7 +33,7 @@
|
||||
#' @param x any (vector of) text that can be coerced to a valid antiviral drug code with [as.av()]
|
||||
#' @param tolower a [logical] to indicate whether the first [character] of every output should be transformed to a lower case [character].
|
||||
#' @param property one of the column names of one of the [antivirals] data set: `vector_or(colnames(antivirals), sort = FALSE)`.
|
||||
#' @param language language of the returned text, defaults to system language (see [get_AMR_locale()]) and can also be set with `getOption("AMR_locale")`. Use `language = NULL` or `language = ""` to prevent translation.
|
||||
#' @param language language of the returned text - the default is system language (see [get_AMR_locale()]) and can also be set with the [package option][AMR-options] [`AMR_locale`][AMR-options]. Use `language = NULL` or `language = ""` to prevent translation.
|
||||
#' @param administration way of administration, either `"oral"` or `"iv"`
|
||||
#' @param open browse the URL using [utils::browseURL()]
|
||||
#' @param ... other arguments passed on to [as.av()]
|
||||
@@ -84,7 +84,7 @@ av_name <- function(x, language = get_AMR_locale(), tolower = FALSE, ...) {
|
||||
meet_criteria(x, allow_NA = TRUE)
|
||||
language <- validate_language(language)
|
||||
meet_criteria(tolower, allow_class = "logical", has_length = 1)
|
||||
|
||||
|
||||
x <- translate_into_language(av_validate(x = x, property = "name", ...), language = language, only_affect_ab_names = TRUE)
|
||||
if (tolower == TRUE) {
|
||||
# use perl to only transform the first character
|
||||
@@ -155,11 +155,11 @@ av_loinc <- function(x, ...) {
|
||||
av_ddd <- function(x, administration = "oral", ...) {
|
||||
meet_criteria(x, allow_NA = TRUE)
|
||||
meet_criteria(administration, is_in = c("oral", "iv"), has_length = 1)
|
||||
|
||||
|
||||
x <- as.av(x, ...)
|
||||
ddd_prop <- paste0(administration, "_ddd")
|
||||
out <- av_validate(x = x, property = ddd_prop)
|
||||
|
||||
|
||||
if (any(av_name(x, language = NULL) %like% "/" & is.na(out))) {
|
||||
warning_(
|
||||
"in `av_ddd()`: DDDs of some combined products are available for different dose combinations and not (yet) part of the AMR package.",
|
||||
@@ -175,11 +175,11 @@ av_ddd <- function(x, administration = "oral", ...) {
|
||||
av_ddd_units <- function(x, administration = "oral", ...) {
|
||||
meet_criteria(x, allow_NA = TRUE)
|
||||
meet_criteria(administration, is_in = c("oral", "iv"), has_length = 1)
|
||||
|
||||
|
||||
x <- as.av(x, ...)
|
||||
ddd_prop <- paste0(administration, "_units")
|
||||
out <- av_validate(x = x, property = ddd_prop)
|
||||
|
||||
|
||||
if (any(av_name(x, language = NULL) %like% "/" & is.na(out))) {
|
||||
warning_(
|
||||
"in `av_ddd_units()`: DDDs of some combined products are available for different dose combinations and not (yet) part of the AMR package.",
|
||||
@@ -195,7 +195,7 @@ av_ddd_units <- function(x, administration = "oral", ...) {
|
||||
av_info <- function(x, language = get_AMR_locale(), ...) {
|
||||
meet_criteria(x, allow_NA = TRUE)
|
||||
language <- validate_language(language)
|
||||
|
||||
|
||||
x <- as.av(x, ...)
|
||||
list(
|
||||
av = as.character(x),
|
||||
@@ -224,18 +224,18 @@ av_info <- function(x, language = get_AMR_locale(), ...) {
|
||||
av_url <- function(x, open = FALSE, ...) {
|
||||
meet_criteria(x, allow_NA = TRUE)
|
||||
meet_criteria(open, allow_class = "logical", has_length = 1)
|
||||
|
||||
|
||||
av <- as.av(x = x, ...)
|
||||
atcs <- av_atc(av, only_first = TRUE)
|
||||
u <- paste0("https://www.whocc.no/atc_ddd_index/?code=", atcs, "&showdescription=no")
|
||||
u[is.na(atcs)] <- NA_character_
|
||||
names(u) <- av_name(av)
|
||||
|
||||
|
||||
NAs <- av_name(av, tolower = TRUE, language = NULL)[!is.na(av) & is.na(atcs)]
|
||||
if (length(NAs) > 0) {
|
||||
warning_("in `av_url()`: no ATC code available for ", vector_and(NAs, quotes = FALSE), ".")
|
||||
}
|
||||
|
||||
|
||||
if (open == TRUE) {
|
||||
if (length(u) > 1 && !is.na(u[1L])) {
|
||||
warning_("in `av_url()`: only the first URL will be opened, as `browseURL()` only suports one string.")
|
||||
@@ -252,7 +252,7 @@ av_url <- function(x, open = FALSE, ...) {
|
||||
av_property <- function(x, property = "name", language = get_AMR_locale(), ...) {
|
||||
meet_criteria(x, allow_NA = TRUE)
|
||||
meet_criteria(property, is_in = colnames(AMR::antivirals), has_length = 1)
|
||||
meet_criteria(language, is_in = c(LANGUAGES_SUPPORTED, ""), has_length = 1, allow_NULL = TRUE, allow_NA = TRUE)
|
||||
language <- validate_language(language)
|
||||
translate_into_language(av_validate(x = x, property = property, ...), language = language)
|
||||
}
|
||||
|
||||
@@ -264,9 +264,9 @@ av_validate <- function(x, property, ...) {
|
||||
# try to catch an error when inputting an invalid argument
|
||||
# so the 'call.' can be set to FALSE
|
||||
tryCatch(x[1L] %in% AMR_env$AV_lookup[1, property, drop = TRUE],
|
||||
error = function(e) stop(e$message, call. = FALSE)
|
||||
error = function(e) stop(e$message, call. = FALSE)
|
||||
)
|
||||
|
||||
|
||||
if (!all(x %in% AMR_env$AV_lookup[, property, drop = TRUE])) {
|
||||
x <- as.av(x, ...)
|
||||
if (all(is.na(x)) && is.list(AMR_env$AV_lookup[, property, drop = TRUE])) {
|
||||
@@ -276,7 +276,7 @@ av_validate <- function(x, property, ...) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (property == "av") {
|
||||
return(set_clean_class(x, new_class = c("av", "character")))
|
||||
} else if (property == "cid") {
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@
|
||||
#'
|
||||
#' Easy check for data availability of all columns in a data set. This makes it easy to get an idea of which antimicrobial combinations can be used for calculation with e.g. [susceptibility()] and [resistance()].
|
||||
#' @param tbl a [data.frame] or [list]
|
||||
#' @param width number of characters to present the visual availability, defaults to filling the width of the console
|
||||
#' @param width number of characters to present the visual availability - the default is filling the width of the console
|
||||
#' @details The function returns a [data.frame] with columns `"resistant"` and `"visual_resistance"`. The values in that columns are calculated with [resistance()].
|
||||
#' @return [data.frame] with column names of `tbl` as row names
|
||||
#' @export
|
||||
|
||||
+24
-11
@@ -31,19 +31,23 @@
|
||||
#'
|
||||
#' Determine antimicrobial resistance (AMR) of all bug-drug combinations in your data set where at least 30 (default) isolates are available per species. Use [format()] on the result to prettify it to a publishable/printable format, see *Examples*.
|
||||
#' @inheritParams eucast_rules
|
||||
#' @param combine_SI a [logical] to indicate whether values S and I should be summed, so resistance will be based on only R, defaults to `TRUE`
|
||||
#' @param combine_SI a [logical] to indicate whether values S and I should be summed, so resistance will be based on only R - the default is `TRUE`
|
||||
#' @param add_ab_group a [logical] to indicate where the group of the antimicrobials must be included as a first column
|
||||
#' @param remove_intrinsic_resistant [logical] to indicate that rows and columns with 100% resistance for all tested antimicrobials must be removed from the table
|
||||
#' @param FUN the function to call on the `mo` column to transform the microorganism codes, defaults to [mo_shortname()]
|
||||
#' @param FUN the function to call on the `mo` column to transform the microorganism codes - the default is [mo_shortname()]
|
||||
#' @param translate_ab a [character] of length 1 containing column names of the [antibiotics] data set
|
||||
#' @param ... arguments passed on to `FUN`
|
||||
#' @inheritParams sir_df
|
||||
#' @inheritParams base::formatC
|
||||
#' @details The function [format()] calculates the resistance per bug-drug combination. Use `combine_SI = TRUE` (default) to test R vs. S+I and `combine_SI = FALSE` to test R+I vs. S.
|
||||
#' @details The function [format()] calculates the resistance per bug-drug combination and returns a table ready for reporting/publishing. Use `combine_SI = TRUE` (default) to test R vs. S+I and `combine_SI = FALSE` to test R+I vs. S. This table can also directly be used in R Markdown / Quarto without the need for e.g. [knitr::kable()].
|
||||
#' @export
|
||||
#' @rdname bug_drug_combinations
|
||||
#' @return The function [bug_drug_combinations()] returns a [data.frame] with columns "mo", "ab", "S", "I", "R" and "total".
|
||||
#' @examples
|
||||
#' # example_isolates is a data set available in the AMR package.
|
||||
#' # run ?example_isolates for more info.
|
||||
#' example_isolates
|
||||
#'
|
||||
#' \donttest{
|
||||
#' x <- bug_drug_combinations(example_isolates)
|
||||
#' head(x)
|
||||
@@ -67,7 +71,7 @@ bug_drug_combinations <- function(x,
|
||||
col_mo = NULL,
|
||||
FUN = mo_shortname,
|
||||
...) {
|
||||
meet_criteria(x, allow_class = "data.frame", contains_column_class = "sir")
|
||||
meet_criteria(x, allow_class = "data.frame", contains_column_class = c("sir", "rsi"))
|
||||
meet_criteria(col_mo, allow_class = "character", is_in = colnames(x), has_length = 1, allow_NULL = TRUE)
|
||||
meet_criteria(FUN, allow_class = "function", has_length = 1)
|
||||
|
||||
@@ -89,7 +93,7 @@ bug_drug_combinations <- function(x,
|
||||
# select only groups and antibiotics
|
||||
if (is_null_or_grouped_tbl(x.bak)) {
|
||||
data_has_groups <- TRUE
|
||||
groups <- setdiff(names(attributes(x.bak)$groups), ".rows")
|
||||
groups <- get_group_names(x.bak)
|
||||
x <- x[, c(groups, col_mo, colnames(x)[vapply(FUN.VALUE = logical(1), x, is.sir)]), drop = FALSE]
|
||||
} else {
|
||||
data_has_groups <- FALSE
|
||||
@@ -120,7 +124,7 @@ bug_drug_combinations <- function(x,
|
||||
m <- as.matrix(table(x))
|
||||
data.frame(S = m["S", ], I = m["I", ], R = m["R", ], stringsAsFactors = FALSE)
|
||||
})
|
||||
merged <- do.call(rbind, pivot)
|
||||
merged <- do.call(rbind_AMR, pivot)
|
||||
out_group <- data.frame(
|
||||
mo = rep(unique_mo[i], NROW(merged)),
|
||||
ab = rownames(merged),
|
||||
@@ -140,14 +144,14 @@ bug_drug_combinations <- function(x,
|
||||
}
|
||||
out_group <- cbind(group_values, out_group)
|
||||
}
|
||||
out <- rbind(out, out_group, stringsAsFactors = FALSE)
|
||||
out <- rbind_AMR(out, out_group)
|
||||
}
|
||||
out
|
||||
}
|
||||
# based on pm_apply_grouped_function
|
||||
apply_group <- function(.data, fn, groups, drop = FALSE, ...) {
|
||||
grouped <- pm_split_into_groups(.data, groups, drop)
|
||||
res <- do.call(rbind, unname(lapply(grouped, fn, ...)))
|
||||
res <- do.call(rbind_AMR, unname(lapply(grouped, fn, ...)))
|
||||
if (any(groups %in% colnames(res))) {
|
||||
class(res) <- c("grouped_data", class(res))
|
||||
res <- pm_set_groups(res, groups[groups %in% colnames(res)])
|
||||
@@ -160,8 +164,9 @@ bug_drug_combinations <- function(x,
|
||||
} else {
|
||||
out <- run_it(x)
|
||||
}
|
||||
rownames(out) <- NULL
|
||||
out <- out %pm>% pm_arrange(mo, ab)
|
||||
out <- as_original_data_class(out, class(x.bak)) # will remove tibble groups
|
||||
rownames(out) <- NULL
|
||||
structure(out, class = c("bug_drug_combinations", ifelse(data_has_groups, "grouped", character(0)), class(out)))
|
||||
}
|
||||
|
||||
@@ -181,7 +186,7 @@ format.bug_drug_combinations <- function(x,
|
||||
meet_criteria(x, allow_class = "data.frame")
|
||||
meet_criteria(translate_ab, allow_class = c("character", "logical"), has_length = 1, allow_NA = TRUE)
|
||||
language <- validate_language(language)
|
||||
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_positive = TRUE, is_finite = TRUE)
|
||||
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_positive_or_zero = TRUE, is_finite = TRUE)
|
||||
meet_criteria(combine_SI, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(add_ab_group, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(remove_intrinsic_resistant, allow_class = "logical", has_length = 1)
|
||||
@@ -322,7 +327,15 @@ format.bug_drug_combinations <- function(x,
|
||||
}
|
||||
|
||||
rownames(y) <- NULL
|
||||
as_original_data_class(y, class(x.bak)) # will remove tibble groups
|
||||
as_original_data_class(y, class(x.bak), extra_class = "formatted_bug_drug_combinations") # will remove tibble groups
|
||||
}
|
||||
|
||||
# will be exported in zzz.R
|
||||
knit_print.formatted_bug_drug_combinations <- function(x, ...) {
|
||||
stop_ifnot_installed("knitr")
|
||||
# make columns with MO names italic according to nomenclature
|
||||
colnames(x)[3:NCOL(x)] <- italicise_taxonomy(colnames(x)[3:NCOL(x)], type = "markdown")
|
||||
knitr::asis_output(paste("", "", knitr::kable(x, ...), collapse = "\n"))
|
||||
}
|
||||
|
||||
#' @method print bug_drug_combinations
|
||||
|
||||
+18
-19
@@ -31,33 +31,32 @@
|
||||
#'
|
||||
#' With [add_custom_antimicrobials()] you can add your own custom antimicrobial drug names and codes.
|
||||
#' @param x a [data.frame] resembling the [antibiotics] data set, at least containing columns "ab" and "name"
|
||||
#' @details **Important:** Due to how \R works, the [add_custom_antimicrobials()] function has to be run in every \R session - added antimicrobials are not stored between sessions and are thus lost when \R is exited.
|
||||
#'
|
||||
#' There are two ways to automate this process:
|
||||
#'
|
||||
#' **Method 1:** Save the antimicrobials to a local or remote file (can even be the internet). To use this method:
|
||||
#'
|
||||
#' @details **Important:** Due to how \R works, the [add_custom_antimicrobials()] function has to be run in every \R session - added antimicrobials are not stored between sessions and are thus lost when \R is exited.
|
||||
#'
|
||||
#' There are two ways to circumvent this and automate the process of adding antimicrobials:
|
||||
#'
|
||||
#' **Method 1:** Using the [package option][AMR-options] [`AMR_custom_ab`][AMR-options], which is the preferred method. To use this method:
|
||||
#'
|
||||
#' 1. Create a data set in the structure of the [antibiotics] data set (containing at the very least columns "ab" and "name") and save it with [saveRDS()] to a location of choice, e.g. `"~/my_custom_ab.rds"`, or any remote location.
|
||||
#'
|
||||
#' 2. Set the file location to the `AMR_custom_ab` \R option: `options(AMR_custom_ab = "~/my_custom_ab.rds")`. This can even be a remote file location, such as an https URL. Since options are not saved between \R sessions, it is best to save this option to the `.Rprofile` file so that it will loaded on start-up of \R. To do this, open the `.Rprofile` file using e.g. `utils::file.edit("~/.Rprofile")`, add this text and save the file:
|
||||
#'
|
||||
#' 2. Set the file location to the [package option][AMR-options] [`AMR_custom_ab`][AMR-options]: `options(AMR_custom_ab = "~/my_custom_ab.rds")`. This can even be a remote file location, such as an https URL. Since options are not saved between \R sessions, it is best to save this option to the `.Rprofile` file so that it will be loaded on start-up of \R. To do this, open the `.Rprofile` file using e.g. `utils::file.edit("~/.Rprofile")`, add this text and save the file:
|
||||
#'
|
||||
#' ```r
|
||||
#' # Add custom antibiotic drug codes:
|
||||
#' # Add custom antimicrobial codes:
|
||||
#' options(AMR_custom_ab = "~/my_custom_ab.rds")
|
||||
#' ```
|
||||
#'
|
||||
#'
|
||||
#' Upon package load, this file will be loaded and run through the [add_custom_antimicrobials()] function.
|
||||
#'
|
||||
#' **Method 2:** Save the antimicrobial additions directly to your `.Rprofile` file. An important downside is that this requires to load the `AMR` package at every start-up. To use this method:
|
||||
#'
|
||||
#'
|
||||
#' **Method 2:** Loading the antimicrobial additions directly from your `.Rprofile` file. Note that the definitions will be stored in a user-specific \R file, which is a suboptimal workflow. To use this method:
|
||||
#'
|
||||
#' 1. Edit the `.Rprofile` file using e.g. `utils::file.edit("~/.Rprofile")`.
|
||||
#'
|
||||
#' 2. Add a text like below and save the file:
|
||||
#'
|
||||
#' ```r
|
||||
#' # Add custom antibiotic drug codes:
|
||||
#' library(AMR)
|
||||
#' add_custom_antimicrobials(
|
||||
#' AMR::add_custom_antimicrobials(
|
||||
#' data.frame(ab = "TESTAB",
|
||||
#' name = "Test Antibiotic",
|
||||
#' group = "Test Group")
|
||||
@@ -139,10 +138,10 @@ add_custom_antimicrobials <- function(x) {
|
||||
x[, col] <- as.list(x[, col, drop = TRUE])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
AMR_env$custom_ab_codes <- c(AMR_env$custom_ab_codes, x$ab)
|
||||
class(AMR_env$AB_lookup$ab) <- "character"
|
||||
|
||||
|
||||
new_df <- AMR_env$AB_lookup[0, , drop = FALSE][seq_len(NROW(x)), , drop = FALSE]
|
||||
rownames(new_df) <- NULL
|
||||
list_cols <- vapply(FUN.VALUE = logical(1), new_df, is.list)
|
||||
@@ -154,8 +153,8 @@ add_custom_antimicrobials <- function(x) {
|
||||
# assign new values
|
||||
new_df[, col] <- x[, col, drop = TRUE]
|
||||
}
|
||||
AMR_env$AB_lookup <- unique(rbind(AMR_env$AB_lookup, new_df))
|
||||
|
||||
AMR_env$AB_lookup <- unique(rbind_AMR(AMR_env$AB_lookup, new_df))
|
||||
|
||||
AMR_env$ab_previously_coerced <- AMR_env$ab_previously_coerced[which(!AMR_env$ab_previously_coerced$ab %in% x$ab), , drop = FALSE]
|
||||
class(AMR_env$AB_lookup$ab) <- c("ab", "character")
|
||||
message_("Added ", nr2char(nrow(x)), " record", ifelse(nrow(x) > 1, "s", ""), " to the internal `antibiotics` data set.")
|
||||
|
||||
@@ -240,11 +240,12 @@ print.custom_eucast_rules <- function(x, ...) {
|
||||
" (", rule$result_group, ")"
|
||||
)
|
||||
agents <- sort(agents)
|
||||
rule_if <- word_wrap(paste0(
|
||||
i, ". ", font_bold("If "), font_blue(rule$query), font_bold(" then "),
|
||||
"set to {result}:"
|
||||
),
|
||||
extra_indent = 5
|
||||
rule_if <- word_wrap(
|
||||
paste0(
|
||||
i, ". ", font_bold("If "), font_blue(rule$query), font_bold(" then "),
|
||||
"set to {result}:"
|
||||
),
|
||||
extra_indent = 5
|
||||
)
|
||||
rule_if <- gsub("{result}", val, rule_if, fixed = TRUE)
|
||||
rule_then <- paste0(" ", word_wrap(paste0(agents, collapse = ", "), extra_indent = 5))
|
||||
|
||||
+84
-60
@@ -32,26 +32,26 @@
|
||||
#' With [add_custom_microorganisms()] you can add your own custom microorganisms, such the non-taxonomic outcome of laboratory analysis.
|
||||
#' @param x a [data.frame] resembling the [microorganisms] data set, at least containing column "genus" (case-insensitive)
|
||||
#' @details This function will fill in missing taxonomy for you, if specific taxonomic columns are missing, see *Examples*.
|
||||
#'
|
||||
#' **Important:** Due to how \R works, the [add_custom_microorganisms()] function has to be run in every \R session - added microorganisms are not stored between sessions and are thus lost when \R is exited.
|
||||
#'
|
||||
#' There are two ways to automate this process:
|
||||
#'
|
||||
#' **Method 1:** Using the option [`AMR_custom_mo`][AMR-options], which is the preferred method. To use this method:
|
||||
#'
|
||||
#'
|
||||
#' **Important:** Due to how \R works, the [add_custom_microorganisms()] function has to be run in every \R session - added microorganisms are not stored between sessions and are thus lost when \R is exited.
|
||||
#'
|
||||
#' There are two ways to circumvent this and automate the process of adding microorganisms:
|
||||
#'
|
||||
#' **Method 1:** Using the [package option][AMR-options] [`AMR_custom_mo`][AMR-options], which is the preferred method. To use this method:
|
||||
#'
|
||||
#' 1. Create a data set in the structure of the [microorganisms] data set (containing at the very least column "genus") and save it with [saveRDS()] to a location of choice, e.g. `"~/my_custom_mo.rds"`, or any remote location.
|
||||
#'
|
||||
#' 2. Set the file location to the `AMR_custom_mo` \R option: `options(AMR_custom_mo = "~/my_custom_mo.rds")`. This can even be a remote file location, such as an https URL. Since options are not saved between \R sessions, it is best to save this option to the `.Rprofile` file so that it will be loaded on start-up of \R. To do this, open the `.Rprofile` file using e.g. `utils::file.edit("~/.Rprofile")`, add this text and save the file:
|
||||
#'
|
||||
#' 2. Set the file location to the [package option][AMR-options] [`AMR_custom_mo`][AMR-options]: `options(AMR_custom_mo = "~/my_custom_mo.rds")`. This can even be a remote file location, such as an https URL. Since options are not saved between \R sessions, it is best to save this option to the `.Rprofile` file so that it will be loaded on start-up of \R. To do this, open the `.Rprofile` file using e.g. `utils::file.edit("~/.Rprofile")`, add this text and save the file:
|
||||
#'
|
||||
#' ```r
|
||||
#' # Add custom microorganism codes:
|
||||
#' options(AMR_custom_mo = "~/my_custom_mo.rds")
|
||||
#' ```
|
||||
#'
|
||||
#'
|
||||
#' Upon package load, this file will be loaded and run through the [add_custom_microorganisms()] function.
|
||||
#'
|
||||
#' **Method 2:** Loading the microorganism directly from your `.Rprofile` file. An important downside is that this requires the `AMR` package to be installed or else this method will fail. To use this method:
|
||||
#'
|
||||
#'
|
||||
#' **Method 2:** Loading the microorganism directly from your `.Rprofile` file. Note that the definitions will be stored in a user-specific \R file, which is a suboptimal workflow. To use this method:
|
||||
#'
|
||||
#' 1. Edit the `.Rprofile` file using e.g. `utils::file.edit("~/.Rprofile")`.
|
||||
#'
|
||||
#' 2. Add a text like below and save the file:
|
||||
@@ -64,7 +64,7 @@
|
||||
#' )
|
||||
#' ```
|
||||
#'
|
||||
#' Use [clear_custom_microorganisms()] to clear the previously added antimicrobials.
|
||||
#' Use [clear_custom_microorganisms()] to clear the previously added microorganisms.
|
||||
#' @seealso [add_custom_antimicrobials()] to add custom antimicrobials.
|
||||
#' @rdname add_custom_microorganisms
|
||||
#' @export
|
||||
@@ -77,44 +77,49 @@
|
||||
#' # now add a custom entry - it will be considered by as.mo() and
|
||||
#' # all mo_*() functions
|
||||
#' add_custom_microorganisms(
|
||||
#' data.frame(genus = "Enterobacter",
|
||||
#' species = "asburiae/cloacae"
|
||||
#' data.frame(
|
||||
#' genus = "Enterobacter",
|
||||
#' species = "asburiae/cloacae"
|
||||
#' )
|
||||
#' )
|
||||
#'
|
||||
#' # E. asburiae/cloacae is now a new microorganism:
|
||||
#' mo_name("Enterobacter asburiae/cloacae")
|
||||
#'
|
||||
#'
|
||||
#' # its code:
|
||||
#' as.mo("Enterobacter asburiae/cloacae")
|
||||
#'
|
||||
#'
|
||||
#' # all internal algorithms will work as well:
|
||||
#' mo_name("Ent asburia cloacae")
|
||||
#'
|
||||
#'
|
||||
#' # and even the taxonomy was added based on the genus!
|
||||
#' mo_family("E. asburiae/cloacae")
|
||||
#' mo_gramstain("Enterobacter asburiae/cloacae")
|
||||
#'
|
||||
#' mo_info("Enterobacter asburiae/cloacae")
|
||||
#'
|
||||
#'
|
||||
#'
|
||||
#'
|
||||
#' # the function tries to be forgiving:
|
||||
#' add_custom_microorganisms(
|
||||
#' data.frame(GENUS = "BACTEROIDES / PARABACTEROIDES SLASHLINE",
|
||||
#' SPECIES = "SPECIES")
|
||||
#' data.frame(
|
||||
#' GENUS = "BACTEROIDES / PARABACTEROIDES SLASHLINE",
|
||||
#' SPECIES = "SPECIES"
|
||||
#' )
|
||||
#' )
|
||||
#' mo_name("BACTEROIDES / PARABACTEROIDES")
|
||||
#' mo_rank("BACTEROIDES / PARABACTEROIDES")
|
||||
#'
|
||||
#'
|
||||
#' # taxonomy still works, although a slashline genus was given as input:
|
||||
#' mo_family("Bacteroides/Parabacteroides")
|
||||
#'
|
||||
#'
|
||||
#'
|
||||
#'
|
||||
#' # for groups and complexes, set them as species or subspecies:
|
||||
#' add_custom_microorganisms(
|
||||
#' data.frame(genus = "Citrobacter",
|
||||
#' species = c("freundii", "braakii complex"),
|
||||
#' subspecies = c("complex", ""))
|
||||
#' data.frame(
|
||||
#' genus = "Citrobacter",
|
||||
#' species = c("freundii", "braakii complex"),
|
||||
#' subspecies = c("complex", "")
|
||||
#' )
|
||||
#' )
|
||||
#' mo_name(c("C. freundii complex", "C. braakii complex"))
|
||||
#' mo_species(c("C. freundii complex", "C. braakii complex"))
|
||||
@@ -123,9 +128,9 @@
|
||||
add_custom_microorganisms <- function(x) {
|
||||
meet_criteria(x, allow_class = "data.frame")
|
||||
stop_ifnot("genus" %in% tolower(colnames(x)), paste0("`x` must contain column 'genus'."))
|
||||
|
||||
|
||||
add_MO_lookup_to_AMR_env()
|
||||
|
||||
|
||||
# remove any extra class/type, such as grouped tbl, or data.table:
|
||||
x <- as.data.frame(x, stringsAsFactors = FALSE)
|
||||
colnames(x) <- tolower(colnames(x))
|
||||
@@ -135,7 +140,7 @@ add_custom_microorganisms <- function(x) {
|
||||
}
|
||||
# keep only columns available in the microorganisms data set
|
||||
x <- x[, colnames(AMR_env$MO_lookup)[colnames(AMR_env$MO_lookup) %in% colnames(x)], drop = FALSE]
|
||||
|
||||
|
||||
# clean the input ----
|
||||
for (col in c("genus", "species", "subspecies")) {
|
||||
if (!col %in% colnames(x)) {
|
||||
@@ -152,7 +157,7 @@ add_custom_microorganisms <- function(x) {
|
||||
col_ <- gsub(" *([/-]) *", "\\1", col_, perl = TRUE)
|
||||
# groups are in our taxonomic table with a capital G
|
||||
col_ <- gsub(" group( |$)", " Group\\1", col_, perl = TRUE)
|
||||
|
||||
|
||||
col_[is.na(col_)] <- ""
|
||||
if (col == "genus") {
|
||||
substr(col_, 1, 1) <- toupper(substr(col_, 1, 1))
|
||||
@@ -163,19 +168,27 @@ add_custom_microorganisms <- function(x) {
|
||||
x[, col] <- col_
|
||||
}
|
||||
# if subspecies is a group or complex, add it to the species and empty the subspecies
|
||||
x$species[which(x$subspecies %in% c("group", "Group", "complex"))] <- paste(x$species[which(x$subspecies %in% c("group", "Group", "complex"))],
|
||||
x$subspecies[which(x$subspecies %in% c("group", "Group", "complex"))])
|
||||
x$species[which(x$subspecies %in% c("group", "Group", "complex"))] <- paste(
|
||||
x$species[which(x$subspecies %in% c("group", "Group", "complex"))],
|
||||
x$subspecies[which(x$subspecies %in% c("group", "Group", "complex"))]
|
||||
)
|
||||
x$subspecies[which(x$subspecies %in% c("group", "Group", "complex"))] <- ""
|
||||
|
||||
|
||||
if ("rank" %in% colnames(x)) {
|
||||
stop_ifnot(all(x$rank %in% AMR_env$MO_lookup$rank),
|
||||
"the 'rank' column can only contain these values: ", vector_or(AMR_env$MO_lookup$rank))
|
||||
stop_ifnot(
|
||||
all(x$rank %in% AMR_env$MO_lookup$rank),
|
||||
"the 'rank' column can only contain these values: ", vector_or(AMR_env$MO_lookup$rank)
|
||||
)
|
||||
} else {
|
||||
x$rank <- ifelse(x$subspecies != "", "subspecies",
|
||||
ifelse(x$species != "", "species",
|
||||
ifelse(x$genus != "", "genus",
|
||||
stop("in add_custom_microorganisms(): only microorganisms up to the genus level can be added",
|
||||
call. = FALSE))))
|
||||
ifelse(x$species != "", "species",
|
||||
ifelse(x$genus != "", "genus",
|
||||
stop("in add_custom_microorganisms(): only microorganisms up to the genus level can be added",
|
||||
call. = FALSE
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
x$source <- "Added by user"
|
||||
if (!"fullname" %in% colnames(x)) {
|
||||
@@ -191,7 +204,7 @@ add_custom_microorganisms <- function(x) {
|
||||
x$class[is.na(x$class)] <- ""
|
||||
x$order[is.na(x$order)] <- ""
|
||||
x$family[is.na(x$family)] <- ""
|
||||
|
||||
|
||||
for (col in colnames(x)) {
|
||||
if (is.factor(x[, col, drop = TRUE])) {
|
||||
x[, col] <- as.character(x[, col, drop = TRUE])
|
||||
@@ -200,7 +213,7 @@ add_custom_microorganisms <- function(x) {
|
||||
x[, col] <- as.list(x[, col, drop = TRUE])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# fill in taxonomy based on genus
|
||||
genus_to_check <- gsub("^(.*)[^a-zA-Z].*", "\\1", x$genus, perl = TRUE)
|
||||
x$kingdom[which(x$kingdom == "" & genus_to_check != "")] <- AMR_env$MO_lookup$kingdom[match(genus_to_check[which(x$kingdom == "" & genus_to_check != "")], AMR_env$MO_lookup$genus)]
|
||||
@@ -208,7 +221,7 @@ add_custom_microorganisms <- function(x) {
|
||||
x$class[which(x$class == "" & genus_to_check != "")] <- AMR_env$MO_lookup$class[match(genus_to_check[which(x$class == "" & genus_to_check != "")], AMR_env$MO_lookup$genus)]
|
||||
x$order[which(x$order == "" & genus_to_check != "")] <- AMR_env$MO_lookup$order[match(genus_to_check[which(x$order == "" & genus_to_check != "")], AMR_env$MO_lookup$genus)]
|
||||
x$family[which(x$family == "" & genus_to_check != "")] <- AMR_env$MO_lookup$family[match(genus_to_check[which(x$family == "" & genus_to_check != "")], AMR_env$MO_lookup$genus)]
|
||||
|
||||
|
||||
# fill in other columns that are used in internal algorithms
|
||||
x$prevalence <- NA_real_
|
||||
x$prevalence[which(genus_to_check != "")] <- AMR_env$MO_lookup$prevalence[match(genus_to_check[which(genus_to_check != "")], AMR_env$MO_lookup$genus)]
|
||||
@@ -222,7 +235,7 @@ add_custom_microorganisms <- function(x) {
|
||||
x$full_first <- substr(x$fullname_lower, 1, 1)
|
||||
x$species_first <- tolower(substr(x$species, 1, 1))
|
||||
x$subspecies_first <- tolower(substr(x$subspecies, 1, 1))
|
||||
|
||||
|
||||
if (!"mo" %in% colnames(x)) {
|
||||
# create the mo code
|
||||
x$mo <- NA_character_
|
||||
@@ -230,19 +243,27 @@ add_custom_microorganisms <- function(x) {
|
||||
x$mo <- trimws2(as.character(x$mo))
|
||||
x$mo[x$mo == ""] <- NA_character_
|
||||
current <- sum(AMR_env$MO_lookup$source == "Added by user", na.rm = TRUE)
|
||||
x$mo[is.na(x$mo)] <- paste0("CUSTOM",
|
||||
seq.int(from = current + 1, to = current + nrow(x), by = 1),
|
||||
"_",
|
||||
toupper(unname(abbreviate(gsub(" +", " _ ",
|
||||
gsub("[^A-Za-z0-9-]", " ",
|
||||
trimws2(paste(x$genus, x$species, x$subspecies)))),
|
||||
minlength = 10))))
|
||||
x$mo[is.na(x$mo)] <- paste0(
|
||||
"CUSTOM",
|
||||
seq.int(from = current + 1, to = current + nrow(x), by = 1),
|
||||
"_",
|
||||
toupper(unname(abbreviate(
|
||||
gsub(
|
||||
" +", " _ ",
|
||||
gsub(
|
||||
"[^A-Za-z0-9-]", " ",
|
||||
trimws2(paste(x$genus, x$species, x$subspecies))
|
||||
)
|
||||
),
|
||||
minlength = 10
|
||||
)))
|
||||
)
|
||||
stop_if(anyDuplicated(c(as.character(AMR_env$MO_lookup$mo), x$mo)), "MO codes must be unique and not match existing MO codes of the AMR package")
|
||||
|
||||
|
||||
# add to package ----
|
||||
AMR_env$custom_mo_codes <- c(AMR_env$custom_mo_codes, x$mo)
|
||||
class(AMR_env$MO_lookup$mo) <- "character"
|
||||
|
||||
|
||||
new_df <- AMR_env$MO_lookup[0, , drop = FALSE][seq_len(NROW(x)), , drop = FALSE]
|
||||
rownames(new_df) <- NULL
|
||||
list_cols <- vapply(FUN.VALUE = logical(1), new_df, is.list)
|
||||
@@ -254,11 +275,11 @@ add_custom_microorganisms <- function(x) {
|
||||
# assign new values
|
||||
new_df[, col] <- x[, col, drop = TRUE]
|
||||
}
|
||||
|
||||
|
||||
# clear previous coercions
|
||||
suppressMessages(mo_reset_session())
|
||||
|
||||
AMR_env$MO_lookup <- unique(rbind(AMR_env$MO_lookup, new_df))
|
||||
|
||||
AMR_env$MO_lookup <- unique(rbind_AMR(AMR_env$MO_lookup, new_df))
|
||||
class(AMR_env$MO_lookup$mo) <- c("mo", "character")
|
||||
if (nrow(x) <= 3) {
|
||||
message_("Added ", vector_and(italicise(x$fullname), quotes = FALSE), " to the internal `microorganisms` data set.")
|
||||
@@ -271,11 +292,14 @@ add_custom_microorganisms <- function(x) {
|
||||
#' @export
|
||||
clear_custom_microorganisms <- function() {
|
||||
n <- nrow(AMR_env$MO_lookup)
|
||||
|
||||
|
||||
# reset
|
||||
AMR_env$MO_lookup <- NULL
|
||||
add_MO_lookup_to_AMR_env()
|
||||
|
||||
|
||||
# clear previous coercions
|
||||
suppressMessages(mo_reset_session())
|
||||
|
||||
n2 <- nrow(AMR_env$MO_lookup)
|
||||
AMR_env$custom_mo_codes <- character(0)
|
||||
AMR_env$mo_previously_coerced <- AMR_env$mo_previously_coerced[which(AMR_env$mo_previously_coerced$mo %in% AMR_env$MO_lookup$mo), , drop = FALSE]
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Data Sets with `r format(nrow(antibiotics) + nrow(antivirals), big.mark = ",")` Antimicrobial Drugs
|
||||
#' Data Sets with `r format(nrow(antibiotics) + nrow(antivirals), big.mark = " ")` Antimicrobial Drugs
|
||||
#'
|
||||
#' Two data sets containing all antibiotics/antimycotics and antivirals. Use [as.ab()] or one of the [`ab_*`][ab_property()] functions to retrieve values from the [antibiotics] data set. Three identifiers are included in this data set: an antibiotic 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
|
||||
@@ -65,10 +65,10 @@
|
||||
#'
|
||||
#' ### Direct download
|
||||
#' Like all data sets in this package, these data sets are publicly available for download in the following formats: R, MS Excel, Apache Feather, Apache Parquet, SPSS, SAS, 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).
|
||||
#' @source
|
||||
#'
|
||||
#' @source
|
||||
#'
|
||||
#' * World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology (WHOCC): <https://www.whocc.no/atc_ddd_index/>
|
||||
#'
|
||||
#'
|
||||
#' * `r TAXONOMY_VERSION$LOINC$citation` Accessed from <`r TAXONOMY_VERSION$LOINC$url`> on `r documentation_date(TAXONOMY_VERSION$LOINC$accessed_date)`.
|
||||
#'
|
||||
#' * European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: <https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm>
|
||||
@@ -82,10 +82,10 @@
|
||||
#' @rdname antibiotics
|
||||
"antivirals"
|
||||
|
||||
#' Data Set with `r format(nrow(microorganisms), big.mark = ",")` Microorganisms
|
||||
#' Data Set with `r format(nrow(microorganisms), big.mark = " ")` Microorganisms
|
||||
#'
|
||||
#' A data set containing the full microbial taxonomy (**last updated: `r documentation_date(max(TAXONOMY_VERSION$GBIF$accessed_date, TAXONOMY_VERSION$LPSN$accessed_date))`**) of `r nr2char(length(unique(microorganisms$kingdom[!microorganisms$kingdom %like% "unknown"])))` kingdoms from the List of Prokaryotic names with Standing in Nomenclature (LPSN) and the Global Biodiversity Information Facility (GBIF). This data set is the backbone of this `AMR` package. MO codes can be looked up using [as.mo()].
|
||||
#' @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
|
||||
#' - `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.
|
||||
#' - `status` \cr Status of the taxon, either `r vector_or(microorganisms$status)`
|
||||
@@ -141,19 +141,19 @@
|
||||
#' * `r TAXONOMY_VERSION$GBIF$citation` Accessed from <`r TAXONOMY_VERSION$GBIF$url`> on `r documentation_date(TAXONOMY_VERSION$GBIF$accessed_date)`.
|
||||
#'
|
||||
#' * `r TAXONOMY_VERSION$SNOMED$citation` URL: <`r TAXONOMY_VERSION$SNOMED$url`>
|
||||
#'
|
||||
#'
|
||||
#' * Grimont *et al.* (2007). Antigenic Formulae of the Salmonella Serovars, 9th Edition. WHO Collaborating Centre for Reference and Research on *Salmonella* (WHOCC-SALM).
|
||||
#'
|
||||
#'
|
||||
#' * Bartlett *et al.* (2022). **A comprehensive list of bacterial pathogens infecting humans** *Microbiology* 168:001269; \doi{10.1099/mic.0.001269}
|
||||
#' @seealso [as.mo()], [mo_property()], [microorganisms.codes], [intrinsic_resistant]
|
||||
#' @examples
|
||||
#' microorganisms
|
||||
"microorganisms"
|
||||
|
||||
#' Data Set with `r format(nrow(microorganisms.codes), big.mark = ",")` Common Microorganism Codes
|
||||
#' Data Set with `r format(nrow(microorganisms.codes), big.mark = " ")` Common Microorganism Codes
|
||||
#'
|
||||
#' A data set containing commonly used codes for microorganisms, from laboratory systems and WHONET. Define your own with [set_mo_source()]. They will all be searched when using [as.mo()] and consequently all the [`mo_*`][mo_property()] functions.
|
||||
#' @format A [tibble][tibble::tibble] with `r format(nrow(microorganisms.codes), big.mark = ",")` observations and `r ncol(microorganisms.codes)` variables:
|
||||
#' @format A [tibble][tibble::tibble] with `r format(nrow(microorganisms.codes), big.mark = " ")` observations and `r ncol(microorganisms.codes)` variables:
|
||||
#' - `code`\cr Commonly used code of a microorganism
|
||||
#' - `mo`\cr ID of the microorganism in the [microorganisms] data set
|
||||
#' @details
|
||||
@@ -163,10 +163,10 @@
|
||||
#' microorganisms.codes
|
||||
"microorganisms.codes"
|
||||
|
||||
#' Data Set with `r format(nrow(example_isolates), big.mark = ",")` Example Isolates
|
||||
#' Data Set with `r format(nrow(example_isolates), big.mark = " ")` Example Isolates
|
||||
#'
|
||||
#' A data set containing `r format(nrow(example_isolates), big.mark = ",")` microbial isolates with their full antibiograms. This data set contains randomised fictitious data, but reflects reality and can be used to practise AMR data analysis. For examples, please read [the tutorial on our website](https://msberends.github.io/AMR/articles/AMR.html).
|
||||
#' @format A [tibble][tibble::tibble] with `r format(nrow(example_isolates), big.mark = ",")` observations and `r ncol(example_isolates)` variables:
|
||||
#' A data set containing `r format(nrow(example_isolates), big.mark = " ")` microbial isolates with their full antibiograms. This data set contains randomised fictitious data, but reflects reality and can be used to practise AMR data analysis. For examples, please read [the tutorial on our website](https://msberends.github.io/AMR/articles/AMR.html).
|
||||
#' @format A [tibble][tibble::tibble] with `r format(nrow(example_isolates), big.mark = " ")` observations and `r ncol(example_isolates)` variables:
|
||||
#' - `date`\cr Date of receipt at the laboratory
|
||||
#' - `patient`\cr ID of the patient
|
||||
#' - `age`\cr Age of the patient
|
||||
@@ -182,8 +182,8 @@
|
||||
|
||||
#' Data Set with Unclean Data
|
||||
#'
|
||||
#' A data set containing `r format(nrow(example_isolates_unclean), big.mark = ",")` microbial isolates that are not cleaned up and consequently not ready for AMR data analysis. This data set can be used for practice.
|
||||
#' @format A [tibble][tibble::tibble] with `r format(nrow(example_isolates_unclean), big.mark = ",")` observations and `r ncol(example_isolates_unclean)` variables:
|
||||
#' A data set containing `r format(nrow(example_isolates_unclean), big.mark = " ")` microbial isolates that are not cleaned up and consequently not ready for AMR data analysis. This data set can be used for practice.
|
||||
#' @format A [tibble][tibble::tibble] with `r format(nrow(example_isolates_unclean), big.mark = " ")` observations and `r ncol(example_isolates_unclean)` variables:
|
||||
#' - `patient_id`\cr ID of the patient
|
||||
#' - `date`\cr date of receipt at the laboratory
|
||||
#' - `hospital`\cr ID of the hospital, from A to C
|
||||
@@ -195,10 +195,10 @@
|
||||
#' example_isolates_unclean
|
||||
"example_isolates_unclean"
|
||||
|
||||
#' Data Set with `r format(nrow(WHONET), big.mark = ",")` Isolates - WHONET Example
|
||||
#' 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 antibiotic results are from our [example_isolates] data set. All patient names are 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:
|
||||
#' 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 antibiotic 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
|
||||
#' - `Organism`\cr Name of the microorganism. Before analysis, you should transform this to a valid microbial class, using [as.mo()].
|
||||
@@ -234,7 +234,7 @@
|
||||
#' Data Set with Clinical Breakpoints for SIR Interpretation
|
||||
#'
|
||||
#' Data set containing clinical breakpoints to interpret MIC and disk diffusion to SIR values, according to international guidelines. Currently implemented guidelines are EUCAST (`r min(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`) and CLSI (`r min(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "CLSI")$guideline)))`). 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
|
||||
#' - `method`\cr Either `r vector_or(clinical_breakpoints$method)`
|
||||
#' - `site`\cr Body site, e.g. "Oral" or "Respiratory"
|
||||
@@ -258,7 +258,7 @@
|
||||
#' Data Set with Bacterial Intrinsic Resistance
|
||||
#'
|
||||
#' 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:
|
||||
#' @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 Antibiotic ID
|
||||
#' @details
|
||||
@@ -275,7 +275,7 @@
|
||||
#' Data Set with Treatment Dosages as Defined by EUCAST
|
||||
#'
|
||||
#' 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:
|
||||
#' @format A [tibble][tibble::tibble] with `r format(nrow(dosage), big.mark = " ")` observations and `r ncol(dosage)` variables:
|
||||
#' - `ab`\cr Antibiotic 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)`
|
||||
|
||||
@@ -120,13 +120,13 @@ as.disk <- function(x, na.rm = FALSE) {
|
||||
vector_and(quotes = TRUE)
|
||||
cur_col <- get_current_column()
|
||||
warning_("in `as.disk()`: ", na_after - na_before, " result",
|
||||
ifelse(na_after - na_before > 1, "s", ""),
|
||||
ifelse(is.null(cur_col), "", paste0(" in column '", cur_col, "'")),
|
||||
" truncated (",
|
||||
round(((na_after - na_before) / length(x)) * 100),
|
||||
"%) that were invalid disk zones: ",
|
||||
list_missing,
|
||||
call = FALSE
|
||||
ifelse(na_after - na_before > 1, "s", ""),
|
||||
ifelse(is.null(cur_col), "", paste0(" in column '", cur_col, "'")),
|
||||
" truncated (",
|
||||
round(((na_after - na_before) / length(x)) * 100),
|
||||
"%) that were invalid disk zones: ",
|
||||
list_missing,
|
||||
call = FALSE
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
-212
@@ -1,212 +0,0 @@
|
||||
# ==================================================================== #
|
||||
# TITLE #
|
||||
# AMR: An R Package for Working with Antimicrobial Resistance Data #
|
||||
# #
|
||||
# SOURCE #
|
||||
# https://github.com/msberends/AMR #
|
||||
# #
|
||||
# CITE AS #
|
||||
# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C #
|
||||
# (2022). AMR: An R Package for Working with Antimicrobial Resistance #
|
||||
# Data. Journal of Statistical Software, 104(3), 1-31. #
|
||||
# doi:10.18637/jss.v104.i03 #
|
||||
# #
|
||||
# Developed at the University of Groningen and the University Medical #
|
||||
# Center Groningen in The Netherlands, in collaboration with many #
|
||||
# colleagues from around the world, see our website. #
|
||||
# #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# We created this package for both routine data analysis and academic #
|
||||
# research and it was publicly released in the hope that it will be #
|
||||
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
|
||||
# #
|
||||
# Visit our website for the full manual and a complete tutorial about #
|
||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Determine (New) Episodes for Patients
|
||||
#'
|
||||
#' These functions determine which items in a vector can be considered (the start of) a new episode, based on the argument `episode_days`. This can be used to determine clinical episodes for any epidemiological analysis. The [get_episode()] function returns the index number of the episode per group, while the [is_new_episode()] function returns values `TRUE`/`FALSE` to indicate whether an item in a vector is the start of a new episode.
|
||||
#' @param x vector of dates (class `Date` or `POSIXt`), will be sorted internally to determine episodes
|
||||
#' @param episode_days required episode length in days, can also be less than a day or `Inf`, see *Details*
|
||||
#' @param ... ignored, only in place to allow future extensions
|
||||
#' @details
|
||||
#' Dates are first sorted from old to new. The oldest date will mark the start of the first episode. After this date, the next date will be marked that is at least `episode_days` days later than the start of the first episode. From that second marked date on, the next date will be marked that is at least `episode_days` days later than the start of the second episode which will be the start of the third episode, and so on. Before the vector is being returned, the original order will be restored.
|
||||
#'
|
||||
#' The [first_isolate()] function is a wrapper around the [is_new_episode()] function, but is more efficient for data sets containing microorganism codes or names and allows for different isolate selection methods.
|
||||
#'
|
||||
#' The `dplyr` package is not required for these functions to work, but these functions do support [variable grouping][dplyr::group_by()] and work conveniently inside `dplyr` verbs such as [`filter()`][dplyr::filter()], [`mutate()`][dplyr::mutate()] and [`summarise()`][dplyr::summarise()].
|
||||
#' @return
|
||||
#' * [get_episode()]: a [double] vector
|
||||
#' * [is_new_episode()]: a [logical] vector
|
||||
#' @seealso [first_isolate()]
|
||||
#' @rdname get_episode
|
||||
#' @export
|
||||
#' @examples
|
||||
#' # `example_isolates` is a data set available in the AMR package.
|
||||
#' # See ?example_isolates
|
||||
#' df <- example_isolates[sample(seq_len(2000), size = 200), ]
|
||||
#'
|
||||
#' get_episode(df$date, episode_days = 60) # indices
|
||||
#' is_new_episode(df$date, episode_days = 60) # TRUE/FALSE
|
||||
#'
|
||||
#' # filter on results from the third 60-day episode only, using base R
|
||||
#' df[which(get_episode(df$date, 60) == 3), ]
|
||||
#'
|
||||
#' # the functions also work for less than a day, e.g. to include one per hour:
|
||||
#' get_episode(c(
|
||||
#' Sys.time(),
|
||||
#' Sys.time() + 60 * 60
|
||||
#' ),
|
||||
#' episode_days = 1 / 24
|
||||
#' )
|
||||
#'
|
||||
#' \donttest{
|
||||
#' if (require("dplyr")) {
|
||||
#' # is_new_episode() can also be used in dplyr verbs to determine patient
|
||||
#' # episodes based on any (combination of) grouping variables:
|
||||
#' df %>%
|
||||
#' mutate(condition = sample(
|
||||
#' x = c("A", "B", "C"),
|
||||
#' size = 200,
|
||||
#' replace = TRUE
|
||||
#' )) %>%
|
||||
#' group_by(condition) %>%
|
||||
#' mutate(new_episode = is_new_episode(date, 365)) %>%
|
||||
#' select(patient, date, condition, new_episode)
|
||||
#' }
|
||||
#' if (require("dplyr")) {
|
||||
#' df %>%
|
||||
#' group_by(ward, patient) %>%
|
||||
#' transmute(date,
|
||||
#' patient,
|
||||
#' new_index = get_episode(date, 60),
|
||||
#' new_logical = is_new_episode(date, 60)
|
||||
#' )
|
||||
#' }
|
||||
#' if (require("dplyr")) {
|
||||
#' df %>%
|
||||
#' group_by(ward) %>%
|
||||
#' summarise(
|
||||
#' n_patients = n_distinct(patient),
|
||||
#' n_episodes_365 = sum(is_new_episode(date, episode_days = 365)),
|
||||
#' n_episodes_60 = sum(is_new_episode(date, episode_days = 60)),
|
||||
#' n_episodes_30 = sum(is_new_episode(date, episode_days = 30))
|
||||
#' )
|
||||
#' }
|
||||
#' if (require("dplyr")) {
|
||||
#'
|
||||
#' # grouping on patients and microorganisms leads to the same
|
||||
#' # results as first_isolate() when using 'episode-based':
|
||||
#' x <- df %>%
|
||||
#' filter_first_isolate(
|
||||
#' include_unknown = TRUE,
|
||||
#' method = "episode-based"
|
||||
#' )
|
||||
#'
|
||||
#' y <- df %>%
|
||||
#' group_by(patient, mo) %>%
|
||||
#' filter(is_new_episode(date, 365)) %>%
|
||||
#' ungroup()
|
||||
#'
|
||||
#' identical(x, y)
|
||||
#' }
|
||||
#' if (require("dplyr")) {
|
||||
#'
|
||||
#' # but is_new_episode() has a lot more flexibility than first_isolate(),
|
||||
#' # since you can now group on anything that seems relevant:
|
||||
#' df %>%
|
||||
#' group_by(patient, mo, ward) %>%
|
||||
#' mutate(flag_episode = is_new_episode(date, 365)) %>%
|
||||
#' select(group_vars(.), flag_episode)
|
||||
#' }
|
||||
#' }
|
||||
get_episode <- function(x, episode_days, ...) {
|
||||
meet_criteria(x, allow_class = c("Date", "POSIXt"), allow_NA = TRUE)
|
||||
meet_criteria(episode_days, allow_class = c("numeric", "integer"), has_length = 1, is_positive = TRUE, is_finite = FALSE)
|
||||
|
||||
exec_episode(
|
||||
x = x,
|
||||
type = "sequential",
|
||||
episode_days = episode_days,
|
||||
... = ...
|
||||
)
|
||||
}
|
||||
|
||||
#' @rdname get_episode
|
||||
#' @export
|
||||
is_new_episode <- function(x, episode_days, ...) {
|
||||
meet_criteria(x, allow_class = c("Date", "POSIXt"), allow_NA = TRUE)
|
||||
meet_criteria(episode_days, allow_class = c("numeric", "integer"), has_length = 1, is_positive = TRUE, is_finite = FALSE)
|
||||
|
||||
exec_episode(
|
||||
x = x,
|
||||
type = "logical",
|
||||
episode_days = episode_days,
|
||||
... = ...
|
||||
)
|
||||
}
|
||||
|
||||
exec_episode <- function(x, type, episode_days, ...) {
|
||||
x <- as.double(as.POSIXct(x)) # as.POSIXct() required for Date classes
|
||||
# since x is now in seconds, get seconds from episode_days as well
|
||||
episode_seconds <- episode_days * 60 * 60 * 24
|
||||
|
||||
if (length(x) == 1) { # this will also match 1 NA, which is fine
|
||||
if (type == "logical") {
|
||||
return(TRUE)
|
||||
} else if (type == "sequential") {
|
||||
return(1)
|
||||
}
|
||||
} else if (length(x) == 2 && !all(is.na(x))) {
|
||||
if (max(x) - min(x) >= episode_seconds) {
|
||||
if (type == "logical") {
|
||||
return(c(TRUE, TRUE))
|
||||
} else if (type == "sequential") {
|
||||
return(c(1, 2))
|
||||
}
|
||||
} else {
|
||||
if (type == "logical") {
|
||||
return(c(TRUE, FALSE))
|
||||
} else if (type == "sequential") {
|
||||
return(c(1, 1))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# I asked on StackOverflow:
|
||||
# https://stackoverflow.com/questions/42122245/filter-one-row-every-year
|
||||
run_episodes <- function(x, episode_seconds) {
|
||||
indices <- integer()
|
||||
start <- x[1]
|
||||
ind <- 1
|
||||
indices[1] <- 1
|
||||
for (i in 2:length(x)) {
|
||||
if (isTRUE((x[i] - start) >= episode_seconds)) {
|
||||
ind <- ind + 1
|
||||
if (type == "logical") {
|
||||
indices[ind] <- i
|
||||
}
|
||||
start <- x[i]
|
||||
}
|
||||
if (type == "sequential") {
|
||||
indices[i] <- ind
|
||||
}
|
||||
}
|
||||
if (type == "logical") {
|
||||
result <- rep(FALSE, length(x))
|
||||
result[indices] <- TRUE
|
||||
result
|
||||
} else if (type == "sequential") {
|
||||
indices
|
||||
}
|
||||
}
|
||||
|
||||
ord <- order(x)
|
||||
out <- run_episodes(x[ord], episode_seconds)[order(ord)]
|
||||
out[is.na(x) & ord != 1] <- NA # every NA but the first must remain NA
|
||||
out
|
||||
}
|
||||
+61
-52
@@ -60,16 +60,16 @@ format_eucast_version_nr <- function(version, markdown = TRUE) {
|
||||
#'
|
||||
#' To improve the interpretation of the antibiogram before EUCAST rules are applied, some non-EUCAST rules can applied at default, see *Details*.
|
||||
#' @param x a data set with antibiotic columns, such as `amox`, `AMX` and `AMC`
|
||||
#' @param info a [logical] to indicate whether progress should be printed to the console, defaults to only print while in interactive sessions
|
||||
#' @param rules a [character] vector that specifies which rules should be applied. Must be one or more of `"breakpoints"`, `"expert"`, `"other"`, `"custom"`, `"all"`, and defaults to `c("breakpoints", "expert")`. The default value can be set to another value, e.g. using `options(AMR_eucastrules = "all")`. If using `"custom"`, be sure to fill in argument `custom_rules` too. Custom rules can be created with [custom_eucast_rules()].
|
||||
#' @param info a [logical] to indicate whether progress should be printed to the console - the default is only print while in interactive sessions
|
||||
#' @param rules a [character] vector that specifies which rules should be applied. Must be one or more of `"breakpoints"`, `"expert"`, `"other"`, `"custom"`, `"all"`, and defaults to `c("breakpoints", "expert")`. The default value can be set to another value using the [package option][AMR-options] [`AMR_eucastrules`][AMR-options]: `options(AMR_eucastrules = "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 version_breakpoints the version number to use for the EUCAST Clinical Breakpoints guideline. Can be either `r vector_or(names(EUCAST_VERSION_BREAKPOINTS), reverse = TRUE)`.
|
||||
#' @param version_expertrules the version number to use for the EUCAST Expert Rules and Intrinsic Resistance guideline. Can be either `r vector_or(names(EUCAST_VERSION_EXPERT_RULES), reverse = TRUE)`.
|
||||
#' @param ampc_cephalosporin_resistance a [character] value that should be applied to cefotaxime, ceftriaxone and ceftazidime for AmpC de-repressed cephalosporin-resistant mutants, defaults to `NA`. Currently only works when `version_expertrules` is `3.2` and higher; these version 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 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 version 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 ... column name of an antibiotic, see section *Antibiotics* below
|
||||
#' @param ab any (vector of) text that can be coerced to a valid antibiotic drug code with [as.ab()]
|
||||
#' @param administration route of administration, either `r vector_or(dosage$administration)`
|
||||
#' @param only_sir_columns a [logical] to indicate whether only antibiotic columns must be detected that were transformed to class `sir` (see [as.sir()]) on beforehand (defaults to `FALSE`)
|
||||
#' @param only_sir_columns a [logical] to indicate whether only antibiotic columns must be detected that were transformed to class `sir` (see [as.sir()]) on beforehand (default is `FALSE`)
|
||||
#' @param custom_rules custom rules to apply, created with [custom_eucast_rules()]
|
||||
#' @inheritParams first_isolate
|
||||
#' @details
|
||||
@@ -98,7 +98,7 @@ format_eucast_version_nr <- function(version, markdown = TRUE) {
|
||||
#'
|
||||
#' Important examples include amoxicillin and amoxicillin/clavulanic acid, and trimethoprim and trimethoprim/sulfamethoxazole. Needless to say, for these rules to work, both drugs must be available in the data set.
|
||||
#'
|
||||
#' Since these rules are not officially approved by EUCAST, they are not applied at default. To use these rules, include `"other"` to the `rules` argument, or use `eucast_rules(..., rules = "all")`. You can also set the option `AMR_eucastrules`, i.e. run `options(AMR_eucastrules = "all")`.
|
||||
#' Since these rules are not officially approved by EUCAST, they are not applied at default. To use these rules, include `"other"` to the `rules` argument, or use `eucast_rules(..., rules = "all")`. You can also set the [package option][AMR-options] [`AMR_eucastrules`][AMR-options], i.e. run `options(AMR_eucastrules = "all")`.
|
||||
#' @section Antibiotics:
|
||||
#' To define antibiotics column names, leave as it is to determine it automatically with [guess_ab_col()] or input a text (case-insensitive), or use `NULL` to skip a column (e.g. `TIC = NULL` to skip ticarcillin). Manually defined but non-existing columns will be skipped with a warning.
|
||||
#'
|
||||
@@ -181,6 +181,7 @@ eucast_rules <- function(x,
|
||||
meet_criteria(ampc_cephalosporin_resistance, allow_class = c("logical", "character", "sir"), has_length = 1, allow_NA = TRUE, allow_NULL = TRUE)
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(custom_rules, allow_class = "custom_eucast_rules", allow_NULL = TRUE)
|
||||
if ("only_rsi_columns" %in% names(list(...))) only_sir_columns <- list(...)$only_rsi_columns
|
||||
|
||||
add_MO_lookup_to_AMR_env()
|
||||
|
||||
@@ -236,7 +237,7 @@ eucast_rules <- function(x,
|
||||
}
|
||||
|
||||
decimal.mark <- getOption("OutDec")
|
||||
big.mark <- ifelse(decimal.mark != ",", ",", ".")
|
||||
big.mark <- ifelse(decimal.mark != ",", ",", " ")
|
||||
formatnr <- function(x, big = big.mark, dec = decimal.mark) {
|
||||
trimws(format(x, big.mark = big, decimal.mark = dec))
|
||||
}
|
||||
@@ -475,7 +476,7 @@ eucast_rules <- function(x,
|
||||
amox$base_ab <- "AMX"
|
||||
amox$base_name <- ab_name("AMX", language = NULL)
|
||||
# merge and sort
|
||||
ab_enzyme <- rbind(ab_enzyme, ampi, amox)
|
||||
ab_enzyme <- rbind_AMR(ab_enzyme, ampi, amox)
|
||||
ab_enzyme <- ab_enzyme[order(ab_enzyme$enzyme_name), , drop = FALSE]
|
||||
|
||||
for (i in seq_len(nrow(ab_enzyme))) {
|
||||
@@ -702,11 +703,12 @@ eucast_rules <- function(x,
|
||||
# Print rule -------------------------------------------------------------
|
||||
if (rule_current != rule_previous) {
|
||||
# is new rule within group, print its name
|
||||
cat(italicise_taxonomy(word_wrap(rule_current,
|
||||
width = getOption("width") - 30,
|
||||
extra_indent = 6
|
||||
),
|
||||
type = "ansi"
|
||||
cat(italicise_taxonomy(
|
||||
word_wrap(rule_current,
|
||||
width = getOption("width") - 30,
|
||||
extra_indent = 6
|
||||
),
|
||||
type = "ansi"
|
||||
))
|
||||
warned <- FALSE
|
||||
}
|
||||
@@ -721,21 +723,23 @@ eucast_rules <- function(x,
|
||||
if (mo_value %like% "coagulase" && any(x$genus == "Staphylococcus", na.rm = TRUE)) {
|
||||
if (mo_value %like% "negative") {
|
||||
eucast_rules_df[i, "this_value"] <- paste0(
|
||||
"^(", paste0(all_staph[which(all_staph$CNS_CPS %like% "negative"),
|
||||
"fullname",
|
||||
drop = TRUE
|
||||
],
|
||||
collapse = "|"
|
||||
"^(", paste0(
|
||||
all_staph[which(all_staph$CNS_CPS %like% "negative"),
|
||||
"fullname",
|
||||
drop = TRUE
|
||||
],
|
||||
collapse = "|"
|
||||
),
|
||||
")$"
|
||||
)
|
||||
} else {
|
||||
eucast_rules_df[i, "this_value"] <- paste0(
|
||||
"^(", paste0(all_staph[which(all_staph$CNS_CPS %like% "positive"),
|
||||
"fullname",
|
||||
drop = TRUE
|
||||
],
|
||||
collapse = "|"
|
||||
"^(", paste0(
|
||||
all_staph[which(all_staph$CNS_CPS %like% "positive"),
|
||||
"fullname",
|
||||
drop = TRUE
|
||||
],
|
||||
collapse = "|"
|
||||
),
|
||||
")$"
|
||||
)
|
||||
@@ -745,11 +749,12 @@ eucast_rules <- function(x,
|
||||
# be sure to comprise all beta-haemolytic Streptococci (Lancefield groups A, B, C and G) when they are mentioned
|
||||
if (mo_value %like% "group [ABCG]" && any(x$genus == "Streptococcus", na.rm = TRUE)) {
|
||||
eucast_rules_df[i, "this_value"] <- paste0(
|
||||
"^(", paste0(all_strep[which(all_strep$Lancefield %like% "group [ABCG]"),
|
||||
"fullname",
|
||||
drop = TRUE
|
||||
],
|
||||
collapse = "|"
|
||||
"^(", paste0(
|
||||
all_strep[which(all_strep$Lancefield %like% "group [ABCG]"),
|
||||
"fullname",
|
||||
drop = TRUE
|
||||
],
|
||||
collapse = "|"
|
||||
),
|
||||
")$"
|
||||
)
|
||||
@@ -789,15 +794,17 @@ eucast_rules <- function(x,
|
||||
if (length(source_antibiotics) == 0) {
|
||||
rows <- integer(0)
|
||||
} else if (length(source_antibiotics) == 1) {
|
||||
rows <- tryCatch(which(x[, if_mo_property, drop = TRUE] %like% mo_value &
|
||||
as.sir_no_warning(x[, source_antibiotics[1L]]) == source_value[1L]),
|
||||
error = function(e) integer(0)
|
||||
rows <- tryCatch(
|
||||
which(x[, if_mo_property, drop = TRUE] %like% mo_value &
|
||||
as.sir_no_warning(x[, source_antibiotics[1L]]) == source_value[1L]),
|
||||
error = function(e) integer(0)
|
||||
)
|
||||
} else if (length(source_antibiotics) == 2) {
|
||||
rows <- tryCatch(which(x[, if_mo_property, drop = TRUE] %like% mo_value &
|
||||
as.sir_no_warning(x[, source_antibiotics[1L]]) == source_value[1L] &
|
||||
as.sir_no_warning(x[, source_antibiotics[2L]]) == source_value[2L]),
|
||||
error = function(e) integer(0)
|
||||
rows <- tryCatch(
|
||||
which(x[, if_mo_property, drop = TRUE] %like% mo_value &
|
||||
as.sir_no_warning(x[, source_antibiotics[1L]]) == source_value[1L] &
|
||||
as.sir_no_warning(x[, source_antibiotics[2L]]) == source_value[2L]),
|
||||
error = function(e) integer(0)
|
||||
)
|
||||
# nolint start
|
||||
# } else if (length(source_antibiotics) == 3) {
|
||||
@@ -872,11 +879,12 @@ eucast_rules <- function(x,
|
||||
)
|
||||
if (isTRUE(info)) {
|
||||
# print rule
|
||||
cat(italicise_taxonomy(word_wrap(format_custom_query_rule(rule$query, colours = FALSE),
|
||||
width = getOption("width") - 30,
|
||||
extra_indent = 6
|
||||
),
|
||||
type = "ansi"
|
||||
cat(italicise_taxonomy(
|
||||
word_wrap(format_custom_query_rule(rule$query, colours = FALSE),
|
||||
width = getOption("width") - 30,
|
||||
extra_indent = 6
|
||||
),
|
||||
type = "ansi"
|
||||
))
|
||||
warned <- FALSE
|
||||
}
|
||||
@@ -1117,14 +1125,15 @@ edit_sir <- function(x,
|
||||
},
|
||||
error = function(e) {
|
||||
txt_error()
|
||||
stop(paste0(
|
||||
"In row(s) ", paste(rows[seq_len(min(length(rows), 10))], collapse = ","),
|
||||
ifelse(length(rows) > 10, "...", ""),
|
||||
" while writing value '", to,
|
||||
"' to column(s) `", paste(cols, collapse = "`, `"),
|
||||
"`:\n", e$message
|
||||
),
|
||||
call. = FALSE
|
||||
stop(
|
||||
paste0(
|
||||
"In row(s) ", paste(rows[seq_len(min(length(rows), 10))], collapse = ","),
|
||||
ifelse(length(rows) > 10, "...", ""),
|
||||
" while writing value '", to,
|
||||
"' to column(s) `", paste(cols, collapse = "`, `"),
|
||||
"`:\n", e$message
|
||||
),
|
||||
call. = FALSE
|
||||
)
|
||||
}
|
||||
)
|
||||
@@ -1153,9 +1162,9 @@ edit_sir <- function(x,
|
||||
)
|
||||
verbose_new <- verbose_new %pm>% pm_filter(old != new | is.na(old) | is.na(new) & !is.na(old))
|
||||
# save changes to data set 'verbose_info'
|
||||
track_changes$verbose_info <- rbind(track_changes$verbose_info,
|
||||
verbose_new,
|
||||
stringsAsFactors = FALSE
|
||||
track_changes$verbose_info <- rbind_AMR(
|
||||
track_changes$verbose_info,
|
||||
verbose_new
|
||||
)
|
||||
# count adds and changes
|
||||
track_changes$added <- track_changes$added + verbose_new %pm>%
|
||||
@@ -1207,11 +1216,11 @@ eucast_dosage <- function(ab, administration = "iv", version_breakpoints = 12.0)
|
||||
)
|
||||
)
|
||||
}
|
||||
out <- do.call("rbind", lapply(lst, as.data.frame, stringsAsFactors = FALSE))
|
||||
out <- do.call(rbind_AMR, lapply(lst, as.data.frame, stringsAsFactors = FALSE))
|
||||
rownames(out) <- NULL
|
||||
out$ab <- ab
|
||||
out$name <- ab_name(ab, language = NULL)
|
||||
if (pkg_is_available("tibble", also_load = FALSE)) {
|
||||
if (pkg_is_available("tibble")) {
|
||||
import_fn("as_tibble", "tibble")(out)
|
||||
} else {
|
||||
out
|
||||
|
||||
+72
-71
@@ -31,13 +31,13 @@
|
||||
#'
|
||||
#' Determine first isolates of all microorganisms of every patient per episode and (if needed) per specimen type. These functions support all four methods as summarised by Hindler *et al.* in 2007 (\doi{10.1086/511864}). To determine patient episodes not necessarily based on microorganisms, use [is_new_episode()] that also supports grouping with the `dplyr` package.
|
||||
#' @param x a [data.frame] containing isolates. Can be left blank for automatic determination, see *Examples*.
|
||||
#' @param col_date column name of the result date (or date that is was received on the lab), defaults to the first column with a date class
|
||||
#' @param col_patient_id column name of the unique IDs of the patients, defaults to the first column that starts with 'patient' or 'patid' (case insensitive)
|
||||
#' @param col_mo column name of the IDs of the microorganisms (see [as.mo()]), defaults to the first column of class [`mo`]. Values will be coerced using [as.mo()].
|
||||
#' @param col_date column name of the result date (or date that is was received on the lab) - the default is the first column with a date class
|
||||
#' @param col_patient_id column name of the unique IDs of the patients - the default is the first column that starts with 'patient' or 'patid' (case insensitive)
|
||||
#' @param col_mo column name of the names or codes of the microorganisms (see [as.mo()]) - the default is the first column of class [`mo`]. Values will be coerced using [as.mo()].
|
||||
#' @param col_testcode column name of the test codes. Use `col_testcode = NULL` to **not** exclude certain test codes (such as test codes for screening). In that case `testcodes_exclude` will be ignored.
|
||||
#' @param col_specimen column name of the specimen type or group
|
||||
#' @param col_icu column name of the logicals (`TRUE`/`FALSE`) whether a ward or department is an Intensive Care Unit (ICU). This can also be a [logical] vector with the same length as rows in `x`.
|
||||
#' @param col_keyantimicrobials (only useful when `method = "phenotype-based"`) column name of the key antimicrobials to determine first isolates, see [key_antimicrobials()]. Defaults to the first column that starts with 'key' followed by 'ab' or 'antibiotics' or 'antimicrobials' (case insensitive). Use `col_keyantimicrobials = FALSE` to prevent this. Can also be the output of [key_antimicrobials()].
|
||||
#' @param col_keyantimicrobials (only useful when `method = "phenotype-based"`) column name of the key antimicrobials to determine first isolates, see [key_antimicrobials()]. The default is the first column that starts with 'key' followed by 'ab' or 'antibiotics' or 'antimicrobials' (case insensitive). Use `col_keyantimicrobials = FALSE` to prevent this. Can also be the output of [key_antimicrobials()].
|
||||
#' @param episode_days episode in days after which a genus/species combination will be determined as 'first isolate' again. The default of 365 days is based on the guideline by CLSI, see *Source*.
|
||||
#' @param testcodes_exclude a [character] vector with test codes that should be excluded (case-insensitive)
|
||||
#' @param icu_exclude a [logical] to indicate whether ICU isolates should be excluded (rows with value `TRUE` in the column set with `col_icu`)
|
||||
@@ -46,7 +46,7 @@
|
||||
#' @param method the method to apply, either `"phenotype-based"`, `"episode-based"`, `"patient-based"` or `"isolate-based"` (can be abbreviated), see *Details*. The default is `"phenotype-based"` if antimicrobial test results are present in the data, and `"episode-based"` otherwise.
|
||||
#' @param ignore_I [logical] to indicate whether antibiotic interpretations with `"I"` will be ignored when `type = "keyantimicrobials"`, see *Details*
|
||||
#' @param points_threshold minimum number of points to require before differences in the antibiogram will lead to inclusion of an isolate when `type = "points"`, see *Details*
|
||||
#' @param info a [logical] to indicate info should be printed, defaults to `TRUE` only in interactive mode
|
||||
#' @param info a [logical] to indicate info should be printed - the default is `TRUE` only in interactive mode
|
||||
#' @param include_unknown a [logical] to indicate whether 'unknown' microorganisms should be included too, i.e. microbial code `"UNKNOWN"`, which defaults to `FALSE`. For WHONET users, this means that all records with organism code `"con"` (*contamination*) will be excluded at default. Isolates with a microbial ID of `NA` will always be excluded as first isolate.
|
||||
#' @param include_untested_sir a [logical] to indicate whether also rows without antibiotic results are still eligible for becoming a first isolate. Use `include_untested_sir = FALSE` to always return `FALSE` for such rows. This checks the data set for columns of class `sir` and consequently requires transforming columns with antibiotic results using [as.sir()] first.
|
||||
#' @param ... arguments passed on to [first_isolate()] when using [filter_first_isolate()], otherwise arguments passed on to [key_antimicrobials()] (such as `universal`, `gram_negative`, `gram_positive`)
|
||||
@@ -133,7 +133,7 @@
|
||||
#' # `example_isolates` is a data set available in the AMR package.
|
||||
#' # See ?example_isolates.
|
||||
#'
|
||||
#' example_isolates[first_isolate(), ]
|
||||
#' example_isolates[first_isolate(info = TRUE), ]
|
||||
#' \donttest{
|
||||
#' # get all first Gram-negatives
|
||||
#' example_isolates[which(first_isolate(info = FALSE) & mo_is_gram_negative()), ]
|
||||
@@ -141,20 +141,18 @@
|
||||
#' if (require("dplyr")) {
|
||||
#' # filter on first isolates using dplyr:
|
||||
#' example_isolates %>%
|
||||
#' filter(first_isolate())
|
||||
#' filter(first_isolate(info = TRUE))
|
||||
#' }
|
||||
#' if (require("dplyr")) {
|
||||
#'
|
||||
#' # short-hand version:
|
||||
#' example_isolates %>%
|
||||
#' filter_first_isolate(info = FALSE)
|
||||
#' }
|
||||
#' if (require("dplyr")) {
|
||||
#'
|
||||
#' # flag the first isolates per group:
|
||||
#' example_isolates %>%
|
||||
#' group_by(ward) %>%
|
||||
#' mutate(first = first_isolate()) %>%
|
||||
#' mutate(first = first_isolate(info = TRUE)) %>%
|
||||
#' select(ward, date, patient, mo, first)
|
||||
#' }
|
||||
#' }
|
||||
@@ -179,7 +177,7 @@ first_isolate <- function(x = NULL,
|
||||
include_untested_sir = TRUE,
|
||||
...) {
|
||||
if (is_null_or_grouped_tbl(x)) {
|
||||
# when `x` is left blank, auto determine it (get_current_data() also contains dplyr::cur_data_all())
|
||||
# when `x` is left blank, auto determine it (get_current_data() searches underlying data within call)
|
||||
# is also fix for using a grouped df as input (a dot as first argument)
|
||||
x <- tryCatch(get_current_data(arg_name = "x", call = -2), error = function(e) x)
|
||||
}
|
||||
@@ -228,6 +226,10 @@ first_isolate <- function(x = NULL,
|
||||
meet_criteria(points_threshold, allow_class = c("numeric", "integer"), has_length = 1, is_positive = TRUE, is_finite = TRUE)
|
||||
meet_criteria(info, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(include_unknown, allow_class = "logical", has_length = 1)
|
||||
if ("include_untested_rsi" %in% names(list(...))) {
|
||||
deprecation_warning("include_untested_rsi", "include_untested_sir", is_function = FALSE)
|
||||
include_untested_sir <- list(...)$include_untested_rsi
|
||||
}
|
||||
meet_criteria(include_untested_sir, allow_class = "logical", has_length = 1)
|
||||
|
||||
# remove data.table, grouping from tibbles, etc.
|
||||
@@ -244,18 +246,19 @@ first_isolate <- function(x = NULL,
|
||||
method <- "episode-based"
|
||||
}
|
||||
if (isTRUE(info) && message_not_thrown_before("first_isolate", "method")) {
|
||||
message_(paste0(
|
||||
"Determining first isolates ",
|
||||
ifelse(method %in% c("episode-based", "phenotype-based"),
|
||||
ifelse(is.infinite(episode_days),
|
||||
"without a specified episode length",
|
||||
paste("using an episode length of", episode_days, "days")
|
||||
),
|
||||
""
|
||||
)
|
||||
),
|
||||
as_note = FALSE,
|
||||
add_fn = font_black
|
||||
message_(
|
||||
paste0(
|
||||
"Determining first isolates ",
|
||||
ifelse(method %in% c("episode-based", "phenotype-based"),
|
||||
ifelse(is.infinite(episode_days),
|
||||
"without a specified episode length",
|
||||
paste("using an episode length of", episode_days, "days")
|
||||
),
|
||||
""
|
||||
)
|
||||
),
|
||||
as_note = FALSE,
|
||||
add_fn = font_black
|
||||
)
|
||||
}
|
||||
|
||||
@@ -347,7 +350,7 @@ first_isolate <- function(x = NULL,
|
||||
x$newvar_mo <- as.mo(x[, col_mo, drop = TRUE])
|
||||
x$newvar_genus_species <- paste(mo_genus(x$newvar_mo), mo_species(x$newvar_mo))
|
||||
x$newvar_date <- x[, col_date, drop = TRUE]
|
||||
x$newvar_patient_id <- x[, col_patient_id, drop = TRUE]
|
||||
x$newvar_patient_id <- as.character(x[, col_patient_id, drop = TRUE])
|
||||
|
||||
if (is.null(col_testcode)) {
|
||||
testcodes_exclude <- NULL
|
||||
@@ -375,7 +378,7 @@ first_isolate <- function(x = NULL,
|
||||
}
|
||||
}
|
||||
if (!is.null(col_keyantimicrobials)) {
|
||||
x$newvar_key_ab <- x[, col_keyantimicrobials, drop = TRUE]
|
||||
x$newvar_key_ab <- as.character(x[, col_keyantimicrobials, drop = TRUE])
|
||||
}
|
||||
|
||||
if (is.null(testcodes_exclude)) {
|
||||
@@ -469,15 +472,17 @@ first_isolate <- function(x = NULL,
|
||||
x$other_pat_or_mo <- !(x$newvar_patient_id == pm_lag(x$newvar_patient_id) & x$newvar_genus_species == pm_lag(x$newvar_genus_species))
|
||||
|
||||
x$episode_group <- paste(x$newvar_patient_id, x$newvar_genus_species)
|
||||
x$more_than_episode_ago <- unlist(lapply(split(
|
||||
x$newvar_date,
|
||||
x$episode_group
|
||||
),
|
||||
exec_episode, # this will skip meet_criteria() in is_new_episode(), saving time
|
||||
type = "logical",
|
||||
episode_days = episode_days
|
||||
),
|
||||
use.names = FALSE
|
||||
|
||||
x$more_than_episode_ago <- unlist(
|
||||
lapply(
|
||||
split(
|
||||
x$newvar_date,
|
||||
x$episode_group
|
||||
),
|
||||
is_new_episode,
|
||||
episode_days = episode_days
|
||||
),
|
||||
use.names = FALSE
|
||||
)
|
||||
|
||||
if (!is.null(col_keyantimicrobials)) {
|
||||
@@ -489,24 +494,16 @@ first_isolate <- function(x = NULL,
|
||||
ignore_I = ignore_I,
|
||||
points_threshold = points_threshold
|
||||
)
|
||||
x$newvar_first_isolate <- pm_if_else(
|
||||
x$newvar_row_index_sorted >= row.start &
|
||||
x$newvar_row_index_sorted <= row.end &
|
||||
x$newvar_genus_species != "" &
|
||||
(x$other_pat_or_mo | x$more_than_episode_ago | x$other_key_ab),
|
||||
TRUE,
|
||||
FALSE
|
||||
)
|
||||
x$newvar_first_isolate <- x$newvar_row_index_sorted >= row.start &
|
||||
x$newvar_row_index_sorted <= row.end &
|
||||
x$newvar_genus_species != "" &
|
||||
(x$other_pat_or_mo | x$more_than_episode_ago | x$other_key_ab)
|
||||
} else {
|
||||
# no key antibiotics
|
||||
x$newvar_first_isolate <- pm_if_else(
|
||||
x$newvar_row_index_sorted >= row.start &
|
||||
x$newvar_row_index_sorted <= row.end &
|
||||
x$newvar_genus_species != "" &
|
||||
(x$other_pat_or_mo | x$more_than_episode_ago),
|
||||
TRUE,
|
||||
FALSE
|
||||
)
|
||||
x$newvar_first_isolate <- x$newvar_row_index_sorted >= row.start &
|
||||
x$newvar_row_index_sorted <= row.end &
|
||||
x$newvar_genus_species != "" &
|
||||
(x$other_pat_or_mo | x$more_than_episode_ago)
|
||||
}
|
||||
|
||||
# first one as TRUE
|
||||
@@ -515,14 +512,17 @@ first_isolate <- function(x = NULL,
|
||||
if (!is.null(col_testcode)) {
|
||||
x[which(x[, col_testcode] %in% tolower(testcodes_exclude)), "newvar_first_isolate"] <- FALSE
|
||||
}
|
||||
|
||||
if (!is.null(col_icu)) {
|
||||
if (icu_exclude == TRUE) {
|
||||
message_("Excluding ", format(sum(col_icu, na.rm = TRUE), big.mark = ","), " isolates from ICU.",
|
||||
add_fn = font_black,
|
||||
as_note = FALSE
|
||||
)
|
||||
if (isTRUE(info)) {
|
||||
message_("Excluding ", format(sum(col_icu, na.rm = TRUE), big.mark = " "), " isolates from ICU.",
|
||||
add_fn = font_black,
|
||||
as_note = FALSE
|
||||
)
|
||||
}
|
||||
x[which(col_icu), "newvar_first_isolate"] <- FALSE
|
||||
} else {
|
||||
} else if (isTRUE(info)) {
|
||||
message_("Including isolates from ICU.",
|
||||
add_fn = font_black,
|
||||
as_note = FALSE
|
||||
@@ -531,7 +531,7 @@ first_isolate <- function(x = NULL,
|
||||
}
|
||||
|
||||
decimal.mark <- getOption("OutDec")
|
||||
big.mark <- ifelse(decimal.mark != ",", ",", ".")
|
||||
big.mark <- ifelse(decimal.mark != ",", ",", " ")
|
||||
|
||||
if (isTRUE(info)) {
|
||||
# print group name if used in dplyr::group_by()
|
||||
@@ -606,21 +606,22 @@ first_isolate <- function(x = NULL,
|
||||
}
|
||||
# mark up number of found
|
||||
n_found <- format(n_found, big.mark = big.mark, decimal.mark = decimal.mark)
|
||||
message_(paste0(
|
||||
"=> Found ",
|
||||
font_bold(paste0(
|
||||
n_found,
|
||||
ifelse(method == "isolate-based", "", paste0(" '", method, "'")),
|
||||
" first isolates"
|
||||
)),
|
||||
" (",
|
||||
ifelse(p_found_total != p_found_scope,
|
||||
paste0(p_found_scope, " within scope and "),
|
||||
""
|
||||
message_(
|
||||
paste0(
|
||||
"=> Found ",
|
||||
font_bold(paste0(
|
||||
n_found,
|
||||
ifelse(method == "isolate-based", "", paste0(" '", method, "'")),
|
||||
" first isolates"
|
||||
)),
|
||||
" (",
|
||||
ifelse(p_found_total != p_found_scope,
|
||||
paste0(p_found_scope, " within scope and "),
|
||||
""
|
||||
),
|
||||
p_found_total, " of total where a microbial ID was available)"
|
||||
),
|
||||
p_found_total, " of total where a microbial ID was available)"
|
||||
),
|
||||
add_fn = font_black, as_note = FALSE
|
||||
add_fn = font_black, as_note = FALSE
|
||||
)
|
||||
}
|
||||
|
||||
@@ -637,7 +638,7 @@ filter_first_isolate <- function(x = NULL,
|
||||
method = c("phenotype-based", "episode-based", "patient-based", "isolate-based"),
|
||||
...) {
|
||||
if (is_null_or_grouped_tbl(x)) {
|
||||
# when `x` is left blank, auto determine it (get_current_data() also contains dplyr::cur_data_all())
|
||||
# when `x` is left blank, auto determine it (get_current_data() searches underlying data within call)
|
||||
# is also fix for using a grouped df as input (a dot as first argument)
|
||||
x <- tryCatch(get_current_data(arg_name = "x", call = -2), error = function(e) x)
|
||||
}
|
||||
|
||||
+1
-1
@@ -179,7 +179,7 @@ g.test <- function(x,
|
||||
V <- outer(sr, sc, v, n)
|
||||
dimnames(E) <- dimnames(x)
|
||||
|
||||
STATISTIC <- 2 * sum(x * log(x / E)) # sum((abs(x - E) - YATES)^2/E) for chisq.test
|
||||
STATISTIC <- 2 * sum(x * log(x / E), na.rm = TRUE) # sum((abs(x - E) - YATES)^2/E) for chisq.test
|
||||
PARAMETER <- (nr - 1L) * (nc - 1L)
|
||||
PVAL <- pchisq(STATISTIC, PARAMETER, lower.tail = FALSE)
|
||||
} else {
|
||||
|
||||
Executable
+268
@@ -0,0 +1,268 @@
|
||||
# ==================================================================== #
|
||||
# TITLE #
|
||||
# AMR: An R Package for Working with Antimicrobial Resistance Data #
|
||||
# #
|
||||
# SOURCE #
|
||||
# https://github.com/msberends/AMR #
|
||||
# #
|
||||
# CITE AS #
|
||||
# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C #
|
||||
# (2022). AMR: An R Package for Working with Antimicrobial Resistance #
|
||||
# Data. Journal of Statistical Software, 104(3), 1-31. #
|
||||
# doi:10.18637/jss.v104.i03 #
|
||||
# #
|
||||
# Developed at the University of Groningen and the University Medical #
|
||||
# Center Groningen in The Netherlands, in collaboration with many #
|
||||
# colleagues from around the world, see our website. #
|
||||
# #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# We created this package for both routine data analysis and academic #
|
||||
# research and it was publicly released in the hope that it will be #
|
||||
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
|
||||
# #
|
||||
# Visit our website for the full manual and a complete tutorial about #
|
||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Determine Clinical or Epidemic Episodes
|
||||
#'
|
||||
#' These functions determine which items in a vector can be considered (the start of) a new episode. This can be used to determine clinical episodes for any epidemiological analysis. The [get_episode()] function returns the index number of the episode per group, while the [is_new_episode()] function returns `TRUE` for every new [get_episode()] index. Both absolute and relative episode determination are supported.
|
||||
#' @param x vector of dates (class `Date` or `POSIXt`), will be sorted internally to determine episodes
|
||||
#' @param episode_days episode length in days to specify the time period after which a new episode begins, can also be less than a day or `Inf`, see *Details*
|
||||
#' @param case_free_days (inter-epidemic) interval length in days after which a new episode will start, can also be less than a day or `Inf`, see *Details*
|
||||
#' @param ... ignored, only in place to allow future extensions
|
||||
#' @details Episodes can be determined in two ways: absolute and relative.
|
||||
#'
|
||||
#' 1. Absolute
|
||||
#'
|
||||
#' This method uses `episode_days` to define an episode length in days, after which a new episode will start. A common use case in AMR data analysis is microbial epidemiology: episodes of *S. aureus* bacteraemia in ICU patients for example. The episode length could then be 30 days, so that new *S. aureus* isolates after an ICU episode of 30 days will be considered a different (or new) episode.
|
||||
#'
|
||||
#' Thus, this method counts **since the start of the previous episode**.
|
||||
#'
|
||||
#' 2. Relative
|
||||
#'
|
||||
#' This method uses `case_free_days` to quantify the duration of case-free days (the inter-epidemic interval), after which a new episode will start. A common use case is infectious disease epidemiology: episodes of norovirus outbreaks in a hospital for example. The case-free period could then be 14 days, so that new norovirus cases after that time will be considered a different (or new) episode.
|
||||
#'
|
||||
#' Thus, this methods counts **since the last case in the previous episode**.
|
||||
#'
|
||||
#' In a table:
|
||||
#'
|
||||
#' | Date | Using `episode_days = 7` | Using `case_free_days = 7` |
|
||||
#' |:----------:|:------------------------:|:--------------------------:|
|
||||
#' | 2023-01-01 | 1 | 1 |
|
||||
#' | 2023-01-02 | 1 | 1 |
|
||||
#' | 2023-01-05 | 1 | 1 |
|
||||
#' | 2023-01-08 | 2** | 1 |
|
||||
#' | 2023-02-21 | 3 | 2*** |
|
||||
#' | 2023-02-22 | 3 | 2 |
|
||||
#' | 2023-02-23 | 3 | 2 |
|
||||
#' | 2023-02-24 | 3 | 2 |
|
||||
#' | 2023-03-01 | 4 | 2 |
|
||||
#'
|
||||
#' ** This marks the start of a new episode, because 8 January 2023 is more than 7 days since the start of the previous episode (1 January 2023). \cr
|
||||
#' *** This marks the start of a new episode, because 21 January 2023 is more than 7 days since the last case in the previous episode (8 January 2023).
|
||||
#'
|
||||
#' Either `episode_days` or `case_free_days` must be provided in the function.
|
||||
#'
|
||||
#' ### Difference between `get_episode()` and `is_new_episode()`
|
||||
#'
|
||||
#' The [get_episode()] function returns the index number of the episode, so all cases/patients/isolates in the first episode will have the number 1, all cases/patients/isolates in the second episode will have the number 2, etc.
|
||||
#'
|
||||
#' The [is_new_episode()] function on the other hand, returns `TRUE` for every new [get_episode()] index.
|
||||
#'
|
||||
#' To specify, when setting `episode_days = 365` (using method 1 as explained above), this is how the two functions differ:
|
||||
#'
|
||||
#' | patient | date | `get_episode()` | `is_new_episode()` |
|
||||
#' |:---------:|:----------:|:---------------:|:------------------:|
|
||||
#' | A | 2019-01-01 | 1 | TRUE |
|
||||
#' | A | 2019-03-01 | 1 | FALSE |
|
||||
#' | A | 2021-01-01 | 2 | TRUE |
|
||||
#' | B | 2008-01-01 | 1 | TRUE |
|
||||
#' | B | 2008-01-01 | 1 | FALSE |
|
||||
#' | C | 2020-01-01 | 1 | TRUE |
|
||||
#'
|
||||
#' ### Other
|
||||
#'
|
||||
#' The [first_isolate()] function is a wrapper around the [is_new_episode()] function, but is more efficient for data sets containing microorganism codes or names and allows for different isolate selection methods.
|
||||
#'
|
||||
#' The `dplyr` package is not required for these functions to work, but these episode functions do support [variable grouping][dplyr::group_by()] and work conveniently inside `dplyr` verbs such as [`filter()`][dplyr::filter()], [`mutate()`][dplyr::mutate()] and [`summarise()`][dplyr::summarise()].
|
||||
#' @return
|
||||
#' * [get_episode()]: an [integer] vector
|
||||
#' * [is_new_episode()]: a [logical] vector
|
||||
#' @seealso [first_isolate()]
|
||||
#' @rdname get_episode
|
||||
#' @export
|
||||
#' @examples
|
||||
#' # difference between absolute and relative determination of episodes:
|
||||
#' x <- data.frame(dates = as.Date(c(
|
||||
#' "2021-01-01",
|
||||
#' "2021-01-02",
|
||||
#' "2021-01-05",
|
||||
#' "2021-01-08",
|
||||
#' "2021-02-21",
|
||||
#' "2021-02-22",
|
||||
#' "2021-02-23",
|
||||
#' "2021-02-24",
|
||||
#' "2021-03-01",
|
||||
#' "2021-03-01"
|
||||
#' )))
|
||||
#' x$absolute <- get_episode(x$dates, episode_days = 7)
|
||||
#' x$relative <- get_episode(x$dates, case_free_days = 7)
|
||||
#' x
|
||||
#'
|
||||
#'
|
||||
#' # `example_isolates` is a data set available in the AMR package.
|
||||
#' # See ?example_isolates
|
||||
#' df <- example_isolates[sample(seq_len(2000), size = 100), ]
|
||||
#'
|
||||
#' get_episode(df$date, episode_days = 60) # indices
|
||||
#' is_new_episode(df$date, episode_days = 60) # TRUE/FALSE
|
||||
#'
|
||||
#' # filter on results from the third 60-day episode only, using base R
|
||||
#' df[which(get_episode(df$date, 60) == 3), ]
|
||||
#'
|
||||
#' # the functions also work for less than a day, e.g. to include one per hour:
|
||||
#' get_episode(
|
||||
#' c(
|
||||
#' Sys.time(),
|
||||
#' Sys.time() + 60 * 60
|
||||
#' ),
|
||||
#' episode_days = 1 / 24
|
||||
#' )
|
||||
#'
|
||||
#' \donttest{
|
||||
#' if (require("dplyr")) {
|
||||
#' # is_new_episode() can also be used in dplyr verbs to determine patient
|
||||
#' # episodes based on any (combination of) grouping variables:
|
||||
#' df %>%
|
||||
#' mutate(condition = sample(
|
||||
#' x = c("A", "B", "C"),
|
||||
#' size = 100,
|
||||
#' replace = TRUE
|
||||
#' )) %>%
|
||||
#' group_by(patient, condition) %>%
|
||||
#' mutate(new_episode = is_new_episode(date, 365)) %>%
|
||||
#' select(patient, date, condition, new_episode) %>%
|
||||
#' arrange(patient, condition, date)
|
||||
#' }
|
||||
#'
|
||||
#' if (require("dplyr")) {
|
||||
#' df %>%
|
||||
#' group_by(ward, patient) %>%
|
||||
#' transmute(date,
|
||||
#' patient,
|
||||
#' new_index = get_episode(date, 60),
|
||||
#' new_logical = is_new_episode(date, 60)
|
||||
#' ) %>%
|
||||
#' arrange(patient, ward, date)
|
||||
#' }
|
||||
#'
|
||||
#' if (require("dplyr")) {
|
||||
#' df %>%
|
||||
#' group_by(ward) %>%
|
||||
#' summarise(
|
||||
#' n_patients = n_distinct(patient),
|
||||
#' n_episodes_365 = sum(is_new_episode(date, episode_days = 365)),
|
||||
#' n_episodes_60 = sum(is_new_episode(date, episode_days = 60)),
|
||||
#' n_episodes_30 = sum(is_new_episode(date, episode_days = 30))
|
||||
#' )
|
||||
#' }
|
||||
#'
|
||||
#' # grouping on patients and microorganisms leads to the same
|
||||
#' # results as first_isolate() when using 'episode-based':
|
||||
#' if (require("dplyr")) {
|
||||
#' x <- df %>%
|
||||
#' filter_first_isolate(
|
||||
#' include_unknown = TRUE,
|
||||
#' method = "episode-based"
|
||||
#' )
|
||||
#'
|
||||
#' y <- df %>%
|
||||
#' group_by(patient, mo) %>%
|
||||
#' filter(is_new_episode(date, 365)) %>%
|
||||
#' ungroup()
|
||||
#'
|
||||
#' identical(x, y)
|
||||
#' }
|
||||
#'
|
||||
#' # but is_new_episode() has a lot more flexibility than first_isolate(),
|
||||
#' # since you can now group on anything that seems relevant:
|
||||
#' if (require("dplyr")) {
|
||||
#' df %>%
|
||||
#' group_by(patient, mo, ward) %>%
|
||||
#' mutate(flag_episode = is_new_episode(date, 365)) %>%
|
||||
#' select(group_vars(.), flag_episode)
|
||||
#' }
|
||||
#' }
|
||||
get_episode <- function(x, episode_days = NULL, case_free_days = NULL, ...) {
|
||||
meet_criteria(x, allow_class = c("Date", "POSIXt"), allow_NA = TRUE)
|
||||
meet_criteria(episode_days, allow_class = c("numeric", "integer"), has_length = 1, is_positive = TRUE, is_finite = FALSE, allow_NULL = TRUE)
|
||||
meet_criteria(case_free_days, allow_class = c("numeric", "integer"), has_length = 1, is_positive = TRUE, is_finite = FALSE, allow_NULL = TRUE)
|
||||
as.integer(exec_episode(x, episode_days, case_free_days, ...))
|
||||
}
|
||||
|
||||
#' @rdname get_episode
|
||||
#' @export
|
||||
is_new_episode <- function(x, episode_days = NULL, case_free_days = NULL, ...) {
|
||||
meet_criteria(x, allow_class = c("Date", "POSIXt"), allow_NA = TRUE)
|
||||
meet_criteria(episode_days, allow_class = c("numeric", "integer"), has_length = 1, is_positive = TRUE, is_finite = FALSE, allow_NULL = TRUE)
|
||||
meet_criteria(case_free_days, allow_class = c("numeric", "integer"), has_length = 1, is_positive = TRUE, is_finite = FALSE, allow_NULL = TRUE)
|
||||
!duplicated(exec_episode(x, episode_days, case_free_days, ...))
|
||||
}
|
||||
|
||||
exec_episode <- function(x, episode_days, case_free_days, ...) {
|
||||
stop_ifnot(is.null(episode_days) || is.null(case_free_days),
|
||||
"either argument `episode_days` or argument `case_free_days` must be set.",
|
||||
call = -2
|
||||
)
|
||||
|
||||
# running as.double() on a POSIXct object will return its number of seconds since 1970-01-01
|
||||
x <- as.double(as.POSIXct(x)) # as.POSIXct() required for Date classes
|
||||
|
||||
# since x is now in seconds, get seconds from episode_days as well
|
||||
episode_seconds <- episode_days * 60 * 60 * 24
|
||||
case_free_seconds <- case_free_days * 60 * 60 * 24
|
||||
|
||||
if (length(x) == 1) { # this will also match 1 NA, which is fine
|
||||
return(1)
|
||||
} else if (length(x) == 2 && all(!is.na(x))) {
|
||||
if ((length(episode_seconds) > 0 && (max(x) - min(x)) >= episode_seconds) ||
|
||||
(length(case_free_seconds) > 0 && (max(x) - min(x)) >= case_free_seconds)) {
|
||||
if (x[1] <= x[2]) {
|
||||
return(c(1, 2))
|
||||
} else {
|
||||
return(c(2, 1))
|
||||
}
|
||||
} else {
|
||||
return(c(1, 1))
|
||||
}
|
||||
}
|
||||
|
||||
run_episodes <- function(x, episode_seconds, case_free) {
|
||||
NAs <- which(is.na(x))
|
||||
x[NAs] <- 0
|
||||
|
||||
indices <- integer(length = length(x))
|
||||
start <- x[1]
|
||||
ind <- 1
|
||||
indices[ind] <- 1
|
||||
for (i in 2:length(x)) {
|
||||
if ((length(episode_seconds) > 0 && (x[i] - start) >= episode_seconds) ||
|
||||
(length(case_free_seconds) > 0 && (x[i] - x[i - 1]) >= case_free_seconds)) {
|
||||
ind <- ind + 1
|
||||
start <- x[i]
|
||||
}
|
||||
indices[i] <- ind
|
||||
}
|
||||
indices[NAs] <- NA
|
||||
indices
|
||||
}
|
||||
|
||||
ord <- order(x)
|
||||
out <- run_episodes(x[ord], episode_seconds, case_free_seconds)[order(ord)]
|
||||
out[is.na(x) & ord != 1] <- NA # every NA expect for the first must remain NA
|
||||
out
|
||||
}
|
||||
+8
-7
@@ -414,13 +414,14 @@ pca_calculations <- function(pca_model,
|
||||
sigma <- var(cbind(x$xvar, x$yvar))
|
||||
mu <- c(mean(x$xvar), mean(x$yvar))
|
||||
ed <- sqrt(qchisq(ellipse_prob, df = 2))
|
||||
data.frame(sweep(circle %*% chol(sigma) * ed,
|
||||
MARGIN = 2,
|
||||
STATS = mu,
|
||||
FUN = "+"
|
||||
),
|
||||
groups = x$groups[1],
|
||||
stringsAsFactors = FALSE
|
||||
data.frame(
|
||||
sweep(circle %*% chol(sigma) * ed,
|
||||
MARGIN = 2,
|
||||
STATS = mu,
|
||||
FUN = "+"
|
||||
),
|
||||
groups = x$groups[1],
|
||||
stringsAsFactors = FALSE
|
||||
)
|
||||
})
|
||||
ell <- do.call(rbind, df.groups)
|
||||
|
||||
+5
-15
@@ -40,7 +40,7 @@
|
||||
#' @inheritParams proportion
|
||||
#' @param nrow (when using `facet`) number of rows
|
||||
#' @param colours a named vactor with colour to be used for filling. The default colours are colour-blind friendly.
|
||||
#' @param aesthetics aesthetics to apply the colours to, defaults to "fill" but can also be (a combination of) "alpha", "colour", "fill", "linetype", "shape" or "size"
|
||||
#' @param aesthetics aesthetics to apply the colours to - the default is "fill" but can also be (a combination of) "alpha", "colour", "fill", "linetype", "shape" or "size"
|
||||
#' @param datalabels show datalabels using [labels_sir_count()]
|
||||
#' @param datalabels.size size of the datalabels
|
||||
#' @param datalabels.colour colour of the datalabels
|
||||
@@ -71,13 +71,11 @@
|
||||
#' @examples
|
||||
#' \donttest{
|
||||
#' if (require("ggplot2") && require("dplyr")) {
|
||||
#'
|
||||
#' # get antimicrobial results for drugs against a UTI:
|
||||
#' ggplot(example_isolates %>% select(AMX, NIT, FOS, TMP, CIP)) +
|
||||
#' geom_sir()
|
||||
#' }
|
||||
#' if (require("ggplot2") && require("dplyr")) {
|
||||
#'
|
||||
#' # prettify the plot using some additional functions:
|
||||
#' df <- example_isolates %>% select(AMX, NIT, FOS, TMP, CIP)
|
||||
#' ggplot(df) +
|
||||
@@ -88,21 +86,18 @@
|
||||
#' theme_sir()
|
||||
#' }
|
||||
#' if (require("ggplot2") && require("dplyr")) {
|
||||
#'
|
||||
#' # or better yet, simplify this using the wrapper function - a single command:
|
||||
#' example_isolates %>%
|
||||
#' select(AMX, NIT, FOS, TMP, CIP) %>%
|
||||
#' ggplot_sir()
|
||||
#' }
|
||||
#' if (require("ggplot2") && require("dplyr")) {
|
||||
#'
|
||||
#' # get only proportions and no counts:
|
||||
#' example_isolates %>%
|
||||
#' select(AMX, NIT, FOS, TMP, CIP) %>%
|
||||
#' ggplot_sir(datalabels = FALSE)
|
||||
#' }
|
||||
#' if (require("ggplot2") && require("dplyr")) {
|
||||
#'
|
||||
#' # add other ggplot2 arguments as you like:
|
||||
#' example_isolates %>%
|
||||
#' select(AMX, NIT, FOS, TMP, CIP) %>%
|
||||
@@ -115,14 +110,12 @@
|
||||
#' )
|
||||
#' }
|
||||
#' if (require("ggplot2") && require("dplyr")) {
|
||||
#'
|
||||
#' # you can alter the colours with colour names:
|
||||
#' example_isolates %>%
|
||||
#' select(AMX) %>%
|
||||
#' ggplot_sir(colours = c(SI = "yellow"))
|
||||
#' }
|
||||
#' if (require("ggplot2") && require("dplyr")) {
|
||||
#'
|
||||
#' # but you can also use the built-in colour-blind friendly colours for
|
||||
#' # your plots, where "S" is green, "I" is yellow and "R" is red:
|
||||
#' data.frame(
|
||||
@@ -135,7 +128,6 @@
|
||||
#' scale_sir_colours(Value4 = "S", Value5 = "I", Value6 = "R")
|
||||
#' }
|
||||
#' if (require("ggplot2") && require("dplyr")) {
|
||||
#'
|
||||
#' # resistance of ciprofloxacine per age group
|
||||
#' example_isolates %>%
|
||||
#' mutate(first_isolate = first_isolate()) %>%
|
||||
@@ -149,14 +141,12 @@
|
||||
#' ggplot_sir(x = "age_group")
|
||||
#' }
|
||||
#' if (require("ggplot2") && require("dplyr")) {
|
||||
#'
|
||||
#' # a shorter version which also adjusts data label colours:
|
||||
#' example_isolates %>%
|
||||
#' select(AMX, NIT, FOS, TMP, CIP) %>%
|
||||
#' ggplot_sir(colours = FALSE)
|
||||
#' }
|
||||
#' if (require("ggplot2") && require("dplyr")) {
|
||||
#'
|
||||
#' # it also supports groups (don't forget to use the group var on `x` or `facet`):
|
||||
#' example_isolates %>%
|
||||
#' filter(mo_is_gram_negative(), ward != "Outpatient") %>%
|
||||
@@ -203,7 +193,7 @@ ggplot_sir <- function(data,
|
||||
y.title = "Proportion",
|
||||
...) {
|
||||
stop_ifnot_installed("ggplot2")
|
||||
meet_criteria(data, allow_class = "data.frame", contains_column_class = "sir")
|
||||
meet_criteria(data, allow_class = "data.frame", contains_column_class = c("sir", "rsi"))
|
||||
meet_criteria(position, allow_class = "character", has_length = 1, is_in = c("fill", "stack", "dodge"), allow_NULL = TRUE)
|
||||
meet_criteria(x, allow_class = "character", has_length = 1)
|
||||
meet_criteria(fill, allow_class = "character", has_length = 1)
|
||||
@@ -212,7 +202,7 @@ ggplot_sir <- function(data,
|
||||
meet_criteria(limits, allow_class = c("numeric", "integer"), has_length = 2, allow_NULL = TRUE, allow_NA = TRUE)
|
||||
meet_criteria(translate_ab, allow_class = c("character", "logical"), has_length = 1, allow_NA = TRUE)
|
||||
meet_criteria(combine_SI, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_finite = TRUE)
|
||||
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_positive_or_zero = TRUE, is_finite = TRUE)
|
||||
language <- validate_language(language)
|
||||
meet_criteria(nrow, allow_class = c("numeric", "integer"), has_length = 1, allow_NULL = TRUE, is_positive = TRUE, is_finite = TRUE)
|
||||
meet_criteria(colours, allow_class = c("character", "logical"))
|
||||
@@ -310,7 +300,7 @@ geom_sir <- function(position = NULL,
|
||||
meet_criteria(x, allow_class = "character", has_length = 1)
|
||||
meet_criteria(fill, allow_class = "character", has_length = 1)
|
||||
meet_criteria(translate_ab, allow_class = c("character", "logical"), has_length = 1, allow_NA = TRUE)
|
||||
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_finite = TRUE)
|
||||
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_positive_or_zero = TRUE, is_finite = TRUE)
|
||||
language <- validate_language(language)
|
||||
meet_criteria(combine_SI, allow_class = "logical", has_length = 1)
|
||||
|
||||
@@ -496,7 +486,7 @@ labels_sir_count <- function(position = NULL,
|
||||
meet_criteria(position, allow_class = "character", has_length = 1, is_in = c("fill", "stack", "dodge"), allow_NULL = TRUE)
|
||||
meet_criteria(x, allow_class = "character", has_length = 1)
|
||||
meet_criteria(translate_ab, allow_class = c("character", "logical"), has_length = 1, allow_NA = TRUE)
|
||||
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_finite = TRUE)
|
||||
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_positive_or_zero = TRUE, is_finite = TRUE)
|
||||
language <- validate_language(language)
|
||||
meet_criteria(combine_SI, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(datalabels.size, allow_class = c("numeric", "integer"), has_length = 1, is_positive = TRUE, is_finite = TRUE)
|
||||
|
||||
+22
-19
@@ -33,7 +33,7 @@
|
||||
#' @param x a [data.frame]
|
||||
#' @param search_string a text to search `x` for, will be checked with [as.ab()] if this value is not a column in `x`
|
||||
#' @param verbose a [logical] to indicate whether additional info should be printed
|
||||
#' @param only_sir_columns a [logical] to indicate whether only antibiotic columns must be detected that were transformed to class `sir` (see [as.sir()]) on beforehand (defaults to `FALSE`)
|
||||
#' @param only_sir_columns a [logical] to indicate whether only antibiotic columns must be detected that were transformed to class `sir` (see [as.sir()]) on beforehand (default is `FALSE`)
|
||||
#' @details You can look for an antibiotic (trade) name or abbreviation and it will search `x` and the [antibiotics] data set for any column containing a name or code of that antibiotic.
|
||||
#' @return A column name of `x`, or `NULL` when no result is found.
|
||||
#' @export
|
||||
@@ -274,14 +274,15 @@ get_column_abx <- function(x,
|
||||
}
|
||||
if (names(out[i]) %in% names(duplicates)) {
|
||||
already_set_as <- out[unname(out) == unname(out[i])][1L]
|
||||
warning_(paste0(
|
||||
"Column '", font_bold(out[i]), "' will not be used for ",
|
||||
names(out)[i], " (", ab_name(names(out)[i], tolower = TRUE, language = NULL), ")",
|
||||
", as it is already set for ",
|
||||
names(already_set_as), " (", ab_name(names(already_set_as), tolower = TRUE, language = NULL), ")"
|
||||
),
|
||||
add_fn = font_red,
|
||||
immediate = verbose
|
||||
warning_(
|
||||
paste0(
|
||||
"Column '", font_bold(out[i]), "' will not be used for ",
|
||||
names(out)[i], " (", ab_name(names(out)[i], tolower = TRUE, language = NULL), ")",
|
||||
", as it is already set for ",
|
||||
names(already_set_as), " (", ab_name(names(already_set_as), tolower = TRUE, language = NULL), ")"
|
||||
),
|
||||
add_fn = font_red,
|
||||
immediate = verbose
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -307,11 +308,12 @@ get_column_abx <- function(x,
|
||||
if (isTRUE(info) && !all(soft_dependencies %in% names(out))) {
|
||||
# missing a soft dependency may lower the reliability
|
||||
missing <- soft_dependencies[!soft_dependencies %in% names(out)]
|
||||
missing_msg <- vector_and(paste0(
|
||||
ab_name(missing, tolower = TRUE, language = NULL),
|
||||
" (", font_bold(missing, collapse = NULL), ")"
|
||||
),
|
||||
quotes = FALSE
|
||||
missing_msg <- vector_and(
|
||||
paste0(
|
||||
ab_name(missing, tolower = TRUE, language = NULL),
|
||||
" (", font_bold(missing, collapse = NULL), ")"
|
||||
),
|
||||
quotes = FALSE
|
||||
)
|
||||
message_(
|
||||
"Reliability would be improved if these antimicrobial results would be available too: ",
|
||||
@@ -355,10 +357,11 @@ generate_warning_abs_missing <- function(missing, any = FALSE) {
|
||||
} else {
|
||||
any_txt <- c("", "are")
|
||||
}
|
||||
warning_(paste0(
|
||||
"Introducing NAs since", any_txt[1], " these antimicrobials ", any_txt[2], " required: ",
|
||||
vector_and(missing, quotes = FALSE)
|
||||
),
|
||||
immediate = TRUE
|
||||
warning_(
|
||||
paste0(
|
||||
"Introducing NAs since", any_txt[1], " these antimicrobials ", any_txt[2], " required: ",
|
||||
vector_and(missing, quotes = FALSE)
|
||||
),
|
||||
immediate = TRUE
|
||||
)
|
||||
}
|
||||
|
||||
+31
-28
@@ -73,41 +73,44 @@ italicise_taxonomy <- function(string, type = c("markdown", "ansi")) {
|
||||
search_strings <- gsub("[^a-zA-Z-]", "", s_split)
|
||||
|
||||
ind_species <- search_strings != "" &
|
||||
search_strings %in% AMR_env$MO_lookup[which(AMR_env$MO_lookup$rank %in% c(
|
||||
"family",
|
||||
"genus",
|
||||
search_strings %in% AMR_env$MO_lookup[
|
||||
which(AMR_env$MO_lookup$rank %in% c(
|
||||
"family",
|
||||
"genus",
|
||||
"species",
|
||||
"subspecies",
|
||||
"infraspecies",
|
||||
"subsp."
|
||||
)),
|
||||
"species",
|
||||
"subspecies",
|
||||
"infraspecies",
|
||||
"subsp."
|
||||
)),
|
||||
"species",
|
||||
drop = TRUE
|
||||
drop = TRUE
|
||||
]
|
||||
|
||||
ind_fullname <- search_strings != "" &
|
||||
search_strings %in% c(
|
||||
AMR_env$MO_lookup[which(AMR_env$MO_lookup$rank %in% c(
|
||||
"family",
|
||||
"genus",
|
||||
"species",
|
||||
"subspecies",
|
||||
"infraspecies",
|
||||
"subsp."
|
||||
)),
|
||||
"fullname",
|
||||
drop = TRUE
|
||||
AMR_env$MO_lookup[
|
||||
which(AMR_env$MO_lookup$rank %in% c(
|
||||
"family",
|
||||
"genus",
|
||||
"species",
|
||||
"subspecies",
|
||||
"infraspecies",
|
||||
"subsp."
|
||||
)),
|
||||
"fullname",
|
||||
drop = TRUE
|
||||
],
|
||||
AMR_env$MO_lookup[which(AMR_env$MO_lookup$rank %in% c(
|
||||
"family",
|
||||
"genus",
|
||||
"species",
|
||||
AMR_env$MO_lookup[
|
||||
which(AMR_env$MO_lookup$rank %in% c(
|
||||
"family",
|
||||
"genus",
|
||||
"species",
|
||||
"subspecies",
|
||||
"infraspecies",
|
||||
"subsp."
|
||||
)),
|
||||
"subspecies",
|
||||
"infraspecies",
|
||||
"subsp."
|
||||
)),
|
||||
"subspecies",
|
||||
drop = TRUE
|
||||
drop = TRUE
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
@@ -128,9 +128,9 @@ anti_join_microorganisms <- function(x, by = NULL, ...) {
|
||||
|
||||
join_microorganisms <- function(type, x, by, suffix, ...) {
|
||||
add_MO_lookup_to_AMR_env()
|
||||
|
||||
|
||||
if (!is.data.frame(x)) {
|
||||
if (pkg_is_available("tibble", also_load = FALSE)) {
|
||||
if (pkg_is_available("tibble")) {
|
||||
x <- import_fn("tibble", "tibble")(mo = x)
|
||||
} else {
|
||||
x <- data.frame(mo = x, stringsAsFactors = FALSE)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#' @param gram_negative names of antibiotic drugs for **Gram-positives**, case-insensitive. Set to `NULL` to ignore. See *Details* for the default antibiotic drugs
|
||||
#' @param gram_positive names of antibiotic drugs for **Gram-negatives**, case-insensitive. Set to `NULL` to ignore. See *Details* for the default antibiotic drugs
|
||||
#' @param antifungal names of antifungal drugs for **fungi**, case-insensitive. Set to `NULL` to ignore. See *Details* for the default antifungal drugs
|
||||
#' @param only_sir_columns a [logical] to indicate whether only columns must be included that were transformed to class `sir` (see [as.sir()]) on beforehand (defaults to `FALSE`)
|
||||
#' @param only_sir_columns a [logical] to indicate whether only columns must be included that were transformed to class `sir` (see [as.sir()]) on beforehand (default is `FALSE`)
|
||||
#' @param ... ignored, only in place to allow future extensions
|
||||
#' @details
|
||||
#' The [key_antimicrobials()] and [all_antimicrobials()] functions are context-aware. This means that the `x` argument can be left blank if used inside a [data.frame] call, see *Examples*.
|
||||
@@ -138,7 +138,7 @@ key_antimicrobials <- function(x = NULL,
|
||||
only_sir_columns = FALSE,
|
||||
...) {
|
||||
if (is_null_or_grouped_tbl(x)) {
|
||||
# when `x` is left blank, auto determine it (get_current_data() also contains dplyr::cur_data_all())
|
||||
# when `x` is left blank, auto determine it (get_current_data() searches underlying data within call)
|
||||
# is also fix for using a grouped df as input (a dot as first argument)
|
||||
x <- tryCatch(get_current_data(arg_name = "x", call = -2), error = function(e) x)
|
||||
}
|
||||
@@ -149,6 +149,10 @@ key_antimicrobials <- function(x = NULL,
|
||||
meet_criteria(gram_positive, allow_class = "character", allow_NULL = TRUE)
|
||||
meet_criteria(antifungal, allow_class = "character", allow_NULL = TRUE)
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
|
||||
# force regular data.frame, not a tibble or data.table
|
||||
x <- as.data.frame(x, stringsAsFactors = FALSE)
|
||||
@@ -250,7 +254,7 @@ all_antimicrobials <- function(x = NULL,
|
||||
only_sir_columns = FALSE,
|
||||
...) {
|
||||
if (is_null_or_grouped_tbl(x)) {
|
||||
# when `x` is left blank, auto determine it (get_current_data() also contains dplyr::cur_data_all())
|
||||
# when `x` is left blank, auto determine it (get_current_data() searches underlying data within call)
|
||||
# is also fix for using a grouped df as input (a dot as first argument)
|
||||
x <- tryCatch(get_current_data(arg_name = "x", call = -2), error = function(e) x)
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ mdro <- function(x = NULL,
|
||||
only_sir_columns = FALSE,
|
||||
...) {
|
||||
if (is_null_or_grouped_tbl(x)) {
|
||||
# when `x` is left blank, auto determine it (get_current_data() also contains dplyr::cur_data_all())
|
||||
# when `x` is left blank, auto determine it (get_current_data() searches underlying data within call)
|
||||
# is also a fix for using a grouped df as input (i.e., a dot as first argument)
|
||||
x <- tryCatch(get_current_data(arg_name = "x", call = -2), error = function(e) x)
|
||||
}
|
||||
@@ -192,18 +192,22 @@ mdro <- function(x = NULL,
|
||||
meet_criteria(pct_required_classes, allow_class = "numeric", has_length = 1)
|
||||
meet_criteria(combine_SI, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(verbose, allow_class = "logical", has_length = 1)
|
||||
if ("only_rsi_columns" %in% names(list(...))) {
|
||||
deprecation_warning("only_rsi_columns", "only_sir_columns", is_function = FALSE)
|
||||
only_sir_columns <- list(...)$only_rsi_columns
|
||||
}
|
||||
meet_criteria(only_sir_columns, allow_class = "logical", has_length = 1)
|
||||
|
||||
|
||||
if (!any(is_sir_eligible(x))) {
|
||||
stop_("There were no possible SIR columns found in the data set. Transform columns with `as.sir()` for valid antimicrobial interpretations.")
|
||||
}
|
||||
|
||||
|
||||
info.bak <- info
|
||||
# don't thrown info's more than once per call
|
||||
if (isTRUE(info)) {
|
||||
info <- message_not_thrown_before("mdro")
|
||||
}
|
||||
|
||||
|
||||
if (interactive() && isTRUE(verbose) && isTRUE(info)) {
|
||||
txt <- paste0(
|
||||
"WARNING: In Verbose mode, the mdro() function does not return the MDRO results, but instead returns a data set in logbook form with extensive info about which isolates would be MDRO-positive, or why they are not.",
|
||||
@@ -221,7 +225,7 @@ mdro <- function(x = NULL,
|
||||
return(x)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
group_msg <- ""
|
||||
if (isTRUE(info.bak)) {
|
||||
# print group name if used in dplyr::group_by()
|
||||
@@ -243,15 +247,15 @@ mdro <- function(x = NULL,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# force regular [data.frame], not a tibble or data.table
|
||||
x <- as.data.frame(x, stringsAsFactors = FALSE)
|
||||
|
||||
|
||||
if (pct_required_classes > 1) {
|
||||
# allow pct_required_classes = 75 -> pct_required_classes = 0.75
|
||||
pct_required_classes <- pct_required_classes / 100
|
||||
}
|
||||
|
||||
|
||||
guideline.bak <- guideline
|
||||
if (is.list(guideline)) {
|
||||
# Custom MDRO guideline ---------------------------------------------------
|
||||
@@ -260,8 +264,8 @@ mdro <- function(x = NULL,
|
||||
txt <- paste0(
|
||||
"Determining MDROs based on custom rules",
|
||||
ifelse(isTRUE(attributes(guideline)$as_factor),
|
||||
paste0(", resulting in factor levels: ", paste0(attributes(guideline)$values, collapse = " < ")),
|
||||
""
|
||||
paste0(", resulting in factor levels: ", paste0(attributes(guideline)$values, collapse = " < ")),
|
||||
""
|
||||
),
|
||||
"."
|
||||
)
|
||||
@@ -314,7 +318,7 @@ mdro <- function(x = NULL,
|
||||
"invalid guideline: ", guideline.bak
|
||||
)
|
||||
guideline <- list(code = guideline)
|
||||
|
||||
|
||||
# try to find columns based on type
|
||||
# -- mo
|
||||
if (is.null(col_mo)) {
|
||||
@@ -329,7 +333,7 @@ mdro <- function(x = NULL,
|
||||
col_mo <- "mo"
|
||||
}
|
||||
stop_if(is.null(col_mo), "`col_mo` must be set")
|
||||
|
||||
|
||||
if (guideline$code == "cmi2012") {
|
||||
guideline$name <- "Multidrug-resistant, extensively drug-resistant and pandrug-resistant bacteria: an international expert proposal for interim standard definitions for acquired resistance."
|
||||
guideline$author <- "Magiorakos AP, Srinivasan A, Carey RB, ..., Vatopoulos A, Weber JT, Monnet DL"
|
||||
@@ -360,7 +364,7 @@ mdro <- function(x = NULL,
|
||||
guideline$version <- "WHO/HTM/TB/2014.11, 2014"
|
||||
guideline$source_url <- font_url("https://www.who.int/publications/i/item/9789241548809", "Direct download")
|
||||
guideline$type <- "MDR-TB's"
|
||||
|
||||
|
||||
# support per country:
|
||||
} else if (guideline$code == "mrgn") {
|
||||
guideline$name <- "Cross-border comparison of the Dutch and German guidelines on multidrug-resistant Gram-negative microorganisms"
|
||||
@@ -377,7 +381,7 @@ mdro <- function(x = NULL,
|
||||
} else {
|
||||
stop("This guideline is currently unsupported: ", guideline$code, call. = FALSE)
|
||||
}
|
||||
|
||||
|
||||
if (guideline$code == "cmi2012") {
|
||||
cols_ab <- get_column_abx(
|
||||
x = x,
|
||||
@@ -456,7 +460,7 @@ mdro <- function(x = NULL,
|
||||
}
|
||||
cols_ab <- c(cols_ab, c(AMP = unname(cols_ab[names(cols_ab) == "AMX"])))
|
||||
}
|
||||
|
||||
|
||||
# nolint start
|
||||
AMC <- cols_ab["AMC"]
|
||||
AMK <- cols_ab["AMK"]
|
||||
@@ -601,13 +605,13 @@ mdro <- function(x = NULL,
|
||||
abx_tb <- abx_tb[!is.na(abx_tb)]
|
||||
stop_if(guideline$code == "tb" & length(abx_tb) == 0, "no antimycobacterials found in data set")
|
||||
# nolint end
|
||||
|
||||
|
||||
if (isTRUE(combine_SI)) {
|
||||
search_result <- "R"
|
||||
} else {
|
||||
search_result <- c("R", "I")
|
||||
}
|
||||
|
||||
|
||||
if (isTRUE(info)) {
|
||||
if (isTRUE(combine_SI)) {
|
||||
cat(font_red("\nOnly results with 'R' are considered as resistance. Use `combine_SI = FALSE` to also consider 'I' as resistance.\n"))
|
||||
@@ -615,18 +619,18 @@ mdro <- function(x = NULL,
|
||||
cat(font_red("\nResults with 'R' or 'I' are considered as resistance. Use `combine_SI = TRUE` to only consider 'R' as resistance.\n"))
|
||||
}
|
||||
cat("\n", word_wrap("Determining multidrug-resistant organisms (MDRO), according to:"), "\n",
|
||||
word_wrap(paste0(font_bold("Guideline: "), font_italic(guideline$name)), extra_indent = 11, as_note = FALSE), "\n",
|
||||
word_wrap(paste0(font_bold("Author(s): "), guideline$author), extra_indent = 11, as_note = FALSE), "\n",
|
||||
ifelse(!is.na(guideline$version),
|
||||
paste0(word_wrap(paste0(font_bold("Version: "), guideline$version), extra_indent = 11, as_note = FALSE), "\n"),
|
||||
""
|
||||
),
|
||||
paste0(font_bold("Source: "), guideline$source_url),
|
||||
"\n\n",
|
||||
sep = ""
|
||||
word_wrap(paste0(font_bold("Guideline: "), font_italic(guideline$name)), extra_indent = 11, as_note = FALSE), "\n",
|
||||
word_wrap(paste0(font_bold("Author(s): "), guideline$author), extra_indent = 11, as_note = FALSE), "\n",
|
||||
ifelse(!is.na(guideline$version),
|
||||
paste0(word_wrap(paste0(font_bold("Version: "), guideline$version), extra_indent = 11, as_note = FALSE), "\n"),
|
||||
""
|
||||
),
|
||||
paste0(font_bold("Source: "), guideline$source_url),
|
||||
"\n\n",
|
||||
sep = ""
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
ab_missing <- function(ab) {
|
||||
isTRUE(ab %in% c(NULL, NA)) | length(ab) == 0
|
||||
}
|
||||
@@ -638,7 +642,7 @@ mdro <- function(x = NULL,
|
||||
out[is.na(out)] <- FALSE
|
||||
out
|
||||
}
|
||||
|
||||
|
||||
# antibiotic classes
|
||||
# nolint start
|
||||
aminoglycosides <- c(TOB, GEN)
|
||||
@@ -649,17 +653,18 @@ mdro <- function(x = NULL,
|
||||
carbapenems <- c(DOR, ETP, IPM, MEM, MEV)
|
||||
fluoroquinolones <- c(CIP, ENX, FLE, GAT, GEM, GRX, LVX, LOM, MFX, NOR, OFX, PAZ, PEF, PRU, RFL, SPX, TMX, TVA)
|
||||
# nolint end
|
||||
|
||||
|
||||
# helper function for editing the table
|
||||
trans_tbl <- function(to, rows, cols, any_all) {
|
||||
cols <- cols[!ab_missing(cols)]
|
||||
cols <- cols[!is.na(cols)]
|
||||
if (length(rows) > 0 && length(cols) > 0) {
|
||||
x[, cols] <- as.data.frame(lapply(
|
||||
x[, cols, drop = FALSE],
|
||||
function(col) as.sir(col)
|
||||
),
|
||||
stringsAsFactors = FALSE
|
||||
x[, cols] <- as.data.frame(
|
||||
lapply(
|
||||
x[, cols, drop = FALSE],
|
||||
function(col) as.sir(col)
|
||||
),
|
||||
stringsAsFactors = FALSE
|
||||
)
|
||||
x[rows, "columns_nonsusceptible"] <<- vapply(
|
||||
FUN.VALUE = character(1),
|
||||
@@ -670,22 +675,23 @@ mdro <- function(x = NULL,
|
||||
x[row, group_vct, drop = FALSE],
|
||||
function(y) y %in% search_result
|
||||
)
|
||||
paste(sort(c(
|
||||
unlist(strsplit(x[row, "columns_nonsusceptible", drop = TRUE], ", ", fixed = TRUE)),
|
||||
names(cols_nonsus)[cols_nonsus]
|
||||
)),
|
||||
collapse = ", "
|
||||
paste(
|
||||
sort(c(
|
||||
unlist(strsplit(x[row, "columns_nonsusceptible", drop = TRUE], ", ", fixed = TRUE)),
|
||||
names(cols_nonsus)[cols_nonsus]
|
||||
)),
|
||||
collapse = ", "
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
if (any_all == "any") {
|
||||
search_function <- any
|
||||
} else if (any_all == "all") {
|
||||
search_function <- all
|
||||
}
|
||||
x_transposed <- as.list(as.data.frame(t(x[, cols, drop = FALSE]),
|
||||
stringsAsFactors = FALSE
|
||||
stringsAsFactors = FALSE
|
||||
))
|
||||
rows_affected <- vapply(
|
||||
FUN.VALUE = logical(1),
|
||||
@@ -704,7 +710,7 @@ mdro <- function(x = NULL,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
trans_tbl2 <- function(txt, rows, lst) {
|
||||
if (isTRUE(info)) {
|
||||
message_(txt, "...", appendLF = FALSE, as_note = FALSE)
|
||||
@@ -714,12 +720,13 @@ mdro <- function(x = NULL,
|
||||
lst_vector <- unlist(lst)[!is.na(unlist(lst))]
|
||||
# keep only unique ones:
|
||||
lst_vector <- lst_vector[!duplicated(paste(lst_vector, names(lst_vector)))]
|
||||
|
||||
x[, lst_vector] <- as.data.frame(lapply(
|
||||
x[, lst_vector, drop = FALSE],
|
||||
function(col) as.sir(col)
|
||||
),
|
||||
stringsAsFactors = FALSE
|
||||
|
||||
x[, lst_vector] <- as.data.frame(
|
||||
lapply(
|
||||
x[, lst_vector, drop = FALSE],
|
||||
function(col) as.sir(col)
|
||||
),
|
||||
stringsAsFactors = FALSE
|
||||
)
|
||||
x[rows, "classes_in_guideline"] <<- length(lst)
|
||||
x[rows, "classes_available"] <<- vapply(
|
||||
@@ -733,7 +740,7 @@ mdro <- function(x = NULL,
|
||||
))
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
if (isTRUE(verbose)) {
|
||||
x[rows, "columns_nonsusceptible"] <<- vapply(
|
||||
FUN.VALUE = character(1),
|
||||
@@ -748,30 +755,31 @@ mdro <- function(x = NULL,
|
||||
FUN.VALUE = double(1),
|
||||
rows,
|
||||
function(row, group_tbl = lst) {
|
||||
sum(vapply(
|
||||
FUN.VALUE = logical(1),
|
||||
group_tbl,
|
||||
function(group) {
|
||||
any(unlist(x[row, group[!is.na(group)], drop = TRUE]) %in% search_result, na.rm = TRUE)
|
||||
}
|
||||
),
|
||||
na.rm = TRUE
|
||||
sum(
|
||||
vapply(
|
||||
FUN.VALUE = logical(1),
|
||||
group_tbl,
|
||||
function(group) {
|
||||
any(unlist(x[row, group[!is.na(group)], drop = TRUE]) %in% search_result, na.rm = TRUE)
|
||||
}
|
||||
),
|
||||
na.rm = TRUE
|
||||
)
|
||||
}
|
||||
)
|
||||
# for PDR; all drugs are R (or I if combine_SI = FALSE)
|
||||
x_transposed <- as.list(as.data.frame(t(x[rows, lst_vector, drop = FALSE]),
|
||||
stringsAsFactors = FALSE
|
||||
stringsAsFactors = FALSE
|
||||
))
|
||||
row_filter <- vapply(FUN.VALUE = logical(1), x_transposed, function(y) all(y %in% search_result, na.rm = TRUE))
|
||||
x[which(row_filter), "classes_affected"] <<- 999
|
||||
}
|
||||
|
||||
|
||||
if (isTRUE(info)) {
|
||||
message_(" OK.", add_fn = list(font_green, font_bold), as_note = FALSE)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
x[, col_mo] <- as.mo(as.character(x[, col_mo, drop = TRUE]))
|
||||
# rename col_mo to prevent interference with joined columns
|
||||
colnames(x)[colnames(x) == col_mo] <- ".col_mo"
|
||||
@@ -782,12 +790,12 @@ mdro <- function(x = NULL,
|
||||
x$row_number <- seq_len(nrow(x))
|
||||
x$reason <- paste0("not covered by ", toupper(guideline$code), " guideline")
|
||||
x$columns_nonsusceptible <- ""
|
||||
|
||||
|
||||
if (guideline$code == "cmi2012") {
|
||||
# CMI, 2012 ---------------------------------------------------------------
|
||||
# Non-susceptible = R and I
|
||||
# (see header 'Approaches to Creating Definitions for MDR, XDR and PDR' in paper)
|
||||
|
||||
|
||||
# take amoxicillin if ampicillin is unavailable
|
||||
if (is.na(AMP) && !is.na(AMX)) {
|
||||
if (isTRUE(verbose)) {
|
||||
@@ -808,87 +816,87 @@ mdro <- function(x = NULL,
|
||||
}
|
||||
CTX <- CRO
|
||||
}
|
||||
|
||||
|
||||
# intrinsic resistant must not be considered for the determination of MDR,
|
||||
# so let's just remove them, meticulously following the paper
|
||||
x[which(x$genus == "Enterococcus" & x$species == "faecium"), ab_NA(IPM)] <- NA
|
||||
x[which(x$genus == "Enterococcus" & x$species == "faecalis"), ab_NA(QDA)] <- NA
|
||||
x[which((x$genus == "Providencia" & x$species == "rettgeri") |
|
||||
(x$genus == "Providencia" & x$species == "stuartii")), ab_NA(c(GEN, TOB, NET))] <- NA
|
||||
(x$genus == "Providencia" & x$species == "stuartii")), ab_NA(c(GEN, TOB, NET))] <- NA
|
||||
x[which(x$genus == "Escherichia" & x$species == "hermannii"), ab_NA(c(TCC, TZP))] <- NA
|
||||
x[which((x$genus == "Citrobacter" & x$species == "freundii") |
|
||||
(x$genus == "Enterobacter" & x$species == "aerogenes") |
|
||||
(x$genus == "Klebsiella" & x$species == "aerogenes") # new name (2017)
|
||||
| (x$genus == "Enterobacter" & x$species == "cloacae") |
|
||||
(x$genus == "Hafnia" & x$species == "alvei") |
|
||||
(x$genus == "Morganella" & x$species == "morganii") |
|
||||
(x$genus == "Proteus" & x$species == "penneri") |
|
||||
(x$genus == "Proteus" & x$species == "vulgaris") |
|
||||
(x$genus == "Serratia" & x$species == "marcescens")), ab_NA(CZO)] <- NA
|
||||
(x$genus == "Enterobacter" & x$species == "aerogenes") |
|
||||
(x$genus == "Klebsiella" & x$species == "aerogenes") # new name (2017)
|
||||
| (x$genus == "Enterobacter" & x$species == "cloacae") |
|
||||
(x$genus == "Hafnia" & x$species == "alvei") |
|
||||
(x$genus == "Morganella" & x$species == "morganii") |
|
||||
(x$genus == "Proteus" & x$species == "penneri") |
|
||||
(x$genus == "Proteus" & x$species == "vulgaris") |
|
||||
(x$genus == "Serratia" & x$species == "marcescens")), ab_NA(CZO)] <- NA
|
||||
x[which((x$genus == "Morganella" & x$species == "morganii") |
|
||||
(x$genus == "Proteus" & x$species == "penneri") |
|
||||
(x$genus == "Proteus" & x$species == "vulgaris") |
|
||||
(x$genus == "Serratia" & x$species == "marcescens")), ab_NA(CXM)] <- NA
|
||||
(x$genus == "Proteus" & x$species == "penneri") |
|
||||
(x$genus == "Proteus" & x$species == "vulgaris") |
|
||||
(x$genus == "Serratia" & x$species == "marcescens")), ab_NA(CXM)] <- NA
|
||||
x[which((x$genus == "Morganella" & x$species == "morganii") |
|
||||
(x$genus == "Proteus" & x$species == "mirabilis") |
|
||||
(x$genus == "Proteus" & x$species == "penneri") |
|
||||
(x$genus == "Proteus" & x$species == "vulgaris") |
|
||||
(x$genus == "Providencia" & x$species == "rettgeri") |
|
||||
(x$genus == "Providencia" & x$species == "stuartii")), ab_NA(TGC)] <- NA
|
||||
(x$genus == "Proteus" & x$species == "mirabilis") |
|
||||
(x$genus == "Proteus" & x$species == "penneri") |
|
||||
(x$genus == "Proteus" & x$species == "vulgaris") |
|
||||
(x$genus == "Providencia" & x$species == "rettgeri") |
|
||||
(x$genus == "Providencia" & x$species == "stuartii")), ab_NA(TGC)] <- NA
|
||||
x[which((x$genus == "Citrobacter" & x$species == "koseri") |
|
||||
(x$genus == "Citrobacter" & x$species == "freundii") |
|
||||
(x$genus == "Enterobacter" & x$species == "aerogenes") |
|
||||
(x$genus == "Klebsiella" & x$species == "aerogenes") # new name (2017)
|
||||
| (x$genus == "Enterobacter" & x$species == "cloacae") |
|
||||
(x$genus == "Escherichia" & x$species == "hermannii") |
|
||||
(x$genus == "Hafnia" & x$species == "alvei") |
|
||||
(x$genus == "Klebsiella") |
|
||||
(x$genus == "Morganella" & x$species == "morganii") |
|
||||
(x$genus == "Proteus" & x$species == "penneri") |
|
||||
(x$genus == "Proteus" & x$species == "vulgaris") |
|
||||
(x$genus == "Providencia" & x$species == "rettgeri") |
|
||||
(x$genus == "Providencia" & x$species == "stuartii") |
|
||||
(x$genus == "Serratia" & x$species == "marcescens")), ab_NA(AMP)] <- NA
|
||||
(x$genus == "Citrobacter" & x$species == "freundii") |
|
||||
(x$genus == "Enterobacter" & x$species == "aerogenes") |
|
||||
(x$genus == "Klebsiella" & x$species == "aerogenes") # new name (2017)
|
||||
| (x$genus == "Enterobacter" & x$species == "cloacae") |
|
||||
(x$genus == "Escherichia" & x$species == "hermannii") |
|
||||
(x$genus == "Hafnia" & x$species == "alvei") |
|
||||
(x$genus == "Klebsiella") |
|
||||
(x$genus == "Morganella" & x$species == "morganii") |
|
||||
(x$genus == "Proteus" & x$species == "penneri") |
|
||||
(x$genus == "Proteus" & x$species == "vulgaris") |
|
||||
(x$genus == "Providencia" & x$species == "rettgeri") |
|
||||
(x$genus == "Providencia" & x$species == "stuartii") |
|
||||
(x$genus == "Serratia" & x$species == "marcescens")), ab_NA(AMP)] <- NA
|
||||
x[which((x$genus == "Citrobacter" & x$species == "freundii") |
|
||||
(x$genus == "Enterobacter" & x$species == "aerogenes") |
|
||||
(x$genus == "Klebsiella" & x$species == "aerogenes") # new name (2017)
|
||||
| (x$genus == "Enterobacter" & x$species == "cloacae") |
|
||||
(x$genus == "Hafnia" & x$species == "alvei") |
|
||||
(x$genus == "Morganella" & x$species == "morganii") |
|
||||
(x$genus == "Providencia" & x$species == "rettgeri") |
|
||||
(x$genus == "Providencia" & x$species == "stuartii") |
|
||||
(x$genus == "Serratia" & x$species == "marcescens")), ab_NA(AMC)] <- NA
|
||||
(x$genus == "Enterobacter" & x$species == "aerogenes") |
|
||||
(x$genus == "Klebsiella" & x$species == "aerogenes") # new name (2017)
|
||||
| (x$genus == "Enterobacter" & x$species == "cloacae") |
|
||||
(x$genus == "Hafnia" & x$species == "alvei") |
|
||||
(x$genus == "Morganella" & x$species == "morganii") |
|
||||
(x$genus == "Providencia" & x$species == "rettgeri") |
|
||||
(x$genus == "Providencia" & x$species == "stuartii") |
|
||||
(x$genus == "Serratia" & x$species == "marcescens")), ab_NA(AMC)] <- NA
|
||||
x[which((x$genus == "Citrobacter" & x$species == "freundii") |
|
||||
(x$genus == "Citrobacter" & x$species == "koseri") |
|
||||
(x$genus == "Enterobacter" & x$species == "aerogenes") |
|
||||
(x$genus == "Klebsiella" & x$species == "aerogenes") # new name (2017)
|
||||
| (x$genus == "Enterobacter" & x$species == "cloacae") |
|
||||
(x$genus == "Hafnia" & x$species == "alvei") |
|
||||
(x$genus == "Providencia" & x$species == "rettgeri") |
|
||||
(x$genus == "Serratia" & x$species == "marcescens")), ab_NA(SAM)] <- NA
|
||||
(x$genus == "Citrobacter" & x$species == "koseri") |
|
||||
(x$genus == "Enterobacter" & x$species == "aerogenes") |
|
||||
(x$genus == "Klebsiella" & x$species == "aerogenes") # new name (2017)
|
||||
| (x$genus == "Enterobacter" & x$species == "cloacae") |
|
||||
(x$genus == "Hafnia" & x$species == "alvei") |
|
||||
(x$genus == "Providencia" & x$species == "rettgeri") |
|
||||
(x$genus == "Serratia" & x$species == "marcescens")), ab_NA(SAM)] <- NA
|
||||
x[which((x$genus == "Morganella" & x$species == "morganii") |
|
||||
(x$genus == "Proteus" & x$species == "mirabilis") |
|
||||
(x$genus == "Proteus" & x$species == "penneri") |
|
||||
(x$genus == "Proteus" & x$species == "vulgaris") |
|
||||
(x$genus == "Providencia" & x$species == "rettgeri") |
|
||||
(x$genus == "Providencia" & x$species == "stuartii") |
|
||||
(x$genus == "Serratia" & x$species == "marcescens")), ab_NA(COL)] <- NA
|
||||
(x$genus == "Proteus" & x$species == "mirabilis") |
|
||||
(x$genus == "Proteus" & x$species == "penneri") |
|
||||
(x$genus == "Proteus" & x$species == "vulgaris") |
|
||||
(x$genus == "Providencia" & x$species == "rettgeri") |
|
||||
(x$genus == "Providencia" & x$species == "stuartii") |
|
||||
(x$genus == "Serratia" & x$species == "marcescens")), ab_NA(COL)] <- NA
|
||||
x[which((x$genus == "Morganella" & x$species == "morganii") |
|
||||
(x$genus == "Proteus" & x$species == "mirabilis") |
|
||||
(x$genus == "Proteus" & x$species == "penneri") |
|
||||
(x$genus == "Proteus" & x$species == "vulgaris") |
|
||||
(x$genus == "Providencia" & x$species == "rettgeri") |
|
||||
(x$genus == "Providencia" & x$species == "stuartii")), ab_NA(TCY)] <- NA
|
||||
(x$genus == "Proteus" & x$species == "mirabilis") |
|
||||
(x$genus == "Proteus" & x$species == "penneri") |
|
||||
(x$genus == "Proteus" & x$species == "vulgaris") |
|
||||
(x$genus == "Providencia" & x$species == "rettgeri") |
|
||||
(x$genus == "Providencia" & x$species == "stuartii")), ab_NA(TCY)] <- NA
|
||||
x[which((x$genus == "Morganella" & x$species == "morganii") |
|
||||
(x$genus == "Proteus" & x$species == "penneri") |
|
||||
(x$genus == "Proteus" & x$species == "vulgaris") |
|
||||
(x$genus == "Providencia" & x$species == "rettgeri") |
|
||||
(x$genus == "Providencia" & x$species == "stuartii")), ab_NA(c(DOX, MNO))] <- NA
|
||||
|
||||
(x$genus == "Proteus" & x$species == "penneri") |
|
||||
(x$genus == "Proteus" & x$species == "vulgaris") |
|
||||
(x$genus == "Providencia" & x$species == "rettgeri") |
|
||||
(x$genus == "Providencia" & x$species == "stuartii")), ab_NA(c(DOX, MNO))] <- NA
|
||||
|
||||
x$classes_in_guideline <- NA_integer_
|
||||
x$classes_available <- NA_integer_
|
||||
x$classes_affected <- NA_integer_
|
||||
|
||||
|
||||
# now add the MDR levels to the data
|
||||
trans_tbl(
|
||||
2,
|
||||
@@ -990,7 +998,7 @@ mdro <- function(x = NULL,
|
||||
c(TCY, DOX, MNO)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
# now set MDROs:
|
||||
# MDR (=2): >=3 classes affected
|
||||
x[which(x$classes_affected >= 3), "MDRO"] <- 2
|
||||
@@ -1002,7 +1010,7 @@ mdro <- function(x = NULL,
|
||||
" out of ", x$classes_available[which(x$classes_affected >= 3)], " available classes"
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
# XDR (=3): all but <=2 classes affected
|
||||
x[which((x$classes_in_guideline - x$classes_affected) <= 2), "MDRO"] <- 3
|
||||
if (isTRUE(verbose)) {
|
||||
@@ -1011,7 +1019,7 @@ mdro <- function(x = NULL,
|
||||
" out of ", x$classes_in_guideline[which(x$MDRO == 3)], " classes)"
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
# PDR (=4): all drugs are R
|
||||
x[which(x$classes_affected == 999 & x$classes_in_guideline == x$classes_available), "MDRO"] <- 4
|
||||
if (isTRUE(verbose)) {
|
||||
@@ -1022,7 +1030,7 @@ mdro <- function(x = NULL,
|
||||
ifelse(!isTRUE(combine_SI), " or I", "")
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
# not enough classes available
|
||||
x[which(x$MDRO %in% c(1, 3) & x$classes_available < floor(x$classes_in_guideline * pct_required_classes)), "MDRO"] <- -1
|
||||
if (isTRUE(verbose)) {
|
||||
@@ -1032,18 +1040,18 @@ mdro <- function(x = NULL,
|
||||
" (~", percentage(pct_required_classes), " of ", x$classes_in_guideline[which(x$MDRO == -1)], ")"
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
# add antibiotic names of resistant ones to verbose output
|
||||
}
|
||||
|
||||
|
||||
if (guideline$code == "eucast3.1") {
|
||||
# EUCAST 3.1 --------------------------------------------------------------
|
||||
# Table 5
|
||||
trans_tbl(
|
||||
3,
|
||||
which(x$order == "Enterobacterales" |
|
||||
(x$genus == "Pseudomonas" & x$species == "aeruginosa") |
|
||||
x$genus == "Acinetobacter"),
|
||||
(x$genus == "Pseudomonas" & x$species == "aeruginosa") |
|
||||
x$genus == "Acinetobacter"),
|
||||
COL,
|
||||
"all"
|
||||
)
|
||||
@@ -1128,17 +1136,17 @@ mdro <- function(x = NULL,
|
||||
"any"
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
if (guideline$code == "eucast3.2") {
|
||||
# EUCAST 3.2 --------------------------------------------------------------
|
||||
# Table 6
|
||||
trans_tbl(
|
||||
3,
|
||||
which((x$order == "Enterobacterales" &
|
||||
!x$family == "Morganellaceae" &
|
||||
!(x$genus == "Serratia" & x$species == "marcescens")) |
|
||||
(x$genus == "Pseudomonas" & x$species == "aeruginosa") |
|
||||
x$genus == "Acinetobacter"),
|
||||
!x$family == "Morganellaceae" &
|
||||
!(x$genus == "Serratia" & x$species == "marcescens")) |
|
||||
(x$genus == "Pseudomonas" & x$species == "aeruginosa") |
|
||||
x$genus == "Acinetobacter"),
|
||||
COL,
|
||||
"all"
|
||||
)
|
||||
@@ -1229,7 +1237,7 @@ mdro <- function(x = NULL,
|
||||
"any"
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
if (guideline$code == "eucast3.3") {
|
||||
# EUCAST 3.3 --------------------------------------------------------------
|
||||
# note: this guideline is equal to EUCAST 3.2 - no MDRO insights changed
|
||||
@@ -1237,10 +1245,10 @@ mdro <- function(x = NULL,
|
||||
trans_tbl(
|
||||
3,
|
||||
which((x$order == "Enterobacterales" &
|
||||
!x$family == "Morganellaceae" &
|
||||
!(x$genus == "Serratia" & x$species == "marcescens")) |
|
||||
(x$genus == "Pseudomonas" & x$species == "aeruginosa") |
|
||||
x$genus == "Acinetobacter"),
|
||||
!x$family == "Morganellaceae" &
|
||||
!(x$genus == "Serratia" & x$species == "marcescens")) |
|
||||
(x$genus == "Pseudomonas" & x$species == "aeruginosa") |
|
||||
x$genus == "Acinetobacter"),
|
||||
COL,
|
||||
"all"
|
||||
)
|
||||
@@ -1331,72 +1339,72 @@ mdro <- function(x = NULL,
|
||||
"any"
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
if (guideline$code == "mrgn") {
|
||||
# Germany -----------------------------------------------------------------
|
||||
|
||||
|
||||
# Table 1
|
||||
trans_tbl(
|
||||
2, # 3MRGN
|
||||
which((x$order == "Enterobacterales" | # following in fact the old Enterobacteriaceae classification
|
||||
(x$genus == "Acinetobacter" & x$species == "baumannii")) &
|
||||
try_ab(x[, PIP, drop = TRUE] == "R") &
|
||||
(try_ab(x[, CTX, drop = TRUE] == "R") | try_ab(x[, CAZ, drop = TRUE] == "R")) &
|
||||
(try_ab(x[, IPM, drop = TRUE] != "R") | try_ab(x[, MEM, drop = TRUE] != "R")) &
|
||||
try_ab(x[, CIP, drop = TRUE] == "R")),
|
||||
(x$genus == "Acinetobacter" & x$species == "baumannii")) &
|
||||
try_ab(x[, PIP, drop = TRUE] == "R") &
|
||||
(try_ab(x[, CTX, drop = TRUE] == "R") | try_ab(x[, CAZ, drop = TRUE] == "R")) &
|
||||
(try_ab(x[, IPM, drop = TRUE] != "R") | try_ab(x[, MEM, drop = TRUE] != "R")) &
|
||||
try_ab(x[, CIP, drop = TRUE] == "R")),
|
||||
c(PIP, CTX, CAZ, IPM, MEM, CIP),
|
||||
"any"
|
||||
)
|
||||
|
||||
|
||||
trans_tbl(
|
||||
3, # 4MRGN, overwrites 3MRGN if applicable
|
||||
which((x$order == "Enterobacterales" | # following in fact the old Enterobacteriaceae classification
|
||||
(x$genus == "Acinetobacter" & x$species == "baumannii")) &
|
||||
try_ab(x[, PIP, drop = TRUE] == "R") &
|
||||
(try_ab(x[, CTX, drop = TRUE] == "R") | try_ab(x[, CAZ, drop = TRUE] == "R")) &
|
||||
(try_ab(x[, IPM, drop = TRUE] == "R") | try_ab(x[, MEM, drop = TRUE] == "R")) &
|
||||
try_ab(x[, CIP, drop = TRUE] == "R")),
|
||||
(x$genus == "Acinetobacter" & x$species == "baumannii")) &
|
||||
try_ab(x[, PIP, drop = TRUE] == "R") &
|
||||
(try_ab(x[, CTX, drop = TRUE] == "R") | try_ab(x[, CAZ, drop = TRUE] == "R")) &
|
||||
(try_ab(x[, IPM, drop = TRUE] == "R") | try_ab(x[, MEM, drop = TRUE] == "R")) &
|
||||
try_ab(x[, CIP, drop = TRUE] == "R")),
|
||||
c(PIP, CTX, CAZ, IPM, MEM, CIP),
|
||||
"any"
|
||||
)
|
||||
|
||||
|
||||
trans_tbl(
|
||||
3, # 4MRGN, overwrites 3MRGN if applicable
|
||||
which((x$order == "Enterobacterales" | # following in fact the old Enterobacteriaceae classification
|
||||
(x$genus == "Acinetobacter" & x$species == "baumannii")) &
|
||||
(try_ab(x[, IPM, drop = TRUE] == "R") | try_ab(x[, MEM, drop = TRUE] == "R"))),
|
||||
(x$genus == "Acinetobacter" & x$species == "baumannii")) &
|
||||
(try_ab(x[, IPM, drop = TRUE] == "R") | try_ab(x[, MEM, drop = TRUE] == "R"))),
|
||||
c(IPM, MEM),
|
||||
"any"
|
||||
)
|
||||
|
||||
|
||||
trans_tbl(
|
||||
2, # 3MRGN, if only 1 group is S
|
||||
which(x$genus == "Pseudomonas" & x$species == "aeruginosa" &
|
||||
try_ab(x[, PIP, drop = TRUE] == "S") +
|
||||
try_ab(x[, CTX, drop = TRUE] == "S") +
|
||||
try_ab(x[, CAZ, drop = TRUE] == "S") +
|
||||
try_ab(x[, IPM, drop = TRUE] == "S") +
|
||||
try_ab(x[, MEM, drop = TRUE] == "S") +
|
||||
try_ab(x[, CIP, drop = TRUE] == "S") == 1),
|
||||
try_ab(x[, PIP, drop = TRUE] == "S") +
|
||||
try_ab(x[, CTX, drop = TRUE] == "S") +
|
||||
try_ab(x[, CAZ, drop = TRUE] == "S") +
|
||||
try_ab(x[, IPM, drop = TRUE] == "S") +
|
||||
try_ab(x[, MEM, drop = TRUE] == "S") +
|
||||
try_ab(x[, CIP, drop = TRUE] == "S") == 1),
|
||||
c(PIP, CTX, CAZ, IPM, MEM, CIP),
|
||||
"any"
|
||||
)
|
||||
|
||||
|
||||
trans_tbl(
|
||||
3, # 4MRGN otherwise
|
||||
which((x$genus == "Pseudomonas" & x$species == "aeruginosa") &
|
||||
try_ab(x[, PIP, drop = TRUE] == "R") &
|
||||
(try_ab(x[, CTX, drop = TRUE] == "R") | try_ab(x[, CAZ, drop = TRUE] == "R")) &
|
||||
(try_ab(x[, IPM, drop = TRUE] == "R") | try_ab(x[, MEM, drop = TRUE] == "R")) &
|
||||
try_ab(x[, CIP, drop = TRUE] == "R")),
|
||||
try_ab(x[, PIP, drop = TRUE] == "R") &
|
||||
(try_ab(x[, CTX, drop = TRUE] == "R") | try_ab(x[, CAZ, drop = TRUE] == "R")) &
|
||||
(try_ab(x[, IPM, drop = TRUE] == "R") | try_ab(x[, MEM, drop = TRUE] == "R")) &
|
||||
try_ab(x[, CIP, drop = TRUE] == "R")),
|
||||
c(PIP, CTX, CAZ, IPM, MEM, CIP),
|
||||
"any"
|
||||
)
|
||||
|
||||
|
||||
x[which(x$MDRO == 2), "reason"] <- "3MRGN"
|
||||
x[which(x$MDRO == 3), "reason"] <- "4MRGN"
|
||||
}
|
||||
|
||||
|
||||
if (guideline$code == "brmo") {
|
||||
# Netherlands -------------------------------------------------------------
|
||||
aminoglycosides <- aminoglycosides[!is.na(aminoglycosides)]
|
||||
@@ -1409,7 +1417,7 @@ mdro <- function(x = NULL,
|
||||
if (length(ESBLs) != 2) {
|
||||
ESBLs <- character(0)
|
||||
}
|
||||
|
||||
|
||||
# Table 1
|
||||
trans_tbl(
|
||||
3,
|
||||
@@ -1417,21 +1425,21 @@ mdro <- function(x = NULL,
|
||||
c(aminoglycosides, fluoroquinolones),
|
||||
"all"
|
||||
)
|
||||
|
||||
|
||||
trans_tbl(
|
||||
2,
|
||||
which(x$order == "Enterobacterales"), # following in fact the old Enterobacteriaceae classification
|
||||
carbapenems,
|
||||
"any"
|
||||
)
|
||||
|
||||
|
||||
trans_tbl(
|
||||
2,
|
||||
which(x$order == "Enterobacterales"), # following in fact the old Enterobacteriaceae classification
|
||||
ESBLs,
|
||||
"all"
|
||||
)
|
||||
|
||||
|
||||
# Table 2
|
||||
trans_tbl(
|
||||
2,
|
||||
@@ -1445,19 +1453,19 @@ mdro <- function(x = NULL,
|
||||
c(aminoglycosides, fluoroquinolones),
|
||||
"all"
|
||||
)
|
||||
|
||||
|
||||
trans_tbl(
|
||||
3,
|
||||
which(x$genus == "Stenotrophomonas" & x$species == "maltophilia"),
|
||||
SXT,
|
||||
"all"
|
||||
)
|
||||
|
||||
|
||||
if (!ab_missing(MEM) && !ab_missing(IPM) &&
|
||||
!ab_missing(GEN) && !ab_missing(TOB) &&
|
||||
!ab_missing(CIP) &&
|
||||
!ab_missing(CAZ) &&
|
||||
!ab_missing(TZP)) {
|
||||
!ab_missing(GEN) && !ab_missing(TOB) &&
|
||||
!ab_missing(CIP) &&
|
||||
!ab_missing(CAZ) &&
|
||||
!ab_missing(TZP)) {
|
||||
x$psae <- 0
|
||||
x[which(x[, MEM, drop = TRUE] == "R" | x[, IPM, drop = TRUE] == "R"), "psae"] <- 1 + x[which(x[, MEM, drop = TRUE] == "R" | x[, IPM, drop = TRUE] == "R"), "psae"]
|
||||
x[which(x[, GEN, drop = TRUE] == "R" & x[, TOB, drop = TRUE] == "R"), "psae"] <- 1 + x[which(x[, GEN, drop = TRUE] == "R" & x[, TOB, drop = TRUE] == "R"), "psae"]
|
||||
@@ -1477,7 +1485,7 @@ mdro <- function(x = NULL,
|
||||
x$genus == "Pseudomonas" & x$species == "aeruginosa" &
|
||||
x$psae >= 3
|
||||
), "reason"] <- paste0("at least 3 classes contain R", ifelse(!isTRUE(combine_SI), " or I", ""))
|
||||
|
||||
|
||||
# Table 3
|
||||
trans_tbl(
|
||||
3,
|
||||
@@ -1498,7 +1506,7 @@ mdro <- function(x = NULL,
|
||||
"all"
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
if (guideline$code == "tb") {
|
||||
# Tuberculosis ------------------------------------------------------------
|
||||
prepare_drug <- function(ab) {
|
||||
@@ -1535,7 +1543,7 @@ mdro <- function(x = NULL,
|
||||
ab != "R"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
x$mono_count <- 0
|
||||
x[drug_is_R(INH), "mono_count"] <- x[drug_is_R(INH), "mono_count", drop = TRUE] + 1
|
||||
x[drug_is_R(RIF), "mono_count"] <- x[drug_is_R(RIF), "mono_count", drop = TRUE] + 1
|
||||
@@ -1543,7 +1551,7 @@ mdro <- function(x = NULL,
|
||||
x[drug_is_R(PZA), "mono_count"] <- x[drug_is_R(PZA), "mono_count", drop = TRUE] + 1
|
||||
x[drug_is_R(RIB), "mono_count"] <- x[drug_is_R(RIB), "mono_count", drop = TRUE] + 1
|
||||
x[drug_is_R(RFP), "mono_count"] <- x[drug_is_R(RFP), "mono_count", drop = TRUE] + 1
|
||||
|
||||
|
||||
x$mono <- x$mono_count > 0
|
||||
x$poly <- x$mono_count > 1 & drug_is_not_R(RIF) & drug_is_not_R(INH)
|
||||
x$mdr <- drug_is_R(RIF) & drug_is_R(INH)
|
||||
@@ -1551,19 +1559,19 @@ mdro <- function(x = NULL,
|
||||
x$second <- drug_is_R(CAP) | drug_is_R(KAN) | drug_is_R(AMK)
|
||||
x$xdr <- x$mdr & x$xdr & x$second
|
||||
x$MDRO <- ifelse(x$xdr, 5,
|
||||
ifelse(x$mdr, 4,
|
||||
ifelse(x$poly, 3,
|
||||
ifelse(x$mono, 2,
|
||||
1
|
||||
)
|
||||
)
|
||||
)
|
||||
ifelse(x$mdr, 4,
|
||||
ifelse(x$poly, 3,
|
||||
ifelse(x$mono, 2,
|
||||
1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
# keep all real TB, make other species NA
|
||||
x$MDRO <- ifelse(x$fullname == "Mycobacterium tuberculosis", x$MDRO, NA_real_)
|
||||
x$reason <- "PDR/MDR/XDR criteria were met"
|
||||
}
|
||||
|
||||
|
||||
# some more info on negative results
|
||||
if (isTRUE(verbose)) {
|
||||
if (guideline$code == "cmi2012") {
|
||||
@@ -1579,7 +1587,7 @@ mdro <- function(x = NULL,
|
||||
x[which(x$MDRO == 1), "reason"] <- "too few antibiotics are R"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (isTRUE(info.bak)) {
|
||||
cat(group_msg)
|
||||
if (sum(!is.na(x$MDRO)) == 0) {
|
||||
@@ -1591,11 +1599,11 @@ mdro <- function(x = NULL,
|
||||
)))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Fill in blanks ----
|
||||
# for rows that have no results
|
||||
x_transposed <- as.list(as.data.frame(t(x[, cols_ab, drop = FALSE]),
|
||||
stringsAsFactors = FALSE
|
||||
stringsAsFactors = FALSE
|
||||
))
|
||||
rows_empty <- which(vapply(
|
||||
FUN.VALUE = logical(1),
|
||||
@@ -1609,7 +1617,7 @@ mdro <- function(x = NULL,
|
||||
} else {
|
||||
cat("\n")
|
||||
}
|
||||
|
||||
|
||||
# Results ----
|
||||
if (guideline$code == "cmi2012") {
|
||||
if (any(x$MDRO == -1, na.rm = TRUE)) {
|
||||
@@ -1656,7 +1664,7 @@ mdro <- function(x = NULL,
|
||||
ordered = TRUE
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
if (isTRUE(verbose)) {
|
||||
colnames(x)[colnames(x) == col_mo] <- "microorganism"
|
||||
x$microorganism <- mo_name(x$microorganism, language = NULL)
|
||||
@@ -1678,9 +1686,9 @@ mdro <- function(x = NULL,
|
||||
#' @export
|
||||
custom_mdro_guideline <- function(..., as_factor = TRUE) {
|
||||
meet_criteria(as_factor, allow_class = "logical", has_length = 1)
|
||||
|
||||
|
||||
dots <- tryCatch(list(...),
|
||||
error = function(e) "error"
|
||||
error = function(e) "error"
|
||||
)
|
||||
stop_if(
|
||||
identical(dots, "error"),
|
||||
@@ -1694,7 +1702,7 @@ custom_mdro_guideline <- function(..., as_factor = TRUE) {
|
||||
inherits(dots[[i]], "formula"),
|
||||
"rule ", i, " must be a valid formula input (e.g., using '~'), see `?mdro`"
|
||||
)
|
||||
|
||||
|
||||
# Query
|
||||
qry <- dots[[i]][[2]]
|
||||
if (inherits(qry, "call")) {
|
||||
@@ -1710,14 +1718,14 @@ custom_mdro_guideline <- function(..., as_factor = TRUE) {
|
||||
qry <- gsub(" *([&|+-/*^><==]+) *", " \\1 ", qry)
|
||||
qry <- gsub("'", "\"", qry, fixed = TRUE)
|
||||
out[[i]]$query <- as.expression(qry)
|
||||
|
||||
|
||||
# Value
|
||||
val <- tryCatch(eval(dots[[i]][[3]]), error = function(e) NULL)
|
||||
stop_if(is.null(val), "rule ", i, " must return a valid value, it now returns an error: ", tryCatch(eval(dots[[i]][[3]]), error = function(e) e$message))
|
||||
stop_if(length(val) > 1, "rule ", i, " must return a value of length 1, not ", length(val))
|
||||
out[[i]]$value <- as.character(val)
|
||||
}
|
||||
|
||||
|
||||
names(out) <- paste0("rule", seq_len(n_dots))
|
||||
out <- set_clean_class(out, new_class = c("custom_mdro_guideline", "list"))
|
||||
attr(out, "values") <- unname(c("Negative", vapply(FUN.VALUE = character(1), unclass(out), function(x) x$value)))
|
||||
@@ -1739,8 +1747,8 @@ c.custom_mdro_guideline <- function(x, ..., as_factor = NULL) {
|
||||
}
|
||||
for (g in list(...)) {
|
||||
stop_ifnot(inherits(g, "custom_mdro_guideline"),
|
||||
"for combining custom MDRO guidelines, all rules must be created with `custom_mdro_guideline()`",
|
||||
call = FALSE
|
||||
"for combining custom MDRO guidelines, all rules must be created with `custom_mdro_guideline()`",
|
||||
call = FALSE
|
||||
)
|
||||
vals <- attributes(x)$values
|
||||
if (!all(attributes(g)$values %in% vals)) {
|
||||
@@ -1790,28 +1798,28 @@ run_custom_mdro_guideline <- function(df, guideline, info) {
|
||||
reasons <- character(length = NROW(df))
|
||||
for (i in seq_len(n_dots)) {
|
||||
qry <- tryCatch(eval(parse(text = guideline[[i]]$query), envir = df, enclos = parent.frame()),
|
||||
error = function(e) {
|
||||
AMR_env$err_msg <- e$message
|
||||
return("error")
|
||||
}
|
||||
error = function(e) {
|
||||
AMR_env$err_msg <- e$message
|
||||
return("error")
|
||||
}
|
||||
)
|
||||
if (identical(qry, "error")) {
|
||||
warning_("in `custom_mdro_guideline()`: rule ", i,
|
||||
" (`", as.character(guideline[[i]]$query), "`) was ignored because of this error message: ",
|
||||
AMR_env$err_msg,
|
||||
call = FALSE,
|
||||
add_fn = font_red
|
||||
" (`", as.character(guideline[[i]]$query), "`) was ignored because of this error message: ",
|
||||
AMR_env$err_msg,
|
||||
call = FALSE,
|
||||
add_fn = font_red
|
||||
)
|
||||
next
|
||||
}
|
||||
stop_ifnot(is.logical(qry), "in custom_mdro_guideline(): rule ", i, " (`", guideline[[i]]$query,
|
||||
"`) must return `TRUE` or `FALSE`, not ",
|
||||
format_class(class(qry), plural = FALSE),
|
||||
call = FALSE
|
||||
"`) must return `TRUE` or `FALSE`, not ",
|
||||
format_class(class(qry), plural = FALSE),
|
||||
call = FALSE
|
||||
)
|
||||
|
||||
|
||||
new_mdros <- which(qry == TRUE & out == "")
|
||||
|
||||
|
||||
if (isTRUE(info)) {
|
||||
cat(word_wrap(
|
||||
"- Custom MDRO rule ", i, ": `", as.character(guideline[[i]]$query),
|
||||
@@ -1827,11 +1835,11 @@ run_custom_mdro_guideline <- function(df, guideline, info) {
|
||||
}
|
||||
out[out == ""] <- "Negative"
|
||||
reasons[out == "Negative"] <- "no rules matched"
|
||||
|
||||
|
||||
if (isTRUE(attributes(guideline)$as_factor)) {
|
||||
out <- factor(out, levels = attributes(guideline)$values, ordered = TRUE)
|
||||
}
|
||||
|
||||
|
||||
columns_nonsusceptible <- as.data.frame(t(df[, is.sir(df), drop = FALSE] == "R"))
|
||||
columns_nonsusceptible <- vapply(
|
||||
FUN.VALUE = character(1),
|
||||
@@ -1839,7 +1847,7 @@ run_custom_mdro_guideline <- function(df, guideline, info) {
|
||||
function(x) paste0(rownames(columns_nonsusceptible)[which(x)], collapse = " ")
|
||||
)
|
||||
columns_nonsusceptible[is.na(out)] <- NA_character_
|
||||
|
||||
|
||||
data.frame(
|
||||
row_number = seq_len(NROW(df)),
|
||||
MDRO = out,
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#' Calculates a normalised mean for antimicrobial resistance between multiple observations, to help to identify similar isolates without comparing antibiograms by hand.
|
||||
#' @param x a vector of class [sir][as.sir()], [mic][as.mic()] or [disk][as.disk()], or a [data.frame] containing columns of any of these classes
|
||||
#' @param ... variables to select (supports [tidyselect language][tidyselect::language] such as `column1:column4` and `where(is.mic)`, and can thus also be [antibiotic selectors][ab_selector()]
|
||||
#' @param combine_SI a [logical] to indicate whether all values of S and I must be merged into one, so the input only consists of S+I vs. R (susceptible vs. resistant), defaults to `TRUE`
|
||||
#' @param combine_SI a [logical] to indicate whether all values of S and I must be merged into one, so the input only consists of S+I vs. R (susceptible vs. resistant) - the default is `TRUE`
|
||||
#' @details The mean AMR distance is effectively [the Z-score](https://en.wikipedia.org/wiki/Standard_score); a normalised numeric value to compare AMR test results which can help to identify similar isolates, without comparing antibiograms by hand.
|
||||
#'
|
||||
#' MIC values (see [as.mic()]) are transformed with [log2()] first; their distance is thus calculated as `(log2(x) - mean(log2(x))) / sd(log2(x))`.
|
||||
@@ -49,13 +49,13 @@
|
||||
#' sir <- random_sir(10)
|
||||
#' sir
|
||||
#' mean_amr_distance(sir)
|
||||
#'
|
||||
#'
|
||||
#' mic <- random_mic(10)
|
||||
#' mic
|
||||
#' mean_amr_distance(mic)
|
||||
#' # equal to the Z-score of their log2:
|
||||
#' (log2(mic) - mean(log2(mic))) / sd(log2(mic))
|
||||
#'
|
||||
#'
|
||||
#' disk <- random_disk(10)
|
||||
#' disk
|
||||
#' mean_amr_distance(disk)
|
||||
@@ -143,7 +143,7 @@ mean_amr_distance.data.frame <- function(x, ..., combine_SI = TRUE) {
|
||||
df_classes <- colnames(df)[vapply(FUN.VALUE = logical(1), df, function(x) is.disk(x) | is.mic(x) | is.disk(x), USE.NAMES = FALSE)]
|
||||
df_antibiotics <- unname(get_column_abx(df, info = FALSE))
|
||||
df <- df[, colnames(df)[colnames(df) %in% union(df_classes, df_antibiotics)], drop = FALSE]
|
||||
|
||||
|
||||
stop_if(ncol(df) < 2,
|
||||
"data set must contain at least two variables",
|
||||
call = -2
|
||||
@@ -151,7 +151,7 @@ mean_amr_distance.data.frame <- function(x, ..., combine_SI = TRUE) {
|
||||
if (message_not_thrown_before("mean_amr_distance", "groups")) {
|
||||
message_("Calculating mean AMR distance based on columns ", vector_and(colnames(df), sort = FALSE))
|
||||
}
|
||||
|
||||
|
||||
res <- vapply(
|
||||
FUN.VALUE = double(nrow(df)),
|
||||
df,
|
||||
|
||||
@@ -230,13 +230,13 @@ as.mic <- function(x, na.rm = FALSE) {
|
||||
vector_and(quotes = TRUE)
|
||||
cur_col <- get_current_column()
|
||||
warning_("in `as.mic()`: ", na_after - na_before, " result",
|
||||
ifelse(na_after - na_before > 1, "s", ""),
|
||||
ifelse(is.null(cur_col), "", paste0(" in column '", cur_col, "'")),
|
||||
" truncated (",
|
||||
round(((na_after - na_before) / length(x)) * 100),
|
||||
"%) that were invalid MICs: ",
|
||||
list_missing,
|
||||
call = FALSE
|
||||
ifelse(na_after - na_before > 1, "s", ""),
|
||||
ifelse(is.null(cur_col), "", paste0(" in column '", cur_col, "'")),
|
||||
" truncated (",
|
||||
round(((na_after - na_before) / length(x)) * 100),
|
||||
"%) that were invalid MICs: ",
|
||||
list_missing,
|
||||
call = FALSE
|
||||
)
|
||||
}
|
||||
|
||||
@@ -286,7 +286,7 @@ as.numeric.mic <- function(x, ...) {
|
||||
|
||||
#' @rdname as.mic
|
||||
#' @method droplevels mic
|
||||
#' @param as.mic a [logical] to indicate whether the `mic` class should be kept, defaults to `FALSE`
|
||||
#' @param as.mic a [logical] to indicate whether the `mic` class should be kept - the default is `FALSE`
|
||||
#' @export
|
||||
droplevels.mic <- function(x, as.mic = FALSE, ...) {
|
||||
x <- droplevels.factor(x, ...)
|
||||
|
||||
@@ -27,23 +27,23 @@
|
||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Transform Input to a Microorganism Code
|
||||
#' Transform Arbitrary Input to Valid Microbial Taxonomy
|
||||
#'
|
||||
#' Use this function to determine a valid microorganism code ([`mo`]). Determination is done using intelligent rules and the complete taxonomic kingdoms `r vector_and(unique(microorganisms$kingdom[which(!grepl("(unknown|Fungi)", microorganisms$kingdom))]), quotes = FALSE)`, and most microbial species from the kingdom Fungi (see *Source*). The input can be almost anything: a full name (like `"Staphylococcus aureus"`), an abbreviated name (such as `"S. aureus"`), an abbreviation known in the field (such as `"MRSA"`), or just a genus. See *Examples*.
|
||||
#' Use this function to get a valid microorganism code ([`mo`]) based on arbitrary user input. Determination is done using intelligent rules and the complete taxonomic tree of the kingdoms `r vector_and(unique(microorganisms$kingdom[which(!grepl("(unknown|Fungi)", microorganisms$kingdom))]), quotes = FALSE)`, and most microbial species from the kingdom Fungi (see *Source*). The input can be almost anything: a full name (like `"Staphylococcus aureus"`), an abbreviated name (such as `"S. aureus"`), an abbreviation known in the field (such as `"MRSA"`), or just a genus. See *Examples*.
|
||||
#' @param x a [character] vector or a [data.frame] with one or two columns
|
||||
#' @param Becker a [logical] to indicate whether staphylococci should be categorised into coagulase-negative staphylococci ("CoNS") and coagulase-positive staphylococci ("CoPS") instead of their own species, according to Karsten Becker *et al.* (see Source).
|
||||
#' @param Becker a [logical] to indicate whether staphylococci should be categorised into coagulase-negative staphylococci ("CoNS") and coagulase-positive staphylococci ("CoPS") instead of their own species, according to Karsten Becker *et al.* (see *Source*). Please see *Details* for a full list of staphylococcal species that will be converted.
|
||||
#'
|
||||
#' This excludes *Staphylococcus aureus* at default, use `Becker = "all"` to also categorise *S. aureus* as "CoPS".
|
||||
#' @param Lancefield a [logical] to indicate whether a beta-haemolytic *Streptococcus* should be categorised into Lancefield groups instead of their own species, according to Rebecca C. Lancefield (see Source). These streptococci will be categorised in their first group, e.g. *Streptococcus dysgalactiae* will be group C, although officially it was also categorised into groups G and L.
|
||||
#' @param Lancefield a [logical] to indicate whether a beta-haemolytic *Streptococcus* should be categorised into Lancefield groups instead of their own species, according to Rebecca C. Lancefield (see *Source*). These streptococci will be categorised in their first group, e.g. *Streptococcus dysgalactiae* will be group C, although officially it was also categorised into groups G and L. . Please see *Details* for a full list of streptococcal species that will be converted.
|
||||
#'
|
||||
#' This excludes enterococci at default (who are in group D), use `Lancefield = "all"` to also categorise all enterococci as group D.
|
||||
#' @param minimum_matching_score a numeric value to set as the lower limit for the [MO matching score][mo_matching_score()]. When left blank, this will be determined automatically based on the character length of `x`, its [taxonomic kingdom][microorganisms] and [human pathogenicity][mo_matching_score()].
|
||||
#' @param keep_synonyms a [logical] to indicate if old, previously valid taxonomic names must be preserved and not be corrected to currently accepted names. The default is `FALSE`, which will return a note if old taxonomic names were processed. The default can be set with `options(AMR_keep_synonyms = TRUE)` or `options(AMR_keep_synonyms = FALSE)`.
|
||||
#' @param keep_synonyms a [logical] to indicate if old, previously valid taxonomic names must be preserved and not be corrected to currently accepted names. The default is `FALSE`, which will return a note if old taxonomic names were processed. The default can be set with the [package option][AMR-options] [`AMR_keep_synonyms`][AMR-options], i.e. `options(AMR_keep_synonyms = TRUE)` or `options(AMR_keep_synonyms = FALSE)`.
|
||||
#' @param reference_df a [data.frame] to be used for extra reference when translating `x` to a valid [`mo`]. See [set_mo_source()] and [get_mo_source()] to automate the usage of your own codes (e.g. used in your analysis or organisation).
|
||||
#' @param ignore_pattern a [regular expression][base::regex] (case-insensitive) of which all matches in `x` must return `NA`. This can be convenient to exclude known non-relevant input and can also be set with the option `AMR_ignore_pattern`, e.g. `options(AMR_ignore_pattern = "(not reported|contaminated flora)")`.
|
||||
#' @param remove_from_input a [regular expression][base::regex] (case-insensitive) to clean the input of `x`. Everything matched in `x` will be removed. At default, this is the outcome of [mo_cleaning_regex()], which removes texts between brackets and texts such as "species" and "serovar".
|
||||
#' @param ignore_pattern a Perl-compatible [regular expression][base::regex] (case-insensitive) of which all matches in `x` must return `NA`. This can be convenient to exclude known non-relevant input and can also be set with the [package option][AMR-options] [`AMR_ignore_pattern`][AMR-options], e.g. `options(AMR_ignore_pattern = "(not reported|contaminated flora)")`.
|
||||
#' @param cleaning_regex a Perl-compatible [regular expression][base::regex] (case-insensitive) to clean the input of `x`. Every matched part in `x` will be removed. At default, this is the outcome of [mo_cleaning_regex()], which removes texts between brackets and texts such as "species" and "serovar". The default can be set with the [package option][AMR-options] [`AMR_cleaning_regex`][AMR-options].
|
||||
#' @param language language to translate text like "no growth", which defaults to the system language (see [get_AMR_locale()])
|
||||
#' @param info a [logical] to indicate if a progress bar should be printed if more than 25 items are to be coerced, defaults to `TRUE` only in interactive mode
|
||||
#' @param info a [logical] to indicate if a progress bar should be printed if more than 25 items are to be coerced - the default is `TRUE` only in interactive mode
|
||||
#' @param ... other arguments passed on to functions
|
||||
#' @rdname as.mo
|
||||
#' @aliases mo
|
||||
@@ -68,13 +68,17 @@
|
||||
#'
|
||||
#' Use the [`mo_*`][mo_property()] functions to get properties based on the returned code, see *Examples*.
|
||||
#'
|
||||
#' The [as.mo()] function uses a novel [matching score algorithm][mo_matching_score()] (see *Matching Score for Microorganisms* below) to match input against the [available microbial taxonomy][microorganisms] in this package. This will lead to the effect that e.g. `"E. coli"` (a microorganism highly prevalent in humans) will return the microbial ID of *Escherichia coli* and not *Entamoeba coli* (a microorganism less prevalent in humans), although the latter would alphabetically come first. The algorithm uses data from the List of Prokaryotic names with Standing in Nomenclature (LPSN) and the Global Biodiversity Information Facility (GBIF) (see [microorganisms]).
|
||||
#' The [as.mo()] function uses a novel [matching score algorithm][mo_matching_score()] (see *Matching Score for Microorganisms* below) to match input against the [available microbial taxonomy][microorganisms] in this package. This will lead to the effect that e.g. `"E. coli"` (a microorganism highly prevalent in humans) will return the microbial ID of *Escherichia coli* and not *Entamoeba coli* (a microorganism less prevalent in humans), although the latter would alphabetically come first.
|
||||
#'
|
||||
#' With `Becker = TRUE`, the following `r length(MO_CONS[MO_CONS != "B_STPHY_CONS"])` staphylococci will be converted to the **coagulase-negative group**: `r vector_and(gsub("Staphylococcus", "S.", mo_name(MO_CONS[MO_CONS != "B_STPHY_CONS"], keep_synonyms = TRUE)), quotes = "*")`.\cr The following `r length(MO_COPS[MO_COPS != "B_STPHY_COPS"])` staphylococci will be converted to the **coagulase-positive group**: `r vector_and(gsub("Staphylococcus", "S.", mo_name(MO_COPS[MO_COPS != "B_STPHY_COPS"], keep_synonyms = TRUE)), quotes = "*")`.
|
||||
#'
|
||||
#' With `Lancefield = TRUE`, the following streptococci will be converted to their corresponding Lancefield group: `r vector_and(gsub("Streptococcus", "S.", paste0("*", mo_name(MO_LANCEFIELD, keep_synonyms = TRUE), "* (", mo_species(MO_LANCEFIELD, keep_synonyms = TRUE, Lancefield = TRUE), ")")), quotes = FALSE)`.
|
||||
#'
|
||||
#' ### Coping with Uncertain Results
|
||||
#'
|
||||
#' Results of non-exact taxonomic input are based on their [matching score][mo_matching_score()]. The lowest allowed score can be set with the `minimum_matching_score` argument. At default this will be determined based on the character length of the input, and the [taxonomic kingdom][microorganisms] and [human pathogenicity][mo_matching_score()] of the taxonomic outcome. If values are matched with uncertainty, a message will be shown to suggest the user to evaluate the results with [mo_uncertainties()], which returns a [data.frame] with all specifications.
|
||||
#'
|
||||
#' To increase the quality of matching, the `remove_from_input` argument can be used to clean the input (i.e., `x`). This must be a [regular expression][base::regex] that matches parts of the input that should be removed before the input is matched against the [available microbial taxonomy][microorganisms]. It will be matched Perl-compatible and case-insensitive. The default value of `remove_from_input` is the outcome of the helper function [mo_cleaning_regex()].
|
||||
#' To increase the quality of matching, the `cleaning_regex` argument can be used to clean the input (i.e., `x`). This must be a [regular expression][base::regex] that matches parts of the input that should be removed before the input is matched against the [available microbial taxonomy][microorganisms]. It will be matched Perl-compatible and case-insensitive. The default value of `cleaning_regex` is the outcome of the helper function [mo_cleaning_regex()].
|
||||
#'
|
||||
#' There are three helper functions that can be run after using the [as.mo()] function:
|
||||
#' - Use [mo_uncertainties()] to get a [data.frame] that prints in a pretty format with all taxonomic names that were guessed. The output contains the matching score for all matches (see *Matching Score for Microorganisms* below).
|
||||
@@ -150,17 +154,18 @@ as.mo <- function(x,
|
||||
keep_synonyms = getOption("AMR_keep_synonyms", FALSE),
|
||||
reference_df = get_mo_source(),
|
||||
ignore_pattern = getOption("AMR_ignore_pattern", NULL),
|
||||
remove_from_input = mo_cleaning_regex(),
|
||||
cleaning_regex = getOption("AMR_cleaning_regex", mo_cleaning_regex()),
|
||||
language = get_AMR_locale(),
|
||||
info = interactive(),
|
||||
...) {
|
||||
meet_criteria(x, allow_class = c("mo", "data.frame", "list", "character", "numeric", "integer", "factor"), allow_NA = TRUE)
|
||||
meet_criteria(Becker, allow_class = c("logical", "character"), has_length = 1)
|
||||
meet_criteria(Lancefield, allow_class = c("logical", "character"), has_length = 1)
|
||||
meet_criteria(minimum_matching_score, allow_class = c("numeric", "integer"), has_length = 1, allow_NULL = TRUE, is_positive_or_zero = TRUE, is_finite = TRUE)
|
||||
meet_criteria(keep_synonyms, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(minimum_matching_score, allow_class = c("numeric", "integer"), has_length = 1, allow_NULL = TRUE)
|
||||
meet_criteria(reference_df, allow_class = "data.frame", allow_NULL = TRUE)
|
||||
meet_criteria(ignore_pattern, allow_class = "character", has_length = 1, allow_NULL = TRUE)
|
||||
meet_criteria(cleaning_regex, allow_class = "character", has_length = 1, allow_NULL = TRUE)
|
||||
language <- validate_language(language)
|
||||
meet_criteria(info, allow_class = "logical", has_length = 1)
|
||||
|
||||
@@ -174,7 +179,6 @@ as.mo <- function(x,
|
||||
return(set_clean_class(x, new_class = c("mo", "character")))
|
||||
}
|
||||
|
||||
|
||||
# start off with replaced language-specific non-ASCII characters with ASCII characters
|
||||
x <- parse_and_convert(x)
|
||||
# replace mo codes used in older package versions
|
||||
@@ -183,12 +187,12 @@ as.mo <- function(x,
|
||||
x <- replace_ignore_pattern(x, ignore_pattern)
|
||||
|
||||
x_lower <- tolower(x)
|
||||
|
||||
|
||||
complexes <- x[trimws2(x_lower) %like_case% " (complex|group)$"]
|
||||
if (length(complexes) > 0 && identical(remove_from_input, mo_cleaning_regex()) && !any(AMR_env$MO_lookup$fullname[which(AMR_env$MO_lookup$source == "Added by user")] %like% "(group|complex)", na.rm = TRUE)) {
|
||||
if (length(complexes) > 0 && identical(cleaning_regex, mo_cleaning_regex()) && !any(AMR_env$MO_lookup$fullname[which(AMR_env$MO_lookup$source == "Added by user")] %like% "(group|complex)", na.rm = TRUE)) {
|
||||
warning_("in `as.mo()`: 'complex' and 'group' were ignored from the input in ", length(complexes), " case", ifelse(length(complexes) > 1, "s", ""), ", as they are currently not supported.\nYou can add your own microorganism with `add_custom_microorganisms()`.", call = FALSE)
|
||||
}
|
||||
|
||||
|
||||
# WHONET: xxx = no growth
|
||||
x[x_lower %in% c("", "xxx", "na", "nan")] <- NA_character_
|
||||
|
||||
@@ -210,7 +214,7 @@ as.mo <- function(x,
|
||||
# From known codes ----
|
||||
out[is.na(out) & toupper(x) %in% AMR::microorganisms.codes$code] <- AMR::microorganisms.codes$mo[match(toupper(x)[is.na(out) & toupper(x) %in% AMR::microorganisms.codes$code], AMR::microorganisms.codes$code)]
|
||||
# From SNOMED ----
|
||||
if (any(is.na(out) & !is.na(x)) && any(is.na(out) & x %in% unlist(microorganisms$snomed), na.rm = TRUE)) {
|
||||
if (any(is.na(out) & !is.na(x)) && any(is.na(out) & x %in% unlist(AMR_env$MO_lookup$snomed), na.rm = TRUE)) {
|
||||
# found this extremely fast gem here: https://stackoverflow.com/a/11002456/4575331
|
||||
out[is.na(out) & x %in% unlist(AMR_env$MO_lookup$snomed)] <- AMR_env$MO_lookup$mo[rep(seq_along(AMR_env$MO_lookup$snomed), vapply(FUN.VALUE = double(1), AMR_env$MO_lookup$snomed, length))[match(x[is.na(out) & x %in% unlist(AMR_env$MO_lookup$snomed)], unlist(AMR_env$MO_lookup$snomed))]]
|
||||
}
|
||||
@@ -256,8 +260,8 @@ as.mo <- function(x,
|
||||
|
||||
# some required cleaning steps
|
||||
x_out <- trimws2(x_search)
|
||||
# this applies the `remove_from_input` argument, which defaults to mo_cleaning_regex()
|
||||
x_out <- gsub(remove_from_input, " ", x_out, ignore.case = TRUE, perl = TRUE)
|
||||
# this applies the `cleaning_regex` argument, which defaults to mo_cleaning_regex()
|
||||
x_out <- gsub(cleaning_regex, " ", x_out, ignore.case = TRUE, perl = TRUE)
|
||||
x_out <- trimws2(gsub(" +", " ", x_out, perl = TRUE))
|
||||
x_search_cleaned <- x_out
|
||||
x_out <- tolower(x_out)
|
||||
@@ -274,7 +278,7 @@ as.mo <- function(x,
|
||||
|
||||
# take out the parts, split by space
|
||||
x_parts <- strsplit(gsub("-", " ", x_out, fixed = TRUE), " ", fixed = TRUE)[[1]]
|
||||
|
||||
|
||||
# do a pre-match on first character (and if it contains a space, first chars of first two terms)
|
||||
if (length(x_parts) %in% c(2, 3)) {
|
||||
# for genus + species + subspecies
|
||||
@@ -313,39 +317,39 @@ as.mo <- function(x,
|
||||
} else {
|
||||
minimum_matching_score_current <- minimum_matching_score
|
||||
}
|
||||
|
||||
|
||||
if (sum(m >= minimum_matching_score_current) > 10) {
|
||||
# at least 10 are left over, make the ones under `m` NA
|
||||
m[m < minimum_matching_score_current] <- NA_real_
|
||||
m[m < minimum_matching_score_current] <- NA_real_
|
||||
}
|
||||
|
||||
top_hits <- mo_to_search[order(m, decreasing = TRUE, na.last = NA)] # na.last = NA will remove the NAs
|
||||
|
||||
top_hits <- mo_to_search[order(m, decreasing = TRUE, na.last = NA)] # na.last = NA will remove the NAs
|
||||
if (length(top_hits) == 0) {
|
||||
warning_("No hits found for \"", x_search, "\" with minimum_matching_score = ", ifelse(is.null(minimum_matching_score), paste0("NULL (=", round(min(minimum_matching_score_current, na.rm = TRUE), 3), ")"), minimum_matching_score), ". Try setting this value lower or even to 0.", call = FALSE)
|
||||
result_mo <- NA_character_
|
||||
} else {
|
||||
result_mo <- AMR_env$MO_lookup$mo[match(top_hits[1], AMR_env$MO_lookup$fullname)]
|
||||
AMR_env$mo_uncertainties <- rbind(AMR_env$mo_uncertainties,
|
||||
AMR_env$mo_uncertainties <- rbind_AMR(
|
||||
AMR_env$mo_uncertainties,
|
||||
data.frame(
|
||||
original_input = x_search,
|
||||
input = x_search_cleaned,
|
||||
fullname = top_hits[1],
|
||||
mo = result_mo,
|
||||
candidates = ifelse(length(top_hits) > 1, paste(top_hits[2:min(26, length(top_hits))], collapse = ", "), ""),
|
||||
candidates = ifelse(length(top_hits) > 1, paste(top_hits[2:min(99, length(top_hits))], collapse = ", "), ""),
|
||||
minimum_matching_score = ifelse(is.null(minimum_matching_score), "NULL", minimum_matching_score),
|
||||
keep_synonyms = keep_synonyms,
|
||||
stringsAsFactors = FALSE
|
||||
),
|
||||
stringsAsFactors = FALSE
|
||||
)
|
||||
)
|
||||
# save to package env to save time for next time
|
||||
AMR_env$mo_previously_coerced <- unique(rbind(AMR_env$mo_previously_coerced,
|
||||
AMR_env$mo_previously_coerced <- unique(rbind_AMR(
|
||||
AMR_env$mo_previously_coerced,
|
||||
data.frame(
|
||||
x = paste(x_search, minimum_matching_score),
|
||||
mo = result_mo,
|
||||
stringsAsFactors = FALSE
|
||||
),
|
||||
stringsAsFactors = FALSE
|
||||
)
|
||||
))
|
||||
}
|
||||
# the actual result:
|
||||
@@ -365,18 +369,19 @@ as.mo <- function(x,
|
||||
plural <- c("s", "these uncertainties")
|
||||
}
|
||||
if (length(AMR_env$mo_uncertainties$original_input) <= 3) {
|
||||
examples <- vector_and(paste0(
|
||||
'"', AMR_env$mo_uncertainties$original_input,
|
||||
'" (assumed ', italicise(AMR_env$mo_uncertainties$fullname), ")"
|
||||
),
|
||||
quotes = FALSE
|
||||
examples <- vector_and(
|
||||
paste0(
|
||||
'"', AMR_env$mo_uncertainties$original_input,
|
||||
'" (assumed ', italicise(AMR_env$mo_uncertainties$fullname), ")"
|
||||
),
|
||||
quotes = FALSE
|
||||
)
|
||||
} else {
|
||||
examples <- paste0(nr2char(length(AMR_env$mo_uncertainties$original_input)), " microorganism", plural[1])
|
||||
}
|
||||
msg <- c(msg, paste0(
|
||||
"Microorganism translation was uncertain for ", examples,
|
||||
". Run `mo_uncertainties()` to review ", plural[2], ", or use `add_custom_microorganisms()` to add own entries."
|
||||
". Run `mo_uncertainties()` to review ", plural[2], ", or use `add_custom_microorganisms()` to add custom entries."
|
||||
))
|
||||
|
||||
for (m in msg) {
|
||||
@@ -442,7 +447,7 @@ as.mo <- function(x,
|
||||
# Apply Lancefield ----
|
||||
if (isTRUE(Lancefield) || Lancefield == "all") {
|
||||
# (using `%like_case%` to also match subspecies)
|
||||
|
||||
|
||||
# group A - S. pyogenes
|
||||
out[out %like_case% "^B_STRPT_PYGN(_|$)"] <- "B_STRPT_GRPA"
|
||||
# group B - S. agalactiae
|
||||
@@ -560,7 +565,7 @@ pillar_shaft.mo <- function(x, ...) {
|
||||
# markup NA and UNKNOWN
|
||||
out[is.na(x)] <- font_na(" NA")
|
||||
out[x == "UNKNOWN"] <- font_na(" UNKNOWN")
|
||||
|
||||
|
||||
# markup manual codes
|
||||
out[x %in% AMR_env$MO_lookup$mo & !x %in% AMR::microorganisms$mo] <- font_blue(out[x %in% AMR_env$MO_lookup$mo & !x %in% AMR::microorganisms$mo], collapse = NULL)
|
||||
|
||||
@@ -577,10 +582,11 @@ pillar_shaft.mo <- function(x, ...) {
|
||||
if (!all(x %in% all_mos) ||
|
||||
(!is.null(df) && !all(unlist(df[, which(mo_cols), drop = FALSE]) %in% all_mos))) {
|
||||
# markup old mo codes
|
||||
out[!x %in% all_mos] <- font_italic(font_na(x[!x %in% all_mos],
|
||||
out[!x %in% all_mos] <- font_italic(
|
||||
font_na(x[!x %in% all_mos],
|
||||
collapse = NULL
|
||||
),
|
||||
collapse = NULL
|
||||
),
|
||||
collapse = NULL
|
||||
)
|
||||
# throw a warning with the affected column name(s)
|
||||
if (!is.null(mo_cols)) {
|
||||
@@ -625,7 +631,7 @@ freq.mo <- function(x, ...) {
|
||||
.add_header = list(
|
||||
`Gram-negative` = paste0(
|
||||
format(sum(grams == "Gram-negative", na.rm = TRUE),
|
||||
big.mark = ",",
|
||||
big.mark = " ",
|
||||
decimal.mark = "."
|
||||
),
|
||||
" (", percentage(sum(grams == "Gram-negative", na.rm = TRUE) / length(grams),
|
||||
@@ -635,7 +641,7 @@ freq.mo <- function(x, ...) {
|
||||
),
|
||||
`Gram-positive` = paste0(
|
||||
format(sum(grams == "Gram-positive", na.rm = TRUE),
|
||||
big.mark = ",",
|
||||
big.mark = " ",
|
||||
decimal.mark = "."
|
||||
),
|
||||
" (", percentage(sum(grams == "Gram-positive", na.rm = TRUE) / length(grams),
|
||||
@@ -792,38 +798,49 @@ rep.mo <- function(x, ...) {
|
||||
#' @method print mo_uncertainties
|
||||
#' @export
|
||||
#' @noRd
|
||||
print.mo_uncertainties <- function(x, ...) {
|
||||
print.mo_uncertainties <- function(x, n = 10, ...) {
|
||||
if (NROW(x) == 0) {
|
||||
cat(word_wrap("No uncertainties to show. Only uncertainties of the last call of `as.mo()` or any `mo_*()` function are stored.\n\n", add_fn = font_blue))
|
||||
return(invisible(NULL))
|
||||
}
|
||||
|
||||
add_MO_lookup_to_AMR_env()
|
||||
|
||||
cat(word_wrap("Matching scores are based on the resemblance between the input and the full taxonomic name, and the pathogenicity in humans. See `?mo_matching_score`.\n\n", add_fn = font_blue))
|
||||
|
||||
add_MO_lookup_to_AMR_env()
|
||||
|
||||
col_red <- function(x) font_rose_bg(font_black(x, collapse = NULL), collapse = NULL)
|
||||
col_orange <- function(x) font_orange_bg(font_black(x, collapse = NULL), collapse = NULL)
|
||||
col_yellow <- function(x) font_yellow_bg(font_black(x, collapse = NULL), collapse = NULL)
|
||||
col_green <- function(x) font_green_bg(font_black(x, collapse = NULL), collapse = NULL)
|
||||
|
||||
if (has_colour()) {
|
||||
cat(word_wrap("Colour keys: ",
|
||||
font_red_bg(" 0.000-0.499 "),
|
||||
font_orange_bg(" 0.500-0.599 "),
|
||||
font_yellow_bg(" 0.600-0.699 "),
|
||||
font_green_bg(" 0.700-1.000"),
|
||||
col_red(" 0.000-0.499 "),
|
||||
col_orange(" 0.500-0.599 "),
|
||||
col_yellow(" 0.600-0.699 "),
|
||||
col_green(" 0.700-1.000"),
|
||||
add_fn = font_blue
|
||||
), font_green_bg(" "), "\n", sep = "")
|
||||
}
|
||||
|
||||
score_set_colour <- function(text, scores) {
|
||||
# set colours to scores
|
||||
text[scores >= 0.7] <- font_green_bg(text[scores >= 0.7], collapse = NULL)
|
||||
text[scores >= 0.6 & scores < 0.7] <- font_yellow_bg(text[scores >= 0.6 & scores < 0.7], collapse = NULL)
|
||||
text[scores >= 0.5 & scores < 0.6] <- font_orange_bg(text[scores >= 0.5 & scores < 0.6], collapse = NULL)
|
||||
text[scores < 0.5] <- font_red_bg(text[scores < 0.5], collapse = NULL)
|
||||
text[scores >= 0.7] <- col_green(text[scores >= 0.7])
|
||||
text[scores >= 0.6 & scores < 0.7] <- col_yellow(text[scores >= 0.6 & scores < 0.7])
|
||||
text[scores >= 0.5 & scores < 0.6] <- col_orange(text[scores >= 0.5 & scores < 0.6])
|
||||
text[scores < 0.5] <- col_red(text[scores < 0.5])
|
||||
text
|
||||
}
|
||||
|
||||
|
||||
txt <- ""
|
||||
any_maxed_out <- FALSE
|
||||
for (i in seq_len(nrow(x))) {
|
||||
if (x[i, ]$candidates != "") {
|
||||
candidates <- unlist(strsplit(x[i, ]$candidates, ", ", fixed = TRUE))
|
||||
if (length(candidates) > n) {
|
||||
any_maxed_out <- TRUE
|
||||
candidates <- candidates[seq_len(n)]
|
||||
}
|
||||
scores <- mo_matching_score(x = x[i, ]$input, n = candidates)
|
||||
n_candidates <- length(candidates)
|
||||
|
||||
@@ -835,21 +852,19 @@ print.mo_uncertainties <- function(x, ...) {
|
||||
candidates_formatted <- candidates_formatted[order(1 - scores)]
|
||||
scores_formatted <- scores_formatted[order(1 - scores)]
|
||||
|
||||
candidates <- word_wrap(paste0(
|
||||
"Also matched: ",
|
||||
vector_and(paste0(
|
||||
candidates_formatted,
|
||||
font_blue(paste0(" (", scores_formatted, ")"), collapse = NULL)
|
||||
candidates <- word_wrap(
|
||||
paste0(
|
||||
"Also matched: ",
|
||||
vector_and(
|
||||
paste0(
|
||||
candidates_formatted,
|
||||
font_blue(paste0(" (", scores_formatted, ")"), collapse = NULL)
|
||||
),
|
||||
quotes = FALSE, sort = FALSE
|
||||
)
|
||||
),
|
||||
quotes = FALSE, sort = FALSE
|
||||
),
|
||||
ifelse(n_candidates == 25,
|
||||
font_grey(" [showing first 25]"),
|
||||
""
|
||||
)
|
||||
),
|
||||
extra_indent = nchar("Also matched: "),
|
||||
width = 0.9 * getOption("width", 100)
|
||||
extra_indent = nchar("Also matched: "),
|
||||
width = 0.9 * getOption("width", 100)
|
||||
)
|
||||
} else {
|
||||
candidates <- ""
|
||||
@@ -891,7 +906,11 @@ print.mo_uncertainties <- function(x, ...) {
|
||||
txt <- gsub("(^[\n]|[\n]$)", "", txt)
|
||||
txt <- paste0("\n", txt, "\n")
|
||||
}
|
||||
|
||||
cat(txt)
|
||||
if (isTRUE(any_maxed_out)) {
|
||||
cat(font_blue(word_wrap("\nOnly the first ", n, " other matches of each record are shown. Run `print(mo_uncertainties(), n = ...)` to view more entries, or save `mo_uncertainties()` to an object.")))
|
||||
}
|
||||
}
|
||||
|
||||
#' @method print mo_renamed
|
||||
@@ -954,17 +973,17 @@ convert_colloquial_input <- function(x) {
|
||||
out[x %like_case% "mil+er+i gr"] <- "B_STRPT_MILL"
|
||||
out[x %like_case% "((strepto|^s).* viridans|^vgs[^a-z]*$)"] <- "B_STRPT_VIRI"
|
||||
out[x %like_case% "(viridans.* (strepto|^s).*|^vgs[^a-z]*$)"] <- "B_STRPT_VIRI"
|
||||
|
||||
|
||||
# Salmonella in different languages, like "Salmonella grupo B"
|
||||
out[x %like_case% "salmonella.* [bcd]$"] <- gsub(".*salmonella.* ([bcd])$",
|
||||
"B_SLMNL_GRP\\U\\1",
|
||||
x[x %like_case% "salmonella.* [bcd]$"],
|
||||
perl = TRUE
|
||||
out[x %like_case% "salmonella.* [abcd]$"] <- gsub(".*salmonella.* ([abcd])$",
|
||||
"B_SLMNL_GRP\\U\\1",
|
||||
x[x %like_case% "salmonella.* [abcd]$"],
|
||||
perl = TRUE
|
||||
)
|
||||
out[x %like_case% "group [bcd] salmonella"] <- gsub(".*group ([bcd]) salmonella*",
|
||||
"B_SLMNL_GRP\\U\\1",
|
||||
x[x %like_case% "group [bcd] salmonella"],
|
||||
perl = TRUE
|
||||
out[x %like_case% "group [abcd] salmonella"] <- gsub(".*group ([abcd]) salmonella*",
|
||||
"B_SLMNL_GRP\\U\\1",
|
||||
x[x %like_case% "group [abcd] salmonella"],
|
||||
perl = TRUE
|
||||
)
|
||||
|
||||
# CoNS/CoPS in different languages (support for German, Dutch, Spanish, Portuguese)
|
||||
@@ -999,10 +1018,14 @@ convert_colloquial_input <- function(x) {
|
||||
|
||||
italicise <- function(x) {
|
||||
out <- font_italic(x, collapse = NULL)
|
||||
out[x %like_case% "Salmonella [A-Z]"] <- paste(font_italic("Salmonella"),
|
||||
gsub("Salmonella ", "", x[x %like_case% "Salmonella [A-Z]"]))
|
||||
out[x %like_case% "Streptococcus [A-Z]"] <- paste(font_italic("Streptococcus"),
|
||||
gsub("Streptococcus ", "", x[x %like_case% "Streptococcus [A-Z]"]))
|
||||
out[x %like_case% "Salmonella [A-Z]"] <- paste(
|
||||
font_italic("Salmonella"),
|
||||
gsub("Salmonella ", "", x[x %like_case% "Salmonella [A-Z]"])
|
||||
)
|
||||
out[x %like_case% "Streptococcus [A-Z]"] <- paste(
|
||||
font_italic("Streptococcus"),
|
||||
gsub("Streptococcus ", "", x[x %like_case% "Streptococcus [A-Z]"])
|
||||
)
|
||||
if (has_colour()) {
|
||||
out <- gsub("(Group|group|Complex|complex)(\033\\[23m)?", "\033[23m\\1", out, perl = TRUE)
|
||||
}
|
||||
|
||||
@@ -34,13 +34,13 @@
|
||||
#' @param x Any user input value(s)
|
||||
#' @param n A full taxonomic name, that exists in [`microorganisms$fullname`][microorganisms]
|
||||
#' @note This algorithm was originally described in: Berends MS *et al.* (2022). **AMR: An R Package for Working with Antimicrobial Resistance Data**. *Journal of Statistical Software*, 104(3), 1-31; \doi{10.18637/jss.v104.i03}.
|
||||
#'
|
||||
#'
|
||||
#' Later, the work of Bartlett A *et al.* about bacterial pathogens infecting humans (2022, \doi{10.1099/mic.0.001269}) was incorporated.
|
||||
#' @section Matching Score for Microorganisms:
|
||||
#' With ambiguous user input in [as.mo()] and all the [`mo_*`][mo_property()] functions, the returned results are chosen based on their matching score using [mo_matching_score()]. This matching score \eqn{m}, is calculated as:
|
||||
#'
|
||||
#' \ifelse{latex}{\deqn{m_{(x, n)} = \frac{l_{n} - 0.5 \cdot \min \begin{cases}l_{n} \\ \textrm{lev}(x, n)\end{cases}}{l_{n} \cdot p_{n} \cdot k_{n}}}}{
|
||||
#'
|
||||
#'
|
||||
#' \ifelse{html}{\figure{mo_matching_score.png}{options: width="300" alt="mo matching score"}}{m(x, n) = ( l_n * min(l_n, lev(x, n) ) ) / ( l_n * p_n * k_n )}}
|
||||
#'
|
||||
#' where:
|
||||
@@ -53,12 +53,12 @@
|
||||
#' * \eqn{k_n} is the taxonomic kingdom of \eqn{n}, set as Bacteria = 1, Fungi = 2, Protozoa = 3, Archaea = 4, others = 5.
|
||||
#'
|
||||
#' The grouping into human pathogenic prevalence \eqn{p} is based on recent work from Bartlett *et al.* (2022, \doi{10.1099/mic.0.001269}) who extensively studied medical-scientific literature to categorise all bacterial species into these groups:
|
||||
#'
|
||||
#'
|
||||
#' - **Established**, if a taxonomic species has infected at least three persons in three or more references. These records have `prevalence = 1.0` in the [microorganisms] data set;
|
||||
#' - **Putative**, if a taxonomic species has fewer than three known cases. These records have `prevalence = 1.25` in the [microorganisms] data set.
|
||||
#'
|
||||
#'
|
||||
#' Furthermore,
|
||||
#'
|
||||
#'
|
||||
#' - Any genus present in the **established** list also has `prevalence = 1.0` in the [microorganisms] data set;
|
||||
#' - Any other genus present in the **putative** list has `prevalence = 1.25` in the [microorganisms] data set;
|
||||
#' - Any other species or subspecies of which the genus is present in the two aforementioned groups, has `prevalence = 1.5` in the [microorganisms] data set;
|
||||
@@ -72,7 +72,7 @@
|
||||
#' @inheritSection AMR Reference Data Publicly Available
|
||||
#' @examples
|
||||
#' mo_reset_session()
|
||||
#'
|
||||
#'
|
||||
#' as.mo("E. coli")
|
||||
#' mo_uncertainties()
|
||||
#'
|
||||
@@ -95,7 +95,7 @@ mo_matching_score <- function(x, n) {
|
||||
|
||||
# force a capital letter, so this conversion will not count as a substitution
|
||||
substr(x, 1, 1) <- toupper(substr(x, 1, 1))
|
||||
|
||||
|
||||
# n is always a taxonomically valid full name
|
||||
if (length(n) == 1) {
|
||||
n <- rep(n, length(x))
|
||||
@@ -103,7 +103,7 @@ mo_matching_score <- function(x, n) {
|
||||
if (length(x) == 1) {
|
||||
x <- rep(x, length(n))
|
||||
}
|
||||
|
||||
|
||||
# length of fullname
|
||||
l_n <- nchar(n)
|
||||
lev <- double(length = length(x))
|
||||
@@ -126,7 +126,7 @@ mo_matching_score <- function(x, n) {
|
||||
p_n <- AMR_env$MO_lookup[match(n, AMR_env$MO_lookup$fullname), "prevalence", drop = TRUE]
|
||||
# kingdom index (Bacteria = 1, Fungi = 2, Protozoa = 3, Archaea = 4, others = 5)
|
||||
k_n <- AMR_env$MO_lookup[match(n, AMR_env$MO_lookup$fullname), "kingdom_index", drop = TRUE]
|
||||
|
||||
|
||||
# matching score:
|
||||
(l_n - 0.5 * l_n.lev) / (l_n * p_n * k_n)
|
||||
}
|
||||
|
||||
+45
-37
@@ -58,7 +58,7 @@
|
||||
#'
|
||||
#' SNOMED codes ([mo_snomed()]) are from the version of `r documentation_date(TAXONOMY_VERSION$SNOMED$accessed_date)`. See *Source* and the [microorganisms] data set for more info.
|
||||
#'
|
||||
#' Old taxonomic names (so-called 'synonyms') can be retrieved with [mo_synonyms()], the current taxonomic name can be retrieved with [mo_current()]. Both functions return full names.
|
||||
#' Old taxonomic names (so-called 'synonyms') can be retrieved with [mo_synonyms()] (which will have the scientific reference as [name][base::names()]), the current taxonomic name can be retrieved with [mo_current()]. Both functions return full names.
|
||||
#'
|
||||
#' All output [will be translated][translate] where possible.
|
||||
#' @section Matching Score for Microorganisms:
|
||||
@@ -69,9 +69,8 @@
|
||||
#' @return
|
||||
#' - An [integer] in case of [mo_year()]
|
||||
#' - An [ordered factor][factor] in case of [mo_pathogenicity()]
|
||||
#' - A [list] in case of [mo_taxonomy()], [mo_synonyms()] and [mo_info()]
|
||||
#' - A [list] in case of [mo_taxonomy()], [mo_synonyms()], [mo_snomed()] and [mo_info()]
|
||||
#' - A named [character] in case of [mo_url()]
|
||||
#' - A [numeric] in case of [mo_snomed()]
|
||||
#' - A [character] in all other cases
|
||||
#' @export
|
||||
#' @seealso Data set [microorganisms]
|
||||
@@ -109,12 +108,12 @@
|
||||
#'
|
||||
#' # scientific reference -----------------------------------------------------
|
||||
#'
|
||||
#' mo_ref("Klebsiella pneumoniae")
|
||||
#' mo_authors("Klebsiella pneumoniae")
|
||||
#' mo_year("Klebsiella pneumoniae")
|
||||
#' mo_lpsn("Klebsiella pneumoniae")
|
||||
#' mo_gbif("Klebsiella pneumoniae")
|
||||
#' mo_synonyms("Klebsiella pneumoniae")
|
||||
#' mo_ref("Klebsiella aerogenes")
|
||||
#' mo_authors("Klebsiella aerogenes")
|
||||
#' mo_year("Klebsiella aerogenes")
|
||||
#' mo_lpsn("Klebsiella aerogenes")
|
||||
#' mo_gbif("Klebsiella aerogenes")
|
||||
#' mo_synonyms("Klebsiella aerogenes")
|
||||
#'
|
||||
#'
|
||||
#' # abbreviations known in the field -----------------------------------------
|
||||
@@ -125,7 +124,8 @@
|
||||
#' mo_gramstain("VISA")
|
||||
#'
|
||||
#' mo_genus("EHEC")
|
||||
#' mo_species("EHEC")
|
||||
#' mo_species("EIEC")
|
||||
#' mo_name("UPEC")
|
||||
#'
|
||||
#'
|
||||
#' # known subspecies ---------------------------------------------------------
|
||||
@@ -133,7 +133,6 @@
|
||||
#' mo_fullname("K. pneu rh")
|
||||
#' mo_shortname("K. pneu rh")
|
||||
#'
|
||||
#'
|
||||
#' \donttest{
|
||||
#' # Becker classification, see ?as.mo ----------------------------------------
|
||||
#'
|
||||
@@ -158,7 +157,7 @@
|
||||
#' mo_gramstain("Klebsiella pneumoniae", language = "es") # Spanish
|
||||
#' mo_gramstain("Klebsiella pneumoniae", language = "el") # Greek
|
||||
#' mo_gramstain("Klebsiella pneumoniae", language = "uk") # Ukrainian
|
||||
#'
|
||||
#'
|
||||
#' # mo_type is equal to mo_kingdom, but mo_kingdom will remain untranslated
|
||||
#' mo_kingdom("Klebsiella pneumoniae")
|
||||
#' mo_type("Klebsiella pneumoniae")
|
||||
@@ -426,17 +425,23 @@ mo_pathogenicity <- function(x, language = get_AMR_locale(), keep_synonyms = get
|
||||
kngd <- AMR_env$MO_lookup$kingdom[match(x.mo, AMR_env$MO_lookup$mo)]
|
||||
rank <- AMR_env$MO_lookup$rank[match(x.mo, AMR_env$MO_lookup$mo)]
|
||||
|
||||
out <- factor(ifelse(prev == 1 & kngd == "Bacteria" & rank != "genus",
|
||||
"Pathogenic",
|
||||
ifelse(prev < 2 & kngd == "Fungi",
|
||||
"Potentially pathogenic",
|
||||
ifelse(prev == 2 & kngd == "Bacteria",
|
||||
"Non-pathogenic",
|
||||
ifelse(kngd == "Bacteria",
|
||||
"Potentially pathogenic",
|
||||
"Unknown")))),
|
||||
levels = c("Pathogenic", "Potentially pathogenic", "Non-pathogenic", "Unknown"),
|
||||
ordered = TRUE)
|
||||
out <- factor(
|
||||
ifelse(prev == 1 & kngd == "Bacteria" & rank != "genus",
|
||||
"Pathogenic",
|
||||
ifelse(prev < 2 & kngd == "Fungi",
|
||||
"Potentially pathogenic",
|
||||
ifelse(prev == 2 & kngd == "Bacteria",
|
||||
"Non-pathogenic",
|
||||
ifelse(kngd == "Bacteria",
|
||||
"Potentially pathogenic",
|
||||
"Unknown"
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
levels = c("Pathogenic", "Potentially pathogenic", "Non-pathogenic", "Unknown"),
|
||||
ordered = TRUE
|
||||
)
|
||||
|
||||
load_mo_uncertainties(metadata)
|
||||
out
|
||||
@@ -727,7 +732,7 @@ mo_synonyms <- function(x, language = get_AMR_locale(), keep_synonyms = getOptio
|
||||
meet_criteria(x, allow_NA = TRUE)
|
||||
language <- validate_language(language)
|
||||
meet_criteria(keep_synonyms, allow_class = "logical", has_length = 1)
|
||||
|
||||
|
||||
add_MO_lookup_to_AMR_env()
|
||||
|
||||
x.mo <- as.mo(x, language = language, keep_synonyms = keep_synonyms, ...)
|
||||
@@ -736,23 +741,22 @@ mo_synonyms <- function(x, language = get_AMR_locale(), keep_synonyms = getOptio
|
||||
syns <- lapply(x.mo, function(y) {
|
||||
gbif <- AMR_env$MO_lookup$gbif[match(y, AMR_env$MO_lookup$mo)]
|
||||
lpsn <- AMR_env$MO_lookup$lpsn[match(y, AMR_env$MO_lookup$mo)]
|
||||
out <- AMR_env$MO_lookup[which(AMR_env$MO_lookup$lpsn_renamed_to == lpsn | AMR_env$MO_lookup$gbif_renamed_to == gbif), "fullname", drop = TRUE]
|
||||
if (length(out) == 0) {
|
||||
fullname <- AMR_env$MO_lookup[which(AMR_env$MO_lookup$lpsn_renamed_to == lpsn | AMR_env$MO_lookup$gbif_renamed_to == gbif), "fullname", drop = TRUE]
|
||||
if (length(fullname) == 0) {
|
||||
NULL
|
||||
} else {
|
||||
out
|
||||
ref <- AMR_env$MO_lookup[which(AMR_env$MO_lookup$lpsn_renamed_to == lpsn | AMR_env$MO_lookup$gbif_renamed_to == gbif), "ref", drop = TRUE]
|
||||
names(fullname) <- ref
|
||||
fullname
|
||||
}
|
||||
})
|
||||
|
||||
if (length(syns) > 1) {
|
||||
names(syns) <- mo_name(x, language = language)
|
||||
result <- syns
|
||||
} else {
|
||||
result <- unlist(syns)
|
||||
if (length(syns) == 1) {
|
||||
syns <- unlist(syns)
|
||||
}
|
||||
|
||||
load_mo_uncertainties(metadata)
|
||||
result
|
||||
syns
|
||||
}
|
||||
|
||||
#' @rdname mo_property
|
||||
@@ -815,7 +819,7 @@ mo_url <- function(x, open = FALSE, language = get_AMR_locale(), keep_synonyms =
|
||||
meet_criteria(open, allow_class = "logical", has_length = 1)
|
||||
language <- validate_language(language)
|
||||
meet_criteria(keep_synonyms, allow_class = "logical", has_length = 1)
|
||||
|
||||
|
||||
add_MO_lookup_to_AMR_env()
|
||||
|
||||
x.mo <- as.mo(x = x, language = language, keep_synonyms = keep_synonyms, ... = ...)
|
||||
@@ -862,7 +866,7 @@ mo_property <- function(x, property = "fullname", language = get_AMR_locale(), k
|
||||
|
||||
mo_validate <- function(x, property, language, keep_synonyms = keep_synonyms, ...) {
|
||||
add_MO_lookup_to_AMR_env()
|
||||
|
||||
|
||||
# try to catch an error when inputting an invalid argument
|
||||
# so the 'call.' can be set to FALSE
|
||||
tryCatch(x[1L] %in% unlist(AMR_env$MO_lookup[1, property, drop = TRUE]),
|
||||
@@ -895,12 +899,16 @@ mo_validate <- function(x, property, language, keep_synonyms = keep_synonyms, ..
|
||||
}
|
||||
|
||||
# get property reeaaally fast using match()
|
||||
x <- AMR_env$MO_lookup[[property]][match(x, AMR_env$MO_lookup$mo)]
|
||||
if (property == "snomed") {
|
||||
x <- lapply(x, function(y) unlist(AMR_env$MO_lookup$snomed[match(y, AMR_env$MO_lookup$mo)]))
|
||||
} else {
|
||||
x <- AMR_env$MO_lookup[[property]][match(x, AMR_env$MO_lookup$mo)]
|
||||
}
|
||||
|
||||
if (property == "mo") {
|
||||
return(set_clean_class(x, new_class = c("mo", "character")))
|
||||
} else if (property == "snomed") {
|
||||
return(sort(as.character(eval(parse(text = x)))))
|
||||
return(x)
|
||||
} else if (property == "prevalence") {
|
||||
return(as.double(x))
|
||||
} else {
|
||||
|
||||
+5
-5
@@ -33,13 +33,13 @@
|
||||
#'
|
||||
#' This is **the fastest way** to have your organisation (or analysis) specific codes picked up and translated by this package, since you don't have to bother about it again after setting it up once.
|
||||
#' @param path location of your reference file, this can be any text file (comma-, tab- or pipe-separated) or an Excel file (see *Details*). Can also be `""`, `NULL` or `FALSE` to delete the reference file.
|
||||
#' @param destination destination of the compressed data file, default to the user's home directory.
|
||||
#' @param destination destination of the compressed data file - the default is the user's home directory.
|
||||
#' @rdname mo_source
|
||||
#' @name mo_source
|
||||
#' @aliases set_mo_source get_mo_source
|
||||
#' @details The reference file can be a text file separated with commas (CSV) or tabs or pipes, an Excel file (either 'xls' or 'xlsx' format) or an \R object file (extension '.rds'). To use an Excel file, you will need to have the `readxl` package installed.
|
||||
#'
|
||||
#' [set_mo_source()] will check the file for validity: it must be a [data.frame], must have a column named `"mo"` which contains values from [`microorganisms$mo`][microorganisms] or [`microorganisms$fullname`][microorganisms] and must have a reference column with your own defined values. If all tests pass, [set_mo_source()] will read the file into \R and will ask to export it to `"~/mo_source.rds"`. The CRAN policy disallows packages to write to the file system, although '*exceptions may be allowed in interactive sessions if the package obtains confirmation from the user*'. For this reason, this function only works in interactive sessions so that the user can **specifically confirm and allow** that this file will be created. The destination of this file can be set with the `destination` argument and defaults to the user's home directory. It can also be set as an \R option, using `options(AMR_mo_source = "my/location/file.rds")`.
|
||||
#' [set_mo_source()] will check the file for validity: it must be a [data.frame], must have a column named `"mo"` which contains values from [`microorganisms$mo`][microorganisms] or [`microorganisms$fullname`][microorganisms] and must have a reference column with your own defined values. If all tests pass, [set_mo_source()] will read the file into \R and will ask to export it to `"~/mo_source.rds"`. The CRAN policy disallows packages to write to the file system, although '*exceptions may be allowed in interactive sessions if the package obtains confirmation from the user*'. For this reason, this function only works in interactive sessions so that the user can **specifically confirm and allow** that this file will be created. The destination of this file can be set with the `destination` argument and defaults to the user's home directory. It can also be set with the [package option][AMR-options] [`AMR_mo_source`][AMR-options], e.g. `options(AMR_mo_source = "my/location/file.rds")`.
|
||||
#'
|
||||
#' The created compressed data file `"mo_source.rds"` will be used at default for MO determination (function [as.mo()] and consequently all `mo_*` functions like [mo_genus()] and [mo_gramstain()]). The location and timestamp of the original file will be saved as an [attribute][base::attributes()] to the compressed data file.
|
||||
#'
|
||||
@@ -149,7 +149,7 @@ set_mo_source <- function(path, destination = getOption("AMR_mo_source", "~/mo_s
|
||||
|
||||
df <- NULL
|
||||
if (path %like% "[.]rds$") {
|
||||
df <- readRDS2(path)
|
||||
df <- readRDS_AMR(path)
|
||||
} else if (path %like% "[.]xlsx?$") {
|
||||
# is Excel file (old or new)
|
||||
stop_ifnot_installed("readxl")
|
||||
@@ -248,7 +248,7 @@ get_mo_source <- function(destination = getOption("AMR_mo_source", "~/mo_source.
|
||||
return(NULL)
|
||||
}
|
||||
if (is.null(AMR_env$mo_source)) {
|
||||
AMR_env$mo_source <- readRDS2(path.expand(destination))
|
||||
AMR_env$mo_source <- readRDS_AMR(path.expand(destination))
|
||||
}
|
||||
|
||||
old_time <- attributes(AMR_env$mo_source)$mo_source_timestamp
|
||||
@@ -262,7 +262,7 @@ get_mo_source <- function(destination = getOption("AMR_mo_source", "~/mo_source.
|
||||
|
||||
check_validity_mo_source <- function(x, refer_to_name = "`reference_df`", stop_on_error = TRUE) {
|
||||
add_MO_lookup_to_AMR_env()
|
||||
|
||||
|
||||
if (paste(deparse(substitute(x)), collapse = "") == "get_mo_source()") {
|
||||
return(TRUE)
|
||||
}
|
||||
|
||||
-39
@@ -1,39 +0,0 @@
|
||||
# ==================================================================== #
|
||||
# TITLE #
|
||||
# AMR: An R Package for Working with Antimicrobial Resistance Data #
|
||||
# #
|
||||
# SOURCE #
|
||||
# https://github.com/msberends/AMR #
|
||||
# #
|
||||
# CITE AS #
|
||||
# Berends MS, Luz CF, Friedrich AW, Sinha BNM, Albers CJ, Glasner C #
|
||||
# (2022). AMR: An R Package for Working with Antimicrobial Resistance #
|
||||
# Data. Journal of Statistical Software, 104(3), 1-31. #
|
||||
# doi:10.18637/jss.v104.i03 #
|
||||
# #
|
||||
# Developed at the University of Groningen and the University Medical #
|
||||
# Center Groningen in The Netherlands, in collaboration with many #
|
||||
# colleagues from around the world, see our website. #
|
||||
# #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# We created this package for both routine data analysis and academic #
|
||||
# research and it was publicly released in the hope that it will be #
|
||||
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
|
||||
# #
|
||||
# Visit our website for the full manual and a complete tutorial about #
|
||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Options for the AMR package
|
||||
#'
|
||||
#' This is an overview of the package-specific [options()] you can set in the `AMR` package.
|
||||
#' @section Options:
|
||||
#' * `AMR_custom_ab`: allows to use custom antimicrobial drugs with this package. This is explained in [add_custom_antimicrobials()].
|
||||
#' * `AMR_custom_mo`: allows to use custom microorganisms with this package. This is explained in [add_custom_microorganisms()].
|
||||
#' @keywords internal
|
||||
#' @name AMR-options
|
||||
# @export
|
||||
NULL
|
||||
@@ -34,11 +34,11 @@
|
||||
#' @param x,object values created with [as.mic()], [as.disk()] or [as.sir()] (or their `random_*` variants, such as [random_mic()])
|
||||
#' @param mo any (vector of) text that can be coerced to a valid microorganism code with [as.mo()]
|
||||
#' @param ab any (vector of) text that can be coerced to a valid antimicrobial drug code with [as.ab()]
|
||||
#' @param guideline interpretation guideline to use, defaults to the latest included EUCAST guideline, see *Details*
|
||||
#' @param guideline interpretation guideline to use - the default is the latest included EUCAST guideline, see *Details*
|
||||
#' @param main,title title of the plot
|
||||
#' @param xlab,ylab axis title
|
||||
#' @param colours_SIR colours to use for filling in the bars, must be a vector of three values (in the order S, I and R). The default colours are colour-blind friendly.
|
||||
#' @param language language to be used to translate 'Susceptible', 'Increased exposure'/'Intermediate' and 'Resistant', defaults to system language (see [get_AMR_locale()]) and can be overwritten by setting the option `AMR_locale`, e.g. `options(AMR_locale = "de")`, see [translate]. Use `language = NULL` or `language = ""` to prevent translation.
|
||||
#' @param language language to be used to translate 'Susceptible', 'Increased exposure'/'Intermediate' and 'Resistant' - the default is system language (see [get_AMR_locale()]) and can be overwritten by setting the [package option][AMR-options] [`AMR_locale`][AMR-options], e.g. `options(AMR_locale = "de")`, see [translate]. Use `language = NULL` or `language = ""` to prevent translation.
|
||||
#' @param expand a [logical] to indicate whether the range on the x axis should be expanded between the lowest and highest value. For MIC values, intermediate values will be factors of 2 starting from the highest MIC value. For disk diameters, the whole diameter range will be filled.
|
||||
#' @details
|
||||
#' The interpretation of "I" will be named "Increased exposure" for all EUCAST guidelines since 2019, and will be named "Intermediate" in all other cases.
|
||||
@@ -88,8 +88,8 @@ plot.mic <- function(x,
|
||||
ab = NULL,
|
||||
guideline = "EUCAST",
|
||||
main = deparse(substitute(x)),
|
||||
ylab = "Frequency",
|
||||
xlab = "Minimum Inhibitory Concentration (mg/L)",
|
||||
ylab = translate_AMR("Frequency", language = language),
|
||||
xlab = translate_AMR("Minimum Inhibitory Concentration (mg/L)", language = language),
|
||||
colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"),
|
||||
language = get_AMR_locale(),
|
||||
expand = TRUE,
|
||||
@@ -100,18 +100,14 @@ plot.mic <- function(x,
|
||||
meet_criteria(main, allow_class = "character", has_length = 1, allow_NULL = TRUE)
|
||||
meet_criteria(ylab, allow_class = "character", has_length = 1)
|
||||
meet_criteria(xlab, allow_class = "character", has_length = 1)
|
||||
if ("colours_RSI" %in% names(list(...))) {
|
||||
deprecation_warning(extra_msg = "The 'colours_RSI' argument has been replaced with 'colours_SIR'.")
|
||||
colours_SIR <- list(...)$colours_RSI
|
||||
}
|
||||
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3))
|
||||
language <- validate_language(language)
|
||||
meet_criteria(expand, allow_class = "logical", has_length = 1)
|
||||
|
||||
# translate if not specifically set
|
||||
if (missing(ylab)) {
|
||||
ylab <- translate_into_language(ylab, language = language)
|
||||
}
|
||||
if (missing(xlab)) {
|
||||
xlab <- translate_into_language(xlab, language = language)
|
||||
}
|
||||
|
||||
if (length(colours_SIR) == 1) {
|
||||
colours_SIR <- rep(colours_SIR, 3)
|
||||
}
|
||||
@@ -127,6 +123,7 @@ plot.mic <- function(x,
|
||||
colours_SIR = colours_SIR,
|
||||
fn = as.mic,
|
||||
language = language,
|
||||
type = "MIC",
|
||||
...
|
||||
)
|
||||
barplot(x,
|
||||
@@ -146,15 +143,15 @@ plot.mic <- function(x,
|
||||
legend_txt <- character(0)
|
||||
legend_col <- character(0)
|
||||
if (any(cols_sub$cols == colours_SIR[1] & cols_sub$count > 0)) {
|
||||
legend_txt <- "Susceptible"
|
||||
legend_txt <- c(legend_txt, "(S) Susceptible")
|
||||
legend_col <- colours_SIR[1]
|
||||
}
|
||||
if (any(cols_sub$cols == colours_SIR[2] & cols_sub$count > 0)) {
|
||||
legend_txt <- c(legend_txt, plot_name_of_I(cols_sub$guideline))
|
||||
legend_txt <- c(legend_txt, paste("(I)", plot_name_of_I(cols_sub$guideline)))
|
||||
legend_col <- c(legend_col, colours_SIR[2])
|
||||
}
|
||||
if (any(cols_sub$cols == colours_SIR[3] & cols_sub$count > 0)) {
|
||||
legend_txt <- c(legend_txt, "Resistant")
|
||||
legend_txt <- c(legend_txt, "(R) Resistant")
|
||||
legend_col <- c(legend_col, colours_SIR[3])
|
||||
}
|
||||
|
||||
@@ -179,8 +176,8 @@ barplot.mic <- function(height,
|
||||
ab = NULL,
|
||||
guideline = "EUCAST",
|
||||
main = deparse(substitute(height)),
|
||||
ylab = "Frequency",
|
||||
xlab = "Minimum Inhibitory Concentration (mg/L)",
|
||||
ylab = translate_AMR("Frequency", language = language),
|
||||
xlab = translate_AMR("Minimum Inhibitory Concentration (mg/L)", language = language),
|
||||
colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"),
|
||||
language = get_AMR_locale(),
|
||||
expand = TRUE,
|
||||
@@ -191,18 +188,14 @@ barplot.mic <- function(height,
|
||||
meet_criteria(mo, allow_class = c("mo", "character"), allow_NULL = TRUE)
|
||||
meet_criteria(ab, allow_class = c("ab", "character"), allow_NULL = TRUE)
|
||||
meet_criteria(guideline, allow_class = "character", has_length = 1)
|
||||
if ("colours_RSI" %in% names(list(...))) {
|
||||
deprecation_warning(extra_msg = "The 'colours_RSI' argument has been replaced with 'colours_SIR'.")
|
||||
colours_SIR <- list(...)$colours_RSI
|
||||
}
|
||||
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3))
|
||||
language <- validate_language(language)
|
||||
meet_criteria(expand, allow_class = "logical", has_length = 1)
|
||||
|
||||
# translate if not specifically set
|
||||
if (missing(ylab)) {
|
||||
ylab <- translate_into_language(ylab, language = language)
|
||||
}
|
||||
if (missing(xlab)) {
|
||||
xlab <- translate_into_language(xlab, language = language)
|
||||
}
|
||||
|
||||
main <- gsub(" +", " ", paste0(main, collapse = " "))
|
||||
|
||||
plot(
|
||||
@@ -226,8 +219,8 @@ autoplot.mic <- function(object,
|
||||
ab = NULL,
|
||||
guideline = "EUCAST",
|
||||
title = deparse(substitute(object)),
|
||||
ylab = "Frequency",
|
||||
xlab = "Minimum Inhibitory Concentration (mg/L)",
|
||||
ylab = translate_AMR("Frequency", language = language),
|
||||
xlab = translate_AMR("Minimum Inhibitory Concentration (mg/L)", language = language),
|
||||
colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"),
|
||||
language = get_AMR_locale(),
|
||||
expand = TRUE,
|
||||
@@ -239,18 +232,14 @@ autoplot.mic <- function(object,
|
||||
meet_criteria(title, allow_class = "character", allow_NULL = TRUE)
|
||||
meet_criteria(ylab, allow_class = "character", has_length = 1)
|
||||
meet_criteria(xlab, allow_class = "character", has_length = 1)
|
||||
if ("colours_RSI" %in% names(list(...))) {
|
||||
deprecation_warning(extra_msg = "The 'colours_RSI' argument has been replaced with 'colours_SIR'.")
|
||||
colours_SIR <- list(...)$colours_RSI
|
||||
}
|
||||
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3))
|
||||
language <- validate_language(language)
|
||||
meet_criteria(expand, allow_class = "logical", has_length = 1)
|
||||
|
||||
# translate if not specifically set
|
||||
if (missing(ylab)) {
|
||||
ylab <- translate_into_language(ylab, language = language)
|
||||
}
|
||||
if (missing(xlab)) {
|
||||
xlab <- translate_into_language(xlab, language = language)
|
||||
}
|
||||
|
||||
if ("main" %in% names(list(...))) {
|
||||
title <- list(...)$main
|
||||
}
|
||||
@@ -267,16 +256,22 @@ autoplot.mic <- function(object,
|
||||
colours_SIR = colours_SIR,
|
||||
fn = as.mic,
|
||||
language = language,
|
||||
type = "MIC",
|
||||
...
|
||||
)
|
||||
df <- as.data.frame(x, stringsAsFactors = TRUE)
|
||||
colnames(df) <- c("mic", "count")
|
||||
df$cols <- cols_sub$cols
|
||||
df$cols[df$cols == colours_SIR[1]] <- "Susceptible"
|
||||
df$cols[df$cols == colours_SIR[2]] <- plot_name_of_I(cols_sub$guideline)
|
||||
df$cols[df$cols == colours_SIR[3]] <- "Resistant"
|
||||
df$cols[df$cols == colours_SIR[1]] <- "(S) Susceptible"
|
||||
df$cols[df$cols == colours_SIR[2]] <- paste("(I)", plot_name_of_I(cols_sub$guideline))
|
||||
df$cols[df$cols == colours_SIR[3]] <- "(R) Resistant"
|
||||
df$cols <- factor(translate_into_language(df$cols, language = language),
|
||||
levels = translate_into_language(c("Susceptible", plot_name_of_I(cols_sub$guideline), "Resistant"),
|
||||
levels = translate_into_language(
|
||||
c(
|
||||
"(S) Susceptible",
|
||||
paste("(I)", plot_name_of_I(cols_sub$guideline)),
|
||||
"(R) Resistant"
|
||||
),
|
||||
language = language
|
||||
),
|
||||
ordered = TRUE
|
||||
@@ -285,10 +280,10 @@ autoplot.mic <- function(object,
|
||||
|
||||
if (any(colours_SIR %in% cols_sub$cols)) {
|
||||
vals <- c(
|
||||
"Susceptible" = colours_SIR[1],
|
||||
"Susceptible, incr. exp." = colours_SIR[2],
|
||||
"Intermediate" = colours_SIR[2],
|
||||
"Resistant" = colours_SIR[3]
|
||||
"(S) Susceptible" = colours_SIR[1],
|
||||
"(I) Susceptible, incr. exp." = colours_SIR[2],
|
||||
"(I) Intermediate" = colours_SIR[2],
|
||||
"(R) Resistant" = colours_SIR[3]
|
||||
)
|
||||
names(vals) <- translate_into_language(names(vals), language = language)
|
||||
p <- p +
|
||||
@@ -324,8 +319,8 @@ fortify.mic <- function(object, ...) {
|
||||
#' @rdname plot
|
||||
plot.disk <- function(x,
|
||||
main = deparse(substitute(x)),
|
||||
ylab = "Frequency",
|
||||
xlab = "Disk diffusion diameter (mm)",
|
||||
ylab = translate_AMR("Frequency", language = language),
|
||||
xlab = translate_AMR("Disk diffusion diameter (mm)", language = language),
|
||||
mo = NULL,
|
||||
ab = NULL,
|
||||
guideline = "EUCAST",
|
||||
@@ -339,18 +334,14 @@ plot.disk <- function(x,
|
||||
meet_criteria(mo, allow_class = c("mo", "character"), allow_NULL = TRUE)
|
||||
meet_criteria(ab, allow_class = c("ab", "character"), allow_NULL = TRUE)
|
||||
meet_criteria(guideline, allow_class = "character", has_length = 1)
|
||||
if ("colours_RSI" %in% names(list(...))) {
|
||||
deprecation_warning(extra_msg = "The 'colours_RSI' argument has been replaced with 'colours_SIR'.")
|
||||
colours_SIR <- list(...)$colours_RSI
|
||||
}
|
||||
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3))
|
||||
language <- validate_language(language)
|
||||
meet_criteria(expand, allow_class = "logical", has_length = 1)
|
||||
|
||||
# translate if not specifically set
|
||||
if (missing(ylab)) {
|
||||
ylab <- translate_into_language(ylab, language = language)
|
||||
}
|
||||
if (missing(xlab)) {
|
||||
xlab <- translate_into_language(xlab, language = language)
|
||||
}
|
||||
|
||||
if (length(colours_SIR) == 1) {
|
||||
colours_SIR <- rep(colours_SIR, 3)
|
||||
}
|
||||
@@ -366,6 +357,7 @@ plot.disk <- function(x,
|
||||
colours_SIR = colours_SIR,
|
||||
fn = as.disk,
|
||||
language = language,
|
||||
type = "disk",
|
||||
...
|
||||
)
|
||||
|
||||
@@ -386,15 +378,15 @@ plot.disk <- function(x,
|
||||
legend_txt <- character(0)
|
||||
legend_col <- character(0)
|
||||
if (any(cols_sub$cols == colours_SIR[3] & cols_sub$count > 0)) {
|
||||
legend_txt <- "Resistant"
|
||||
legend_txt <- "(R) Resistant"
|
||||
legend_col <- colours_SIR[3]
|
||||
}
|
||||
if (any(cols_sub$cols == colours_SIR[2] & cols_sub$count > 0)) {
|
||||
legend_txt <- c(legend_txt, plot_name_of_I(cols_sub$guideline))
|
||||
legend_txt <- c(legend_txt, paste("(I)", plot_name_of_I(cols_sub$guideline)))
|
||||
legend_col <- c(legend_col, colours_SIR[2])
|
||||
}
|
||||
if (any(cols_sub$cols == colours_SIR[1] & cols_sub$count > 0)) {
|
||||
legend_txt <- c(legend_txt, "Susceptible")
|
||||
legend_txt <- c(legend_txt, "(S) Susceptible")
|
||||
legend_col <- c(legend_col, colours_SIR[1])
|
||||
}
|
||||
legend("top",
|
||||
@@ -415,8 +407,8 @@ plot.disk <- function(x,
|
||||
#' @noRd
|
||||
barplot.disk <- function(height,
|
||||
main = deparse(substitute(height)),
|
||||
ylab = "Frequency",
|
||||
xlab = "Disk diffusion diameter (mm)",
|
||||
ylab = translate_AMR("Frequency", language = language),
|
||||
xlab = translate_AMR("Disk diffusion diameter (mm)", language = language),
|
||||
mo = NULL,
|
||||
ab = NULL,
|
||||
guideline = "EUCAST",
|
||||
@@ -430,18 +422,14 @@ barplot.disk <- function(height,
|
||||
meet_criteria(mo, allow_class = c("mo", "character"), allow_NULL = TRUE)
|
||||
meet_criteria(ab, allow_class = c("ab", "character"), allow_NULL = TRUE)
|
||||
meet_criteria(guideline, allow_class = "character", has_length = 1)
|
||||
if ("colours_RSI" %in% names(list(...))) {
|
||||
deprecation_warning(extra_msg = "The 'colours_RSI' argument has been replaced with 'colours_SIR'.")
|
||||
colours_SIR <- list(...)$colours_RSI
|
||||
}
|
||||
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3))
|
||||
language <- validate_language(language)
|
||||
meet_criteria(expand, allow_class = "logical", has_length = 1)
|
||||
|
||||
# translate if not specifically set
|
||||
if (missing(ylab)) {
|
||||
ylab <- translate_into_language(ylab, language = language)
|
||||
}
|
||||
if (missing(xlab)) {
|
||||
xlab <- translate_into_language(xlab, language = language)
|
||||
}
|
||||
|
||||
main <- gsub(" +", " ", paste0(main, collapse = " "))
|
||||
|
||||
plot(
|
||||
@@ -464,8 +452,8 @@ autoplot.disk <- function(object,
|
||||
mo = NULL,
|
||||
ab = NULL,
|
||||
title = deparse(substitute(object)),
|
||||
ylab = "Frequency",
|
||||
xlab = "Disk diffusion diameter (mm)",
|
||||
ylab = translate_AMR("Frequency", language = language),
|
||||
xlab = translate_AMR("Disk diffusion diameter (mm)", language = language),
|
||||
guideline = "EUCAST",
|
||||
colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"),
|
||||
language = get_AMR_locale(),
|
||||
@@ -478,18 +466,14 @@ autoplot.disk <- function(object,
|
||||
meet_criteria(mo, allow_class = c("mo", "character"), allow_NULL = TRUE)
|
||||
meet_criteria(ab, allow_class = c("ab", "character"), allow_NULL = TRUE)
|
||||
meet_criteria(guideline, allow_class = "character", has_length = 1)
|
||||
if ("colours_RSI" %in% names(list(...))) {
|
||||
deprecation_warning(extra_msg = "The 'colours_RSI' argument has been replaced with 'colours_SIR'.")
|
||||
colours_SIR <- list(...)$colours_RSI
|
||||
}
|
||||
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3))
|
||||
language <- validate_language(language)
|
||||
meet_criteria(expand, allow_class = "logical", has_length = 1)
|
||||
|
||||
# translate if not specifically set
|
||||
if (missing(ylab)) {
|
||||
ylab <- translate_into_language(ylab, language = language)
|
||||
}
|
||||
if (missing(xlab)) {
|
||||
xlab <- translate_into_language(xlab, language = language)
|
||||
}
|
||||
|
||||
if ("main" %in% names(list(...))) {
|
||||
title <- list(...)$main
|
||||
}
|
||||
@@ -506,17 +490,23 @@ autoplot.disk <- function(object,
|
||||
colours_SIR = colours_SIR,
|
||||
fn = as.disk,
|
||||
language = language,
|
||||
type = "disk",
|
||||
...
|
||||
)
|
||||
df <- as.data.frame(x, stringsAsFactors = TRUE)
|
||||
colnames(df) <- c("disk", "count")
|
||||
df$cols <- cols_sub$cols
|
||||
|
||||
df$cols[df$cols == colours_SIR[1]] <- "Susceptible"
|
||||
df$cols[df$cols == colours_SIR[2]] <- plot_name_of_I(cols_sub$guideline)
|
||||
df$cols[df$cols == colours_SIR[3]] <- "Resistant"
|
||||
df$cols[df$cols == colours_SIR[1]] <- "(S) Susceptible"
|
||||
df$cols[df$cols == colours_SIR[2]] <- paste("(I)", plot_name_of_I(cols_sub$guideline))
|
||||
df$cols[df$cols == colours_SIR[3]] <- "(R) Resistant"
|
||||
df$cols <- factor(translate_into_language(df$cols, language = language),
|
||||
levels = translate_into_language(c("Susceptible", plot_name_of_I(cols_sub$guideline), "Resistant"),
|
||||
levels = translate_into_language(
|
||||
c(
|
||||
"(S) Susceptible",
|
||||
paste("(I)", plot_name_of_I(cols_sub$guideline)),
|
||||
"(R) Resistant"
|
||||
),
|
||||
language = language
|
||||
),
|
||||
ordered = TRUE
|
||||
@@ -525,10 +515,10 @@ autoplot.disk <- function(object,
|
||||
|
||||
if (any(colours_SIR %in% cols_sub$cols)) {
|
||||
vals <- c(
|
||||
"Susceptible" = colours_SIR[1],
|
||||
"Susceptible, incr. exp." = colours_SIR[2],
|
||||
"Intermediate" = colours_SIR[2],
|
||||
"Resistant" = colours_SIR[3]
|
||||
"(S) Susceptible" = colours_SIR[1],
|
||||
"(I) Susceptible, incr. exp." = colours_SIR[2],
|
||||
"(I) Intermediate" = colours_SIR[2],
|
||||
"(R) Resistant" = colours_SIR[3]
|
||||
)
|
||||
names(vals) <- translate_into_language(names(vals), language = language)
|
||||
p <- p +
|
||||
@@ -563,8 +553,8 @@ fortify.disk <- function(object, ...) {
|
||||
#' @importFrom graphics plot text axis
|
||||
#' @rdname plot
|
||||
plot.sir <- function(x,
|
||||
ylab = "Percentage",
|
||||
xlab = "Antimicrobial Interpretation",
|
||||
ylab = translate_AMR("Percentage", language = language),
|
||||
xlab = translate_AMR("Antimicrobial Interpretation", language = language),
|
||||
main = deparse(substitute(x)),
|
||||
language = get_AMR_locale(),
|
||||
...) {
|
||||
@@ -572,32 +562,18 @@ plot.sir <- function(x,
|
||||
meet_criteria(xlab, allow_class = "character", has_length = 1)
|
||||
meet_criteria(main, allow_class = "character", has_length = 1, allow_NULL = TRUE)
|
||||
|
||||
# translate if not specifically set
|
||||
if (missing(ylab)) {
|
||||
ylab <- translate_into_language(ylab, language = language)
|
||||
}
|
||||
if (missing(xlab)) {
|
||||
xlab <- translate_into_language(xlab, language = language)
|
||||
}
|
||||
|
||||
data <- as.data.frame(table(x), stringsAsFactors = FALSE)
|
||||
colnames(data) <- c("x", "n")
|
||||
data$s <- round((data$n / sum(data$n)) * 100, 1)
|
||||
|
||||
if (!"S" %in% data$x) {
|
||||
data <- rbind(data, data.frame(x = "S", n = 0, s = 0, stringsAsFactors = FALSE),
|
||||
stringsAsFactors = FALSE
|
||||
)
|
||||
data <- rbind_AMR(data, data.frame(x = "S", n = 0, s = 0, stringsAsFactors = FALSE))
|
||||
}
|
||||
if (!"I" %in% data$x) {
|
||||
data <- rbind(data, data.frame(x = "I", n = 0, s = 0, stringsAsFactors = FALSE),
|
||||
stringsAsFactors = FALSE
|
||||
)
|
||||
data <- rbind_AMR(data, data.frame(x = "I", n = 0, s = 0, stringsAsFactors = FALSE))
|
||||
}
|
||||
if (!"R" %in% data$x) {
|
||||
data <- rbind(data, data.frame(x = "R", n = 0, s = 0, stringsAsFactors = FALSE),
|
||||
stringsAsFactors = FALSE
|
||||
)
|
||||
data <- rbind_AMR(data, data.frame(x = "R", n = 0, s = 0, stringsAsFactors = FALSE))
|
||||
}
|
||||
|
||||
data$x <- factor(data$x, levels = c("S", "I", "R"), ordered = TRUE)
|
||||
@@ -633,8 +609,8 @@ plot.sir <- function(x,
|
||||
#' @noRd
|
||||
barplot.sir <- function(height,
|
||||
main = deparse(substitute(height)),
|
||||
xlab = "Antimicrobial Interpretation",
|
||||
ylab = "Frequency",
|
||||
xlab = translate_AMR("Antimicrobial Interpretation", language = language),
|
||||
ylab = translate_AMR("Frequency", language = language),
|
||||
colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"),
|
||||
language = get_AMR_locale(),
|
||||
expand = TRUE,
|
||||
@@ -642,18 +618,14 @@ barplot.sir <- function(height,
|
||||
meet_criteria(xlab, allow_class = "character", has_length = 1)
|
||||
meet_criteria(main, allow_class = "character", has_length = 1, allow_NULL = TRUE)
|
||||
meet_criteria(ylab, allow_class = "character", has_length = 1)
|
||||
if ("colours_RSI" %in% names(list(...))) {
|
||||
deprecation_warning(extra_msg = "The 'colours_RSI' argument has been replaced with 'colours_SIR'.")
|
||||
colours_SIR <- list(...)$colours_RSI
|
||||
}
|
||||
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3))
|
||||
language <- validate_language(language)
|
||||
meet_criteria(expand, allow_class = "logical", has_length = 1)
|
||||
|
||||
# translate if not specifically set
|
||||
if (missing(ylab)) {
|
||||
ylab <- translate_into_language(ylab, language = language)
|
||||
}
|
||||
if (missing(xlab)) {
|
||||
xlab <- translate_into_language(xlab, language = language)
|
||||
}
|
||||
|
||||
if (length(colours_SIR) == 1) {
|
||||
colours_SIR <- rep(colours_SIR, 3)
|
||||
}
|
||||
@@ -676,8 +648,8 @@ barplot.sir <- function(height,
|
||||
# will be exported using s3_register() in R/zzz.R
|
||||
autoplot.sir <- function(object,
|
||||
title = deparse(substitute(object)),
|
||||
xlab = "Antimicrobial Interpretation",
|
||||
ylab = "Frequency",
|
||||
xlab = translate_AMR("Antimicrobial Interpretation", language = language),
|
||||
ylab = translate_AMR("Frequency", language = language),
|
||||
colours_SIR = c("#3CAEA3", "#F6D55C", "#ED553B"),
|
||||
language = get_AMR_locale(),
|
||||
...) {
|
||||
@@ -687,14 +659,6 @@ autoplot.sir <- function(object,
|
||||
meet_criteria(xlab, allow_class = "character", has_length = 1)
|
||||
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3))
|
||||
|
||||
# translate if not specifically set
|
||||
if (missing(ylab)) {
|
||||
ylab <- translate_into_language(ylab, language = language)
|
||||
}
|
||||
if (missing(xlab)) {
|
||||
xlab <- translate_into_language(xlab, language = language)
|
||||
}
|
||||
|
||||
if ("main" %in% names(list(...))) {
|
||||
title <- list(...)$main
|
||||
}
|
||||
@@ -780,33 +744,44 @@ plot_name_of_I <- function(guideline) {
|
||||
}
|
||||
}
|
||||
|
||||
plot_colours_subtitle_guideline <- function(x, mo, ab, guideline, colours_SIR, fn, language, ...) {
|
||||
plot_colours_subtitle_guideline <- function(x, mo, ab, guideline, colours_SIR, fn, language, type, ...) {
|
||||
guideline <- get_guideline(guideline, AMR::clinical_breakpoints)
|
||||
if (!is.null(mo) && !is.null(ab)) {
|
||||
# interpret and give colour based on MIC values
|
||||
mo <- as.mo(mo)
|
||||
ab <- as.ab(ab)
|
||||
sir <- suppressWarnings(suppressMessages(as.sir(fn(names(x)), mo = mo, ab = ab, guideline = guideline, ...)))
|
||||
cols <- character(length = length(sir))
|
||||
cols[is.na(sir)] <- "#BEBEBE"
|
||||
cols[sir == "S"] <- colours_SIR[1]
|
||||
cols[sir == "I"] <- colours_SIR[2]
|
||||
cols[sir == "R"] <- colours_SIR[3]
|
||||
moname <- mo_name(mo, language = language)
|
||||
ab <- as.ab(ab)
|
||||
abname <- ab_name(ab, language = language)
|
||||
if (all(cols == "#BEBEBE")) {
|
||||
message_(
|
||||
"No ", guideline, " interpretations found for ",
|
||||
ab_name(ab, language = NULL, tolower = TRUE), " in ", moname
|
||||
)
|
||||
guideline_txt <- ""
|
||||
|
||||
sir <- suppressWarnings(suppressMessages(as.sir(fn(names(x)), mo = mo, ab = ab, guideline = guideline, include_screening = FALSE, include_PKPD = TRUE, ...)))
|
||||
guideline_txt <- guideline
|
||||
if (all(is.na(sir))) {
|
||||
sir_screening <- suppressWarnings(suppressMessages(as.sir(fn(names(x)), mo = mo, ab = ab, guideline = guideline, include_screening = TRUE, include_PKPD = TRUE, ...)))
|
||||
if (!all(is.na(sir_screening))) {
|
||||
message_(
|
||||
"Only ", guideline, " ", type, " interpretations found for ",
|
||||
ab_name(ab, language = NULL, tolower = TRUE), " in ", italicise(moname), " for screening"
|
||||
)
|
||||
sir <- sir_screening
|
||||
guideline_txt <- paste0("(Screen, ", guideline_txt, ")")
|
||||
} else {
|
||||
message_(
|
||||
"No ", guideline, " ", type, " interpretations found for ",
|
||||
ab_name(ab, language = NULL, tolower = TRUE), " in ", italicise(moname)
|
||||
)
|
||||
guideline_txt <- ""
|
||||
}
|
||||
} else {
|
||||
guideline_txt <- guideline
|
||||
if (isTRUE(list(...)$uti)) {
|
||||
guideline_txt <- paste("UTIs,", guideline_txt)
|
||||
}
|
||||
guideline_txt <- paste0("(", guideline_txt, ")")
|
||||
}
|
||||
cols <- character(length = length(sir))
|
||||
cols[is.na(sir)] <- "#BEBEBE"
|
||||
cols[sir == "S"] <- colours_SIR[1]
|
||||
cols[sir == "I"] <- colours_SIR[2]
|
||||
cols[sir == "R"] <- colours_SIR[3]
|
||||
sub <- bquote(.(abname) ~ "-" ~ italic(.(moname)) ~ .(guideline_txt))
|
||||
} else {
|
||||
cols <- "#BEBEBE"
|
||||
|
||||
+46
-23
@@ -27,7 +27,7 @@
|
||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Calculate Microbial Resistance
|
||||
#' Calculate Antimicrobial Resistance
|
||||
#'
|
||||
#' @description These functions can be used to calculate the (co-)resistance or susceptibility of microbial isolates (i.e. percentage of S, SI, I, IR or R). All functions support quasiquotation with pipes, can be used in `summarise()` from the `dplyr` package and also support grouped variables, see *Examples*.
|
||||
#'
|
||||
@@ -39,17 +39,18 @@
|
||||
#' @param data a [data.frame] containing columns with class [`sir`] (see [as.sir()])
|
||||
#' @param translate_ab a column name of the [antibiotics] data set to translate the antibiotic abbreviations to, using [ab_property()]
|
||||
#' @inheritParams ab_property
|
||||
#' @param combine_SI a [logical] to indicate whether all values of S and I must be merged into one, so the output only consists of S+I vs. R (susceptible vs. resistant), defaults to `TRUE`
|
||||
#' @param combine_SI a [logical] to indicate whether all values of S and I must be merged into one, so the output only consists of S+I vs. R (susceptible vs. resistant) - the default is `TRUE`
|
||||
#' @param ab_result antibiotic results to test against, must be one or more values of "S", "I", or "R"
|
||||
#' @param confidence_level the confidence level for the returned confidence interval. For the calculation, the number of S or SI isolates, and R isolates are compared with the total number of available isolates with R, S, or I by using [binom.test()], i.e., the Clopper-Pearson method.
|
||||
#' @param side the side of the confidence interval to return. Defaults to `"both"` for a length 2 vector, but can also be (abbreviated as) `"min"`/`"left"`/`"lower"`/`"less"` or `"max"`/`"right"`/`"higher"`/`"greater"`.
|
||||
#' @param side the side of the confidence interval to return. The default is `"both"` for a length 2 vector, but can also be (abbreviated as) `"min"`/`"left"`/`"lower"`/`"less"` or `"max"`/`"right"`/`"higher"`/`"greater"`.
|
||||
#' @param collapse a [logical] to indicate whether the output values should be 'collapsed', i.e. be merged together into one value, or a character value to use for collapsing
|
||||
#' @inheritSection as.sir Interpretation of SIR
|
||||
#' @details
|
||||
#' The function [resistance()] is equal to the function [proportion_R()]. The function [susceptibility()] is equal to the function [proportion_SI()].
|
||||
#'
|
||||
#' Use [sir_confidence_interval()] to calculate the confidence interval, which relies on [binom.test()], i.e., the Clopper-Pearson method. This function returns a vector of length 2 at default for antimicrobial *resistance*. Change the `side` argument to "left"/"min" or "right"/"max" to return a single value, and change the `ab_result` argument to e.g. `c("S", "I")` to test for antimicrobial *susceptibility*, see Examples.
|
||||
#'
|
||||
#' **Remember that you should filter your data to let it contain only first isolates!** This is needed to exclude duplicates and to reduce selection bias. Use [first_isolate()] to determine them in your data set.
|
||||
#' **Remember that you should filter your data to let it contain only first isolates!** This is needed to exclude duplicates and to reduce selection bias. Use [first_isolate()] to determine them in your data set with one of the four available algorithms.
|
||||
#'
|
||||
#' These functions are not meant to count isolates, but to calculate the proportion of resistance/susceptibility. Use the [`count()`][AMR::count()] functions to count isolates. The function [susceptibility()] is essentially equal to `count_susceptible() / count_all()`. *Low counts can influence the outcome - the `proportion` functions may camouflage this, since they only return the proportion (albeit being dependent on the `minimum` argument).*
|
||||
#'
|
||||
@@ -57,6 +58,7 @@
|
||||
#' @section Combination Therapy:
|
||||
#' When using more than one variable for `...` (= combination therapy), use `only_all_tested` to only count isolates that are tested for all antibiotics/variables that you test them for. See this example for two antibiotics, Drug A and Drug B, about how [susceptibility()] works to calculate the %SI:
|
||||
#'
|
||||
#'
|
||||
#' ```
|
||||
#' --------------------------------------------------------------------
|
||||
#' only_all_tested = FALSE only_all_tested = TRUE
|
||||
@@ -77,11 +79,14 @@
|
||||
#' ```
|
||||
#'
|
||||
#' Please note that, in combination therapies, for `only_all_tested = TRUE` applies that:
|
||||
#'
|
||||
#' ```
|
||||
#' count_S() + count_I() + count_R() = count_all()
|
||||
#' proportion_S() + proportion_I() + proportion_R() = 1
|
||||
#' ```
|
||||
#'
|
||||
#' and that, in combination therapies, for `only_all_tested = FALSE` applies that:
|
||||
#'
|
||||
#' ```
|
||||
#' count_S() + count_I() + count_R() >= count_all()
|
||||
#' proportion_S() + proportion_I() + proportion_R() >= 1
|
||||
@@ -98,6 +103,8 @@
|
||||
#' @examples
|
||||
#' # example_isolates is a data set available in the AMR package.
|
||||
#' # run ?example_isolates for more info.
|
||||
#' example_isolates
|
||||
#'
|
||||
#'
|
||||
#' # base R ------------------------------------------------------------
|
||||
#' # determines %R
|
||||
@@ -106,6 +113,10 @@
|
||||
#' sir_confidence_interval(example_isolates$AMX,
|
||||
#' confidence_level = 0.975
|
||||
#' )
|
||||
#' sir_confidence_interval(example_isolates$AMX,
|
||||
#' confidence_level = 0.975,
|
||||
#' collapse = ", "
|
||||
#' )
|
||||
#'
|
||||
#' # determines %S+I:
|
||||
#' susceptibility(example_isolates$AMX)
|
||||
@@ -140,7 +151,6 @@
|
||||
#' )
|
||||
#' }
|
||||
#' if (require("dplyr")) {
|
||||
#'
|
||||
#' # scoped dplyr verbs with antibiotic selectors
|
||||
#' # (you could also use across() of course)
|
||||
#' example_isolates %>%
|
||||
@@ -255,10 +265,16 @@ sir_confidence_interval <- function(...,
|
||||
as_percent = FALSE,
|
||||
only_all_tested = FALSE,
|
||||
confidence_level = 0.95,
|
||||
side = "both") {
|
||||
side = "both",
|
||||
collapse = FALSE) {
|
||||
meet_criteria(ab_result, allow_class = c("character", "sir"), has_length = c(1, 2, 3), is_in = c("S", "I", "R"))
|
||||
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_positive_or_zero = TRUE, is_finite = TRUE)
|
||||
meet_criteria(as_percent, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(only_all_tested, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(confidence_level, allow_class = "numeric", is_positive = TRUE, has_length = 1)
|
||||
meet_criteria(side, allow_class = "character", has_length = 1, is_in = c("both", "b", "left", "l", "lower", "lowest", "less", "min", "right", "r", "higher", "highest", "greater", "g", "max"))
|
||||
meet_criteria(collapse, allow_class = c("logical", "character"), has_length = 1)
|
||||
|
||||
x <- tryCatch(
|
||||
sir_calc(...,
|
||||
ab_result = ab_result,
|
||||
@@ -276,19 +292,7 @@ sir_confidence_interval <- function(...,
|
||||
error = function(e) stop_(gsub("in sir_calc(): ", "", e$message, fixed = TRUE), call = -5)
|
||||
)
|
||||
|
||||
if (n < minimum) {
|
||||
warning_("Introducing NA: ",
|
||||
ifelse(n == 0, "no", paste("only", n)),
|
||||
" results available for `sir_confidence_interval()` (`minimum` = ", minimum, ").",
|
||||
call = FALSE
|
||||
)
|
||||
if (as_percent == TRUE) {
|
||||
return(NA_character_)
|
||||
} else {
|
||||
return(NA_real_)
|
||||
}
|
||||
}
|
||||
|
||||
# this applies the Clopper-Pearson method
|
||||
out <- stats::binom.test(x = x, n = n, conf.level = confidence_level)$conf.int
|
||||
out <- set_clean_class(out, "double")
|
||||
|
||||
@@ -297,11 +301,30 @@ sir_confidence_interval <- function(...,
|
||||
} else if (side %in% c("right", "r", "higher", "highest", "greater", "g", "max")) {
|
||||
out <- out[2]
|
||||
}
|
||||
if (as_percent == TRUE) {
|
||||
percentage(out, digits = 1)
|
||||
} else {
|
||||
out
|
||||
if (isTRUE(as_percent)) {
|
||||
out <- percentage(out, digits = 1)
|
||||
}
|
||||
if (!isFALSE(collapse) && length(out) > 1) {
|
||||
if (is.numeric(out)) {
|
||||
out <- round(out, digits = 3)
|
||||
}
|
||||
out <- paste(out, collapse = ifelse(isTRUE(collapse), "-", collapse))
|
||||
}
|
||||
|
||||
if (n < minimum) {
|
||||
warning_("Introducing NA: ",
|
||||
ifelse(n == 0, "no", paste("only", n)),
|
||||
" results available for `sir_confidence_interval()` (`minimum` = ", minimum, ").",
|
||||
call = FALSE
|
||||
)
|
||||
if (is.character(out)) {
|
||||
return(NA_character_)
|
||||
} else {
|
||||
return(NA_real_)
|
||||
}
|
||||
}
|
||||
|
||||
out
|
||||
}
|
||||
|
||||
#' @rdname proportion
|
||||
|
||||
+5
-1
@@ -83,6 +83,10 @@ random_disk <- function(size = NULL, mo = NULL, ab = NULL, ...) {
|
||||
#' @export
|
||||
random_sir <- function(size = NULL, prob_SIR = c(0.33, 0.33, 0.33), ...) {
|
||||
meet_criteria(size, allow_class = c("numeric", "integer"), has_length = 1, is_positive = TRUE, is_finite = TRUE, allow_NULL = TRUE)
|
||||
if ("prob_RSI" %in% names(list(...))) {
|
||||
deprecation_warning("prob_RSI", "prob_SIR", is_function = FALSE)
|
||||
prob_SIR <- list(...)$prob_RSI
|
||||
}
|
||||
meet_criteria(prob_SIR, allow_class = c("numeric", "integer"), has_length = 3)
|
||||
if (is.null(size)) {
|
||||
size <- NROW(get_current_data(arg_name = "size", call = -3))
|
||||
@@ -91,7 +95,7 @@ random_sir <- function(size = NULL, prob_SIR = c(0.33, 0.33, 0.33), ...) {
|
||||
}
|
||||
|
||||
random_exec <- function(type, size, mo = NULL, ab = NULL) {
|
||||
df <- clinical_breakpoints %pm>%
|
||||
df <- AMR::clinical_breakpoints %pm>%
|
||||
pm_filter(guideline %like% "EUCAST") %pm>%
|
||||
pm_arrange(pm_desc(guideline)) %pm>%
|
||||
subset(guideline == max(guideline) &
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
#' Create a prediction model to predict antimicrobial resistance for the next years on statistical solid ground. Standard errors (SE) will be returned as columns `se_min` and `se_max`. See *Examples* for a real live example.
|
||||
#' @param object model data to be plotted
|
||||
#' @param col_ab column name of `x` containing antimicrobial interpretations (`"R"`, `"I"` and `"S"`)
|
||||
#' @param col_date column name of the date, will be used to calculate years if this column doesn't consist of years already, defaults to the first column of with a date class
|
||||
#' @param col_date column name of the date, will be used to calculate years if this column doesn't consist of years already - the default is the first column of with a date class
|
||||
#' @param year_min lowest year to use in the prediction model, dafaults to the lowest year in `col_date`
|
||||
#' @param year_max highest year to use in the prediction model, defaults to 10 years after today
|
||||
#' @param year_max highest year to use in the prediction model - the default is 10 years after today
|
||||
#' @param year_every unit of sequence between lowest year found in the data and `year_max`
|
||||
#' @param minimum minimal amount of available isolates per year to include. Years containing less observations will be estimated by the model.
|
||||
#' @param model the statistical model of choice. This could be a generalised linear regression model with binomial distribution (i.e. using `glm(..., family = binomial)`, assuming that a period of zero resistance was followed by a period of increasing resistance leading slowly to more and more resistance. See *Details* for all valid options.
|
||||
@@ -125,7 +125,7 @@ resistance_predict <- function(x,
|
||||
meet_criteria(year_min, allow_class = c("numeric", "integer"), has_length = 1, allow_NULL = TRUE, is_positive = TRUE, is_finite = TRUE)
|
||||
meet_criteria(year_max, allow_class = c("numeric", "integer"), has_length = 1, allow_NULL = TRUE, is_positive = TRUE, is_finite = TRUE)
|
||||
meet_criteria(year_every, allow_class = c("numeric", "integer"), has_length = 1, is_positive = TRUE, is_finite = TRUE)
|
||||
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_finite = TRUE)
|
||||
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_positive_or_zero = TRUE, is_finite = TRUE)
|
||||
meet_criteria(model, allow_class = c("character", "function"), has_length = 1, allow_NULL = TRUE)
|
||||
meet_criteria(I_as_S, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(preserve_measurements, allow_class = "logical", has_length = 1)
|
||||
@@ -274,7 +274,7 @@ resistance_predict <- function(x,
|
||||
df_prediction$value <- ifelse(df_prediction$value > 1, 1, pmax(df_prediction$value, 0))
|
||||
df_prediction <- df_prediction[order(df_prediction$year), , drop = FALSE]
|
||||
|
||||
out <- as_original_data_class(df_prediction, class(x.bak)) # will remove tibble groups
|
||||
out <- as_original_data_class(df_prediction, class(x.bak)) # will remove tibble groups
|
||||
structure(out,
|
||||
class = c("resistance_predict", class(out)),
|
||||
I_as_S = I_as_S,
|
||||
|
||||
@@ -29,16 +29,20 @@
|
||||
|
||||
#' Translate MIC and Disk Diffusion to SIR, or Clean Existing SIR Data
|
||||
#'
|
||||
#' Interpret minimum inhibitory concentration (MIC) values and disk diffusion diameters according to EUCAST or CLSI, or clean up existing SIR values. This transforms the input to a new class [`sir`], which is an ordered [factor] with levels `S < I < R`.
|
||||
#' @description Interpret minimum inhibitory concentration (MIC) values and disk diffusion diameters according to EUCAST or CLSI, or clean up existing SIR values. This transforms the input to a new class [`sir`], which is an ordered [factor] with levels `S < I < R`.
|
||||
#'
|
||||
#' All breakpoints used for interpretation are publicly available in the [clinical_breakpoints] data set.
|
||||
#' @rdname as.sir
|
||||
#' @param x vector of values (for class [`mic`]: MIC values in mg/L, for class [`disk`]: a disk diffusion radius in millimetres)
|
||||
#' @param mo any (vector of) text that can be coerced to valid microorganism codes with [as.mo()], can be left empty to determine it automatically
|
||||
#' @param ab any (vector of) text that can be coerced to a valid antimicrobial drug code with [as.ab()]
|
||||
#' @param uti (Urinary Tract Infection) A vector with [logical]s (`TRUE` or `FALSE`) to specify whether a UTI specific interpretation from the guideline should be chosen. For using [as.sir()] on a [data.frame], this can also be a column containing [logical]s or when left blank, the data set will be searched for a column 'specimen', and rows within this column containing 'urin' (such as 'urine', 'urina') will be regarded isolates from a UTI. See *Examples*.
|
||||
#' @inheritParams first_isolate
|
||||
#' @param guideline defaults to EUCAST `r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "EUCAST")$guideline)))` (the latest implemented EUCAST guideline in the [clinical_breakpoints] data set), but can be set with the [option][options()] `AMR_guideline`. Supports EUCAST (`r min(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`) and CLSI (`r min(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "CLSI")$guideline)))`), see *Details*.
|
||||
#' @param guideline defaults to EUCAST `r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "EUCAST")$guideline)))` (the latest implemented EUCAST guideline in the [AMR::clinical_breakpoints] data set), but can be set with the [package option][AMR-options] [`AMR_guideline`][AMR-options]. Currently supports EUCAST (`r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`) and CLSI (`r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI")$guideline)))`), see *Details*.
|
||||
#' @param conserve_capped_values a [logical] to indicate that MIC values starting with `">"` (but not `">="`) must always return "R" , and that MIC values starting with `"<"` (but not `"<="`) must always return "S"
|
||||
#' @param add_intrinsic_resistance *(only useful when using a EUCAST guideline)* a [logical] to indicate whether intrinsic antibiotic resistance must also be considered for applicable bug-drug combinations, meaning that e.g. ampicillin will always return "R" in *Klebsiella* species. Determination is based on the [intrinsic_resistant] data set, that itself is based on `r format_eucast_version_nr(3.3)`.
|
||||
#' @param include_screening a [logical] to indicate that clinical breakpoints for screening are allowed - the default is `FALSE`. Can also be set with the [package option][AMR-options] [`AMR_include_screening`][AMR-options].
|
||||
#' @param include_PKPD a [logical] to indicate that PK/PD clinical breakpoints must be applied as a last resort - the default is `TRUE`. Can also be set with the [package option][AMR-options] [`AMR_include_PKPD`][AMR-options].
|
||||
#' @param reference_data a [data.frame] to be used for interpretation, which defaults to the [clinical_breakpoints] data set. Changing this argument allows for using own interpretation guidelines. This argument must contain a data set that is equal in structure to the [clinical_breakpoints] data set (same column names and column types). Please note that the `guideline` argument will be ignored when `reference_data` is manually set.
|
||||
#' @param threshold maximum fraction of invalid antimicrobial interpretations of `x`, see *Examples*
|
||||
#' @param ... for using on a [data.frame]: names of columns to apply [as.sir()] on (supports tidy selection such as `column1:column4`). Otherwise: arguments passed on to methods.
|
||||
@@ -64,16 +68,16 @@
|
||||
#' ```
|
||||
#' 4. For **interpreting a complete data set**, with automatic determination of MIC values, disk diffusion diameters, microorganism names or codes, and antimicrobial test results. This is done very simply by running `as.sir(your_data)`.
|
||||
#'
|
||||
#' For points 2, 3 and 4: Use [sir_interpretation_history()] to retrieve a [data.frame] (or [tibble][tibble::tibble()] if the `tibble` package is installed) with all results of the last [as.sir()] call.
|
||||
#' **For points 2, 3 and 4: Use [sir_interpretation_history()]** to retrieve a [data.frame] (or [tibble][tibble::tibble()] if the `tibble` package is installed) with all results of the last [as.sir()] call.
|
||||
#'
|
||||
#' ### Supported Guidelines
|
||||
#'
|
||||
#' For interpreting MIC values as well as disk diffusion diameters, currently implemented guidelines are EUCAST (`r min(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`) and CLSI (`r min(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "CLSI")$guideline)))`).
|
||||
#' For interpreting MIC values as well as disk diffusion diameters, currently implemented guidelines are EUCAST (`r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`) and CLSI (`r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI")$guideline)))`).
|
||||
#'
|
||||
#' Thus, the `guideline` argument must be set to e.g., ``r paste0('"', subset(AMR::clinical_breakpoints, guideline %like% "EUCAST")$guideline[1], '"')`` or ``r paste0('"', subset(AMR::clinical_breakpoints, guideline %like% "CLSI")$guideline[1], '"')``. By simply using `"EUCAST"` (the default) or `"CLSI"` as input, the latest included version of that guideline will automatically be selected. You can set your own data set using the `reference_data` argument. The `guideline` argument will then be ignored.
|
||||
#'
|
||||
#' You can set the default guideline with the [package option][AMR-options] [`AMR_guideline`][AMR-options] (e.g. in your `.Rprofile` file), such as:
|
||||
#'
|
||||
#' Thus, the `guideline` argument must be set to e.g., ``r paste0('"', subset(clinical_breakpoints, guideline %like% "EUCAST")$guideline[1], '"')`` or ``r paste0('"', subset(clinical_breakpoints, guideline %like% "CLSI")$guideline[1], '"')``. By simply using `"EUCAST"` (the default) or `"CLSI"` as input, the latest included version of that guideline will automatically be selected. You can set your own data set using the `reference_data` argument. The `guideline` argument will then be ignored.
|
||||
#'
|
||||
#' You can set the default guideline with the `AMR_guideline` [option][options()] (e.g. in your `.Rprofile` file), such as:
|
||||
#'
|
||||
#' ```
|
||||
#' options(AMR_guideline = "CLSI")
|
||||
#' options(AMR_guideline = "CLSI 2018")
|
||||
@@ -86,9 +90,9 @@
|
||||
#'
|
||||
#' After using [as.sir()], you can use the [eucast_rules()] defined by EUCAST to (1) apply inferred susceptibility and resistance based on results of other antimicrobials and (2) apply intrinsic resistance based on taxonomic properties of a microorganism.
|
||||
#'
|
||||
#' ### Machine-Readable Interpretation Guidelines
|
||||
#' ### Machine-Readable Clinical Breakpoints
|
||||
#'
|
||||
#' The repository of this package [contains a machine-readable version](https://github.com/msberends/AMR/blob/main/data-raw/clinical_breakpoints.txt) of all guidelines. This is a CSV file consisting of `r format(nrow(AMR::clinical_breakpoints), big.mark = ",")` rows and `r ncol(AMR::clinical_breakpoints)` columns. This file is machine-readable, since it contains one row for every unique combination of the test method (MIC or disk diffusion), the antimicrobial drug and the microorganism. **This allows for easy implementation of these rules in laboratory information systems (LIS)**. Note that it only contains interpretation guidelines for humans - interpretation guidelines from CLSI for animals were removed.
|
||||
#' The repository of this package [contains a machine-readable version](https://github.com/msberends/AMR/blob/main/data-raw/clinical_breakpoints.txt) of all guidelines. This is a CSV file consisting of `r format(nrow(AMR::clinical_breakpoints), big.mark = " ")` rows and `r ncol(AMR::clinical_breakpoints)` columns. This file is machine-readable, since it contains one row for every unique combination of the test method (MIC or disk diffusion), the antimicrobial drug and the microorganism. **This allows for easy implementation of these rules in laboratory information systems (LIS)**. Note that it only contains interpretation guidelines for humans - interpretation guidelines from CLSI for animals were removed.
|
||||
#'
|
||||
#' ### Other
|
||||
#'
|
||||
@@ -104,7 +108,7 @@
|
||||
#' A microorganism is categorised as "Susceptible, Increased exposure*" when there is a high likelihood of therapeutic success because exposure to the agent is increased by adjusting the dosing regimen or by its concentration at the site of infection.
|
||||
#' - **R = Resistant**\cr
|
||||
#' A microorganism is categorised as "Resistant" when there is a high likelihood of therapeutic failure even when there is increased exposure.
|
||||
#'
|
||||
#'
|
||||
#' * *Exposure* is a function of how the mode of administration, dose, dosing interval, infusion time, as well as distribution and excretion of the antimicrobial agent will influence the infecting organism at the site of infection.
|
||||
#'
|
||||
#' This AMR package honours this insight. Use [susceptibility()] (equal to [proportion_SI()]) to determine antimicrobial susceptibility and [count_susceptible()] (equal to [count_SI()]) to count susceptible isolates.
|
||||
@@ -115,9 +119,9 @@
|
||||
#' @source
|
||||
#' For interpretations of minimum inhibitory concentration (MIC) values and disk diffusion diameters:
|
||||
#'
|
||||
#' - **M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data**, `r min(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "CLSI")$guideline)))`, *Clinical and Laboratory Standards Institute* (CLSI). <https://clsi.org/standards/products/microbiology/documents/m39/>.
|
||||
#' - **M100 Performance Standard for Antimicrobial Susceptibility Testing**, `r min(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "CLSI")$guideline)))`, *Clinical and Laboratory Standards Institute* (CLSI). <https://clsi.org/standards/products/microbiology/documents/m100/>.
|
||||
#' - **Breakpoint tables for interpretation of MICs and zone diameters**, `r min(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`, *European Committee on Antimicrobial Susceptibility Testing* (EUCAST). <https://www.eucast.org/clinical_breakpoints>.
|
||||
#' - **M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data**, `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI")$guideline)))`, *Clinical and Laboratory Standards Institute* (CLSI). <https://clsi.org/standards/products/microbiology/documents/m39/>.
|
||||
#' - **M100 Performance Standard for Antimicrobial Susceptibility Testing**, `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "CLSI")$guideline)))`, *Clinical and Laboratory Standards Institute* (CLSI). <https://clsi.org/standards/products/microbiology/documents/m100/>.
|
||||
#' - **Breakpoint tables for interpretation of MICs and zone diameters**, `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, guideline %like% "EUCAST")$guideline)))`, *European Committee on Antimicrobial Susceptibility Testing* (EUCAST). <https://www.eucast.org/clinical_breakpoints>.
|
||||
#' @inheritSection AMR Reference Data Publicly Available
|
||||
#' @examples
|
||||
#' example_isolates
|
||||
@@ -228,7 +232,12 @@ is.sir <- function(x) {
|
||||
if (inherits(x, "data.frame")) {
|
||||
unname(vapply(FUN.VALUE = logical(1), x, is.sir))
|
||||
} else {
|
||||
inherits(x, "sir")
|
||||
rsi <- inherits(x, "rsi")
|
||||
sir <- inherits(x, "sir")
|
||||
if (isTRUE(rsi) && message_not_thrown_before("is.sir-rsi")) {
|
||||
deprecation_warning(extra_msg = "The 'rsi' class has been replaced with 'sir'. Transform your 'rsi' columns to 'sir' with `as.sir()`, e.g.:\n your_data %>% mutate_if(is.rsi, as.sir)")
|
||||
}
|
||||
isTRUE(rsi) || isTRUE(sir)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,13 +300,13 @@ is_sir_eligible <- function(x, threshold = 0.05) {
|
||||
#' @export
|
||||
# extra param: warn (logical, to never throw a warning)
|
||||
as.sir.default <- function(x, ...) {
|
||||
if (is.sir(x)) {
|
||||
if (inherits(x, "sir")) {
|
||||
return(x)
|
||||
}
|
||||
|
||||
x.bak <- x
|
||||
x <- as.character(x) # this is needed to prevent the vctrs pkg from throwing an error
|
||||
|
||||
|
||||
if (inherits(x.bak, c("integer", "numeric", "double")) && all(x %in% c(1:3, NA))) {
|
||||
# support haven package for importing e.g., from SPSS - it adds the 'labels' attribute
|
||||
lbls <- attributes(x.bak)$labels
|
||||
@@ -328,7 +337,7 @@ as.sir.default <- function(x, ...) {
|
||||
x <- trimws2(as.character(unlist(x)))
|
||||
x[x %in% c(NA, "", "-", "NULL")] <- NA_character_
|
||||
x.bak <- x
|
||||
|
||||
|
||||
na_before <- length(x[is.na(x)])
|
||||
|
||||
# correct for translations
|
||||
@@ -417,6 +426,8 @@ as.sir.mic <- function(x,
|
||||
conserve_capped_values = FALSE,
|
||||
add_intrinsic_resistance = FALSE,
|
||||
reference_data = AMR::clinical_breakpoints,
|
||||
include_screening = getOption("AMR_include_screening", FALSE),
|
||||
include_PKPD = getOption("AMR_include_PKPD", TRUE),
|
||||
...) {
|
||||
as_sir_method(
|
||||
method_short = "mic",
|
||||
@@ -429,6 +440,8 @@ as.sir.mic <- function(x,
|
||||
conserve_capped_values = conserve_capped_values,
|
||||
add_intrinsic_resistance = add_intrinsic_resistance,
|
||||
reference_data = reference_data,
|
||||
include_screening = include_screening,
|
||||
include_PKPD = include_PKPD,
|
||||
...
|
||||
)
|
||||
}
|
||||
@@ -442,6 +455,8 @@ as.sir.disk <- function(x,
|
||||
uti = NULL,
|
||||
add_intrinsic_resistance = FALSE,
|
||||
reference_data = AMR::clinical_breakpoints,
|
||||
include_screening = getOption("AMR_include_screening", FALSE),
|
||||
include_PKPD = getOption("AMR_include_PKPD", TRUE),
|
||||
...) {
|
||||
as_sir_method(
|
||||
method_short = "disk",
|
||||
@@ -454,6 +469,8 @@ as.sir.disk <- function(x,
|
||||
conserve_capped_values = FALSE,
|
||||
add_intrinsic_resistance = add_intrinsic_resistance,
|
||||
reference_data = reference_data,
|
||||
include_screening = include_screening,
|
||||
include_PKPD = include_PKPD,
|
||||
...
|
||||
)
|
||||
}
|
||||
@@ -467,7 +484,9 @@ as.sir.data.frame <- function(x,
|
||||
uti = NULL,
|
||||
conserve_capped_values = FALSE,
|
||||
add_intrinsic_resistance = FALSE,
|
||||
reference_data = AMR::clinical_breakpoints) {
|
||||
reference_data = AMR::clinical_breakpoints,
|
||||
include_screening = getOption("AMR_include_screening", FALSE),
|
||||
include_PKPD = getOption("AMR_include_PKPD", TRUE)) {
|
||||
meet_criteria(x, allow_class = "data.frame") # will also check for dimensions > 0
|
||||
meet_criteria(col_mo, allow_class = "character", is_in = colnames(x), allow_NULL = TRUE)
|
||||
meet_criteria(guideline, allow_class = "character", has_length = 1)
|
||||
@@ -604,6 +623,8 @@ as.sir.data.frame <- function(x,
|
||||
conserve_capped_values = conserve_capped_values,
|
||||
add_intrinsic_resistance = add_intrinsic_resistance,
|
||||
reference_data = reference_data,
|
||||
include_screening = include_screening,
|
||||
include_PKPD = include_PKPD,
|
||||
is_data.frame = TRUE
|
||||
)
|
||||
} else if (types[i] == "disk") {
|
||||
@@ -619,6 +640,8 @@ as.sir.data.frame <- function(x,
|
||||
uti = uti,
|
||||
add_intrinsic_resistance = add_intrinsic_resistance,
|
||||
reference_data = reference_data,
|
||||
include_screening = include_screening,
|
||||
include_PKPD = include_PKPD,
|
||||
is_data.frame = TRUE
|
||||
)
|
||||
} else if (types[i] == "sir") {
|
||||
@@ -686,6 +709,8 @@ as_sir_method <- function(method_short,
|
||||
conserve_capped_values,
|
||||
add_intrinsic_resistance,
|
||||
reference_data,
|
||||
include_screening,
|
||||
include_PKPD,
|
||||
...) {
|
||||
meet_criteria(x, allow_NA = TRUE, .call_depth = -2)
|
||||
meet_criteria(mo, allow_class = c("mo", "character"), allow_NULL = TRUE, .call_depth = -2)
|
||||
@@ -695,7 +720,9 @@ as_sir_method <- function(method_short,
|
||||
meet_criteria(conserve_capped_values, allow_class = "logical", has_length = 1, .call_depth = -2)
|
||||
meet_criteria(add_intrinsic_resistance, allow_class = "logical", has_length = 1, .call_depth = -2)
|
||||
meet_criteria(reference_data, allow_class = "data.frame", .call_depth = -2)
|
||||
check_reference_data(reference_data)
|
||||
meet_criteria(include_screening, allow_class = "logical", has_length = 1, .call_depth = -2)
|
||||
meet_criteria(include_PKPD, allow_class = "logical", has_length = 1, .call_depth = -2)
|
||||
check_reference_data(reference_data, .call_depth = -2)
|
||||
|
||||
# for dplyr's across()
|
||||
cur_column_dplyr <- import_fn("cur_column", "dplyr", error_on_fail = FALSE)
|
||||
@@ -748,7 +775,7 @@ as_sir_method <- function(method_short,
|
||||
} else {
|
||||
mo.bak <- mo
|
||||
}
|
||||
# be sure to take current taxonomy, as the clinical_breakpoints data set only contains current taxonomy
|
||||
# be sure to take current taxonomy, as the 'clinical_breakpoints' data set only contains current taxonomy
|
||||
mo <- suppressWarnings(suppressMessages(as.mo(mo, keep_synonyms = FALSE, inf0 = FALSE)))
|
||||
guideline_coerced <- get_guideline(guideline, reference_data)
|
||||
if (is.na(ab)) {
|
||||
@@ -768,13 +795,13 @@ as_sir_method <- function(method_short,
|
||||
if (length(uti) == 1) {
|
||||
uti <- rep(uti, length(x))
|
||||
}
|
||||
|
||||
|
||||
if (isTRUE(add_intrinsic_resistance) && guideline_coerced %unlike% "EUCAST") {
|
||||
if (message_not_thrown_before("as.sir", "intrinsic")) {
|
||||
warning_("in `as.sir()`: using 'add_intrinsic_resistance' is only useful when using EUCAST guidelines, since the rules for intrinsic resistance are based on EUCAST.")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
agent_formatted <- paste0("'", font_bold(ab.bak), "'")
|
||||
agent_name <- ab_name(ab, tolower = TRUE, language = NULL)
|
||||
if (generalise_antibiotic_name(ab.bak) == generalise_antibiotic_name(agent_name)) {
|
||||
@@ -801,27 +828,31 @@ as_sir_method <- function(method_short,
|
||||
appendLF = FALSE,
|
||||
as_note = FALSE
|
||||
)
|
||||
|
||||
|
||||
msg_note <- function(messages) {
|
||||
for (i in seq_len(length(messages))) {
|
||||
messages[i] <- word_wrap(extra_indent = 5, messages[i])
|
||||
}
|
||||
message(font_green(font_bold(" Note:\n")),
|
||||
paste0(" ", font_black(AMR_env$bullet_icon)," ", font_black(messages, collapse = NULL) , collapse = "\n"))
|
||||
message(
|
||||
font_green(font_bold(" Note:\n")),
|
||||
paste0(" ", font_black(AMR_env$bullet_icon), " ", font_black(messages, collapse = NULL), collapse = "\n")
|
||||
)
|
||||
}
|
||||
|
||||
method <- method_short
|
||||
|
||||
metadata_mo <- get_mo_uncertainties()
|
||||
|
||||
df <- data.frame(values = x,
|
||||
mo = mo,
|
||||
result = NA_sir_,
|
||||
uti = uti,
|
||||
stringsAsFactors = FALSE)
|
||||
df <- data.frame(
|
||||
values = x,
|
||||
mo = mo,
|
||||
result = NA_sir_,
|
||||
uti = uti,
|
||||
stringsAsFactors = FALSE
|
||||
)
|
||||
if (method == "mic") {
|
||||
# when as.sir.mic is called directly
|
||||
df$values <- as.mic(df$values)
|
||||
df$values <- as.mic(df$values)
|
||||
} else if (method == "disk") {
|
||||
# when as.sir.disk is called directly
|
||||
df$values <- as.disk(df$values)
|
||||
@@ -832,7 +863,7 @@ as_sir_method <- function(method_short,
|
||||
method_coerced <- toupper(method)
|
||||
ab_coerced <- ab
|
||||
mo_coerced <- mo
|
||||
|
||||
|
||||
if (identical(reference_data, AMR::clinical_breakpoints)) {
|
||||
breakpoints <- reference_data %pm>%
|
||||
subset(guideline == guideline_coerced & method == method_coerced & ab == ab_coerced)
|
||||
@@ -845,30 +876,42 @@ as_sir_method <- function(method_short,
|
||||
breakpoints <- reference_data %pm>%
|
||||
subset(method == method_coerced & ab == ab_coerced)
|
||||
}
|
||||
|
||||
|
||||
if (isFALSE(include_screening)) {
|
||||
# remove screening rules from the breakpoints table
|
||||
breakpoints <- breakpoints %pm>%
|
||||
subset(site %unlike% "screen" & ref_tbl %unlike% "screen")
|
||||
}
|
||||
if (isFALSE(include_PKPD)) {
|
||||
# remove PKPD rules from the breakpoints table
|
||||
breakpoints <- breakpoints %pm>%
|
||||
subset(mo != "UNKNOWN" & ref_tbl %unlike% "PK.*PD")
|
||||
}
|
||||
|
||||
msgs <- character(0)
|
||||
if (nrow(breakpoints) == 0) {
|
||||
# apparently no breakpoints found
|
||||
msg_note(paste0("No ", method_coerced, " breakpoints available for ",
|
||||
suppressMessages(suppressWarnings(ab_name(ab_coerced, language = NULL, tolower = TRUE))),
|
||||
" (", ab_coerced, ")"))
|
||||
msg_note(paste0(
|
||||
"No ", method_coerced, " breakpoints available for ",
|
||||
suppressMessages(suppressWarnings(ab_name(ab_coerced, language = NULL, tolower = TRUE))),
|
||||
" (", ab_coerced, ")"
|
||||
))
|
||||
load_mo_uncertainties(metadata_mo)
|
||||
return(rep(NA_sir_, nrow(df)))
|
||||
}
|
||||
|
||||
|
||||
if (guideline_coerced %like% "EUCAST") {
|
||||
any_is_intrinsic_resistant <- FALSE
|
||||
add_intrinsic_resistance_to_AMR_env()
|
||||
}
|
||||
|
||||
|
||||
# run the rules
|
||||
for (mo_unique in unique(df$mo)) {
|
||||
|
||||
rows <- which(df$mo == mo_unique)
|
||||
values <- df[rows, "values", drop = TRUE]
|
||||
uti <- df[rows, "uti", drop = TRUE]
|
||||
new_sir <- rep(NA_sir_, length(rows))
|
||||
|
||||
|
||||
# find different mo properties
|
||||
mo_current_genus <- as.mo(mo_genus(mo_unique, language = NULL))
|
||||
mo_current_family <- as.mo(mo_family(mo_unique, language = NULL))
|
||||
@@ -890,18 +933,22 @@ as_sir_method <- function(method_short,
|
||||
if (!mo_rank(mo_unique) %in% c("kingdom", "phylum", "class", "order")) {
|
||||
mo_formatted <- font_italic(mo_formatted)
|
||||
}
|
||||
ab_formatted <- paste0(suppressMessages(suppressWarnings(ab_name(ab_coerced, language = NULL, tolower = TRUE))),
|
||||
" (", ab_coerced, ")")
|
||||
|
||||
# gather all available breakpoints for current MO and sort on taxonomic rank
|
||||
ab_formatted <- paste0(
|
||||
suppressMessages(suppressWarnings(ab_name(ab_coerced, language = NULL, tolower = TRUE))),
|
||||
" (", ab_coerced, ")"
|
||||
)
|
||||
|
||||
# gather all available breakpoints for current MO and sort on taxonomic rank
|
||||
# (this will prefer species breakpoints over order breakpoints)
|
||||
breakpoints_current <- breakpoints %pm>%
|
||||
subset(mo %in% c(mo_current_genus, mo_current_family,
|
||||
mo_current_order, mo_current_class,
|
||||
mo_current_becker, mo_current_lancefield,
|
||||
mo_current_other))
|
||||
|
||||
if (any(df[rows, "uti", drop = TRUE], na.rm = TRUE)) {
|
||||
subset(mo %in% c(
|
||||
mo_current_genus, mo_current_family,
|
||||
mo_current_order, mo_current_class,
|
||||
mo_current_becker, mo_current_lancefield,
|
||||
mo_current_other
|
||||
))
|
||||
|
||||
if (any(uti, na.rm = TRUE)) {
|
||||
breakpoints_current <- breakpoints_current %pm>%
|
||||
# be as specific as possible (i.e. prefer species over genus):
|
||||
# the below `pm_desc(uti)` will put `TRUE` on top and FALSE on bottom
|
||||
@@ -911,7 +958,7 @@ as_sir_method <- function(method_short,
|
||||
# sort UTI = FALSE first, then UTI = TRUE
|
||||
pm_arrange(rank_index, uti)
|
||||
}
|
||||
|
||||
|
||||
# throw notes for different body sites
|
||||
if (nrow(breakpoints_current) == 1 && all(breakpoints_current$uti == TRUE) && any(uti %in% c(FALSE, NA)) && message_not_thrown_before("as.sir", "uti", ab_coerced)) {
|
||||
# only UTI breakpoints available
|
||||
@@ -932,18 +979,27 @@ as_sir_method <- function(method_short,
|
||||
}
|
||||
msgs <- c(msgs, paste0("Multiple breakpoints available for ", ab_formatted, " in ", mo_formatted, " - assuming ", site, "."))
|
||||
}
|
||||
|
||||
|
||||
# first check if mo is intrinsic resistant
|
||||
if (isTRUE(add_intrinsic_resistance) && guideline_coerced %like% "EUCAST" && paste(mo_unique, ab_coerced) %in% AMR_env$intrinsic_resistant) {
|
||||
msgs <- c(msgs, paste0("Intrinsic resistance applied for ", ab_formatted, " in ", mo_formatted, ""))
|
||||
new_sir <- rep(as.sir("R"), length(rows))
|
||||
|
||||
} else if (nrow(breakpoints_current) == 0) {
|
||||
# no rules available
|
||||
new_sir <- rep(NA_sir_, length(rows))
|
||||
} else {
|
||||
# then run the rules
|
||||
breakpoints_current <- breakpoints_current[1L, , drop = FALSE]
|
||||
|
||||
|
||||
if (any(breakpoints_current$mo == "UNKNOWN", na.rm = TRUE) | any(breakpoints_current$ref_tbl %like% "PK.*PD", na.rm = TRUE)) {
|
||||
msgs <- c(msgs, "(Some) PK/PD breakpoints were applied - use `include_PKPD = FALSE` to prevent this")
|
||||
}
|
||||
if (any(breakpoints_current$site %like% "screen", na.rm = TRUE) | any(breakpoints_current$ref_tbl %like% "screen", na.rm = TRUE)) {
|
||||
msgs <- c(msgs, "(Some) screening breakpoints were applied - use `include_screening = FALSE` to prevent this")
|
||||
}
|
||||
|
||||
if (method == "mic") {
|
||||
new_sir <- quick_case_when(
|
||||
new_sir <- case_when_AMR(
|
||||
is.na(values) ~ NA_sir_,
|
||||
values <= breakpoints_current$breakpoint_S ~ as.sir("S"),
|
||||
guideline_coerced %like% "EUCAST" & values > breakpoints_current$breakpoint_R ~ as.sir("R"),
|
||||
@@ -953,9 +1009,8 @@ as_sir_method <- function(method_short,
|
||||
# and NA otherwise
|
||||
TRUE ~ NA_sir_
|
||||
)
|
||||
|
||||
} else if (method == "disk") {
|
||||
new_sir <- quick_case_when(
|
||||
new_sir <- case_when_AMR(
|
||||
is.na(values) ~ NA_sir_,
|
||||
as.double(values) >= as.double(breakpoints_current$breakpoint_S) ~ as.sir("S"),
|
||||
guideline_coerced %like% "EUCAST" & as.double(values) < as.double(breakpoints_current$breakpoint_R) ~ as.sir("R"),
|
||||
@@ -968,7 +1023,7 @@ as_sir_method <- function(method_short,
|
||||
}
|
||||
|
||||
# write to verbose output
|
||||
AMR_env$sir_interpretation_history <- rbind(
|
||||
AMR_env$sir_interpretation_history <- rbind_AMR(
|
||||
AMR_env$sir_interpretation_history,
|
||||
# recycling 1 to 2 rows does not seem to work, which is why rep() was added
|
||||
data.frame(
|
||||
@@ -988,10 +1043,10 @@ as_sir_method <- function(method_short,
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
df[rows, "result"] <- new_sir
|
||||
}
|
||||
|
||||
|
||||
if (isTRUE(rise_warning)) {
|
||||
message(font_yellow(font_bold(" * WARNING *")))
|
||||
} else if (length(msgs) == 0) {
|
||||
@@ -999,9 +1054,9 @@ as_sir_method <- function(method_short,
|
||||
} else {
|
||||
msg_note(sort(msgs))
|
||||
}
|
||||
|
||||
|
||||
load_mo_uncertainties(metadata_mo)
|
||||
|
||||
|
||||
df$result
|
||||
}
|
||||
|
||||
@@ -1027,7 +1082,10 @@ sir_interpretation_history <- function(clean = FALSE) {
|
||||
AMR_env$sir_interpretation_history <- out.bak
|
||||
}
|
||||
|
||||
if (pkg_is_available("tibble", also_load = FALSE)) {
|
||||
# sort descending on time
|
||||
out <- out[order(out$datetime, decreasing = TRUE), , drop = FALSE]
|
||||
|
||||
if (pkg_is_available("tibble")) {
|
||||
import_fn("as_tibble", "tibble")(out)
|
||||
} else {
|
||||
out
|
||||
@@ -1156,6 +1214,9 @@ summary.sir <- function(object, ...) {
|
||||
I <- sum(x == "I", na.rm = TRUE)
|
||||
R <- sum(x == "R", na.rm = TRUE)
|
||||
pad <- function(x) {
|
||||
if (is.na(x)) {
|
||||
return("??")
|
||||
}
|
||||
if (x == "0%") {
|
||||
x <- " 0.0%"
|
||||
}
|
||||
@@ -1218,16 +1279,15 @@ rep.sir <- function(x, ...) {
|
||||
y
|
||||
}
|
||||
|
||||
check_reference_data <- function(reference_data) {
|
||||
check_reference_data <- function(reference_data, .call_depth) {
|
||||
if (!identical(reference_data, AMR::clinical_breakpoints)) {
|
||||
class_sir <- vapply(FUN.VALUE = character(1), clinical_breakpoints, function(x) paste0("<", class(x), ">", collapse = " and "))
|
||||
class_sir <- vapply(FUN.VALUE = character(1), AMR::clinical_breakpoints, function(x) paste0("<", class(x), ">", collapse = " and "))
|
||||
class_ref <- vapply(FUN.VALUE = character(1), reference_data, function(x) paste0("<", class(x), ">", collapse = " and "))
|
||||
if (!all(names(class_sir) == names(class_ref))) {
|
||||
stop_("`reference_data` must have the same column names as the 'clinical_breakpoints' data set.", call = -2)
|
||||
stop_("`reference_data` must have the same column names as the 'clinical_breakpoints' data set.", call = .call_depth)
|
||||
}
|
||||
if (!all(class_sir == class_ref)) {
|
||||
class_sir[class_sir != class_ref][1]
|
||||
stop_("`reference_data` must be the same structure as the 'clinical_breakpoints' data set. Column '", names(class_ref[class_sir != class_ref][1]), "' is of class ", class_ref[class_sir != class_ref][1], ", but should be of class ", class_sir[class_sir != class_ref][1], ".", call = -2)
|
||||
stop_("`reference_data` must be the same structure as the 'clinical_breakpoints' data set. Column '", names(class_ref[class_sir != class_ref][1]), "' is of class ", class_ref[class_sir != class_ref][1], ", but should be of class ", class_sir[class_sir != class_ref][1], ".", call = .call_depth)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+10
-9
@@ -31,7 +31,8 @@ dots2vars <- function(...) {
|
||||
# this function is to give more informative output about
|
||||
# variable names in count_* and proportion_* functions
|
||||
dots <- substitute(list(...))
|
||||
as.character(dots)[2:length(dots)]
|
||||
dots <- as.character(dots)[2:length(dots)]
|
||||
paste0(dots[dots != "."], collapse = "+")
|
||||
}
|
||||
|
||||
sir_calc <- function(...,
|
||||
@@ -41,7 +42,7 @@ sir_calc <- function(...,
|
||||
only_all_tested = FALSE,
|
||||
only_count = FALSE) {
|
||||
meet_criteria(ab_result, allow_class = c("character", "numeric", "integer"), has_length = c(1, 2, 3))
|
||||
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_finite = TRUE)
|
||||
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_positive_or_zero = TRUE, is_finite = TRUE)
|
||||
meet_criteria(as_percent, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(only_all_tested, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(only_count, allow_class = "logical", has_length = 1)
|
||||
@@ -133,7 +134,7 @@ sir_calc <- function(...,
|
||||
}
|
||||
|
||||
x_transposed <- as.list(as.data.frame(t(x), stringsAsFactors = FALSE))
|
||||
if (only_all_tested == TRUE) {
|
||||
if (isTRUE(only_all_tested)) {
|
||||
# no NAs in any column
|
||||
y <- apply(
|
||||
X = as.data.frame(lapply(x, as.integer), stringsAsFactors = FALSE),
|
||||
@@ -222,10 +223,10 @@ sir_calc_df <- function(type, # "proportion", "count" or "both"
|
||||
combine_SI = TRUE,
|
||||
confidence_level = 0.95) {
|
||||
meet_criteria(type, is_in = c("proportion", "count", "both"), has_length = 1)
|
||||
meet_criteria(data, allow_class = "data.frame", contains_column_class = "sir")
|
||||
meet_criteria(data, allow_class = "data.frame", contains_column_class = c("sir", "rsi"))
|
||||
meet_criteria(translate_ab, allow_class = c("character", "logical"), has_length = 1, allow_NA = TRUE)
|
||||
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
||||
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_finite = TRUE)
|
||||
language <- validate_language(language)
|
||||
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_positive_or_zero = TRUE, is_finite = TRUE)
|
||||
meet_criteria(as_percent, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(combine_SI, allow_class = "logical", has_length = 1)
|
||||
meet_criteria(confidence_level, allow_class = "numeric", has_length = 1)
|
||||
@@ -236,7 +237,7 @@ sir_calc_df <- function(type, # "proportion", "count" or "both"
|
||||
# select only groups and antibiotics
|
||||
if (is_null_or_grouped_tbl(data)) {
|
||||
data_has_groups <- TRUE
|
||||
groups <- setdiff(names(attributes(data)$groups), ".rows")
|
||||
groups <- get_group_names(data)
|
||||
data <- data[, c(groups, colnames(data)[vapply(FUN.VALUE = logical(1), data, is.sir)]), drop = FALSE]
|
||||
} else {
|
||||
data_has_groups <- FALSE
|
||||
@@ -321,7 +322,7 @@ sir_calc_df <- function(type, # "proportion", "count" or "both"
|
||||
}
|
||||
out_new <- cbind(group_values, out_new)
|
||||
}
|
||||
out <- rbind(out, out_new, stringsAsFactors = FALSE)
|
||||
out <- rbind_AMR(out, out_new)
|
||||
}
|
||||
}
|
||||
out
|
||||
@@ -330,7 +331,7 @@ sir_calc_df <- function(type, # "proportion", "count" or "both"
|
||||
# based on pm_apply_grouped_function
|
||||
apply_group <- function(.data, fn, groups, drop = FALSE, ...) {
|
||||
grouped <- pm_split_into_groups(.data, groups, drop)
|
||||
res <- do.call(rbind, unname(lapply(grouped, fn, ...)))
|
||||
res <- do.call(rbind_AMR, unname(lapply(grouped, fn, ...)))
|
||||
if (any(groups %in% colnames(res))) {
|
||||
class(res) <- c("grouped_data", class(res))
|
||||
res <- pm_set_groups(res, groups[groups %in% colnames(res)])
|
||||
|
||||
Binary file not shown.
+23
-21
@@ -29,12 +29,12 @@
|
||||
|
||||
#' Translate Strings from the AMR Package
|
||||
#'
|
||||
#' For language-dependent output of AMR functions, like [mo_name()], [mo_gramstain()], [mo_type()] and [ab_name()].
|
||||
#' For language-dependent output of `AMR` functions, such as [mo_name()], [mo_gramstain()], [mo_type()] and [ab_name()].
|
||||
#' @param x text to translate
|
||||
#' @param language language to choose. Use one of these supported language names or ISO-639-1 codes: `r vector_or(paste0(sapply(LANGUAGES_SUPPORTED_NAMES, function(x) x[[1]]), " (" , LANGUAGES_SUPPORTED, ")"), quotes = FALSE, sort = FALSE)`.
|
||||
#' @details The currently `r length(LANGUAGES_SUPPORTED)` supported languages are `r vector_and(paste0(sapply(LANGUAGES_SUPPORTED_NAMES, function(x) x[[1]]), " (" , LANGUAGES_SUPPORTED, ")"), quotes = FALSE, sort = FALSE)`. All these languages have translations available for all antimicrobial drugs and colloquial microorganism names.
|
||||
#'
|
||||
#' To permanently silence the once-per-session language note on a non-English operating system, you can set the option `AMR_locale` in your `.Rprofile` file like this:
|
||||
#' To permanently silence the once-per-session language note on a non-English operating system, you can set the [package option][AMR-options] [`AMR_locale`][AMR-options] in your `.Rprofile` file like this:
|
||||
#'
|
||||
#' ```r
|
||||
#' # Open .Rprofile file
|
||||
@@ -51,12 +51,12 @@
|
||||
#' ### Changing the Default Language
|
||||
#' The system language will be used at default (as returned by `Sys.getenv("LANG")` or, if `LANG` is not set, [`Sys.getlocale("LC_COLLATE")`][Sys.getlocale()]), if that language is supported. But the language to be used can be overwritten in two ways and will be checked in this order:
|
||||
#'
|
||||
#' 1. Setting the R option `AMR_locale`, either by using e.g. `set_AMR_locale("German")` or by running e.g. `options(AMR_locale = "German")`.
|
||||
#' 1. Setting the [package option][AMR-options] [`AMR_locale`][AMR-options], either by using e.g. `set_AMR_locale("German")` or by running e.g. `options(AMR_locale = "German")`.
|
||||
#'
|
||||
#' Note that setting an \R option only works in the same session. Save the command `options(AMR_locale = "(your language)")` to your `.Rprofile` file to apply it for every session. Run `utils::file.edit("~/.Rprofile")` to edit your `.Rprofile` file.
|
||||
#' 2. Setting the system variable `LANGUAGE` or `LANG`, e.g. by adding `LANGUAGE="de_DE.utf8"` to your `.Renviron` file in your home directory.
|
||||
#'
|
||||
#' Thus, if the R option `AMR_locale` is set, the system variables `LANGUAGE` and `LANG` will be ignored.
|
||||
#' Thus, if the [package option][AMR-options] [`AMR_locale`][AMR-options] is set, the system variables `LANGUAGE` and `LANG` will be ignored.
|
||||
#' @rdname translate
|
||||
#' @name translate
|
||||
#' @export
|
||||
@@ -141,10 +141,11 @@ reset_AMR_locale <- function() {
|
||||
#' @export
|
||||
translate_AMR <- function(x, language = get_AMR_locale()) {
|
||||
translate_into_language(x,
|
||||
language = language,
|
||||
only_unknown = FALSE,
|
||||
only_affect_ab_names = FALSE,
|
||||
only_affect_mo_names = FALSE)
|
||||
language = language,
|
||||
only_unknown = FALSE,
|
||||
only_affect_ab_names = FALSE,
|
||||
only_affect_mo_names = FALSE
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -170,14 +171,15 @@ find_language <- function(language, fallback = TRUE) {
|
||||
language <- Map(LANGUAGES_SUPPORTED_NAMES,
|
||||
LANGUAGES_SUPPORTED,
|
||||
f = function(l, n, check = language) {
|
||||
grepl(paste0(
|
||||
"^(", l[1], "|", l[2], "|",
|
||||
n, "(_|$)|", toupper(n), "(_|$))"
|
||||
),
|
||||
check,
|
||||
ignore.case = TRUE,
|
||||
perl = TRUE,
|
||||
useBytes = FALSE
|
||||
grepl(
|
||||
paste0(
|
||||
"^(", l[1], "|", l[2], "|",
|
||||
n, "(_|$)|", toupper(n), "(_|$))"
|
||||
),
|
||||
check,
|
||||
ignore.case = TRUE,
|
||||
perl = TRUE,
|
||||
useBytes = FALSE
|
||||
)
|
||||
},
|
||||
USE.NAMES = TRUE
|
||||
@@ -196,7 +198,6 @@ translate_into_language <- function(from,
|
||||
only_unknown = FALSE,
|
||||
only_affect_ab_names = FALSE,
|
||||
only_affect_mo_names = FALSE) {
|
||||
|
||||
# get ISO-639-1 of language
|
||||
lang <- validate_language(language)
|
||||
if (lang == "en") {
|
||||
@@ -245,7 +246,8 @@ translate_into_language <- function(from,
|
||||
}
|
||||
|
||||
lapply(
|
||||
seq_len(nrow(df_trans)),
|
||||
# starting with longest pattern, since more general translations are shorter, such as 'Group'
|
||||
order(nchar(df_trans$pattern), decreasing = TRUE),
|
||||
function(i) {
|
||||
from_unique_translated <<- gsub(
|
||||
pattern = df_trans$pattern[i],
|
||||
@@ -260,10 +262,10 @@ translate_into_language <- function(from,
|
||||
|
||||
# force UTF-8 for diacritics
|
||||
from_unique_translated <- enc2utf8(from_unique_translated)
|
||||
|
||||
|
||||
# a kind of left join to get all results back
|
||||
out <- from_unique_translated[match(from.bak, from_unique)]
|
||||
|
||||
|
||||
if (!identical(from.bak, out) && get_AMR_locale() == lang && message_not_thrown_before("translation", entire_session = TRUE) && interactive()) {
|
||||
message(word_wrap(
|
||||
"Assuming the ", LANGUAGES_SUPPORTED_NAMES[[lang]]$exonym, " language (",
|
||||
@@ -271,6 +273,6 @@ translate_into_language <- function(from,
|
||||
add_fn = list(font_blue), as_note = TRUE
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
out
|
||||
}
|
||||
|
||||
+37
-20
@@ -35,7 +35,8 @@
|
||||
#' @rdname AMR-deprecated
|
||||
#' @export
|
||||
NA_rsi_ <- set_clean_class(factor(NA_character_, levels = c("S", "I", "R"), ordered = TRUE),
|
||||
new_class = c("rsi", "ordered", "factor"))
|
||||
new_class = c("rsi", "ordered", "factor")
|
||||
)
|
||||
#' @rdname AMR-deprecated
|
||||
#' @export
|
||||
as.rsi <- function(x, ...) {
|
||||
@@ -89,13 +90,9 @@ ggplot_rsi_predict <- function(...) {
|
||||
}
|
||||
#' @rdname AMR-deprecated
|
||||
#' @export
|
||||
is.rsi <- function(x, ...) {
|
||||
# this is an exception, so mutate_if(is.rsi, as.sir) can be used
|
||||
if (inherits(x, "data.frame")) {
|
||||
unname(vapply(FUN.VALUE = logical(1), x, is.rsi))
|
||||
} else {
|
||||
inherits(x, "rsi")
|
||||
}
|
||||
is.rsi <- function(...) {
|
||||
# REMINDER: change as.sir() to remove the deprecation warning there
|
||||
suppressWarnings(is.sir(...))
|
||||
}
|
||||
#' @rdname AMR-deprecated
|
||||
#' @export
|
||||
@@ -149,15 +146,17 @@ theme_rsi <- function(...) {
|
||||
# will be exported using s3_register() in R/zzz.R
|
||||
pillar_shaft.rsi <- pillar_shaft.sir
|
||||
type_sum.rsi <- function(x, ...) {
|
||||
deprecation_warning(extra_msg = "* Transform your old 'rsi' class to the new 'sir' class with `as.sir()` using e.g.:\n your_data %>% mutate_if(is.rsi, as.sir)")
|
||||
paste0("rsi", font_bold(font_red("[!]")))
|
||||
if (message_not_thrown_before("type_sum.rsi")) {
|
||||
deprecation_warning(extra_msg = "The 'rsi' class has been replaced with 'sir'. Transform your 'rsi' columns to 'sir' with `as.sir()`, e.g.:\n your_data %>% mutate_if(is.rsi, as.sir)")
|
||||
}
|
||||
"rsi"
|
||||
}
|
||||
|
||||
#' @method print rsi
|
||||
#' @export
|
||||
#' @noRd
|
||||
print.rsi <- function(x, ...) {
|
||||
deprecation_warning(extra_msg = "Transform your old 'rsi' class to the new 'sir' class with `as.sir()`")
|
||||
deprecation_warning(extra_msg = "The 'rsi' class has been replaced with 'sir' - transform your 'rsi' data with `as.sir()`")
|
||||
cat("Class 'rsi'", font_bold(font_red("[!]\n")))
|
||||
print(as.character(x), quote = FALSE)
|
||||
}
|
||||
@@ -190,21 +189,39 @@ summary.rsi <- summary.sir
|
||||
#' @export
|
||||
unique.rsi <- unique.sir
|
||||
|
||||
deprecation_warning <- function(old = NULL, new = NULL, extra_msg = NULL) {
|
||||
# WHEN REMOVING RSI, DON'T FORGET TO REMOVE :
|
||||
# - THE "rsi_df" CLASS FROM R/sir_calc.R
|
||||
# - CODE CONTAINING only_rsi_columns, colours_RSI, include_untested_rsi, prob_RSI
|
||||
|
||||
deprecation_warning <- function(old = NULL, new = NULL, extra_msg = NULL, is_function = TRUE) {
|
||||
if (is.null(old)) {
|
||||
warning_(extra_msg)
|
||||
} else {
|
||||
env <- paste0("deprecated_", old)
|
||||
if (!env %in% names(AMR_env)) {
|
||||
AMR_env[[paste0("deprecated_", old)]] <- 1
|
||||
warning_(ifelse(is.null(new),
|
||||
paste0("The `", old, "()` function is no longer in use"),
|
||||
paste0("The `", old, "()` function has been replaced with `", new, "()`")),
|
||||
", see `?AMR-deprecated`.",
|
||||
ifelse(!is.null(extra_msg),
|
||||
paste0(" ", extra_msg),
|
||||
""),
|
||||
"\nThis warning will be shown once per session.")
|
||||
if (isTRUE(is_function)) {
|
||||
old <- paste0(old, "()")
|
||||
new <- paste0(new, "()")
|
||||
type <- "function"
|
||||
} else {
|
||||
type <- "argument"
|
||||
}
|
||||
warning_(
|
||||
ifelse(is.null(new),
|
||||
paste0("The `", old, "` ", type, " is no longer in use"),
|
||||
paste0("The `", old, "` ", type, " has been replaced with `", new, "`")
|
||||
),
|
||||
ifelse(type == "argument",
|
||||
". While the old argument still works, it will be removed in a future version, so please update your code.",
|
||||
", see `?AMR-deprecated`."
|
||||
),
|
||||
ifelse(!is.null(extra_msg),
|
||||
paste0(" ", extra_msg),
|
||||
""
|
||||
),
|
||||
"\nThis warning will be shown once per session."
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ if (utf8_supported && !is_latex) {
|
||||
s3_register("cleaner::freq", "mo")
|
||||
s3_register("cleaner::freq", "sir")
|
||||
# Support for skim() from the skimr package
|
||||
if (pkg_is_available("skimr", also_load = FALSE, min_version = "2.0.0")) {
|
||||
if (pkg_is_available("skimr", min_version = "2.0.0")) {
|
||||
s3_register("skimr::get_skimmers", "mo")
|
||||
s3_register("skimr::get_skimmers", "sir")
|
||||
s3_register("skimr::get_skimmers", "mic")
|
||||
@@ -123,10 +123,14 @@ if (utf8_supported && !is_latex) {
|
||||
s3_register("ggplot2::autoplot", "mic")
|
||||
s3_register("ggplot2::autoplot", "disk")
|
||||
s3_register("ggplot2::autoplot", "resistance_predict")
|
||||
s3_register("ggplot2::autoplot", "antibiogram")
|
||||
# Support for fortify from the ggplot2 package
|
||||
s3_register("ggplot2::fortify", "sir")
|
||||
s3_register("ggplot2::fortify", "mic")
|
||||
s3_register("ggplot2::fortify", "disk")
|
||||
# Support for knitr (R Markdown/Quarto)
|
||||
s3_register("knitr::knit_print", "antibiogram")
|
||||
s3_register("knitr::knit_print", "formatted_bug_drug_combinations")
|
||||
# Support vctrs package for use in e.g. dplyr verbs
|
||||
# S3: ab_selector
|
||||
s3_register("vctrs::vec_ptype2", "character.ab_selector")
|
||||
@@ -177,7 +181,7 @@ if (utf8_supported && !is_latex) {
|
||||
try(invisible(get_mo_source()), silent = TRUE)
|
||||
}
|
||||
# be sure to print tibbles as tibbles
|
||||
if (pkg_is_available("tibble", also_load = FALSE)) {
|
||||
if (pkg_is_available("tibble")) {
|
||||
try(loadNamespace("tibble"), silent = TRUE)
|
||||
}
|
||||
|
||||
@@ -191,19 +195,25 @@ if (utf8_supported && !is_latex) {
|
||||
# if custom ab option is available, load it
|
||||
if (!is.null(getOption("AMR_custom_ab")) && file.exists(getOption("AMR_custom_ab", default = ""))) {
|
||||
packageStartupMessage("Adding custom antimicrobials from '", getOption("AMR_custom_ab"), "'...", appendLF = FALSE)
|
||||
x <- readRDS2(getOption("AMR_custom_ab"))
|
||||
tryCatch({
|
||||
suppressWarnings(suppressMessages(add_custom_antimicrobials(x)))
|
||||
packageStartupMessage("OK.")
|
||||
}, error = function(e) packageStartupMessage("Failed: ", e$message))
|
||||
x <- readRDS_AMR(getOption("AMR_custom_ab"))
|
||||
tryCatch(
|
||||
{
|
||||
suppressWarnings(suppressMessages(add_custom_antimicrobials(x)))
|
||||
packageStartupMessage("OK.")
|
||||
},
|
||||
error = function(e) packageStartupMessage("Failed: ", e$message)
|
||||
)
|
||||
}
|
||||
# if custom mo option is available, load it
|
||||
if (!is.null(getOption("AMR_custom_mo")) && file.exists(getOption("AMR_custom_mo", default = ""))) {
|
||||
packageStartupMessage("Adding custom microorganisms from '", getOption("AMR_custom_mo"), "'...", appendLF = FALSE)
|
||||
x <- readRDS2(getOption("AMR_custom_mo"))
|
||||
tryCatch({
|
||||
suppressWarnings(suppressMessages(add_custom_microorganisms(x)))
|
||||
packageStartupMessage("OK.")
|
||||
}, error = function(e) packageStartupMessage("Failed: ", e$message))
|
||||
x <- readRDS_AMR(getOption("AMR_custom_mo"))
|
||||
tryCatch(
|
||||
{
|
||||
suppressWarnings(suppressMessages(add_custom_microorganisms(x)))
|
||||
packageStartupMessage("OK.")
|
||||
},
|
||||
error = function(e) packageStartupMessage("Failed: ", e$message)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,26 +27,8 @@ install.packages("AMR")
|
||||
|
||||
It will be downloaded and installed automatically. For RStudio, click on the menu *Tools* > *Install Packages...* and then type in "AMR" and press <kbd>Install</kbd>.
|
||||
|
||||
### Copyright
|
||||
----
|
||||
|
||||
This R package is licensed under the [GNU General Public License (GPL) v2.0](https://github.com/msberends/AMR/blob/main/LICENSE). In a nutshell, this means that this package:
|
||||
|
||||
- May be used for commercial purposes
|
||||
|
||||
- May be used for private purposes
|
||||
|
||||
- May **not** be used for patent purposes
|
||||
|
||||
- May be modified, although:
|
||||
|
||||
- Modifications **must** be released under the same license when distributing the package
|
||||
- Changes made to the code **must** be documented
|
||||
|
||||
- May be distributed, although:
|
||||
|
||||
- Source code **must** be made available when the package is distributed
|
||||
- A copy of the license and copyright notice **must** be included with the package.
|
||||
|
||||
- Comes with a LIMITATION of liability
|
||||
|
||||
- Comes with NO warranty
|
||||
<small>
|
||||
This AMR package for R is free, open-source software and licensed under the [GNU General Public License v2.0 (GPL-2)](https://msberends.github.io/AMR/LICENSE-text.html). These requirements are consequently legally binding: modifications must be released under the same license when distributing the package, changes made to the code must be documented, source code must be made available when the package is distributed, and a copy of the license and copyright notice must be included with the package.
|
||||
</small>
|
||||
|
||||
+33
-11
@@ -41,6 +41,10 @@ template:
|
||||
# the green "success" colour of this bootstrap theme should be the same as the green in our logo
|
||||
success: "#128f76"
|
||||
link-color: "#128f76"
|
||||
light: "#128f76a6" # this is success with 60% alpha
|
||||
# the template "info" is blue - this should be a green fitting our theme
|
||||
info: "#60a799"
|
||||
# make top bar a bit wider
|
||||
navbar-padding-y: "0.5rem"
|
||||
opengraph:
|
||||
twitter:
|
||||
@@ -72,37 +76,43 @@ navbar:
|
||||
- text: "How to"
|
||||
icon: "fa-question-circle"
|
||||
menu:
|
||||
- text: "Conduct AMR analysis"
|
||||
- text: "Conduct AMR Analysis"
|
||||
icon: "fa-directions"
|
||||
href: "articles/AMR.html"
|
||||
- text: "Predict antimicrobial resistance"
|
||||
- text: "Generate Antibiogram (Trad./Syndromic/WISCA)"
|
||||
icon: "fa-file-prescription"
|
||||
href: "reference/antibiogram.html" # reference instead of an article
|
||||
- text: "Predict Antimicrobial Resistance"
|
||||
icon: "fa-dice"
|
||||
href: "articles/resistance_predict.html"
|
||||
- text: "Data sets for download / own use"
|
||||
- text: "Download Data Sets for Own Use"
|
||||
icon: "fa-database"
|
||||
href: "articles/datasets.html"
|
||||
- text: "Conduct principal component analysis for AMR"
|
||||
- text: "Set User- Or Team-specific Package Settings"
|
||||
icon: "fa-gear"
|
||||
href: "reference/AMR-options.html"
|
||||
- text: "Conduct Principal Component Analysis for AMR"
|
||||
icon: "fa-compress"
|
||||
href: "articles/PCA.html"
|
||||
- text: "Determine multi-drug resistance (MDR)"
|
||||
- text: "Determine Multi-Drug Resistance (MDR)"
|
||||
icon: "fa-skull-crossbones"
|
||||
href: "articles/MDR.html"
|
||||
- text: "Work with WHONET data"
|
||||
- text: "Work with WHONET Data"
|
||||
icon: "fa-globe-americas"
|
||||
href: "articles/WHONET.html"
|
||||
- text: "Import data from SPSS/SAS/Stata"
|
||||
- text: "Import Data From SPSS/SAS/Stata"
|
||||
icon: "fa-file-upload"
|
||||
href: "articles/SPSS.html"
|
||||
- text: "Apply EUCAST rules"
|
||||
- text: "Apply Eucast Rules"
|
||||
icon: "fa-exchange-alt"
|
||||
href: "articles/EUCAST.html"
|
||||
- text: "Get taxonomy of a microorganism"
|
||||
- text: "Get Taxonomy of a Microorganism"
|
||||
icon: "fa-bug"
|
||||
href: "reference/mo_property.html" # reference instead of an article
|
||||
- text: "Get properties of an antibiotic drug"
|
||||
- text: "Get Properties of an Antibiotic Drug"
|
||||
icon: "fa-capsules"
|
||||
href: "reference/ab_property.html" # reference instead of an article
|
||||
- text: "Get properties of an antiviral drug"
|
||||
- text: "Get Properties of an Antiviral Drug"
|
||||
icon: "fa-capsules"
|
||||
href: "reference/av_property.html" # reference instead of an article
|
||||
- text: "Manual"
|
||||
@@ -158,9 +168,12 @@ reference:
|
||||
- title: "Analysing data: antimicrobial resistance"
|
||||
desc: >
|
||||
Use these function for the analysis part. You can use `susceptibility()` or `resistance()` on any antibiotic column.
|
||||
With `antibiogram()`, you can generate a traditional, combined, syndromic, or weighted-incidence syndromic combination
|
||||
antibiogram(WISCA). This function also comes with support for R Markdown and Quarto.
|
||||
Be sure to first select the isolates that are appropiate for analysis, by using `first_isolate()` or `is_new_episode()`.
|
||||
You can also filter your data on certain resistance in certain antibiotic classes (`carbapenems()`, `aminoglycosides()`), or determine multi-drug resistant microorganisms (MDRO, `mdro()`).
|
||||
contents:
|
||||
- "`antibiogram`"
|
||||
- "`proportion`"
|
||||
- "`count`"
|
||||
- "`is_new_episode`"
|
||||
@@ -176,6 +189,15 @@ reference:
|
||||
- "`resistance_predict`"
|
||||
- "`guess_ab_col`"
|
||||
|
||||
- title: "Other: AMR-specific options"
|
||||
desc: >
|
||||
The AMR package is customisable, by providing settings that can be set per user or per team. For
|
||||
example, the default interpretation guideline can be changed from EUCAST to CLSI, or a supported
|
||||
language can be set for the whole team (system-language independent) for antibiotic names in a
|
||||
foreign language.
|
||||
contents:
|
||||
- "`AMR-options`"
|
||||
|
||||
- title: "Other: antiviral drugs"
|
||||
desc: >
|
||||
This package also provides extensive support for antiviral agents, even though it is not the primary
|
||||
|
||||
+4
-1
@@ -1,2 +1,5 @@
|
||||
Extra release for fixing image options, as requested by CRAN team on 17 February 2022 (Kurt Hornik).
|
||||
As with all previous >20 releases, some CHECKs might return a NOTE for *just* hitting the installation size limit, though its size has been brought down to a minimum in collaboration with CRAN maintainers previously.
|
||||
|
||||
We consider this a high-impact package: it was published in the Journal of Statistical Software (2022), is including in a CRAN Task View (Epidemiology), and is according to download stats used in almost all countries in the world. If there is anything to note, please let us know up-front without directly archiving the current version. That said, we continually unit test our package extensively and have no reason to assume that anything is wrong.
|
||||
|
||||
Thanks for maintaining and hosting CRAN! It's empowering R and its use enormously!
|
||||
|
||||
+4751
-4600
File diff suppressed because one or more lines are too long
+55
-50
@@ -101,56 +101,59 @@ create_species_cons_cops <- function(type = c("CoNS", "CoPS")) {
|
||||
MO_staph <- AMR::microorganisms
|
||||
MO_staph <- MO_staph[which(MO_staph$genus == "Staphylococcus"), , drop = FALSE]
|
||||
if (type == "CoNS") {
|
||||
MO_staph[which(MO_staph$species %in% c(
|
||||
"coagulase-negative", "argensis", "arlettae",
|
||||
"auricularis", "borealis", "caeli", "capitis", "caprae",
|
||||
"carnosus", "casei", "caseolyticus", "chromogenes", "cohnii", "condimenti",
|
||||
"croceilyticus",
|
||||
"debuckii", "devriesei", "edaphicus", "epidermidis",
|
||||
"equorum", "felis", "fleurettii", "gallinarum",
|
||||
"haemolyticus", "hominis", "jettensis", "kloosii",
|
||||
"lentus", "lugdunensis", "massiliensis", "microti",
|
||||
"muscae", "nepalensis", "pasteuri", "petrasii",
|
||||
"pettenkoferi", "piscifermentans", "pragensis", "pseudoxylosus",
|
||||
"pulvereri", "rostri", "saccharolyticus", "saprophyticus",
|
||||
"sciuri", "simulans", "stepanovicii", "succinus",
|
||||
"ureilyticus",
|
||||
"vitulinus", "vitulus", "warneri", "xylosus",
|
||||
"caledonicus", "canis",
|
||||
"durrellii", "lloydii",
|
||||
"ratti", "taiwanensis", "veratri", "urealyticus"
|
||||
) |
|
||||
# old, now renamed to S. schleiferi (but still as synonym in our data of course):
|
||||
(MO_staph$species == "schleiferi" & MO_staph$subspecies %in% c("schleiferi", ""))),
|
||||
"mo",
|
||||
drop = TRUE
|
||||
MO_staph[
|
||||
which(MO_staph$species %in% c(
|
||||
"coagulase-negative", "argensis", "arlettae",
|
||||
"auricularis", "borealis", "caeli", "capitis", "caprae",
|
||||
"carnosus", "casei", "caseolyticus", "chromogenes", "cohnii", "condimenti",
|
||||
"croceilyticus",
|
||||
"debuckii", "devriesei", "edaphicus", "epidermidis",
|
||||
"equorum", "felis", "fleurettii", "gallinarum",
|
||||
"haemolyticus", "hominis", "jettensis", "kloosii",
|
||||
"lentus", "lugdunensis", "massiliensis", "microti",
|
||||
"muscae", "nepalensis", "pasteuri", "petrasii",
|
||||
"pettenkoferi", "piscifermentans", "pragensis", "pseudoxylosus",
|
||||
"pulvereri", "rostri", "saccharolyticus", "saprophyticus",
|
||||
"sciuri", "simulans", "stepanovicii", "succinus",
|
||||
"ureilyticus",
|
||||
"vitulinus", "vitulus", "warneri", "xylosus",
|
||||
"caledonicus", "canis",
|
||||
"durrellii", "lloydii",
|
||||
"ratti", "taiwanensis", "veratri", "urealyticus"
|
||||
) |
|
||||
# old, now renamed to S. schleiferi (but still as synonym in our data of course):
|
||||
(MO_staph$species == "schleiferi" & MO_staph$subspecies %in% c("schleiferi", ""))),
|
||||
"mo",
|
||||
drop = TRUE
|
||||
]
|
||||
} else if (type == "CoPS") {
|
||||
MO_staph[which(MO_staph$species %in% c(
|
||||
"coagulase-positive", "coagulans",
|
||||
"agnetis", "argenteus",
|
||||
"cornubiensis",
|
||||
"delphini", "lutrae",
|
||||
"hyicus", "intermedius",
|
||||
"pseudintermedius", "pseudointermedius",
|
||||
"schweitzeri", "simiae",
|
||||
"roterodami",
|
||||
"singaporensis"
|
||||
) |
|
||||
# old, now renamed to S. coagulans (but still as synonym in our data of course):
|
||||
(MO_staph$species == "schleiferi" & MO_staph$subspecies == "coagulans")),
|
||||
"mo",
|
||||
drop = TRUE
|
||||
MO_staph[
|
||||
which(MO_staph$species %in% c(
|
||||
"coagulase-positive", "coagulans",
|
||||
"agnetis", "argenteus",
|
||||
"cornubiensis",
|
||||
"delphini", "lutrae",
|
||||
"hyicus", "intermedius",
|
||||
"pseudintermedius", "pseudointermedius",
|
||||
"schweitzeri", "simiae",
|
||||
"roterodami",
|
||||
"singaporensis"
|
||||
) |
|
||||
# old, now renamed to S. coagulans (but still as synonym in our data of course):
|
||||
(MO_staph$species == "schleiferi" & MO_staph$subspecies == "coagulans")),
|
||||
"mo",
|
||||
drop = TRUE
|
||||
]
|
||||
}
|
||||
}
|
||||
MO_CONS <- create_species_cons_cops("CoNS")
|
||||
MO_COPS <- create_species_cons_cops("CoPS")
|
||||
MO_STREP_ABCG <- AMR_env$MO_lookup$mo[which(AMR_env$MO_lookup$genus == "Streptococcus" &
|
||||
AMR_env$MO_lookup$species %in% c(
|
||||
MO_STREP_ABCG <- AMR::microorganisms$mo[which(AMR::microorganisms$genus == "Streptococcus" &
|
||||
tolower(AMR::microorganisms$species) %in% c(
|
||||
"pyogenes", "agalactiae", "dysgalactiae", "equi", "canis",
|
||||
"group A", "group B", "group C", "group G"
|
||||
"group a", "group b", "group c", "group g"
|
||||
))]
|
||||
MO_LANCEFIELD <- AMR::microorganisms$mo[which(AMR::microorganisms$mo %like% "^(B_STRPT_PYGN(_|$)|B_STRPT_AGLC(_|$)|B_STRPT_(DYSG|EQUI)(_|$)|B_STRPT_ANGN(_|$)|B_STRPT_(DYSG|CANS)(_|$)|B_STRPT_SNGN(_|$)|B_STRPT_SLVR(_|$))")]
|
||||
MO_PREVALENT_GENERA <- c(
|
||||
"Absidia", "Acanthamoeba", "Acremonium", "Aedes", "Alternaria", "Amoeba", "Ancylostoma", "Angiostrongylus",
|
||||
"Anisakis", "Anopheles", "Apophysomyces", "Aspergillus", "Aureobasidium", "Basidiobolus", "Beauveria",
|
||||
@@ -254,14 +257,15 @@ create_AB_AV_lookup <- function(df) {
|
||||
}
|
||||
new_df$generalised_loinc <- lapply(new_df$loinc, generalise_antibiotic_name)
|
||||
new_df$generalised_all <- unname(lapply(
|
||||
as.list(as.data.frame(t(new_df[,
|
||||
c(
|
||||
colnames(new_df)[colnames(new_df) %in% c("ab", "av", "atc", "cid", "name")],
|
||||
colnames(new_df)[colnames(new_df) %like% "generalised"]
|
||||
),
|
||||
drop = FALSE
|
||||
]),
|
||||
stringsAsFactors = FALSE
|
||||
as.list(as.data.frame(
|
||||
t(new_df[,
|
||||
c(
|
||||
colnames(new_df)[colnames(new_df) %in% c("ab", "av", "atc", "cid", "name")],
|
||||
colnames(new_df)[colnames(new_df) %like% "generalised"]
|
||||
),
|
||||
drop = FALSE
|
||||
]),
|
||||
stringsAsFactors = FALSE
|
||||
)),
|
||||
function(x) {
|
||||
x <- generalise_antibiotic_name(unname(unlist(x)))
|
||||
@@ -282,6 +286,7 @@ suppressMessages(usethis::use_data(EUCAST_RULES_DF,
|
||||
MO_CONS,
|
||||
MO_COPS,
|
||||
MO_STREP_ABCG,
|
||||
MO_LANCEFIELD,
|
||||
MO_PREVALENT_GENERA,
|
||||
AB_LOOKUP,
|
||||
AV_LOOKUP,
|
||||
@@ -472,7 +477,7 @@ suppressMessages(devtools::document(quiet = TRUE))
|
||||
if (!"styler" %in% rownames(utils::installed.packages())) {
|
||||
message("Package 'styler' not installed!")
|
||||
} else if (interactive()) {
|
||||
# # only when sourcing this file ourselves
|
||||
# only when sourcing this file ourselves
|
||||
# usethis::ui_info("Styling package")
|
||||
# styler::style_pkg(
|
||||
# style = styler::tidyverse_style,
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
43220347c34d06a5c57f2014a8ecaa82
|
||||
8bf97fd5f1d8d82486902d05916ebca0
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
---
|
||||
title: "Generating antibiograms with the AMR package"
|
||||
author: "AMR package developers"
|
||||
date: "`r Sys.Date()`"
|
||||
output: pdf_document
|
||||
---
|
||||
|
||||
```{r setup, include=FALSE}
|
||||
knitr::opts_chunk$set(echo = TRUE, message = FALSE)
|
||||
library(AMR)
|
||||
```
|
||||
|
||||
This is an example R Markdown file to show the use of `antibiogram()` of the AMR package.
|
||||
|
||||
For starters, this is what our `example_isolates` data set looks like:
|
||||
|
||||
```{r}
|
||||
example_isolates
|
||||
```
|
||||
|
||||
|
||||
### Traditional Antibiogram
|
||||
|
||||
```{r trad}
|
||||
antibiogram(example_isolates,
|
||||
antibiotics = c(aminoglycosides(), carbapenems()))
|
||||
```
|
||||
|
||||
### Combined Antibiogram
|
||||
|
||||
```{r comb}
|
||||
antibiogram(example_isolates,
|
||||
antibiotics = c("TZP", "TZP+TOB", "TZP+GEN"))
|
||||
```
|
||||
|
||||
### Syndromic Antibiogram
|
||||
|
||||
```{r synd}
|
||||
antibiogram(example_isolates,
|
||||
antibiotics = c(aminoglycosides(), carbapenems()),
|
||||
syndromic_group = "ward")
|
||||
```
|
||||
|
||||
### Weighted-Incidence Syndromic Combination Antibiogram (WISCA)
|
||||
|
||||
```{r wisca}
|
||||
antibiogram(example_isolates,
|
||||
antibiotics = c("AMC", "AMC+CIP", "TZP", "TZP+TOB"),
|
||||
mo_transform = "gramstain",
|
||||
minimum = 10, # this should be >= 30, but now just as example
|
||||
syndromic_group = ifelse(example_isolates$age >= 65 &
|
||||
example_isolates$gender == "M",
|
||||
"WISCA Group 1", "WISCA Group 2"))
|
||||
```
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -410,7 +410,7 @@
|
||||
"SLT3" "Sulfamerazine/trimethoprim" "Trimethoprims" "J01EE07" "Sulfonamides and trimethoprim" "Combinations of sulfonamides and trimethoprim, incl. derivatives" "" "" ""
|
||||
"SUM" 5327 "Sulfamethazine" "Other antibacterials" "NA" "" "azolmetazin,benzene sulfonamide,calfspan,calfspan tablets,cremomethazine,diazil,diazilsulfadine,dimezathine,intradine,kelametazine,mermeth,metazin,neasina,neazina,nsulfanilamide,panazin,pirmazin,primazin,sa iii,solfadimidina,spanbolet,sulfadimerazine,sulfadimesin,sulfadimesine,sulfadimethyldiazine,sulfadimezin,sulfadimezine,sulfadimezinum,sulfadimidin,sulfadimidina,sulfadimidine,sulfadimidinum,sulfadine,sulfametazina,sulfametazyny,sulfamethazine,sulfamethiazine,sulfamezathine,sulfamidine,sulfasure sr bolus,sulfodimesin,sulfodimezine,sulka k boluses,sulka s boluses,sulmet,sulphadimidine,sulphamethasine,sulphamethazine,sulphamezathine,sulphamidine,sulphodimezine,superseptil,superseptyl,vertolan" "87592-2"
|
||||
"SLF4" 5328 "Sulfamethizole" "Trimethoprims" "B05CA04,D06BA04,J01EB02,S01AB01" "Sulfonamides and trimethoprim" "Short-acting sulfonamides" "sfmz" "ayerlucil,lucosil,methazol,microsul,nsulfanilamide,proklar,renasul,salimol,solfametizolo,sulamethizole,sulfa gram,sulfamethizol,sulfamethizole,sulfamethizolum,sulfametizol,sulfapyelon,sulfstat,sulfurine,sulphamethizole,tetracid,thidicur,thiosulfil,thiosulfil forte,ultrasul,urocydal,urodiaton,urolucosil,urosulfin" 4 "g" "60175-7,60176-5,60177-3"
|
||||
"SMX" 5329 "Sulfamethoxazole" "Trimethoprims" "J01EC01" "Sulfonamides and trimethoprim" "Intermediate-acting sulfonamides" "sfmx,sulf" "azo gantanol,bactrim,bactrimel,cotrimoxazole,eusaprim,gamazole,gantanol,gantanol ds,metoxal,nsulfanilamide,nsulphanilamide,radonil,septran,septrin,simsinomin,sinomin,solfametossazolo,sulfamethalazole,sulfamethoxazol,sulfamethoxazole,sulfamethoxazolum,sulfamethoxizole,sulfamethylisoxazole,sulfametoxazol,sulfisomezole,sulmeprim,sulphamethalazole,sulphamethoxazol,sulphamethoxazole,sulphisomezole,urobak" 2 "g" "10342-4,25271-8,39772-9,59971-2,59972-0,60333-2,72674-5,80549-9,80974-9"
|
||||
"SMX" 5329 "Sulfamethoxazole" "Trimethoprims" "J01EC01" "Sulfonamides and trimethoprim" "Intermediate-acting sulfonamides" "sfmx,sulf" "azo gantanol,gamazole,gantanol,gantanol ds,metoxal,nsulfanilamide,nsulphanilamide,radonil,septran,simsinomin,sinomin,solfametossazolo,sulfamethalazole,sulfamethoxazol,sulfamethoxazole,sulfamethoxazolum,sulfamethoxizole,sulfamethylisoxazole,sulfametoxazol,sulfisomezole,sulmeprim,sulphamethalazole,sulphamethoxazol,sulphamethoxazole,sulphisomezole,urobak" 2 "g" "10342-4,25271-8,39772-9,59971-2,59972-0,60333-2,72674-5,80549-9,80974-9"
|
||||
"SLF5" 5330 "Sulfamethoxypyridazine" "Trimethoprims" "J01ED05" "Sulfonamides and trimethoprim" "Long-acting sulfonamides" "" "altezol,davosin,depovernil,kineks,lederkyn,lentac,lisulfen,longin,medicel,midicel,midikel,myasul,nsulfanilamide,opinsul,paramid,paramid supra,petrisul,piridolo,quinoseptyl,retamid,retasulfin,retasulphine,slosul,spofadazine,sulfalex,sulfapyridazine,sulfdurazin,sulfozona,sultirene,vinces" 0.5 "g" ""
|
||||
"SLF6" 19596 "Sulfametomidine" "Trimethoprims" "J01ED03" "Sulfonamides and trimethoprim" "Long-acting sulfonamides" "" "duroprocin,methofadin,methofazine,nsulfanilamide,solfametomidina,sulfamethomidine,sulfametomidin,sulfametomidina,sulfametomidine,sulfametomidinum" ""
|
||||
"SLF7" 5326 "Sulfametoxydiazine" "Trimethoprims" "J01ED04" "Sulfonamides and trimethoprim" "Long-acting sulfonamides" "" "bayrena,berlicid,dairena,durenat,juvoxin,kinecid,kirocid,longasulf,methoxypyrimal,nsulfanilamide,solfametossidiazina,sulfameter,sulfamethorine,sulfamethoxine,sulfamethoxydiazin,sulfamethoxydiazine,sulfamethoxydin,sulfamethoxydine,sulfametin,sulfametinum,sulfametorin,sulfametorine,sulfametorinum,sulfametoxidiazina,sulfametoxidine,sulfametoxydiazine,sulfametoxydiazinum,sulphameter,sulphamethoxydiazine,supramid,ultrax" 0.5 "g" ""
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,3 @@
|
||||
|
||||
license_text <- readLines("docs/LICENSE-text.html")
|
||||
license_text <- paste(license_text, collapse = "|||")
|
||||
license_text <- gsub("licen(s|c)e", "Survey", license_text, ignore.case = TRUE)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
810cc621f75ee69a51cfe6726ab46398
|
||||
7846247d4113c4e8f550cfd2cb87467f
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+54
-53
@@ -1,8 +1,8 @@
|
||||
"mo" "fullname" "status" "kingdom" "phylum" "class" "order" "family" "genus" "species" "subspecies" "rank" "ref" "source" "lpsn" "lpsn_parent" "lpsn_renamed_to" "gbif" "gbif_parent" "gbif_renamed_to" "prevalence" "snomed"
|
||||
"B_ANAER" "(unknown anaerobic bacteria)" "accepted" "Bacteria" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown Gram-negatives)" "(unknown species)" "(unknown subspecies)" "subspecies" "manually added" 2 ""
|
||||
"F_FUNGUS" "(unknown fungus)" "accepted" "Fungi" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown genus)" "(unknown species)" "(unknown subspecies)" "subspecies" "manually added" 2 ""
|
||||
"B_GRAMN" "(unknown Gram-negatives)" "accepted" "Bacteria" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown Gram-negatives)" "(unknown species)" "(unknown subspecies)" "subspecies" "manually added" 2 ""
|
||||
"B_GRAMP" "(unknown Gram-positives)" "accepted" "Bacteria" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown Gram-positives)" "(unknown species)" "(unknown subspecies)" "subspecies" "manually added" 2 ""
|
||||
"B_ANAER" "(unknown anaerobic bacteria)" "accepted" "Bacteria" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown Gram-negatives)" "(unknown species)" "(unknown subspecies)" "subspecies" "manually added" 2 ""
|
||||
"F_FUNGUS" "(unknown fungus)" "accepted" "Fungi" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown genus)" "(unknown species)" "(unknown subspecies)" "subspecies" "manually added" 2 ""
|
||||
"UNKNOWN" "(unknown name)" "accepted" "(unknown kingdom)" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown genus)" "(unknown species)" "(unknown subspecies)" "subspecies" "manually added" 2 ""
|
||||
"F_YEAST" "(unknown yeast)" "accepted" "Fungi" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown genus)" "(unknown species)" "(unknown subspecies)" "subspecies" "manually added" 2 ""
|
||||
"B_[FAM]_ABDTBCTR" "Abditibacteriaceae" "accepted" "Bacteria" "Abditibacteriota" "Abditibacteriia" "Abditibacteriales" "Abditibacteriaceae" "" "" "" "family" "Tahon et al., 2018" "LPSN" "4812" "4982" "10678443" "10853930" 2 ""
|
||||
@@ -6477,6 +6477,7 @@
|
||||
"B_AZYRT" "Azyrtalia" "accepted" "Bacteria" "Cyanobacteria" "Cyanobacteriia" "Cyanobacteriales" "Rivulariaceae" "Azyrtalia" "" "" "genus" "Vologdin et al., 1969" "GBIF" "3237706" "4306626" 2 ""
|
||||
"B_AZYRT_ZNLT" "Azyrtalia zonulata" "accepted" "Bacteria" "Cyanobacteria" "Cyanobacteriia" "Cyanobacteriales" "Rivulariaceae" "Azyrtalia" "zonulata" "" "species" "Vologdin et al., 1969" "GBIF" "11176322" "3237706" 2 ""
|
||||
"A_B-DKE" "B-DKE" "accepted" "Archaea" "Euryarchaeota" "Thermoplasmata" "Thermoplasmatales" "Thermoplasmataceae" "B-DKE" "" "" "genus" "GBIF" "11214677" "3810" 2 ""
|
||||
"A_BE-D" "BE-D" "accepted" "Archaea" "Thermoproteota" "Thermoproteia" "Marsarchaeales" "Marsarchaeaceae" "BE-D" "" "" "genus" "GBIF" "11119914" "10885120" 2 ""
|
||||
"B_BABEL" "Babela" "accepted" "Bacteria" "Dependentiae" "Babeliae" "Babeliales" "Babeliaceae" "Babela" "" "" "genus" "GBIF" "10699249" "10857700" 2 ""
|
||||
"B_BABEL_MSSL" "Babela massiliensis" "accepted" "Bacteria" "Dependentiae" "Babeliae" "Babeliales" "Babeliaceae" "Babela" "massiliensis" "" "species" "GBIF" "10816215" "10699249" 2 ""
|
||||
"B_[FAM]_BABELIAC" "Babeliaceae" "accepted" "Bacteria" "Dependentiae" "Babeliae" "Babeliales" "Babeliaceae" "" "" "" "family" "GBIF" "10857700" "10791973" 2 ""
|
||||
@@ -7288,7 +7289,6 @@
|
||||
"B_BDLLV_STLP" "Bdellovibrio stolpii" "synonym" "Bacteria" "Pseudomonadota" "Oligoflexia" "Bdellovibrionales" "Bdellovibrionaceae" "Bdellovibrio" "stolpii" "" "species" "Seidler et al., 1972" "LPSN" "773991" "516977" "773917" 2 "9752009"
|
||||
"B_[FAM]_BDLLVBRN" "Bdellovibrionaceae" "accepted" "Bacteria" "Pseudomonadota" "Oligoflexia" "Bdellovibrionales" "Bdellovibrionaceae" "" "" "" "family" "Garrity et al., 2006" "LPSN" "203" "5078" "8932" "652" 2 "427516001"
|
||||
"B_[ORD]_BDLLVBRN" "Bdellovibrionales" "accepted" "Bacteria" "Pseudomonadota" "Oligoflexia" "Bdellovibrionales" "" "" "" "" "order" "Garrity et al., 2006" "LPSN" "5078" "111" "652" "10808561" 2 "426331002"
|
||||
"A_BE-D" "BE-D" "accepted" "Archaea" "Thermoproteota" "Thermoproteia" "Marsarchaeales" "Marsarchaeaceae" "BE-D" "" "" "genus" "GBIF" "11119914" "10885120" 2 ""
|
||||
"F_BEAVR" "Beauveria" "accepted" "Fungi" "Ascomycota" "Sordariomycetes" "Hypocreales" "Cordycipitaceae" "Beauveria" "" "" "genus" "Vuill, 1912" "GBIF" "2560584" "8418" 1.5 "66193005"
|
||||
"F_BEAVR_ACRD" "Beauveria acridophila" "accepted" "Fungi" "Ascomycota" "Sordariomycetes" "Hypocreales" "Cordycipitaceae" "Beauveria" "acridophila" "" "species" "Sanjuan et al." "GBIF" "10753468" "2560584" 1.5 ""
|
||||
"F_BEAVR_AMRP" "Beauveria amorpha" "accepted" "Fungi" "Ascomycota" "Sordariomycetes" "Hypocreales" "Cordycipitaceae" "Beauveria" "amorpha" "" "species" "Minnis et al." "GBIF" "7417312" "2560584" 1.5 ""
|
||||
@@ -19169,6 +19169,7 @@
|
||||
"B_FSBCTR_VARM" "Fusobacterium varium" "accepted" "Bacteria" "Fusobacteriota" "Fusobacteriia" "Fusobacteriales" "Fusobacteriaceae" "Fusobacterium" "varium" "" "species" "Moore et al., 1969" "LPSN" "783893" "515666" "3225872" "4903731" 1 "1972005"
|
||||
"B_FSBCTR_VNCN" "Fusobacterium vincentii" "accepted" "Bacteria" "Fusobacteriota" "Fusobacteriia" "Fusobacteriales" "Fusobacteriaceae" "Fusobacterium" "vincentii" "" "species" "Kook et al., 2022" "LPSN" "28103" "515666" "10808231" "4903731" 1.5 ""
|
||||
"B_FSBCTR_WTNB" "Fusobacterium watanabei" "accepted" "Bacteria" "Fusobacteriota" "Fusobacteriia" "Fusobacteriales" "Fusobacteriaceae" "Fusobacterium" "watanabei" "" "species" "Tomida et al., 2021" "LPSN" "17647" "515666" 1.5 ""
|
||||
"B_GBCHB" "GBChlB" "accepted" "Bacteria" "Chlorobiota" "Chlorobiia" "Chlorobiales" "Chloroherpetonaceae" "GBChlB" "" "" "genus" "GBIF" "11171983" "10775177" 2 ""
|
||||
"B_GBNBC" "Gabonibacter" "accepted" "Bacteria" "Bacteroidota" "Bacteroidia" "Bacteroidales" "Odoribacteraceae" "Gabonibacter" "" "" "genus" "Mourembou et al., 2017" "LPSN" "519111" "2047" "9240178" 2 "785729002"
|
||||
"B_GBNBC_JSTS" "Gabonibacter justesenii" "synonym" "Bacteria" "Bacteroidota" "Bacteroidia" "Bacteroidales" "Odoribacteraceae" "Gabonibacter" "justesenii" "" "species" "GBIF" "11090238" "9240178" "9415109" 2 ""
|
||||
"B_GBNBC_MSSL" "Gabonibacter massiliensis" "accepted" "Bacteria" "Bacteroidota" "Bacteroidia" "Bacteroidales" "Odoribacteraceae" "Gabonibacter" "massiliensis" "" "species" "Mourembou et al., 2017" "LPSN" "795002" "519111" "9415109" "9240178" 2 ""
|
||||
@@ -19282,7 +19283,6 @@
|
||||
"B_GSTRN_PHSC" "Gastranaerophilus phascolarctosicola" "accepted" "Bacteria" "Cyanobacteria" "Vampirovibrionia" "Gastranaerophilales" "Gastranaerophilaceae" "Gastranaerophilus" "phascolarctosicola" "" "species" "GBIF" "10876363" "10700903" 2 ""
|
||||
"P_GDRYN" "Gaudryina" "accepted" "Protozoa" "Sarcomastigophora" "" "" "Verneulidae" "Gaudryina" "" "" "genus" "GBIF" "10167887" "6123475" 2 ""
|
||||
"P_GDRYN_KKSN" "Gaudryina kokuseiensis" "accepted" "Protozoa" "Sarcomastigophora" "" "" "Verneulidae" "Gaudryina" "kokuseiensis" "" "species" "Ishizaki" "GBIF" "6123479" "10167887" 2 ""
|
||||
"B_GBCHB" "GBChlB" "accepted" "Bacteria" "Chlorobiota" "Chlorobiia" "Chlorobiales" "Chloroherpetonaceae" "GBChlB" "" "" "genus" "GBIF" "11171983" "10775177" 2 ""
|
||||
"P_GMPHR" "Geamphorella" "accepted" "Protozoa" "Amoebozoa" "Lobosa" "Arcellinida" "Nebelidae" "Geamphorella" "" "" "genus" "Bonnet, 1959" "GBIF" "4888795" "2170" 2 ""
|
||||
"P_GMPHR_LUCD" "Geamphorella lucida" "accepted" "Protozoa" "Amoebozoa" "Lobosa" "Arcellinida" "Nebelidae" "Geamphorella" "lucida" "" "species" "Bonnet, 1959" "GBIF" "10677162" "4888795" 2 ""
|
||||
"B_GEHNG" "Gehongia" "accepted" "Bacteria" "Bacillota" "Clostridia" "Eubacteriales" "Christensenellaceae" "Gehongia" "" "" "genus" "Liu et al., 2022" "LPSN" "28816" "1935" 2 ""
|
||||
@@ -22583,6 +22583,7 @@
|
||||
"B_HYNSN_UDNS" "Hyunsoonleella udoensis" "synonym" "Bacteria" "Bacteroidota" "Flavobacteriia" "Flavobacteriales" "Flavobacteriaceae" "Hyunsoonleella" "udoensis" "" "species" "Kim et al., 2016" "LPSN" "793695" "517944" "793694" 2 ""
|
||||
"B_HYNSN_UDNN" "Hyunsoonleella udonensis" "accepted" "Bacteria" "Bacteroidota" "Flavobacteriia" "Flavobacteriales" "Flavobacteriaceae" "Hyunsoonleella" "udonensis" "" "species" "Kim et al., 2016" "LPSN" "793694" "517944" "8797340" "7660455" 2 ""
|
||||
"B_HYNSN_ULVA" "Hyunsoonleella ulvae" "accepted" "Bacteria" "Bacteroidota" "Flavobacteriia" "Flavobacteriales" "Flavobacteriaceae" "Hyunsoonleella" "ulvae" "" "species" "Wang et al., 2022" "LPSN" "28379" "517944" 2 ""
|
||||
"B_ISDG" "ISDg" "accepted" "Bacteria" "Bacillota" "Clostridia" "Eubacteriales" "Lachnospiraceae" "ISDg" "" "" "genus" "GBIF" "11121283" "4713" 2 ""
|
||||
"A_[FAM]_IAINRCHC" "Iainarchaeaceae" "accepted" "Archaea" "Iainarchaeota" "Iainarchaeia" "Iainarchaeales" "Iainarchaeaceae" "" "" "" "family" "GBIF" "10843220" "10672343" 2 ""
|
||||
"A_[ORD]_IANRCHLS" "Iainarchaeales" "accepted" "Archaea" "Iainarchaeota" "Iainarchaeia" "Iainarchaeales" "" "" "" "" "order" "GBIF" "10672343" "10847779" 2 ""
|
||||
"A_[CLS]_IAINARCH" "Iainarchaeia" "accepted" "Archaea" "Iainarchaeota" "Iainarchaeia" "" "" "" "" "" "class" "GBIF" "10847779" "10776132" 2 ""
|
||||
@@ -22792,7 +22793,6 @@
|
||||
"B_ISCHN_ALKL" "Isachenkonia alkalipeptolytica" "accepted" "Bacteria" "Bacillota" "Clostridia" "Eubacteriales" "Clostridiaceae" "Isachenkonia" "alkalipeptolytica" "" "species" "Zavarzina et al., 2020" "LPSN" "8748" "8742" 2 ""
|
||||
"B_ISCTS" "Isactis" "accepted" "Bacteria" "Cyanobacteria" "Cyanobacteriia" "Cyanobacteriales" "Rivulariaceae" "Isactis" "" "" "genus" "Thuret et al., 1886" "GBIF" "3219609" "4306626" 2 ""
|
||||
"B_ISCTS_PLAN" "Isactis plana" "accepted" "Bacteria" "Cyanobacteria" "Cyanobacteriia" "Cyanobacteriales" "Rivulariaceae" "Isactis" "plana" "" "species" "Thur et al." "GBIF" "3219610" "3219609" 2 ""
|
||||
"B_ISDG" "ISDg" "accepted" "Bacteria" "Bacillota" "Clostridia" "Eubacteriales" "Lachnospiraceae" "ISDg" "" "" "genus" "GBIF" "11121283" "4713" 2 ""
|
||||
"B_ISHKW" "Ishikawaella" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Ishikawaella" "" "" "genus" "GBIF" "10797324" "11158430" 2 ""
|
||||
"B_ISHKW_CPSL" "Ishikawaella capsulata" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Ishikawaella" "capsulata" "" "species" "GBIF" "10718144" "10797324" 2 ""
|
||||
"B_ISBCL" "Isobaculum" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Carnobacteriaceae" "Isobaculum" "" "" "genus" "Collins et al., 2002" "LPSN" "515857" "279" "3227154" 2 "432998006"
|
||||
@@ -23653,6 +23653,7 @@
|
||||
"B_KYTCC_AERL" "Kytococcus aerolatus" "accepted" "Bacteria" "Actinomycetota" "Actinomycetes" "Micrococcales" "Kytococcaceae" "Kytococcus" "aerolatus" "" "species" "Nouioui et al., 2018" "LPSN" "788155" "515905" "7687887" "3225662" 1.5 ""
|
||||
"B_KYTCC_SCHR" "Kytococcus schroeteri" "accepted" "Bacteria" "Actinomycetota" "Actinomycetes" "Micrococcales" "Kytococcaceae" "Kytococcus" "schroeteri" "" "species" "Becker et al., 2002" "LPSN" "777226" "515905" "3225663" "3225662" 1 "428721003"
|
||||
"B_KYTCC_SDNT" "Kytococcus sedentarius" "accepted" "Bacteria" "Actinomycetota" "Actinomycetes" "Micrococcales" "Kytococcaceae" "Kytococcus" "sedentarius" "" "species" "Nouioui et al., 2018" "LPSN" "777227" "515905" "3225664" "3225662" 1 "113775009"
|
||||
"B_LS-NO" "LS-NOB" "accepted" "Bacteria" "Nitrospinota" "Nitrospinia" "Nitrospinales" "Nitrospinaceae" "LS-NOB" "" "" "genus" "GBIF" "11159629" "5444" 2 ""
|
||||
"B_LABED" "Labedaea" "accepted" "Bacteria" "Actinomycetota" "Actinomycetes" "Pseudonocardiales" "Pseudonocardiaceae" "Labedaea" "" "" "genus" "2012" "LPSN" "518231" "1137" "7668340" "3841" 2 ""
|
||||
"B_LABED_RHZS" "Labedaea rhizosphaerae" "accepted" "Bacteria" "Actinomycetota" "Actinomycetes" "Pseudonocardiales" "Pseudonocardiaceae" "Labedaea" "rhizosphaerae" "" "species" "2012" "LPSN" "790047" "518231" "7830525" "7668340" 2 ""
|
||||
"B_LBDLL" "Labedella" "accepted" "Bacteria" "Actinomycetota" "Actinomycetes" "Micrococcales" "Microbacteriaceae" "Labedella" "" "" "genus" "Li et al., 2019" "LPSN" "517689" "875" "4899919" 2 ""
|
||||
@@ -25497,7 +25498,6 @@
|
||||
"B_LTTDB" "Lottiidibacillus" "accepted" "Bacteria" "Bacillota" "Bacilli" "Caryophanales" "Bacillaceae" "Lottiidibacillus" "" "" "genus" "Liu et al., 2020" "LPSN" "9035" "191" 2 ""
|
||||
"B_LTTDB_PTLL" "Lottiidibacillus patelloidae" "accepted" "Bacteria" "Bacillota" "Bacilli" "Caryophanales" "Bacillaceae" "Lottiidibacillus" "patelloidae" "" "species" "Liu et al., 2020" "LPSN" "15262" "9035" 2 ""
|
||||
"P_[PHL]_LOUKOZOA" "Loukozoa" "accepted" "Protozoa" "Loukozoa" "" "" "" "" "" "" "phylum" "GBIF" "7872314" "7" 2 ""
|
||||
"B_LS-NO" "LS-NOB" "accepted" "Bacteria" "Nitrospinota" "Nitrospinia" "Nitrospinales" "Nitrospinaceae" "LS-NOB" "" "" "genus" "GBIF" "11159629" "5444" 2 ""
|
||||
"B_LUCBCTRM" "Lucibacterium" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Vibrionales" "Vibrionaceae" "Lucibacterium" "" "" "genus" "Hendrie et al., 1970" "LPSN" "515980" "1543" "517157" 1 ""
|
||||
"B_LUCBCTRM_HRVY" "Lucibacterium harveyi" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Vibrionales" "Vibrionaceae" "Lucibacterium" "harveyi" "" "species" "Hendrie et al., 1970" "LPSN" "777606" "515980" "783009" 1 ""
|
||||
"B_LUCFR" "Lucifera" "accepted" "Bacteria" "Bacillota" "Negativicutes" "Selenomonadales" "Sporomusaceae" "Lucifera" "" "" "genus" "Sanchez-Andrea et al., 2019" "LPSN" "521634" "2041" 2 ""
|
||||
@@ -25850,6 +25850,9 @@
|
||||
"B_LYTCM" "Lyticum" "accepted" "Bacteria" "Pseudomonadota" "Alphaproteobacteria" "Rickettsiales" "Ehrlichiaceae" "Lyticum" "" "" "genus" "Preer et al., 1982" "LPSN" "517271" "473" "3221463" "4901684" 2 "433004006"
|
||||
"B_LYTCM_FLGL" "Lyticum flagellatum" "accepted" "Bacteria" "Pseudomonadota" "Alphaproteobacteria" "Rickettsiales" "Ehrlichiaceae" "Lyticum" "flagellatum" "" "species" "Preer et al., 1982" "LPSN" "784168" "517271" "3221464" "3221463" 2 "433754005"
|
||||
"B_LYTCM_SNSM" "Lyticum sinuosum" "accepted" "Bacteria" "Pseudomonadota" "Alphaproteobacteria" "Rickettsiales" "Ehrlichiaceae" "Lyticum" "sinuosum" "" "species" "Preer et al., 1982" "LPSN" "784169" "517271" "3221465" "3221463" 2 "434353007"
|
||||
"A_MGII-" "MGIIa-I" "accepted" "Archaea" "Thermoplasmatota" "Poseidoniia" "Poseidoniales" "Poseidoniaceae" "MGIIa-I" "" "" "genus" "GBIF" "11196009" "10685831" 2 ""
|
||||
"A_GII-P" "MGIIb-P" "accepted" "Archaea" "Thermoplasmatota" "Poseidoniia" "Poseidoniales" "Thalassarchaeaceae" "MGIIb-P" "" "" "genus" "GBIF" "11123790" "10752789" 2 ""
|
||||
"B_MZ-XQ" "MZ-XQ" "accepted" "Bacteria" "Mycoplasmatota" "Mollicutes" "Acholeplasmatales" "Acholeplasmataceae" "MZ-XQ" "" "" "genus" "GBIF" "11137212" 2 ""
|
||||
"B_MBKBC" "Mabikibacter" "synonym" "Bacteria" "Pseudomonadota" "Alphaproteobacteria" "Hyphomicrobiales" "Notoacmeibacteraceae" "Mabikibacter" "" "" "genus" "Choi et al., 2017" "LPSN" "519257" "2084" "519233" 2 ""
|
||||
"B_MBKBC_RUBR" "Mabikibacter ruber" "synonym" "Bacteria" "Pseudomonadota" "Alphaproteobacteria" "Hyphomicrobiales" "Notoacmeibacteraceae" "Mabikibacter" "ruber" "" "species" "Choi et al., 2017" "LPSN" "795890" "519257" "795709" "9791970" 2 ""
|
||||
"B_MCLLB" "Macellibacteroides" "accepted" "Bacteria" "Bacteroidota" "Bacteroidia" "Bacteroidales" "Porphyromonadaceae" "Macellibacteroides" "" "" "genus" "Jabari et al., 2012" "LPSN" "518264" "1100" "8021701" 2 ""
|
||||
@@ -27856,8 +27859,6 @@
|
||||
"F_MYRZY_PRPS_TXTL" "Meyerozyma parapsilosis tuxtlensis" "synonym" "Fungi" "Ascomycota" "Saccharomycetes" "Saccharomycetales" "Debaryomycetaceae" "Meyerozyma" "parapsilosis" "tuxtlensis" "subspecies" "Herrera et al." "GBIF" "3479713" "5893383" 1.5 ""
|
||||
"F_MYRZY_PSDG" "Meyerozyma pseudoguilliermondii" "synonym" "Fungi" "Ascomycota" "Saccharomycetes" "Saccharomycetales" "Debaryomycetaceae" "Meyerozyma" "pseudoguilliermondii" "" "species" "GBIF" "3556778" "5893380" "5893383" 1.5 ""
|
||||
"F_MYRZY_SMTH" "Meyerozyma smithsonii" "accepted" "Fungi" "Ascomycota" "Saccharomycetes" "Saccharomycetales" "Debaryomycetaceae" "Meyerozyma" "smithsonii" "" "species" "Yurkov et al." "GBIF" "10712206" "5893380" 1.5 ""
|
||||
"A_MGII-" "MGIIa-I" "accepted" "Archaea" "Thermoplasmatota" "Poseidoniia" "Poseidoniales" "Poseidoniaceae" "MGIIa-I" "" "" "genus" "GBIF" "11196009" "10685831" 2 ""
|
||||
"A_GII-P" "MGIIb-P" "accepted" "Archaea" "Thermoplasmatota" "Poseidoniia" "Poseidoniales" "Thalassarchaeaceae" "MGIIb-P" "" "" "genus" "GBIF" "11123790" "10752789" 2 ""
|
||||
"B_MCVBR" "Micavibrio" "accepted" "Bacteria" "Pseudomonadota" "Oligoflexia" "Bdellovibrionales" "Bdellovibrionaceae" "Micavibrio" "" "" "genus" "Lambina et al., 1989" "LPSN" "517285" "203" "11199699" "8932" 2 "429897008"
|
||||
"B_MCVBR_ADMR" "Micavibrio admirandus" "accepted" "Bacteria" "Pseudomonadota" "Oligoflexia" "Bdellovibrionales" "Bdellovibrionaceae" "Micavibrio" "admirandus" "" "species" "Lambina et al., 1989" "LPSN" "784260" "517285" 2 "433368001"
|
||||
"A_[FAM]_MICRRCHC" "Micrarchaeaceae" "accepted" "Archaea" "Micrarchaeota" "Micrarchaeia" "Micrarchaeales" "Micrarchaeaceae" "" "" "" "family" "GBIF" "10878041" "10702512" 2 ""
|
||||
@@ -30316,7 +30317,6 @@
|
||||
"B_MYXSR_BRMN" "Myxosarcina burmensis" "accepted" "Bacteria" "Cyanobacteria" "Cyanobacteriia" "Cyanobacteriales" "Xenococcaceae" "Myxosarcina" "burmensis" "" "species" "Skuja" "GBIF" "3216275" "7729673" 2 ""
|
||||
"B_MYXSR_CNCN" "Myxosarcina concinna" "accepted" "Bacteria" "Cyanobacteria" "Cyanobacteriia" "Cyanobacteriales" "Xenococcaceae" "Myxosarcina" "concinna" "" "species" "GBIF" "3217367" "7729673" 2 ""
|
||||
"B_MYXSR_GLCP" "Myxosarcina gloeocapsoides" "accepted" "Bacteria" "Cyanobacteria" "Cyanobacteriia" "Cyanobacteriales" "Xenococcaceae" "Myxosarcina" "gloeocapsoides" "" "species" "Komarek et al." "GBIF" "3217365" "7729673" 2 ""
|
||||
"B_MZ-XQ" "MZ-XQ" "accepted" "Bacteria" "Mycoplasmatota" "Mollicutes" "Acholeplasmatales" "Acholeplasmataceae" "MZ-XQ" "" "" "genus" "GBIF" "11137212" 2 ""
|
||||
"B_MZBMY" "Mzabimyces" "synonym" "Bacteria" "Actinomycetota" "Actinomycetes" "Pseudonocardiales" "Pseudonocardiaceae" "Mzabimyces" "" "" "genus" "Saker et al., 2015" "LPSN" "518817" "1137" "518590" 2 ""
|
||||
"B_MZBMY_ALGR" "Mzabimyces algeriensis" "synonym" "Bacteria" "Actinomycetota" "Actinomycetes" "Pseudonocardiales" "Pseudonocardiaceae" "Mzabimyces" "algeriensis" "" "species" "Saker et al., 2015" "LPSN" "793403" "518817" "795677" 2 ""
|
||||
"B_NAASI" "Naasia" "accepted" "Bacteria" "Actinomycetota" "Actinomycetes" "Micrococcales" "Microbacteriaceae" "Naasia" "" "" "genus" "Weon et al., 2013" "LPSN" "518394" "875" "8305219" 2 ""
|
||||
@@ -41270,7 +41270,6 @@
|
||||
"B_SLMNL_ARPH" "Salmonella Arapahoe" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Arapahoe" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_ARCH" "Salmonella Arechavaleta" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Arechavaleta" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_ARGN" "Salmonella Argenteuil" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Argenteuil" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_ARZN" "Salmonella arizonae" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "arizonae" "" "species" "Kauffmann, 1964" "LPSN" "780744" "516547" "780755" "5427588" "3221815" 1.5 ""
|
||||
"B_SLMNL_ARSH" "Salmonella Arusha" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Arusha" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_ASCH" "Salmonella Aschersleben" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Aschersleben" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_ASHN" "Salmonella Ashanti" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Ashanti" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
@@ -41379,7 +41378,6 @@
|
||||
"B_SLMNL_BLTN" "Salmonella Bolton" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Bolton" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_BNMS" "Salmonella Bonames" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Bonames" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_BNRN" "Salmonella Bonariensis" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Bonariensis" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_BNGR" "Salmonella bongori" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "bongori" "" "species" "Reeves et al., 1989" "LPSN" "780745" "516547" "5427596" "3221815" 1 "398393000"
|
||||
"B_SLMNL_BONN" "Salmonella Bonn" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Bonn" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_BOTL" "Salmonella Bootle" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Bootle" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_BRBC" "Salmonella Borbeck" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Borbeck" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
@@ -41482,14 +41480,6 @@
|
||||
"B_SLMNL_CHNG" "Salmonella Chingola" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Chingola" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_CHRD" "Salmonella Chiredzi" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Chiredzi" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_CHTT" "Salmonella Chittagong" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Chittagong" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_CHLR" "Salmonella choleraesuis" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "choleraesuis" "" "species" "Weldin, 1927" "LPSN" "780746" "516547" "784857" "7515106" "3221815" "9701185" 1 ""
|
||||
"B_SLMNL_CHLR_ARZN" "Salmonella choleraesuis arizonae" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "choleraesuis" "arizonae" "subspecies" "Le Minor et al., 1985" "LPSN" "780747" "780746" "780755" "5427587" "7515106" "5427586" 1 ""
|
||||
"B_SLMNL_CHLR_BNGR" "Salmonella choleraesuis bongori" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "choleraesuis" "bongori" "subspecies" "Le Minor et al., 1985" "LPSN" "780748" "780746" "780745" "5427597" "7515106" "5427596" 1 ""
|
||||
"B_SLMNL_CHLR_CHLR" "Salmonella choleraesuis choleraesuis" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "choleraesuis" "choleraesuis" "subspecies" "Le Minor et al., 1985" "LPSN" "780749" "780746" "780758" "5427590" "7515106" "5427589" 1 ""
|
||||
"B_SLMNL_CHLR_DRZN" "Salmonella choleraesuis diarizonae" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "choleraesuis" "diarizonae" "subspecies" "Le Minor et al., 1985" "LPSN" "780750" "780746" "780757" "5427579" "7515106" "5427578" 1 ""
|
||||
"B_SLMNL_CHLR_HOTN" "Salmonella choleraesuis houtenae" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "choleraesuis" "houtenae" "subspecies" "Le Minor et al., 1985" "LPSN" "780751" "780746" "780759" "5427581" "7515106" "5427580" 1 ""
|
||||
"B_SLMNL_CHLR_INDC" "Salmonella choleraesuis indica" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "choleraesuis" "indica" "subspecies" "Le Minor et al., 1987" "LPSN" "780752" "780746" "780760" "5427583" "7515106" "5427582" 1 ""
|
||||
"B_SLMNL_CHLR_SALM" "Salmonella choleraesuis salamae" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "choleraesuis" "salamae" "subspecies" "Le Minor et al., 1985" "LPSN" "780753" "780746" "780761" "5427585" "7515106" "5427584" 1 ""
|
||||
"B_SLMNL_CHMD" "Salmonella Chomedey" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Chomedey" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_CHRS" "Salmonella Christiansborg" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Christiansborg" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_CLCK" "Salmonella Clackamas" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Clackamas" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
@@ -41552,7 +41542,6 @@
|
||||
"B_SLMNL_DESS" "Salmonella Dessau" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Dessau" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_DTML" "Salmonella Detmold" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Detmold" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_DVRS" "Salmonella Deversoir" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Deversoir" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_DRZN" "Salmonella diarizonae" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "diarizonae" "" "species" "GBIF" "10672082" "3221815" 1.5 ""
|
||||
"B_SLMNL_DIBR" "Salmonella Dibra" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Dibra" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_DTRC" "Salmonella Dietrichsdorf" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Dietrichsdorf" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_DPPL" "Salmonella Dieuppeul" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Dieuppeul" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
@@ -41614,15 +41603,6 @@
|
||||
"B_SLMNL_ENCN" "Salmonella Encino" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Encino" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_ENSC" "Salmonella Enschede" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Enschede" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_ENTB" "Salmonella Entebbe" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Entebbe" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_ENTR" "Salmonella enterica" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "" "species" "Le Minor et al., 1987" "LPSN" "784857" "516547" "9701185" "3221815" 1 "110378009,397502001,398428002,398508004,398371005,398620001,398488004"
|
||||
"B_SLMNL_ENTR_ARZN" "Salmonella enterica arizonae" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "arizonae" "subspecies" "Le Minor et al., 1987" "LPSN" "780755" "784857" "5427586" "9701185" 1 ""
|
||||
"B_SLMNL_ENTR_BNGR" "Salmonella enterica bongori" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "bongori" "subspecies" "Le Minor et al., 1987" "LPSN" "780756" "784857" "780745" "5427598" "9701185" "5427596" 1 ""
|
||||
"B_SLMNL_ENTR_DRZN" "Salmonella enterica diarizonae" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "diarizonae" "subspecies" "Le Minor et al., 1987" "LPSN" "780757" "784857" "5427578" "9701185" 1 ""
|
||||
"B_SLMNL_ENTR_ENTR" "Salmonella enterica enterica" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "enterica" "subspecies" "Le Minor et al., 1987" "LPSN" "780758" "784857" "5427589" "9701185" 1 ""
|
||||
"B_SLMNL_ENTR_HOTN" "Salmonella enterica houtenae" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "houtenae" "subspecies" "Le Minor et al., 1987" "LPSN" "780759" "784857" "5427580" "9701185" 1 ""
|
||||
"B_SLMNL_ENTR_INDC" "Salmonella enterica indica" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "indica" "subspecies" "Le Minor et al., 1987" "LPSN" "780760" "784857" "5427582" "9701185" 1 ""
|
||||
"B_SLMNL_ENTR_SALM" "Salmonella enterica salamae" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "salamae" "subspecies" "Le Minor et al., 1987" "LPSN" "780761" "784857" "5427584" "9701185" 1 ""
|
||||
"B_SLMNL_RTDS" "Salmonella enteritidis" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enteritidis" "" "species" "Castellani et al., 1919" "LPSN" "780762" "516547" "784857" "5427592" "3221815" "9701185" 1 ""
|
||||
"B_SLMNL_ENUG" "Salmonella Enugu" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Enugu" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_EPLN" "Salmonella Epalinges" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Epalinges" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_EPCR" "Salmonella Epicrates" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Epicrates" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
@@ -41741,9 +41721,10 @@
|
||||
"B_SLMNL_GRAZ" "Salmonella Graz" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Graz" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_GREZ" "Salmonella Greiz" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Greiz" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_GRNK" "Salmonella Groenekan" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Groenekan" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_GRPB" "Salmonella Group B" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "Group B" "" "species" "manually added" 1.5 ""
|
||||
"B_SLMNL_GRPC" "Salmonella Group C" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "Group C" "" "species" "manually added" 1.5 ""
|
||||
"B_SLMNL_GRPD" "Salmonella Group D" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "Group D" "" "species" "manually added" 1.5 ""
|
||||
"B_SLMNL_GRPA" "Salmonella Group A" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "Group A" "" "species" "manually added" "516547" "3221815" 1.5 ""
|
||||
"B_SLMNL_GRPB" "Salmonella Group B" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "Group B" "" "species" "manually added" "516547" "3221815" 1.5 ""
|
||||
"B_SLMNL_GRPC" "Salmonella Group C" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "Group C" "" "species" "manually added" "516547" "3221815" 1.5 ""
|
||||
"B_SLMNL_GRPD" "Salmonella Group D" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "Group D" "" "species" "manually added" "516547" "3221815" 1.5 ""
|
||||
"B_SLMNL_GNSS" "Salmonella Grumpensis" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Grumpensis" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_GRPR" "Salmonella Guarapiranga" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Guarapiranga" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_GURN" "Salmonella Guerin" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Guerin" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
@@ -41807,7 +41788,6 @@
|
||||
"B_SLMNL_HNGK" "Salmonella Hongkong" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Hongkong" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_HRSH" "Salmonella Horsham" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Horsham" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_HSTN" "Salmonella Houston" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Houston" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_HOTN" "Salmonella houtenae" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "houtenae" "" "species" "GBIF" "7617321" "3221815" 1.5 ""
|
||||
"B_SLMNL_HDDN" "Salmonella Huddinge" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Huddinge" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_HTTW" "Salmonella Huettwilen" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Huettwilen" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_HULL" "Salmonella Hull" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Hull" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
@@ -42277,13 +42257,12 @@
|
||||
"B_SLMNL_PKST" "Salmonella Pakistan" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Pakistan" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_PLMN" "Salmonella Palamaner" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Palamaner" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_PALM" "Salmonella Palime" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Palime" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_PANM" "Salmonella panama" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "panama" "" "species" "Kauffmann, 1934" "GBIF" "9407232" "3221815" 1.5 ""
|
||||
"B_SLMNL_PAPN" "Salmonella Papuana" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Papuana" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_PARK" "Salmonella Parakou" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Parakou" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_PRTY" "Salmonella paratyphi" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "paratyphi" "" "species" "Ezaki et al., 2000" "LPSN" "784858" "516547" "784857" "5427593" "3221815" "9701185" 1 "840687007"
|
||||
"B_SLMNL_PRTA" "Salmonella Paratyphi A" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "Paratyphi A" "" "species" "manually added" 1.5 ""
|
||||
"B_SLMNL_PRTB" "Salmonella Paratyphi B" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "Paratyphi B" "" "species" "manually added" 1.5 ""
|
||||
"B_SLMNL_PRTC" "Salmonella Paratyphi C" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "Paratyphi C" "" "species" "manually added" 1.5 ""
|
||||
"B_SLMNL_PRTY" "Salmonella Paratyphi" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Paratyphi" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_PRTA" "Salmonella Paratyphi A" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "Paratyphi A" "" "species" "manually added" "516547" "3221815" 1.5 ""
|
||||
"B_SLMNL_PRTB" "Salmonella Paratyphi B" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "Paratyphi B" "" "species" "manually added" "516547" "3221815" 1.5 ""
|
||||
"B_SLMNL_PRTC" "Salmonella Paratyphi C" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "Paratyphi C" "" "species" "manually added" "516547" "3221815" 1.5 ""
|
||||
"B_SLMNL_PARS" "Salmonella Paris" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Paris" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_PRKR" "Salmonella Parkroyal" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Parkroyal" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_PSNG" "Salmonella Pasing" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Pasing" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
@@ -42480,7 +42459,6 @@
|
||||
"B_SLMNL_STVN" "Salmonella Stuivenberg" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Stuivenberg" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_STTT" "Salmonella Stuttgart" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Stuttgart" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_SUBR" "Salmonella Suberu" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Suberu" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_SBTR" "Salmonella subterranea" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "subterranea" "" "species" "Shelobolina et al., 2005" "LPSN" "780769" "516547" "5427595" "3221815" 1.5 ""
|
||||
"B_SLMNL_SUDN" "Salmonella Sudan" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Sudan" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_SLLD" "Salmonella Suelldorf" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Suelldorf" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_SNDS" "Salmonella Sundsvall" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Sundsvall" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
@@ -42574,8 +42552,8 @@
|
||||
"B_SLMNL_TCSN" "Salmonella Tucson" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Tucson" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_TUDU" "Salmonella Tudu" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Tudu" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_TUMD" "Salmonella Tumodi" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Tumodi" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_TYPH" "Salmonella typhi" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "typhi" "" "species" "Warren et al., 1930" "LPSN" "784859" "516547" "784857" "5427594" "3221815" "9701185" 1 "712764007"
|
||||
"B_SLMNL_HMRM" "Salmonella typhimurium" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "typhimurium" "" "species" "Castellani et al., 1919" "LPSN" "780770" "516547" "784857" "5427591" "3221815" "9701185" 1 ""
|
||||
"B_SLMNL_TYPH" "Salmonella Typhi" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Typhi" "subspecies" "manually added" "784857" "9701185" 1 "840687007"
|
||||
"B_SLMNL_HMRM" "Salmonella Typhimurium" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Typhimurium" "subspecies" "manually added" "784857" "9701185" 1 "712764007"
|
||||
"B_SLMNL_THSS" "Salmonella Typhisuis" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Typhisuis" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_TYRS" "Salmonella Tyresoe" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Tyresoe" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_UCCL" "Salmonella Uccle" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Uccle" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
@@ -42718,6 +42696,29 @@
|
||||
"B_SLMNL_ZONG" "Salmonella Zongo" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Zongo" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_ZULN" "Salmonella Zuilen" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Zuilen" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_ZWCK" "Salmonella Zwickau" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "Zwickau" "subspecies" "manually added" "784857" "9701185" 1 ""
|
||||
"B_SLMNL_ARZN" "Salmonella arizonae" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "arizonae" "" "species" "Kauffmann, 1964" "LPSN" "780744" "516547" "780755" "5427588" "3221815" 1.5 ""
|
||||
"B_SLMNL_BNGR" "Salmonella bongori" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "bongori" "" "species" "Reeves et al., 1989" "LPSN" "780745" "516547" "5427596" "3221815" 1 "398393000"
|
||||
"B_SLMNL_CHLR" "Salmonella choleraesuis" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "choleraesuis" "" "species" "Weldin, 1927" "LPSN" "780746" "516547" "784857" "7515106" "3221815" "9701185" 1 ""
|
||||
"B_SLMNL_CHLR_ARZN" "Salmonella choleraesuis arizonae" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "choleraesuis" "arizonae" "subspecies" "Le Minor et al., 1985" "LPSN" "780747" "780746" "780755" "5427587" "7515106" "5427586" 1 ""
|
||||
"B_SLMNL_CHLR_BNGR" "Salmonella choleraesuis bongori" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "choleraesuis" "bongori" "subspecies" "Le Minor et al., 1985" "LPSN" "780748" "780746" "780745" "5427597" "7515106" "5427596" 1 ""
|
||||
"B_SLMNL_CHLR_CHLR" "Salmonella choleraesuis choleraesuis" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "choleraesuis" "choleraesuis" "subspecies" "Le Minor et al., 1985" "LPSN" "780749" "780746" "780758" "5427590" "7515106" "5427589" 1 ""
|
||||
"B_SLMNL_CHLR_DRZN" "Salmonella choleraesuis diarizonae" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "choleraesuis" "diarizonae" "subspecies" "Le Minor et al., 1985" "LPSN" "780750" "780746" "780757" "5427579" "7515106" "5427578" 1 ""
|
||||
"B_SLMNL_CHLR_HOTN" "Salmonella choleraesuis houtenae" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "choleraesuis" "houtenae" "subspecies" "Le Minor et al., 1985" "LPSN" "780751" "780746" "780759" "5427581" "7515106" "5427580" 1 ""
|
||||
"B_SLMNL_CHLR_INDC" "Salmonella choleraesuis indica" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "choleraesuis" "indica" "subspecies" "Le Minor et al., 1987" "LPSN" "780752" "780746" "780760" "5427583" "7515106" "5427582" 1 ""
|
||||
"B_SLMNL_CHLR_SALM" "Salmonella choleraesuis salamae" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "choleraesuis" "salamae" "subspecies" "Le Minor et al., 1985" "LPSN" "780753" "780746" "780761" "5427585" "7515106" "5427584" 1 ""
|
||||
"B_SLMNL_DRZN" "Salmonella diarizonae" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "diarizonae" "" "species" "GBIF" "516547" "10672082" "3221815" 1.5 ""
|
||||
"B_SLMNL_ENTR" "Salmonella enterica" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "" "species" "Le Minor et al., 1987" "LPSN" "784857" "516547" "9701185" "3221815" 1 "110378009,397502001,398428002,398508004,398371005,398620001,398488004"
|
||||
"B_SLMNL_ENTR_ARZN" "Salmonella enterica arizonae" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "arizonae" "subspecies" "Le Minor et al., 1987" "LPSN" "780755" "784857" "5427586" "9701185" 1 ""
|
||||
"B_SLMNL_ENTR_BNGR" "Salmonella enterica bongori" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "bongori" "subspecies" "Le Minor et al., 1987" "LPSN" "780756" "784857" "780745" "5427598" "9701185" "5427596" 1 ""
|
||||
"B_SLMNL_ENTR_DRZN" "Salmonella enterica diarizonae" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "diarizonae" "subspecies" "Le Minor et al., 1987" "LPSN" "780757" "784857" "5427578" "9701185" 1 ""
|
||||
"B_SLMNL_ENTR_ENTR" "Salmonella enterica enterica" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "enterica" "subspecies" "Le Minor et al., 1987" "LPSN" "780758" "784857" "5427589" "9701185" 1 ""
|
||||
"B_SLMNL_ENTR_HOTN" "Salmonella enterica houtenae" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "houtenae" "subspecies" "Le Minor et al., 1987" "LPSN" "780759" "784857" "5427580" "9701185" 1 ""
|
||||
"B_SLMNL_ENTR_INDC" "Salmonella enterica indica" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "indica" "subspecies" "Le Minor et al., 1987" "LPSN" "780760" "784857" "5427582" "9701185" 1 ""
|
||||
"B_SLMNL_ENTR_SALM" "Salmonella enterica salamae" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enterica" "salamae" "subspecies" "Le Minor et al., 1987" "LPSN" "780761" "784857" "5427584" "9701185" 1 ""
|
||||
"B_SLMNL_RTDS" "Salmonella enteritidis" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "enteritidis" "" "species" "Castellani et al., 1919" "LPSN" "780762" "516547" "784857" "5427592" "3221815" "9701185" 1 ""
|
||||
"B_SLMNL_HOTN" "Salmonella houtenae" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "houtenae" "" "species" "GBIF" "516547" "7617321" "3221815" 1.5 ""
|
||||
"B_SLMNL_PANM" "Salmonella panama" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "panama" "" "species" "Kauffmann, 1934" "GBIF" "516547" "9407232" "3221815" 1.5 ""
|
||||
"B_SLMNL_SBTR" "Salmonella subterranea" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Enterobacterales" "Enterobacteriaceae" "Salmonella" "subterranea" "" "species" "Shelobolina et al., 2005" "LPSN" "780769" "516547" "5427595" "3221815" 1.5 ""
|
||||
"B_SLSPL" "Salsipaludibacter" "accepted" "Bacteria" "Actinomycetota" "Nitriliruptoria" "Salsipaludibacterales" "Salsipaludibacteraceae" "Salsipaludibacter" "" "" "genus" "Almeida et al., 2022" "LPSN" "25963" "25953" 2 ""
|
||||
"B_SLSPL_ALBS" "Salsipaludibacter albus" "accepted" "Bacteria" "Actinomycetota" "Nitriliruptoria" "Salsipaludibacterales" "Salsipaludibacteraceae" "Salsipaludibacter" "albus" "" "species" "Almeida et al., 2022" "LPSN" "25977" "25963" 2 ""
|
||||
"B_[FAM]_SLSPLDBC" "Salsipaludibacteraceae" "accepted" "Bacteria" "Actinomycetota" "Nitriliruptoria" "Salsipaludibacterales" "Salsipaludibacteraceae" "" "" "" "family" "Almeida et al., 2022" "LPSN" "25953" "25966" 2 ""
|
||||
@@ -45278,7 +45279,7 @@
|
||||
"B_STNTR_INDC" "Stenotrophomonas indicatrix" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Lysobacterales" "Lysobacteraceae" "Stenotrophomonas" "indicatrix" "" "species" "Weber et al., 2018" "LPSN" "797782" "516670" "10701219" 1.5 ""
|
||||
"B_STNTR_KRNS" "Stenotrophomonas koreensis" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Lysobacterales" "Lysobacteraceae" "Stenotrophomonas" "koreensis" "" "species" "Yang et al., 2006" "LPSN" "781248" "516670" "3222376" 1.5 ""
|
||||
"B_STNTR_LCTT" "Stenotrophomonas lactitubi" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Lysobacterales" "Lysobacteraceae" "Stenotrophomonas" "lactitubi" "" "species" "Weber et al., 2018" "LPSN" "797783" "516670" "10788780" 1.5 ""
|
||||
"B_STNTR_MLTP" "Stenotrophomonas maltophilia" "synonym" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Lysobacterales" "Lysobacteraceae" "Stenotrophomonas" "maltophilia" "" "species" "Palleroni et al., 1993" "LPSN" "781249" "516670" "783141" "10912104" 1 "113697002"
|
||||
"B_STNTR_MLTP" "Stenotrophomonas maltophilia" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Lysobacterales" "Lysobacteraceae" "Stenotrophomonas" "maltophilia" "" "species" "Palleroni et al., 1993" "LPSN" "781249" "516670" "10912104" 1 "113697002"
|
||||
"B_STNTR_NTRT" "Stenotrophomonas nitritireducens" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Lysobacterales" "Lysobacteraceae" "Stenotrophomonas" "nitritireducens" "" "species" "Finkmann et al., 2000" "LPSN" "781250" "516670" "3222370" 1.5 "416746005"
|
||||
"B_STNTR_PNCH" "Stenotrophomonas panacihumi" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Lysobacterales" "Lysobacteraceae" "Stenotrophomonas" "panacihumi" "" "species" "Yi et al., 2010" "GBIF" "11141735" 1.5 ""
|
||||
"B_STNTR_PAVN" "Stenotrophomonas pavanii" "accepted" "Bacteria" "Pseudomonadota" "Gammaproteobacteria" "Lysobacterales" "Lysobacteraceae" "Stenotrophomonas" "pavanii" "" "species" "Ramos et al., 2011" "LPSN" "789171" "516670" "8102737" 1.5 "704977000"
|
||||
@@ -45427,6 +45428,15 @@
|
||||
"B_STRPTB_RATT" "Streptobacillus ratti" "accepted" "Bacteria" "Fusobacteriota" "Fusobacteriia" "Fusobacteriales" "Leptotrichiaceae" "Streptobacillus" "ratti" "" "species" "Eisenberg et al., 2016" "LPSN" "794063" "516688" "9144099" "3225903" 1.5 ""
|
||||
"B_[FAM]_STRPTCCC" "Streptococcaceae" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "" "" "" "family" "Deibel et al., 1974" "LPSN" "1344" "5123" "4899829" "577" "7798" 2 "115107007"
|
||||
"B_STRPT" "Streptococcus" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "" "" "genus" "Rosenbach, 1884" "LPSN" "517118" "1344" "3223465" "4899829" 1 "58800005,414871004,70160008"
|
||||
"B_STRPT_GRPA" "Streptococcus Group A" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "Group A" "" "species" "Lancefield, 1933" "manually added" 1.5 ""
|
||||
"B_STRPT_GRPB" "Streptococcus Group B" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "Group B" "" "species" "Lancefield, 1933" "manually added" 1.5 ""
|
||||
"B_STRPT_GRPC" "Streptococcus Group C" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "Group C" "" "species" "Lancefield, 1933" "manually added" 1.5 ""
|
||||
"B_STRPT_GRPD" "Streptococcus Group D" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "Group D" "" "species" "Lancefield, 1933" "manually added" 1.5 ""
|
||||
"B_STRPT_GRPF" "Streptococcus Group F" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "Group F" "" "species" "Lancefield, 1933" "manually added" 1.5 ""
|
||||
"B_STRPT_GRPG" "Streptococcus Group G" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "Group G" "" "species" "Lancefield, 1933" "manually added" 1.5 ""
|
||||
"B_STRPT_GRPH" "Streptococcus Group H" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "Group H" "" "species" "Lancefield, 1933" "manually added" 1.5 ""
|
||||
"B_STRPT_GRPK" "Streptococcus Group K" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "Group K" "" "species" "Lancefield, 1933" "manually added" 1.5 ""
|
||||
"B_STRPT_GRPL" "Streptococcus Group L" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "Group L" "" "species" "Lancefield, 1933" "manually added" 1.5 ""
|
||||
"B_STRPT_ACDM" "Streptococcus acidominimus" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "acidominimus" "" "species" "Ayers et al., 1922" "LPSN" "781295" "517118" 1 "51182006"
|
||||
"B_STRPT_ADJC" "Streptococcus adjacens" "synonym" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "adjacens" "" "species" "Bouvet et al., 1989" "LPSN" "781296" "517118" "776611" 1.5 ""
|
||||
"B_STRPT_AGLC" "Streptococcus agalactiae" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "agalactiae" "" "species" "Lehmann et al., 1896" "LPSN" "781297" "517118" 1 "713924007,43492007"
|
||||
@@ -45496,15 +45506,6 @@
|
||||
"B_STRPT_GLLL_PSTR" "Streptococcus gallolyticus pasteurianus" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "gallolyticus" "pasteurianus" "subspecies" "Beck et al., 2008" "LPSN" "781340" "781337" "3227070" 1.25 ""
|
||||
"B_STRPT_GARV" "Streptococcus garvieae" "synonym" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "garvieae" "" "species" "Collins et al., 1984" "LPSN" "781341" "517118" "777418" 1 ""
|
||||
"B_STRPT_GRDN" "Streptococcus gordonii" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "gordonii" "" "species" "Kilian et al., 1989" "LPSN" "781342" "517118" 1 "113986004"
|
||||
"B_STRPT_GRPA" "Streptococcus Group A" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "Group A" "" "species" "Lancefield, 1933" "manually added" 1.5 ""
|
||||
"B_STRPT_GRPB" "Streptococcus Group B" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "Group B" "" "species" "Lancefield, 1933" "manually added" 1.5 ""
|
||||
"B_STRPT_GRPC" "Streptococcus Group C" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "Group C" "" "species" "Lancefield, 1933" "manually added" 1.5 ""
|
||||
"B_STRPT_GRPD" "Streptococcus Group D" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "Group D" "" "species" "Lancefield, 1933" "manually added" 1.5 ""
|
||||
"B_STRPT_GRPF" "Streptococcus Group F" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "Group F" "" "species" "Lancefield, 1933" "manually added" 1.5 ""
|
||||
"B_STRPT_GRPG" "Streptococcus Group G" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "Group G" "" "species" "Lancefield, 1933" "manually added" 1.5 ""
|
||||
"B_STRPT_GRPH" "Streptococcus Group H" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "Group H" "" "species" "Lancefield, 1933" "manually added" 1.5 ""
|
||||
"B_STRPT_GRPK" "Streptococcus Group K" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "Group K" "" "species" "Lancefield, 1933" "manually added" 1.5 ""
|
||||
"B_STRPT_GRPL" "Streptococcus Group L" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "Group L" "" "species" "Lancefield, 1933" "manually added" 1.5 ""
|
||||
"B_STRPT_GWNG" "Streptococcus gwangjuense" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "gwangjuense" "" "species" "GBIF" "11190550" "3223465" 1.5 ""
|
||||
"B_STRPT_HLCH" "Streptococcus halichoeri" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "halichoeri" "" "species" "Shewmaker et al., 2016" "LPSN" "781344" "517118" 1.25 "438161002"
|
||||
"B_STRPT_HLTS" "Streptococcus halitosis" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "halitosis" "" "species" "GBIF" "10822581" "3223465" 1.5 ""
|
||||
@@ -45554,7 +45555,7 @@
|
||||
"B_STRPT_ORLX" "Streptococcus oriloxodontae" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "oriloxodontae" "" "species" "Shinozaki-Kuwahara et al., 2014" "LPSN" "792340" "517118" 1.5 ""
|
||||
"B_STRPT_ORSS" "Streptococcus orisasini" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "orisasini" "" "species" "Takada et al., 2013" "LPSN" "790987" "517118" 1.5 ""
|
||||
"B_STRPT_ORSR" "Streptococcus orisratti" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "orisratti" "" "species" "Zhu et al., 2000" "LPSN" "781365" "517118" 1.5 "438034004"
|
||||
"B_STRPT_sirS" "Streptococcus orisuis" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "orisuis" "" "species" "Takada et al., 2007" "LPSN" "781314" "517118" 1.5 "6441000146108"
|
||||
"B_STRPT_RSIS" "Streptococcus orisuis" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "orisuis" "" "species" "Takada et al., 2007" "LPSN" "781314" "517118" 1.5 "6441000146108"
|
||||
"B_STRPT_OVIS" "Streptococcus ovis" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "ovis" "" "species" "Collins et al., 2001" "LPSN" "781366" "517118" 1.5 "438035003"
|
||||
"B_STRPT_OVBR" "Streptococcus ovuberis" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "ovuberis" "" "species" "Zamora et al., 2017" "LPSN" "796216" "517118" 1.5 ""
|
||||
"B_STRPT_PCFC" "Streptococcus pacificus" "accepted" "Bacteria" "Bacillota" "Bacilli" "Lactobacillales" "Streptococcaceae" "Streptococcus" "pacificus" "" "species" "Volokhov et al., 2021" "LPSN" "19573" "517118" 1.5 ""
|
||||
@@ -51721,6 +51722,7 @@
|
||||
"A_WKNGR_YPNS" "Wukongarchaeum yapensis" "accepted" "Archaea" "Asgardarchaeota" "Wukongarchaeia" "Wukongarchaeales" "Wukongarchaeaceae" "Wukongarchaeum" "yapensis" "" "species" "GBIF" "11649514" "11817462" 2 ""
|
||||
"B_WKNGB" "Wukongibacter" "accepted" "Bacteria" "Bacillota" "Clostridia" "Eubacteriales" "Peptostreptococcaceae" "Wukongibacter" "" "" "genus" "Li et al., 2016" "LPSN" "519079" "1053" "9506110" "7800" 2 ""
|
||||
"B_WKNGB_BDNS" "Wukongibacter baidiensis" "accepted" "Bacteria" "Bacillota" "Clostridia" "Eubacteriales" "Peptostreptococcaceae" "Wukongibacter" "baidiensis" "" "species" "Li et al., 2016" "LPSN" "794822" "519079" "9479445" "9506110" 2 ""
|
||||
"B_XYC" "XYC" "accepted" "Bacteria" "Nitrospirota" "Thermodesulfovibrionia" "Thermodesulfovibrionales" "Magnetobacteriaceae" "XYC" "" "" "genus" "GBIF" "11695901" "10718264" 2 ""
|
||||
"P_XNTHS" "Xanthiosphaera" "accepted" "Protozoa" "Sarcomastigophora" "" "" "" "Xanthiosphaera" "" "" "genus" "GBIF" "9472186" 2 ""
|
||||
"P_XNTHS_LPPC" "Xanthiosphaera lappacea" "accepted" "Protozoa" "Sarcomastigophora" "" "" "" "Xanthiosphaera" "lappacea" "" "species" "Haeckel" "GBIF" "6123506" "9472186" 2 ""
|
||||
"B_XNTHB" "Xanthobacter" "accepted" "Bacteria" "Pseudomonadota" "Alphaproteobacteria" "Hyphomicrobiales" "Xanthobacteraceae" "Xanthobacter" "" "" "genus" "Wiegel et al., 1978" "LPSN" "516929" "1568" 2 "439120008"
|
||||
@@ -51890,7 +51892,6 @@
|
||||
"B_[FAM]_XPHNMTBC" "Xiphinematobacteraceae" "accepted" "Bacteria" "Verrucomicrobiota" "Verrucomicrobiae" "Chthoniobacterales" "Xiphinematobacteraceae" "" "" "" "family" "GBIF" "10770063" "10733345" 2 ""
|
||||
"B_XUHSH" "Xuhuaishuia" "synonym" "Bacteria" "Pseudomonadota" "Alphaproteobacteria" "Rhodobacterales" "Rhodobacteraceae" "Xuhuaishuia" "" "" "genus" "Wang et al., 2016" "LPSN" "518921" "1175" "518801" 2 ""
|
||||
"B_XUHSH_MNGN" "Xuhuaishuia manganoxidans" "synonym" "Bacteria" "Pseudomonadota" "Alphaproteobacteria" "Rhodobacterales" "Rhodobacteraceae" "Xuhuaishuia" "manganoxidans" "" "species" "Wang et al., 2016" "LPSN" "793971" "518921" "793304" 2 ""
|
||||
"B_XYC" "XYC" "accepted" "Bacteria" "Nitrospirota" "Thermodesulfovibrionia" "Thermodesulfovibrionales" "Magnetobacteriaceae" "XYC" "" "" "genus" "GBIF" "11695901" "10718264" 2 ""
|
||||
"B_XYLNB" "Xylanibacillus" "accepted" "Bacteria" "Bacillota" "Bacilli" "Caryophanales" "Paenibacillaceae" "Xylanibacillus" "" "" "genus" "Kukolya et al., 2018" "LPSN" "520351" "1013" 2 ""
|
||||
"B_XYLNB_CMPS" "Xylanibacillus composti" "accepted" "Bacteria" "Bacillota" "Bacilli" "Caryophanales" "Paenibacillaceae" "Xylanibacillus" "composti" "" "species" "Kukolya et al., 2018" "LPSN" "797542" "520351" 2 ""
|
||||
"B_XBCTR" "Xylanibacter" "synonym" "Bacteria" "Bacteroidota" "Bacteroidia" "Bacteroidales" "Prevotellaceae" "Xylanibacter" "" "" "genus" "Hitch et al., 2022" "LPSN" "516940" "1105" "516385" 2 ""
|
||||
|
||||
Binary file not shown.
@@ -32,11 +32,11 @@
|
||||
# Source file: data-raw/reproduction_of_poorman.R
|
||||
# ------------------------------------------------
|
||||
|
||||
# poorman: a package to replace all dplyr functions with base R so we can lose dependency on dplyr.
|
||||
# {poorman}: a package to replace all dplyr functions with base R so we can lose dependency on {dplyr}.
|
||||
# These functions were downloaded from https://github.com/nathaneastwood/poorman,
|
||||
# from this commit: https://github.com/nathaneastwood/poorman/tree/{commit}.
|
||||
#
|
||||
# All functions are prefixed with 'pm_' to make it obvious that they are dplyr substitutes.
|
||||
# All functions are prefixed with 'pm_' to make it obvious that they are {dplyr} substitutes.
|
||||
#
|
||||
# All code below was released under MIT license, that permits 'free of charge, to any person obtaining a
|
||||
# copy of the software and associated documentation files (the "Software"), to deal in the Software
|
||||
|
||||
+26
-23
@@ -66,33 +66,36 @@ read_EUCAST <- function(sheet, file, guideline_name) {
|
||||
|
||||
# in the info header in the Excel file, EUCAST mentions which genera are targeted
|
||||
if (sheet %like% "anaerob.*Gram.*posi") {
|
||||
sheet <- paste0(c(
|
||||
"Actinomyces", "Bifidobacterium", "Clostridioides",
|
||||
"Clostridium", "Cutibacterium", "Eggerthella",
|
||||
"Eubacterium", "Lactobacillus", "Propionibacterium",
|
||||
"Staphylococcus saccharolyticus"
|
||||
),
|
||||
collapse = "_"
|
||||
sheet <- paste0(
|
||||
c(
|
||||
"Actinomyces", "Bifidobacterium", "Clostridioides",
|
||||
"Clostridium", "Cutibacterium", "Eggerthella",
|
||||
"Eubacterium", "Lactobacillus", "Propionibacterium",
|
||||
"Staphylococcus saccharolyticus"
|
||||
),
|
||||
collapse = "_"
|
||||
)
|
||||
} else if (sheet %like% "anaerob.*Gram.*nega") {
|
||||
sheet <- paste0(c(
|
||||
"Bacteroides",
|
||||
"Bilophila",
|
||||
"Fusobacterium",
|
||||
"Mobiluncus",
|
||||
"Parabacteroides",
|
||||
"Porphyromonas",
|
||||
"Prevotella"
|
||||
),
|
||||
collapse = "_"
|
||||
sheet <- paste0(
|
||||
c(
|
||||
"Bacteroides",
|
||||
"Bilophila",
|
||||
"Fusobacterium",
|
||||
"Mobiluncus",
|
||||
"Parabacteroides",
|
||||
"Porphyromonas",
|
||||
"Prevotella"
|
||||
),
|
||||
collapse = "_"
|
||||
)
|
||||
} else if (sheet == "Streptococcus A,B,C,G") {
|
||||
sheet <- paste0(microorganisms %>%
|
||||
filter(genus == "Streptococcus") %>%
|
||||
mutate(lancefield = mo_name(mo, Lancefield = TRUE)) %>%
|
||||
filter(lancefield %like% "^Streptococcus group") %>%
|
||||
pull(fullname),
|
||||
collapse = "_"
|
||||
sheet <- paste0(
|
||||
microorganisms %>%
|
||||
filter(genus == "Streptococcus") %>%
|
||||
mutate(lancefield = mo_name(mo, Lancefield = TRUE)) %>%
|
||||
filter(lancefield %like% "^Streptococcus group") %>%
|
||||
pull(fullname),
|
||||
collapse = "_"
|
||||
)
|
||||
} else if (sheet %like% "PK.*PD") {
|
||||
sheet <- "UNKNOWN"
|
||||
|
||||
@@ -142,14 +142,15 @@ abx2 <- bind_rows(abx_atc1, abx_atc2)
|
||||
rm(abx_atc1)
|
||||
rm(abx_atc2)
|
||||
|
||||
abx2$ab[is.na(abx2$ab)] <- toupper(abbreviate(gsub(
|
||||
"[/0-9-]",
|
||||
" ",
|
||||
abx2$name[is.na(abx2$ab)]
|
||||
),
|
||||
minlength = 3,
|
||||
method = "left.kept",
|
||||
strict = TRUE
|
||||
abx2$ab[is.na(abx2$ab)] <- toupper(abbreviate(
|
||||
gsub(
|
||||
"[/0-9-]",
|
||||
" ",
|
||||
abx2$name[is.na(abx2$ab)]
|
||||
),
|
||||
minlength = 3,
|
||||
method = "left.kept",
|
||||
strict = TRUE
|
||||
))
|
||||
|
||||
n_distinct(abx2$ab)
|
||||
@@ -187,7 +188,7 @@ abx2 <- abx2 %>%
|
||||
|
||||
abx2$abbr <- lapply(as.list(abx2$abbr), function(x) unlist(strsplit(x, "|", fixed = TRUE)))
|
||||
|
||||
# Update Compound IDs and Trade Names ----
|
||||
# Update Compound IDs and Synonyms ----
|
||||
|
||||
# vector with official names, returns vector with CIDs
|
||||
get_CID <- function(ab) {
|
||||
@@ -197,24 +198,26 @@ get_CID <- function(ab) {
|
||||
p$tick()
|
||||
|
||||
CID[i] <- tryCatch(
|
||||
data.table::fread(paste0(
|
||||
"https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/",
|
||||
URLencode(ab[i], reserved = TRUE),
|
||||
"/cids/TXT?name_type=complete"
|
||||
),
|
||||
showProgress = FALSE
|
||||
data.table::fread(
|
||||
paste0(
|
||||
"https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/",
|
||||
URLencode(ab[i], reserved = TRUE),
|
||||
"/cids/TXT?name_type=complete"
|
||||
),
|
||||
showProgress = FALSE
|
||||
)[[1]][1],
|
||||
error = function(e) NA_integer_
|
||||
)
|
||||
if (is.na(CID[i])) {
|
||||
# try with removing the text in brackets
|
||||
CID[i] <- tryCatch(
|
||||
data.table::fread(paste0(
|
||||
"https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/",
|
||||
URLencode(trimws(gsub("[(].*[)]", "", ab[i])), reserved = TRUE),
|
||||
"/cids/TXT?name_type=complete"
|
||||
),
|
||||
showProgress = FALSE
|
||||
data.table::fread(
|
||||
paste0(
|
||||
"https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/",
|
||||
URLencode(trimws(gsub("[(].*[)]", "", ab[i])), reserved = TRUE),
|
||||
"/cids/TXT?name_type=complete"
|
||||
),
|
||||
showProgress = FALSE
|
||||
)[[1]][1],
|
||||
error = function(e) NA_integer_
|
||||
)
|
||||
@@ -223,12 +226,13 @@ get_CID <- function(ab) {
|
||||
# try match on word and take the lowest CID value (sorted)
|
||||
ab[i] <- gsub("[^a-z0-9]+", " ", ab[i], ignore.case = TRUE)
|
||||
CID[i] <- tryCatch(
|
||||
data.table::fread(paste0(
|
||||
"https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/",
|
||||
URLencode(ab[i], reserved = TRUE),
|
||||
"/cids/TXT?name_type=word"
|
||||
),
|
||||
showProgress = FALSE
|
||||
data.table::fread(
|
||||
paste0(
|
||||
"https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/",
|
||||
URLencode(ab[i], reserved = TRUE),
|
||||
"/cids/TXT?name_type=word"
|
||||
),
|
||||
showProgress = FALSE
|
||||
)[[1]][1],
|
||||
error = function(e) NA_integer_
|
||||
)
|
||||
@@ -260,13 +264,14 @@ get_synonyms <- function(CID, clean = TRUE) {
|
||||
}
|
||||
|
||||
synonyms_txt <- tryCatch(
|
||||
data.table::fread(paste0(
|
||||
"https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/fastidentity/cid/",
|
||||
CID[i],
|
||||
"/synonyms/TXT"
|
||||
),
|
||||
sep = "\n",
|
||||
showProgress = FALSE
|
||||
data.table::fread(
|
||||
paste0(
|
||||
"https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/fastidentity/cid/",
|
||||
CID[i],
|
||||
"/synonyms/TXT"
|
||||
),
|
||||
sep = "\n",
|
||||
showProgress = FALSE
|
||||
)[[1]],
|
||||
error = function(e) NA_character_
|
||||
)
|
||||
@@ -302,6 +307,7 @@ get_synonyms <- function(CID, clean = TRUE) {
|
||||
# get brand names from PubChem (3-4 min)
|
||||
synonyms <- get_synonyms(CIDs)
|
||||
synonyms.bak <- synonyms
|
||||
|
||||
# add existing ones (will be cleaned later)
|
||||
for (i in seq_len(length(synonyms))) {
|
||||
old <- antibiotics$synonyms[[i]]
|
||||
@@ -313,6 +319,13 @@ for (i in seq_len(length(synonyms))) {
|
||||
|
||||
antibiotics$synonyms <- synonyms
|
||||
|
||||
stop("remember to remove co-trimoxazole as synonyms from SXT (Sulfamethoxazole), so it only exists in SXT!")
|
||||
sulfa <- antibiotics[which(antibiotics$ab == "SMX"), "synonyms", drop = TRUE][[1]]
|
||||
cotrim <- antibiotics[which(antibiotics$ab == "SXT"), "synonyms", drop = TRUE][[1]]
|
||||
sulfa <- sulfa[!sulfa %in% cotrim]
|
||||
antibiotics[which(antibiotics$ab == "SMX"), "synonyms"][[1]][[1]] <- sulfa
|
||||
|
||||
|
||||
# now go to end of this file
|
||||
|
||||
|
||||
|
||||
@@ -106,31 +106,32 @@ antivirals <- antivirals %>%
|
||||
oral_units,
|
||||
iv_ddd,
|
||||
iv_units
|
||||
) %>%
|
||||
) %>%
|
||||
AMR:::dataset_UTF8_to_ASCII()
|
||||
|
||||
av_codes <- tibble(name = antivirals$name %>%
|
||||
strsplit("(, | and )") %>%
|
||||
unlist() %>%
|
||||
unique() %>%
|
||||
sort()) %>%
|
||||
mutate(av_1st = toupper(abbreviate(name, minlength = 3, use.classes = FALSE))) %>%
|
||||
strsplit("(, | and )") %>%
|
||||
unlist() %>%
|
||||
unique() %>%
|
||||
sort()) %>%
|
||||
mutate(av_1st = toupper(abbreviate(name, minlength = 3, use.classes = FALSE))) %>%
|
||||
filter(!name %in% c("acid", "dipivoxil", "disoproxil", "marboxil", "alafenamide"))
|
||||
|
||||
replace_with_av_code <- function(name) {
|
||||
unname(av_codes$av_1st[match(name, av_codes$name)])
|
||||
}
|
||||
|
||||
names_codes <- antivirals %>%
|
||||
names_codes <- antivirals %>%
|
||||
separate(name,
|
||||
into = paste0("name", c(1:7)),
|
||||
sep = "(, | and )",
|
||||
remove = FALSE,
|
||||
fill = "right") %>%
|
||||
into = paste0("name", c(1:7)),
|
||||
sep = "(, | and )",
|
||||
remove = FALSE,
|
||||
fill = "right"
|
||||
) %>%
|
||||
# remove empty columns
|
||||
select(!where(function(x) all(is.na(x)))) %>%
|
||||
mutate_at(vars(matches("name[1-9]")), replace_with_av_code) %>%
|
||||
unite(av, matches("name[1-9]"), sep = "+", na.rm = TRUE) %>%
|
||||
select(!where(function(x) all(is.na(x)))) %>%
|
||||
mutate_at(vars(matches("name[1-9]")), replace_with_av_code) %>%
|
||||
unite(av, matches("name[1-9]"), sep = "+", na.rm = TRUE) %>%
|
||||
mutate(name = gsub("(, | and )", "/", name))
|
||||
substr(names_codes$name, 1, 1) <- toupper(substr(names_codes$name, 1, 1))
|
||||
|
||||
@@ -143,8 +144,9 @@ antivirals <- antivirals %>% AMR:::dataset_UTF8_to_ASCII()
|
||||
|
||||
# add loinc, see 'data-raw/loinc.R'
|
||||
loinc_df <- read.csv("data-raw/Loinc.csv",
|
||||
row.names = NULL,
|
||||
stringsAsFactors = FALSE)
|
||||
row.names = NULL,
|
||||
stringsAsFactors = FALSE
|
||||
)
|
||||
|
||||
loinc_df <- loinc_df %>% filter(CLASS == "DRUG/TOX")
|
||||
av_names <- antivirals %>%
|
||||
|
||||
@@ -95,8 +95,8 @@ new_mo_codes <- breakpoints %>%
|
||||
new_mo_codes %>%
|
||||
mutate(code = toupper(ORGANISM_CODE)) %>%
|
||||
rename(mo_new = mo) %>%
|
||||
left_join(microorganisms.codes) %>%
|
||||
filter(mo != mo_new)
|
||||
left_join(microorganisms.codes %>% rename(mo_old = mo)) %>%
|
||||
filter(mo_old != mo_new)
|
||||
|
||||
microorganisms.codes <- microorganisms.codes %>%
|
||||
filter(!code %in% toupper(new_mo_codes$ORGANISM_CODE)) %>%
|
||||
|
||||
@@ -173,7 +173,7 @@ dosage_new <- bind_rows(
|
||||
as.data.frame(stringsAsFactors = FALSE)
|
||||
rownames(dosage_new) <- NULL
|
||||
|
||||
dosage <- bind_rows(dosage_new, AMR::dosage) %>%
|
||||
dosage <- bind_rows(dosage_new, AMR::dosage) %>%
|
||||
dataset_UTF8_to_ASCII()
|
||||
|
||||
usethis::use_data(dosage, internal = FALSE, overwrite = TRUE, version = 2)
|
||||
|
||||
@@ -37,10 +37,10 @@
|
||||
# CSV file (~12,5 MB) as "taxonomy.csv". Their API unfortunately does
|
||||
# not include the full taxonomy and is currently (2022) pretty worthless.
|
||||
# 3. For data about human pathogens, we use Bartlett et al. (2022),
|
||||
# https://doi.org/10.1099/mic.0.001269. Their latest supplementary material
|
||||
# https://doi.org/10.1099/mic.0.001269. Their latest supplementary material
|
||||
# can be found here: https://github.com/padpadpadpad/bartlett_et_al_2022_human_pathogens.
|
||||
#. Download their latest xlsx file in the `data` folder and save it to our
|
||||
#. `data-raw` folder.
|
||||
# . Download their latest xlsx file in the `data` folder and save it to our
|
||||
# . `data-raw` folder.
|
||||
# 4. Set this folder_location to the path where these two files are:
|
||||
folder_location <- "~/Downloads/backbone/"
|
||||
file_gbif <- paste0(folder_location, "Taxon.tsv")
|
||||
@@ -65,7 +65,7 @@ devtools::load_all(".") # load AMR package
|
||||
|
||||
get_author_year <- function(ref) {
|
||||
# Only keep first author, e.g. transform 'Smith, Jones, 2011' to 'Smith et al., 2011'
|
||||
|
||||
|
||||
authors2 <- iconv(ref, from = "UTF-8", to = "ASCII//TRANSLIT")
|
||||
authors2 <- gsub(" ?\\(Approved Lists [0-9]+\\) ?", " () ", authors2)
|
||||
authors2 <- gsub(" [)(]+ $", "", authors2)
|
||||
@@ -73,21 +73,21 @@ get_author_year <- function(ref) {
|
||||
authors2 <- trimws(gsub("^[(](.*)[)]$", "\\1", authors2))
|
||||
# only take part after brackets if there's a name
|
||||
authors2 <- ifelse(grepl(".*[)] [a-zA-Z]+.*", authors2),
|
||||
gsub(".*[)] (.*)", "\\1", authors2),
|
||||
authors2
|
||||
gsub(".*[)] (.*)", "\\1", authors2),
|
||||
authors2
|
||||
)
|
||||
# replace parentheses with emend. to get the latest authors
|
||||
authors2 <- gsub("(", " emend. ", authors2, fixed = TRUE)
|
||||
authors2 <- gsub(")", "", authors2, fixed = TRUE)
|
||||
authors2 <- gsub(" +", " ", authors2)
|
||||
authors2 <- trimws(authors2)
|
||||
|
||||
|
||||
# get year from last 4 digits
|
||||
lastyear <- as.integer(gsub(".*([0-9]{4})$", "\\1", authors2))
|
||||
# can never be later than now
|
||||
lastyear <- ifelse(lastyear > as.integer(format(Sys.Date(), "%Y")),
|
||||
NA,
|
||||
lastyear
|
||||
NA,
|
||||
lastyear
|
||||
)
|
||||
# get authors without last year
|
||||
authors <- gsub("(.*)[0-9]{4}$", "\\1", authors2)
|
||||
@@ -119,8 +119,8 @@ get_author_year <- function(ref) {
|
||||
authors[nchar(authors) <= 3] <- ""
|
||||
# combine author and year if year is available
|
||||
ref <- ifelse(!is.na(lastyear),
|
||||
paste0(authors, ", ", lastyear),
|
||||
authors
|
||||
paste0(authors, ", ", lastyear),
|
||||
authors
|
||||
)
|
||||
# fix beginning and ending
|
||||
ref <- gsub(", $", "", ref)
|
||||
@@ -128,7 +128,7 @@ get_author_year <- function(ref) {
|
||||
ref <- gsub("^(emend|et al.,?)", "", ref)
|
||||
ref <- trimws(ref)
|
||||
ref <- gsub("'", "", ref)
|
||||
|
||||
|
||||
# a lot start with a lowercase character - fix that
|
||||
ref[!grepl("^d[A-Z]", ref)] <- gsub("^([a-z])", "\\U\\1", ref[!grepl("^d[A-Z]", ref)], perl = TRUE)
|
||||
# specific one for the French that are named dOrbigny
|
||||
@@ -222,9 +222,9 @@ include_fungal_orders <- c(
|
||||
# get latest taxonomic names of these fungal orders
|
||||
include_fungal_orders_ids <- taxonomy_gbif.bak %>%
|
||||
filter(order %in% include_fungal_orders)
|
||||
include_fungal_orders <- taxonomy_gbif.bak %>%
|
||||
filter(taxonID %in% c(include_fungal_orders_ids$taxonID, include_fungal_orders_ids$acceptedNameUsageID)) %>%
|
||||
distinct(order) %>%
|
||||
include_fungal_orders <- taxonomy_gbif.bak %>%
|
||||
filter(taxonID %in% c(include_fungal_orders_ids$taxonID, include_fungal_orders_ids$acceptedNameUsageID)) %>%
|
||||
distinct(order) %>%
|
||||
pull(order)
|
||||
|
||||
# check some columns to validate below filters
|
||||
@@ -361,7 +361,7 @@ for (page in LETTERS) {
|
||||
names <- names[ranks != "species"]
|
||||
ranks <- ranks[ranks != "species"]
|
||||
ranks[ranks == "domain"] <- "kingdom"
|
||||
|
||||
|
||||
df <- names %>%
|
||||
tibble() %>%
|
||||
t() %>%
|
||||
@@ -369,7 +369,7 @@ for (page in LETTERS) {
|
||||
setNames(ranks) %>%
|
||||
# no candidates please
|
||||
filter(genus %unlike% "^(Candidatus|\\[)")
|
||||
|
||||
|
||||
taxonomy_lpsn_missing <- taxonomy_lpsn_missing %>%
|
||||
bind_rows(df)
|
||||
}
|
||||
@@ -491,14 +491,14 @@ saveRDS(taxonomy_lpsn, "data-raw/taxonomy_lpsn.rds", version = 2)
|
||||
taxonomy_gbif <- taxonomy_gbif %>%
|
||||
# clean NAs and add fullname
|
||||
mutate(across(kingdom:subspecies, function(x) ifelse(is.na(x), "", x)),
|
||||
fullname = trimws(case_when(
|
||||
rank == "family" ~ family,
|
||||
rank == "order" ~ order,
|
||||
rank == "class" ~ class,
|
||||
rank == "phylum" ~ phylum,
|
||||
rank == "kingdom" ~ kingdom,
|
||||
TRUE ~ paste(genus, species, subspecies)
|
||||
)), .before = 1
|
||||
fullname = trimws(case_when(
|
||||
rank == "family" ~ family,
|
||||
rank == "order" ~ order,
|
||||
rank == "class" ~ class,
|
||||
rank == "phylum" ~ phylum,
|
||||
rank == "kingdom" ~ kingdom,
|
||||
TRUE ~ paste(genus, species, subspecies)
|
||||
)), .before = 1
|
||||
) %>%
|
||||
# keep only one GBIF taxon ID per full name
|
||||
arrange(fullname, gbif) %>%
|
||||
@@ -507,14 +507,14 @@ taxonomy_gbif <- taxonomy_gbif %>%
|
||||
taxonomy_lpsn <- taxonomy_lpsn %>%
|
||||
# clean NAs and add fullname
|
||||
mutate(across(kingdom:subspecies, function(x) ifelse(is.na(x), "", x)),
|
||||
fullname = trimws(case_when(
|
||||
rank == "family" ~ family,
|
||||
rank == "order" ~ order,
|
||||
rank == "class" ~ class,
|
||||
rank == "phylum" ~ phylum,
|
||||
rank == "kingdom" ~ kingdom,
|
||||
TRUE ~ paste(genus, species, subspecies)
|
||||
)), .before = 1
|
||||
fullname = trimws(case_when(
|
||||
rank == "family" ~ family,
|
||||
rank == "order" ~ order,
|
||||
rank == "class" ~ class,
|
||||
rank == "phylum" ~ phylum,
|
||||
rank == "kingdom" ~ kingdom,
|
||||
TRUE ~ paste(genus, species, subspecies)
|
||||
)), .before = 1
|
||||
) %>%
|
||||
# keep only one LPSN record ID per full name
|
||||
arrange(fullname, lpsn) %>%
|
||||
@@ -536,23 +536,25 @@ taxonomy_lpsn$lpsn_parent[taxonomy_lpsn$rank == "subspecies"] <- taxonomy_lpsn$l
|
||||
taxonomy <- taxonomy_lpsn %>%
|
||||
# join GBIF identifiers to them
|
||||
left_join(taxonomy_gbif %>% select(kingdom, fullname, starts_with("gbif")),
|
||||
by = c("kingdom", "fullname")
|
||||
by = c("kingdom", "fullname")
|
||||
)
|
||||
|
||||
# for everything else, add the GBIF data
|
||||
taxonomy <- taxonomy %>%
|
||||
bind_rows(taxonomy_gbif %>%
|
||||
filter(!paste(kingdom, fullname) %in% paste(taxonomy$kingdom, taxonomy$fullname))) %>%
|
||||
filter(!paste(kingdom, fullname) %in% paste(taxonomy$kingdom, taxonomy$fullname))) %>%
|
||||
arrange(fullname) %>%
|
||||
filter(fullname != "")
|
||||
|
||||
# get missing entries from existing microorganisms data set
|
||||
taxonomy <- taxonomy %>%
|
||||
bind_rows(AMR::microorganisms %>%
|
||||
select(all_of(colnames(taxonomy))) %>%
|
||||
filter(!paste(kingdom, fullname) %in% paste(taxonomy$kingdom, taxonomy$fullname),
|
||||
# these will be added later:
|
||||
source != "manually added")) %>%
|
||||
select(all_of(colnames(taxonomy))) %>%
|
||||
filter(
|
||||
!paste(kingdom, fullname) %in% paste(taxonomy$kingdom, taxonomy$fullname),
|
||||
# these will be added later:
|
||||
source != "manually added"
|
||||
)) %>%
|
||||
arrange(fullname) %>%
|
||||
filter(fullname != "")
|
||||
|
||||
@@ -602,9 +604,10 @@ taxonomy <- taxonomy %>%
|
||||
source = "manually added"
|
||||
) %>%
|
||||
filter(!paste(kingdom, rank) %in% paste(taxonomy$kingdom, taxonomy$rank)) %>%
|
||||
left_join(current_gbif %>%
|
||||
select(kingdom, rank = taxonRank, ref = scientificNameAuthorship, gbif = taxonID, gbif_parent = parentNameUsageID),
|
||||
by = c("kingdom", "rank")
|
||||
left_join(
|
||||
current_gbif %>%
|
||||
select(kingdom, rank = taxonRank, ref = scientificNameAuthorship, gbif = taxonID, gbif_parent = parentNameUsageID),
|
||||
by = c("kingdom", "rank")
|
||||
) %>%
|
||||
mutate(source = ifelse(!is.na(gbif), "GBIF", source))
|
||||
)
|
||||
@@ -625,17 +628,18 @@ for (i in 2:6) {
|
||||
source = "manually added"
|
||||
) %>%
|
||||
filter(!paste(kingdom, .[[ncol(.) - 4]], rank) %in% paste(taxonomy$kingdom, taxonomy[[i + 1]], taxonomy$rank)) %>%
|
||||
# get GBIF identifier where available
|
||||
left_join(current_gbif %>%
|
||||
select(kingdom, all_of(i_name), rank = taxonRank, ref = scientificNameAuthorship, gbif = taxonID, gbif_parent = parentNameUsageID),
|
||||
by = c("kingdom", "rank", i_name)
|
||||
) %>%
|
||||
mutate(source = ifelse(!is.na(gbif), "GBIF", source))
|
||||
# get GBIF identifier where available
|
||||
left_join(
|
||||
current_gbif %>%
|
||||
select(kingdom, all_of(i_name), rank = taxonRank, ref = scientificNameAuthorship, gbif = taxonID, gbif_parent = parentNameUsageID),
|
||||
by = c("kingdom", "rank", i_name)
|
||||
) %>%
|
||||
mutate(source = ifelse(!is.na(gbif), "GBIF", source))
|
||||
message("n = ", nrow(to_add))
|
||||
if (is.null(taxonomy_all_missing)) {
|
||||
taxonomy_all_missing <- to_add
|
||||
} else {
|
||||
taxonomy_all_missing <- taxonomy_all_missing %>%
|
||||
taxonomy_all_missing <- taxonomy_all_missing %>%
|
||||
bind_rows(to_add)
|
||||
}
|
||||
}
|
||||
@@ -645,20 +649,24 @@ taxonomy <- taxonomy %>%
|
||||
bind_rows(taxonomy_all_missing)
|
||||
|
||||
# fix for duplicate fullnames within a kingdom (such as Nitrospira which is the name of the genus AND its class)
|
||||
taxonomy <- taxonomy %>%
|
||||
mutate(rank_index = case_when(rank == "subspecies" ~ 1,
|
||||
rank == "species" ~ 2,
|
||||
rank == "genus" ~ 3,
|
||||
rank == "family" ~ 4,
|
||||
rank == "order" ~ 5,
|
||||
rank == "class" ~ 6,
|
||||
TRUE ~ 7),
|
||||
fullname_rank = paste0(fullname, " {", rank, "}")) %>%
|
||||
arrange(kingdom, fullname, rank_index) %>%
|
||||
group_by(kingdom, fullname) %>%
|
||||
mutate(fullname = if_else(row_number() > 1, fullname_rank, fullname)) %>%
|
||||
ungroup() %>%
|
||||
select(-fullname_rank, -rank_index) %>%
|
||||
taxonomy <- taxonomy %>%
|
||||
mutate(
|
||||
rank_index = case_when(
|
||||
rank == "subspecies" ~ 1,
|
||||
rank == "species" ~ 2,
|
||||
rank == "genus" ~ 3,
|
||||
rank == "family" ~ 4,
|
||||
rank == "order" ~ 5,
|
||||
rank == "class" ~ 6,
|
||||
TRUE ~ 7
|
||||
),
|
||||
fullname_rank = paste0(fullname, " {", rank, "}")
|
||||
) %>%
|
||||
arrange(kingdom, fullname, rank_index) %>%
|
||||
group_by(kingdom, fullname) %>%
|
||||
mutate(fullname = if_else(row_number() > 1, fullname_rank, fullname)) %>%
|
||||
ungroup() %>%
|
||||
select(-fullname_rank, -rank_index) %>%
|
||||
arrange(fullname)
|
||||
|
||||
# now also add missing species (requires combination with genus)
|
||||
@@ -676,12 +684,13 @@ taxonomy <- taxonomy %>%
|
||||
) %>%
|
||||
filter(!paste(kingdom, genus, species, rank) %in% paste(taxonomy$kingdom, taxonomy$genus, taxonomy$species, taxonomy$rank)) %>%
|
||||
# get GBIF identifier where available
|
||||
left_join(current_gbif %>%
|
||||
select(kingdom, genus, species = specificEpithet, rank = taxonRank, ref = scientificNameAuthorship, gbif = taxonID, gbif_parent = parentNameUsageID),
|
||||
by = c("kingdom", "rank", "genus", "species")
|
||||
left_join(
|
||||
current_gbif %>%
|
||||
select(kingdom, genus, species = specificEpithet, rank = taxonRank, ref = scientificNameAuthorship, gbif = taxonID, gbif_parent = parentNameUsageID),
|
||||
by = c("kingdom", "rank", "genus", "species")
|
||||
) %>%
|
||||
mutate(source = ifelse(!is.na(gbif), "GBIF", source))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
# remove NAs from taxonomy again, and keep unique full names
|
||||
@@ -702,7 +711,7 @@ manually_added <- AMR::microorganisms %>%
|
||||
filter(source == "manually added", !paste(kingdom, fullname) %in% paste(taxonomy$kingdom, taxonomy$fullname)) %>%
|
||||
select(fullname:subspecies, ref, source, rank)
|
||||
|
||||
manually_added <- manually_added %>%
|
||||
manually_added <- manually_added %>%
|
||||
bind_rows(salmonellae)
|
||||
|
||||
# get latest taxonomy for those entries
|
||||
@@ -805,76 +814,83 @@ taxonomy <- taxonomy %>%
|
||||
pathogens <- read_excel(file_bartlett, sheet = "Tab 6 Full List")
|
||||
|
||||
# get all established, both old and current taxonomic names
|
||||
established <- pathogens %>%
|
||||
filter(status == "established") %>%
|
||||
established <- pathogens %>%
|
||||
filter(status == "established") %>%
|
||||
mutate(fullname = paste(genus, species)) %>%
|
||||
pull(fullname) %>%
|
||||
c(unlist(mo_current(.)),
|
||||
unlist(mo_synonyms(., keep_synonyms = FALSE))) %>%
|
||||
strsplit(" ", fixed = TRUE) %>%
|
||||
sapply(function(x) ifelse(length(x) == 1, x, paste(x[1], x[2]))) %>%
|
||||
sort() %>%
|
||||
pull(fullname) %>%
|
||||
c(
|
||||
unlist(mo_current(.)),
|
||||
unlist(mo_synonyms(., keep_synonyms = FALSE))
|
||||
) %>%
|
||||
strsplit(" ", fixed = TRUE) %>%
|
||||
sapply(function(x) ifelse(length(x) == 1, x, paste(x[1], x[2]))) %>%
|
||||
sort() %>%
|
||||
unique()
|
||||
|
||||
# get all putative, both old and current taxonomic names
|
||||
putative <- pathogens %>%
|
||||
filter(status == "putative") %>%
|
||||
putative <- pathogens %>%
|
||||
filter(status == "putative") %>%
|
||||
mutate(fullname = paste(genus, species)) %>%
|
||||
pull(fullname) %>%
|
||||
c(unlist(mo_current(.)),
|
||||
unlist(mo_synonyms(., keep_synonyms = FALSE))) %>%
|
||||
strsplit(" ", fixed = TRUE) %>%
|
||||
sapply(function(x) ifelse(length(x) == 1, x, paste(x[1], x[2]))) %>%
|
||||
sort() %>%
|
||||
pull(fullname) %>%
|
||||
c(
|
||||
unlist(mo_current(.)),
|
||||
unlist(mo_synonyms(., keep_synonyms = FALSE))
|
||||
) %>%
|
||||
strsplit(" ", fixed = TRUE) %>%
|
||||
sapply(function(x) ifelse(length(x) == 1, x, paste(x[1], x[2]))) %>%
|
||||
sort() %>%
|
||||
unique()
|
||||
|
||||
established <- established[established %unlike% "unknown"]
|
||||
putative <- putative[putative %unlike% "unknown"]
|
||||
|
||||
established_genera <- established %>%
|
||||
strsplit(" ", fixed = TRUE) %>%
|
||||
sapply(function(x) x[1]) %>%
|
||||
sort() %>%
|
||||
established_genera <- established %>%
|
||||
strsplit(" ", fixed = TRUE) %>%
|
||||
sapply(function(x) x[1]) %>%
|
||||
sort() %>%
|
||||
unique()
|
||||
|
||||
putative_genera <- putative %>%
|
||||
strsplit(" ", fixed = TRUE) %>%
|
||||
sapply(function(x) x[1]) %>%
|
||||
sort() %>%
|
||||
putative_genera <- putative %>%
|
||||
strsplit(" ", fixed = TRUE) %>%
|
||||
sapply(function(x) x[1]) %>%
|
||||
sort() %>%
|
||||
unique()
|
||||
|
||||
nonbacterial_genera <- AMR:::MO_PREVALENT_GENERA %>%
|
||||
c(unlist(mo_current(.)),
|
||||
unlist(mo_synonyms(., keep_synonyms = FALSE))) %>%
|
||||
strsplit(" ", fixed = TRUE) %>%
|
||||
sapply(function(x) x[1]) %>%
|
||||
sort() %>%
|
||||
nonbacterial_genera <- AMR:::MO_PREVALENT_GENERA %>%
|
||||
c(
|
||||
unlist(mo_current(.)),
|
||||
unlist(mo_synonyms(., keep_synonyms = FALSE))
|
||||
) %>%
|
||||
strsplit(" ", fixed = TRUE) %>%
|
||||
sapply(function(x) x[1]) %>%
|
||||
sort() %>%
|
||||
unique()
|
||||
nonbacterial_genera <- nonbacterial_genera[nonbacterial_genera %unlike% "unknown"]
|
||||
|
||||
# update prevalence based on taxonomy (following the recent and thorough work of Bartlett et al., 2022)
|
||||
# see https://doi.org/10.1099/mic.0.001269
|
||||
taxonomy <- taxonomy %>%
|
||||
taxonomy <- taxonomy %>%
|
||||
mutate(prevalence = case_when(
|
||||
# 'established' means 'have infected at least three persons in three or more references'
|
||||
paste(genus, species) %in% established & rank %in% c("species", "subspecies") ~ 1.0,
|
||||
# other genera in the 'established' group
|
||||
genus %in% established_genera & rank == "genus" ~ 1.0,
|
||||
|
||||
|
||||
# 'putative' means 'fewer than three known cases'
|
||||
paste(genus, species) %in% putative & rank %in% c("species", "subspecies") ~ 1.25,
|
||||
# other genera in the 'putative' group
|
||||
genus %in% putative_genera & rank == "genus" ~ 1.25,
|
||||
|
||||
|
||||
# species and subspecies in 'established' and 'putative' groups
|
||||
genus %in% c(established_genera, putative_genera) & rank %in% c("species", "subspecies") ~ 1.5,
|
||||
# other species from a genus in either group
|
||||
genus %in% nonbacterial_genera & rank %in% c("genus", "species", "subspecies") ~ 1.5,
|
||||
# we keep track of prevalent genera too of non-bacterial species
|
||||
genus %in% AMR:::MO_PREVALENT_GENERA & kingdom != "Bacteria" & rank %in% c("genus", "species", "subspecies") ~ 1.5,
|
||||
|
||||
|
||||
# all others
|
||||
TRUE ~ 2.0))
|
||||
TRUE ~ 2.0
|
||||
))
|
||||
|
||||
table(taxonomy$prevalence, useNA = "always")
|
||||
# (a lot will be removed further below)
|
||||
@@ -909,13 +925,14 @@ mo_kingdom <- taxonomy %>%
|
||||
mo_phylum <- taxonomy %>%
|
||||
filter(rank == "phylum") %>%
|
||||
distinct(kingdom, phylum) %>%
|
||||
left_join(AMR::microorganisms %>%
|
||||
filter(rank == "phylum") %>%
|
||||
transmute(kingdom,
|
||||
phylum = fullname,
|
||||
mo_old = gsub("[A-Z]{1,2}_", "", as.character(mo))
|
||||
),
|
||||
by = c("kingdom", "phylum")
|
||||
left_join(
|
||||
AMR::microorganisms %>%
|
||||
filter(rank == "phylum") %>%
|
||||
transmute(kingdom,
|
||||
phylum = fullname,
|
||||
mo_old = gsub("[A-Z]{1,2}_", "", as.character(mo))
|
||||
),
|
||||
by = c("kingdom", "phylum")
|
||||
) %>%
|
||||
group_by(kingdom) %>%
|
||||
mutate(
|
||||
@@ -935,13 +952,14 @@ mo_phylum <- mo_phylum %>%
|
||||
mo_class <- taxonomy %>%
|
||||
filter(rank == "class") %>%
|
||||
distinct(kingdom, class) %>%
|
||||
left_join(AMR::microorganisms %>%
|
||||
filter(rank == "class") %>%
|
||||
transmute(kingdom,
|
||||
class = fullname,
|
||||
mo_old = gsub("[A-Z]{1,2}_", "", as.character(mo))
|
||||
),
|
||||
by = c("kingdom", "class")
|
||||
left_join(
|
||||
AMR::microorganisms %>%
|
||||
filter(rank == "class") %>%
|
||||
transmute(kingdom,
|
||||
class = fullname,
|
||||
mo_old = gsub("[A-Z]{1,2}_", "", as.character(mo))
|
||||
),
|
||||
by = c("kingdom", "class")
|
||||
) %>%
|
||||
group_by(kingdom) %>%
|
||||
mutate(
|
||||
@@ -961,13 +979,14 @@ mo_class <- mo_class %>%
|
||||
mo_order <- taxonomy %>%
|
||||
filter(rank == "order") %>%
|
||||
distinct(kingdom, order) %>%
|
||||
left_join(AMR::microorganisms %>%
|
||||
filter(rank == "order") %>%
|
||||
transmute(kingdom,
|
||||
order = fullname,
|
||||
mo_old = gsub("[A-Z]{1,2}_", "", as.character(mo))
|
||||
),
|
||||
by = c("kingdom", "order")
|
||||
left_join(
|
||||
AMR::microorganisms %>%
|
||||
filter(rank == "order") %>%
|
||||
transmute(kingdom,
|
||||
order = fullname,
|
||||
mo_old = gsub("[A-Z]{1,2}_", "", as.character(mo))
|
||||
),
|
||||
by = c("kingdom", "order")
|
||||
) %>%
|
||||
group_by(kingdom) %>%
|
||||
mutate(
|
||||
@@ -987,13 +1006,14 @@ mo_order <- mo_order %>%
|
||||
mo_family <- taxonomy %>%
|
||||
filter(rank == "family") %>%
|
||||
distinct(kingdom, family) %>%
|
||||
left_join(AMR::microorganisms %>%
|
||||
filter(rank == "family") %>%
|
||||
transmute(kingdom,
|
||||
family = fullname,
|
||||
mo_old = gsub("[A-Z]{1,2}_", "", as.character(mo))
|
||||
),
|
||||
by = c("kingdom", "family")
|
||||
left_join(
|
||||
AMR::microorganisms %>%
|
||||
filter(rank == "family") %>%
|
||||
transmute(kingdom,
|
||||
family = fullname,
|
||||
mo_old = gsub("[A-Z]{1,2}_", "", as.character(mo))
|
||||
),
|
||||
by = c("kingdom", "family")
|
||||
) %>%
|
||||
group_by(kingdom) %>%
|
||||
mutate(
|
||||
@@ -1014,11 +1034,12 @@ mo_genus <- taxonomy %>%
|
||||
filter(rank == "genus") %>%
|
||||
distinct(kingdom, genus) %>%
|
||||
# get available old MO codes
|
||||
left_join(AMR::microorganisms %>%
|
||||
filter(rank == "genus") %>%
|
||||
transmute(mo_genus_old = gsub("^[A-Z]+_", "", as.character(mo)), kingdom, genus) %>%
|
||||
distinct(kingdom, genus, .keep_all = TRUE),
|
||||
by = c("kingdom", "genus")
|
||||
left_join(
|
||||
AMR::microorganisms %>%
|
||||
filter(rank == "genus") %>%
|
||||
transmute(mo_genus_old = gsub("^[A-Z]+_", "", as.character(mo)), kingdom, genus) %>%
|
||||
distinct(kingdom, genus, .keep_all = TRUE),
|
||||
by = c("kingdom", "genus")
|
||||
) %>%
|
||||
distinct(kingdom, genus, .keep_all = TRUE) %>%
|
||||
# since kingdom is part of the code, genus abbreviations may be duplicated between kingdoms
|
||||
@@ -1060,12 +1081,13 @@ mo_genus <- mo_genus %>%
|
||||
mo_species <- taxonomy %>%
|
||||
filter(rank == "species") %>%
|
||||
distinct(kingdom, genus, species) %>%
|
||||
left_join(AMR::microorganisms %>%
|
||||
filter(rank == "species") %>%
|
||||
transmute(mo_species_old = gsub("^[A-Z]+_[A-Z]+_", "", as.character(mo)), kingdom, genus, species) %>%
|
||||
filter(mo_species_old %unlike% "-") %>%
|
||||
distinct(kingdom, genus, species, .keep_all = TRUE),
|
||||
by = c("kingdom", "genus", "species")
|
||||
left_join(
|
||||
AMR::microorganisms %>%
|
||||
filter(rank == "species") %>%
|
||||
transmute(mo_species_old = gsub("^[A-Z]+_[A-Z]+_", "", as.character(mo)), kingdom, genus, species) %>%
|
||||
filter(mo_species_old %unlike% "-") %>%
|
||||
distinct(kingdom, genus, species, .keep_all = TRUE),
|
||||
by = c("kingdom", "genus", "species")
|
||||
) %>%
|
||||
distinct(kingdom, genus, species, .keep_all = TRUE) %>%
|
||||
group_by(kingdom, genus) %>%
|
||||
@@ -1108,12 +1130,13 @@ mo_species <- mo_species %>%
|
||||
mo_subspecies <- taxonomy %>%
|
||||
filter(rank == "subspecies") %>%
|
||||
distinct(kingdom, genus, species, subspecies) %>%
|
||||
left_join(AMR::microorganisms %>%
|
||||
filter(rank %in% c("subspecies", "subsp.", "infraspecies")) %>%
|
||||
transmute(mo_subspecies_old = gsub("^[A-Z]+_[A-Z]+_[A-Z]+_", "", as.character(mo)), kingdom, genus, species, subspecies) %>%
|
||||
filter(mo_subspecies_old %unlike% "-") %>%
|
||||
distinct(kingdom, genus, species, subspecies, .keep_all = TRUE),
|
||||
by = c("kingdom", "genus", "species", "subspecies")
|
||||
left_join(
|
||||
AMR::microorganisms %>%
|
||||
filter(rank %in% c("subspecies", "subsp.", "infraspecies")) %>%
|
||||
transmute(mo_subspecies_old = gsub("^[A-Z]+_[A-Z]+_[A-Z]+_", "", as.character(mo)), kingdom, genus, species, subspecies) %>%
|
||||
filter(mo_subspecies_old %unlike% "-") %>%
|
||||
distinct(kingdom, genus, species, subspecies, .keep_all = TRUE),
|
||||
by = c("kingdom", "genus", "species", "subspecies")
|
||||
) %>%
|
||||
distinct(kingdom, genus, species, subspecies, .keep_all = TRUE) %>%
|
||||
group_by(kingdom, genus, species) %>%
|
||||
@@ -1187,20 +1210,26 @@ taxonomy <- taxonomy %>%
|
||||
arrange(fullname)
|
||||
|
||||
# now check these - e.g. Nitrospira is the name of a genus AND its class
|
||||
taxonomy %>% filter(fullname %in% .[duplicated(fullname), "fullname", drop = TRUE]) %>% View()
|
||||
taxonomy %>%
|
||||
filter(fullname %in% .[duplicated(fullname), "fullname", drop = TRUE]) %>%
|
||||
View()
|
||||
taxonomy <- taxonomy %>%
|
||||
mutate(rank_index = case_when(kingdom == "Bacteria" ~ 1,
|
||||
kingdom == "Fungi" ~ 2,
|
||||
kingdom == "Protozoa" ~ 3,
|
||||
kingdom == "Archaea" ~ 4,
|
||||
TRUE ~ 5)) %>%
|
||||
arrange(fullname, rank_index) %>%
|
||||
distinct(fullname, .keep_all = TRUE) %>%
|
||||
select(-rank_index) %>%
|
||||
mutate(rank_index = case_when(
|
||||
kingdom == "Bacteria" ~ 1,
|
||||
kingdom == "Fungi" ~ 2,
|
||||
kingdom == "Protozoa" ~ 3,
|
||||
kingdom == "Archaea" ~ 4,
|
||||
TRUE ~ 5
|
||||
)) %>%
|
||||
arrange(fullname, rank_index) %>%
|
||||
distinct(fullname, .keep_all = TRUE) %>%
|
||||
select(-rank_index) %>%
|
||||
filter(mo != "")
|
||||
|
||||
# this must not exist:
|
||||
taxonomy %>% filter(mo %like% "__") %>% View()
|
||||
taxonomy %>%
|
||||
filter(mo %like% "__") %>%
|
||||
View()
|
||||
taxonomy <- taxonomy %>% filter(mo %unlike% "__")
|
||||
|
||||
|
||||
@@ -1214,14 +1243,20 @@ taxonomy <- taxonomy %>% distinct(mo, .keep_all = TRUE)
|
||||
taxonomy %>% filter(fullname %in% .[duplicated(fullname), "fullname", drop = TRUE])
|
||||
|
||||
# are all GBIFs available?
|
||||
taxonomy %>% filter(!gbif_parent %in% gbif) %>% count(rank)
|
||||
taxonomy %>%
|
||||
filter(!gbif_parent %in% gbif) %>%
|
||||
count(rank)
|
||||
# try to find the right gbif IDs
|
||||
taxonomy$gbif_parent[which(!taxonomy$gbif_parent %in% taxonomy$gbif & taxonomy$rank == "species")] <- taxonomy$gbif[match(taxonomy$genus[which(!taxonomy$gbif_parent %in% taxonomy$gbif & taxonomy$rank == "species")], taxonomy$genus)]
|
||||
taxonomy$gbif_parent[which(!taxonomy$gbif_parent %in% taxonomy$gbif & taxonomy$rank == "class")] <- taxonomy$gbif[match(taxonomy$phylum[which(!taxonomy$gbif_parent %in% taxonomy$gbif & taxonomy$rank == "class")], taxonomy$phylum)]
|
||||
taxonomy %>% filter(!gbif_parent %in% gbif) %>% count(rank)
|
||||
taxonomy %>%
|
||||
filter(!gbif_parent %in% gbif) %>%
|
||||
count(rank)
|
||||
|
||||
# are all LPSNs available?
|
||||
taxonomy %>% filter(!lpsn_parent %in% lpsn) %>% count(rank)
|
||||
taxonomy %>%
|
||||
filter(!lpsn_parent %in% lpsn) %>%
|
||||
count(rank)
|
||||
# make GBIF refer to newest renaming according to LPSN
|
||||
taxonomy$gbif_renamed_to[which(!is.na(taxonomy$gbif_renamed_to) & !is.na(taxonomy$lpsn_renamed_to))] <- taxonomy$gbif[match(taxonomy$lpsn_renamed_to[which(!is.na(taxonomy$gbif_renamed_to) & !is.na(taxonomy$lpsn_renamed_to))], taxonomy$lpsn)]
|
||||
|
||||
@@ -1251,21 +1286,33 @@ taxonomy <- taxonomy %>%
|
||||
|
||||
# no ghost families, orders classes, phyla
|
||||
taxonomy <- taxonomy %>%
|
||||
group_by(kingdom, family) %>% filter(n() > 1 | fullname %like% "unknown" | rank == "kingdom") %>%
|
||||
group_by(kingdom, order) %>% filter(n() > 1 | fullname %like% "unknown" | rank == "kingdom") %>%
|
||||
group_by(kingdom, class) %>% filter(n() > 1 | fullname %like% "unknown" | rank == "kingdom") %>%
|
||||
group_by(kingdom, phylum) %>% filter(n() > 1 | fullname %like% "unknown" | rank == "kingdom") %>%
|
||||
group_by(kingdom, family) %>%
|
||||
filter(n() > 1 | fullname %like% "unknown" | rank == "kingdom") %>%
|
||||
group_by(kingdom, order) %>%
|
||||
filter(n() > 1 | fullname %like% "unknown" | rank == "kingdom") %>%
|
||||
group_by(kingdom, class) %>%
|
||||
filter(n() > 1 | fullname %like% "unknown" | rank == "kingdom") %>%
|
||||
group_by(kingdom, phylum) %>%
|
||||
filter(n() > 1 | fullname %like% "unknown" | rank == "kingdom") %>%
|
||||
ungroup()
|
||||
|
||||
|
||||
message("\nCongratulations! The new taxonomic table will contain ", format(nrow(taxonomy), big.mark = ","), " rows.\n",
|
||||
"This was ", format(nrow(AMR::microorganisms), big.mark = ","), " rows.\n")
|
||||
message(
|
||||
"\nCongratulations! The new taxonomic table will contain ", format(nrow(taxonomy), big.mark = " "), " rows.\n",
|
||||
"This was ", format(nrow(AMR::microorganisms), big.mark = " "), " rows.\n"
|
||||
)
|
||||
|
||||
# these are the new ones:
|
||||
taxonomy %>% filter(!paste(kingdom, fullname) %in% paste(AMR::microorganisms$kingdom, AMR::microorganisms$fullname)) %>% View()
|
||||
taxonomy %>%
|
||||
filter(!paste(kingdom, fullname) %in% paste(AMR::microorganisms$kingdom, AMR::microorganisms$fullname)) %>%
|
||||
View()
|
||||
# these were removed:
|
||||
AMR::microorganisms %>% filter(!paste(kingdom, fullname) %in% paste(taxonomy$kingdom, taxonomy$fullname)) %>% View()
|
||||
AMR::microorganisms %>% filter(!fullname %in% taxonomy$fullname) %>% View()
|
||||
AMR::microorganisms %>%
|
||||
filter(!paste(kingdom, fullname) %in% paste(taxonomy$kingdom, taxonomy$fullname)) %>%
|
||||
View()
|
||||
AMR::microorganisms %>%
|
||||
filter(!fullname %in% taxonomy$fullname) %>%
|
||||
View()
|
||||
|
||||
|
||||
# Add SNOMED CT -----------------------------------------------------------
|
||||
@@ -1310,19 +1357,29 @@ taxonomy <- taxonomy %>%
|
||||
|
||||
# set class <mo>
|
||||
class(taxonomy$mo) <- c("mo", "character")
|
||||
microorganisms <- taxonomy
|
||||
|
||||
### this was previously needed?? Since 2022 M. catarrhalis seems to be "accepted" again
|
||||
# # Moraxella catarrhalis was named Branhamella catarrhalis (Catlin, 1970), but this is unaccepted in clinical microbiology
|
||||
# # we keep them both
|
||||
# taxonomy$status[which(taxonomy$fullname == "Moraxella catarrhalis")]
|
||||
# taxonomy$lpsn_renamed_to[which(taxonomy$fullname == "Moraxella catarrhalis")]
|
||||
# taxonomy$status[which(taxonomy$fullname == "Moraxella catarrhalis")] <- "accepted"
|
||||
# taxonomy$lpsn_renamed_to[which(taxonomy$fullname == "Moraxella catarrhalis")] <- NA_character_
|
||||
|
||||
# Restore 'synonym' microorganisms to 'accepted' --------------------------
|
||||
|
||||
# according to LPSN: Stenotrophomonas maltophilia is the correct name if this species is regarded as a separate species (i.e., if its nomenclatural type is not assigned to another species whose name is validly published, legitimate and not rejected and has priority) within a separate genus Stenotrophomonas.
|
||||
# https://lpsn.dsmz.de/species/stenotrophomonas-maltophilia
|
||||
|
||||
# all MO's to keep as 'accepted', not as 'synonym':
|
||||
to_restore <- c(
|
||||
"Stenotrophomonas maltophilia",
|
||||
"Moraxella catarrhalis"
|
||||
)
|
||||
all(to_restore %in% microorganisms$fullname)
|
||||
for (nm in to_restore) {
|
||||
microorganisms$lpsn_renamed_to[which(microorganisms$fullname == nm)] <- NA
|
||||
microorganisms$gbif_renamed_to[which(microorganisms$fullname == nm)] <- NA
|
||||
microorganisms$status[which(microorganisms$fullname == nm)] <- "accepted"
|
||||
}
|
||||
|
||||
|
||||
# Save to package ---------------------------------------------------------
|
||||
|
||||
microorganisms <- taxonomy
|
||||
usethis::use_data(microorganisms, overwrite = TRUE, version = 2, compress = "xz")
|
||||
rm(microorganisms)
|
||||
|
||||
|
||||
@@ -1,22 +1,31 @@
|
||||
# get complete filenames of all R files in the GitHub repository of nathaneastwood/poorman
|
||||
|
||||
commit <- "52eb6947e0b4430cd588976ed8820013eddf955f"
|
||||
library(magrittr)
|
||||
`%like%` <- function(x, y) grepl(y, x, ignore.case = TRUE, perl = TRUE)
|
||||
`%unlike%` <- function(x, y) !grepl(y, x, ignore.case = TRUE, perl = TRUE)
|
||||
|
||||
commit <- "3cc0a9920b1eb559dd166f548561244189586b3a"
|
||||
|
||||
files <- xml2::read_html(paste0("https://github.com/nathaneastwood/poorman/tree/", commit, "/R")) %>%
|
||||
rvest::html_nodes("a") %>%
|
||||
rvest::html_attr("href")
|
||||
files <- files[files %like% "/blob/.*R$"]
|
||||
|
||||
# get full URLs of all raw R files
|
||||
files <- sort(paste0("https://raw.githubusercontent.com", gsub("blob/", "", files[files %like% "/R/.*.R$"])))
|
||||
# remove files with only pkg specific code
|
||||
files <- files[files %unlike% "(zzz|init)[.]R$"]
|
||||
# also, there's a lot of functions we don't use
|
||||
files <- files[files %unlike% "(slice|glimpse|recode|replace_na|coalesce)[.]R$"]
|
||||
files <- files[files %unlike% "/(between|coalesce|cumulative|fill|glimpse|group_cols|na_if|near|nest_by|check_filter|poorman-package|print|recode|reconstruct|replace_na|replace_with|rownames|slice|union_all|unite|window_rank|with_groups)[.]R$"]
|
||||
|
||||
# add our prepend file, containing info about the source of the data
|
||||
intro <- readLines("data-raw/poorman_prepend.R")
|
||||
intro <- readLines("data-raw/poorman_prepend.R") %>%
|
||||
# add commit to intro part
|
||||
gsub("{commit}", commit, ., fixed = TRUE) %>%
|
||||
# add date to intro part
|
||||
gsub("{date}", trimws(format(Sys.Date(), "%e %B %Y")), ., fixed = TRUE)
|
||||
# copyright info:
|
||||
copyright <- paste0("# ", readLines("https://raw.githubusercontent.com/nathaneastwood/poorman/master/LICENSE"))
|
||||
copyright <- paste0("# ", readLines(paste0("https://raw.githubusercontent.com/nathaneastwood/poorman/", commit, "/LICENSE")))
|
||||
|
||||
# read all contents to a character vector
|
||||
contents <- character(0)
|
||||
@@ -25,31 +34,35 @@ sapply(files, function(file) {
|
||||
contents <<- c(contents, readLines(file))
|
||||
invisible()
|
||||
})
|
||||
contents <- c(
|
||||
intro,
|
||||
copyright,
|
||||
"",
|
||||
contents
|
||||
)
|
||||
|
||||
# remove lines starting with "#'" and NULL and write to file
|
||||
contents <- contents[!grepl("^(#'|NULL|\"_PACKAGE)", contents)]
|
||||
contents.bak <- contents
|
||||
|
||||
# grouped attributes same as dplyr
|
||||
contents <- gsub("grouped_data", "grouped_df", contents, fixed = TRUE)
|
||||
# now make it independent on UseMethod, since we will not export these functions
|
||||
contents <- gsub('UseMethod[(]"(.*?)"[)]',
|
||||
'if ("grouped_data" %in% class(.data)) {||| \\1.grouped_data(.data, ...)||| } else {||| \\1.default(.data, ...)||| }',
|
||||
paste(contents, collapse = "|||"),
|
||||
perl = TRUE
|
||||
) %>%
|
||||
# add commit to intro part
|
||||
gsub("{commit}", commit, ., fixed = TRUE) %>%
|
||||
# add date to intro part
|
||||
gsub("{date}", format(Sys.Date(), "%e %B %Y"), ., fixed = TRUE) %>%
|
||||
strsplit(split = "|||", fixed = TRUE) %>%
|
||||
unlist() %>%
|
||||
# add "pm_" as prefix to all functions
|
||||
gsub("^([a-z_.]+) <- function", "pm_\\1 <- function", .)
|
||||
|
||||
has_usemethods <- gsub("^([a-z_]+).*", "\\1", contents[which(contents %like% "usemethod") - 1])
|
||||
for (use in has_usemethods) {
|
||||
relevant_row <- which(contents %like% paste0("^", use, " <- function")) + 1
|
||||
function_call <- trimws(gsub(".*function(.*)\\{.*", "\\1", contents[relevant_row - 1]))
|
||||
function_call1 <- trimws(gsub("[()]", "", strsplit(function_call, ",")[[1]][1]))
|
||||
if (any(contents %like% paste0(use, ".grouped_df"))) {
|
||||
# this function will have methods for data.frame and grouped_df
|
||||
contents[relevant_row] <- paste0(" if (\"grouped_df\" %in% class(", function_call1, ")) ", use, ".grouped_df", function_call, " else ", use, ".data.frame", function_call)
|
||||
} else {
|
||||
# this function will only have data.frame as method
|
||||
contents[relevant_row] <- paste0(" ", use, ".data.frame", function_call)
|
||||
}
|
||||
# add pm_ prefix
|
||||
contents[relevant_row - 1] <- paste0("pm_", contents[relevant_row - 1])
|
||||
}
|
||||
# correct for NextMethod
|
||||
contents <- gsub("NextMethod\\(\"(.*)\"\\)", "\\1.data.frame(...)", contents)
|
||||
# correct for 'default' method
|
||||
contents <- gsub(".default <-", ".data.frame <-", contents, fixed = TRUE)
|
||||
contents <- gsub("pm_group_by_drop.data.frame", "pm_group_by_drop", contents, fixed = TRUE)
|
||||
contents <- gsub("(stats::)?setNames", "stats::setNames", contents)
|
||||
# now get all those pm_* functions to replace all untransformed function name calls as well
|
||||
new_pm_names <- sort(gsub("pm_(.*?) <-.*", "\\1", contents[grepl("^pm_", contents)]))
|
||||
for (i in seq_len(length(new_pm_names))) {
|
||||
@@ -57,29 +70,41 @@ for (i in seq_len(length(new_pm_names))) {
|
||||
# starting with a space or a straight bracket or an opening parenthesis, ending with nothing or a non-character or a closing parenthesis
|
||||
contents <- gsub(paste0("( |\\[|\\()", new_pm_names[i], "($|[^a-z]|\\))"), paste0("\\1pm_", new_pm_names[i], "\\2"), contents)
|
||||
}
|
||||
|
||||
# replace %>% with %pm>%
|
||||
contents[which(contents %like% "^\\|\\|") - 1] <- paste0(contents[which(contents %like% "^\\|\\|") - 1], " ||")
|
||||
contents[which(contents %like% "^\\|\\|")] <- gsub("^\\|\\|", "", contents[which(contents %like% "^\\|\\|")])
|
||||
contents <- gsub("%>%", "%pm>%", contents, fixed = TRUE)
|
||||
# fix for new lines, since n() also existed
|
||||
contents <- gsub("\\pm_n", "\\n", contents, fixed = TRUE)
|
||||
# prefix other functions also with "pm_"
|
||||
contents <- gsub("^([a-z_]+)(\\$|)", "pm_\\1\\2", contents)
|
||||
# prefix environments
|
||||
contents <- gsub("eval_env", "pm_eval_env", contents, fixed = TRUE)
|
||||
contents <- gsub("select_env", "pm_select_env", contents, fixed = TRUE)
|
||||
contents <- gsub("context", "pm_context", contents, fixed = TRUE)
|
||||
# now some items are overprefixed
|
||||
# prefix environmental objects and functions
|
||||
contents <- gsub("(add_group_columns|add_tally|apply_grouped_function|as_function|as_symbols|build_data_frame|calculate_groups|check_filter|check_if_types|check_name|check_context|collapse_to_sentence|context|deparse_|dotdotdot|drop_dup_list|eval_call|eval_env|eval_expr|eval_select_pos|find_used|flatten|get_group_details|gluestick|group_|groups|groups_set|has_groups|have_name|insert_dot|is.grouped_df|is_df_or_vector|is_empty_list|is_formula|is_named|is_negated_colon|is_nested|is_string|is_wholenumber|join_message|join_worker|names_are_invalid|nth|peek_vars|reconstruct_attrs|replace_na|replace_with|select_|select_context|select_env|select_positions|setup_|split_into_groups|squash|tally|tally_n|validate_case_when_length)", "pm_\\1", contents)
|
||||
# now a lot of items are overprefixed
|
||||
contents <- gsub("(pm_)+", "pm_", contents)
|
||||
# special case for pm_distinct(), we need '.keep_all' to work
|
||||
contents <- gsub("pm_distinct <- function(.data, ..., .keep_all = FALSE)", "pm_distinct <- function(.data, ...)", contents, fixed = TRUE)
|
||||
# pm_pull does not correct for tibbles, misses the drop argument
|
||||
contents[contents == ".data[, var]"] <- ".data[, var, drop = TRUE]"
|
||||
contents <- gsub("_pm_", "_", contents)
|
||||
contents <- gsub("pm_if (\"grouped_df", "if (\"grouped_df", contents, fixed = TRUE)
|
||||
# remove comments and empty lines
|
||||
contents <- gsub("#.*", "", contents)
|
||||
contents <- contents[trimws(contents) != ""]
|
||||
# fix for their relocate()
|
||||
contents <- gsub("if (!missing(.before))", "if (!missing(.before) && !is.null(.before))", contents, fixed = TRUE)
|
||||
contents <- gsub("if (!missing(.after))", "if (!missing(.after) && !is.null(.after))", contents, fixed = TRUE)
|
||||
contents[which(contents %like% "reshape\\($") + 1] <- gsub("data", "as.data.frame(data, stringsAsFactors = FALSE)", contents[which(contents %like% "reshape\\($") + 1])
|
||||
contents <- gsub("pm_relocate(.data = long, values_to, .after = -1)", 'pm_relocate(.data = long, "value", .after = -1)', contents, fixed = TRUE)
|
||||
|
||||
# who needs US spelling?
|
||||
contents <- contents[!grepl("summarize", contents)]
|
||||
contents <- contents[contents %unlike% "summarize"]
|
||||
|
||||
# add intro
|
||||
contents <- c(
|
||||
intro,
|
||||
copyright,
|
||||
"",
|
||||
contents
|
||||
)
|
||||
|
||||
writeLines(contents, "R/aa_helper_pm_functions.R")
|
||||
|
||||
# after this, comment out:
|
||||
# pm_left_join() since we use a faster version
|
||||
# pm_group_split() since we don't use it and it relies on R 3.5.0 for the use of ...length(), which is hard to support without C++ code
|
||||
# note: pm_left_join() will be overwritten by aaa_helper_functions.R, which contains a faster implementation
|
||||
# replace `res <- as.data.frame(res)` with `res <- as.data.frame(res, stringsAsFactors = FALSE)`
|
||||
|
||||
+1534
-1528
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,33 @@
|
||||
snomed2 <- microorganisms %>%
|
||||
filter(mo %in% c("B_SLMNL_TYPH", "B_SLMNL_HMRM", "B_SLMNL_PRTY")) %>%
|
||||
pull(snomed)
|
||||
|
||||
new_typhi <- microorganisms %>%
|
||||
filter(mo == "B_SLMNL_THSS") %>%
|
||||
slice(c(1, 1, 1)) %>%
|
||||
mutate(
|
||||
mo = c("B_SLMNL_TYPH", "B_SLMNL_HMRM", "B_SLMNL_PRTY"),
|
||||
fullname = c("Salmonella Typhi", "Salmonella Typhimurium", "Salmonella Paratyphi"),
|
||||
subspecies = c("Typhi", "Typhimurium", "Paratyphi"),
|
||||
snomed = snomed2
|
||||
)
|
||||
|
||||
new_groupa <- microorganisms %>%
|
||||
filter(mo == "B_SLMNL_GRPB") %>%
|
||||
mutate(
|
||||
mo = "B_SLMNL_GRPA",
|
||||
fullname = gsub("roup B", "roup A", fullname),
|
||||
species = gsub("roup B", "roup A", species)
|
||||
)
|
||||
|
||||
microorganisms$mo <- as.character(microorganisms$mo)
|
||||
|
||||
microorganisms <- microorganisms %>%
|
||||
filter(!mo %in% c("B_SLMNL_TYPH", "B_SLMNL_HMRM", "B_SLMNL_PRTY")) %>%
|
||||
bind_rows(new_typhi, new_groupa) %>%
|
||||
arrange(fullname)
|
||||
|
||||
microorganisms$lpsn_parent[which(microorganisms$genus == "Salmonella" & microorganisms$rank == "species")] <- "516547"
|
||||
microorganisms$gbif_parent[which(microorganisms$genus == "Salmonella" & microorganisms$rank == "species")] <- "3221815"
|
||||
|
||||
class(microorganisms$mo) <- c("mo", "character")
|
||||
+278
-273
@@ -1,273 +1,278 @@
|
||||
pattern regular_expr case_sensitive affect_ab_name affect_mo_name zh da nl fr de el it ja pl pt ru es sv tr uk
|
||||
language name English FALSE FALSE FALSE FALSE Chinese Danish Dutch French German Greek Italian Japanese Polish Portuguese Russian Spanish Swedish Turkish Ukrainian
|
||||
language name FALSE FALSE FALSE FALSE 汉语 Dansk Nederlands Français Deutsch Ελληνικά Italiano 日本語 Polski Português Русский Español Svenska Türkçe Українська
|
||||
Coagulase-negative Staphylococcus TRUE TRUE FALSE TRUE 凝固酶阴性葡萄球菌 Koagulase-negative stafylokokker Coagulase-negatieve Staphylococcus Staphylococcus à coagulase négative Koagulase-negative Staphylococcus Σταφυλόκοκκος με αρνητική πηκτικότητα Staphylococcus negativo coagulasi コアグラーゼ陰性ブドウ球菌 Staphylococcus koagulazoujemny Staphylococcus coagulase negativo Коагулазоотрицательный стафилококк Staphylococcus coagulasa negativo Koagulasnegativa stafylokocker Koagülaz-negatif Stafilokok Коагулазонегативний стафілокок
|
||||
Coagulase-positive Staphylococcus TRUE TRUE FALSE TRUE 凝固酶阳性葡萄球菌 Koagulase-positive stafylokokker Coagulase-positieve Staphylococcus Staphylococcus à coagulase positif Koagulase-positive Staphylococcus Σταφυλόκοκκος θετικός στην πήξη Staphylococcus positivo coagulasi コアグラーゼ陽性ブドウ球菌 Staphylococcus koagulazo-dodatni Staphylococcus coagulase positivo Коагулазоположительный стафилококк Staphylococcus coagulasa positivo Koagulaspositiva stafylokocker Koagülaz-pozitif Stafilokok Коагулазопозитивний стафілокок
|
||||
Beta-haemolytic Streptococcus TRUE TRUE FALSE TRUE β-溶血性链球菌 Beta-haemolytiske streptokokker Beta-hemolytische Streptococcus Streptococcus Bêta-hémolytique Beta-hämolytischer Streptococcus Β-αιμολυτικός στρεπτόκοκκος Streptococcus Beta-emolitico ベータ溶血性レンサ球菌 Streptococcus beta-hemolityczny Streptococcus Beta-hemolítico Бета-гемолитический стрептококк Streptococcus Beta-hemolítico Beta-hemolytiska streptokocker Beta-hemolitik Streptokok Бета-гемолітичний стрептокок
|
||||
unknown Gram-negatives TRUE TRUE FALSE TRUE 不明革兰氏阴性菌 ukendte Gram-negative onbekende Gram-negatieven Gram négatifs inconnus unbekannte Gramnegativen άγνωστοι αρνητικοί κατά Gram Gram negativi sconosciuti 不明なグラム陰性菌 Nieznane bakterie Gram-ujemne Gram negativos desconhecidos неизвестные грамотрицательные Gram negativos desconocidos okända gramnegativa bakterier bilinmeyen Gram-negatifler невідомі грамнегативні
|
||||
unknown Gram-positives TRUE TRUE FALSE TRUE 不明革兰氏阳性菌 ukendte Gram-positive onbekende Gram-positieven Gram positifs inconnus unbekannte Grampositiven άγνωστοι θετικοί κατά Gram Gram positivi sconosciuti 未知のグラム陽性菌 Nieznane bakterie Gram-dodatnie Gram positivos desconhecidos неизвестные грамположительные Gram positivos desconocidos okända Gram-positiva bilinmeyen Gram-pozitifler невідомі грампозитивні
|
||||
unknown fungus TRUE TRUE FALSE TRUE 未知真菌 ukendt svamp onbekende schimmel champignon inconnu unbekannter Pilze άγνωστος μύκητας fungo sconosciuto 未知真菌 Nieznany grzyb fungo desconhecido неизвестный грибок hongo desconocido Okänd svamp bilinmeyen mantar невідомий гриб
|
||||
unknown yeast TRUE TRUE FALSE TRUE 未知酵母菌 ukendt gær onbekende gist levure inconnue unbekannte Hefe άγνωστος ζυμομύκητας lievito sconosciuto 未知酵母 Nieznany drożdżak levedura desconhecida неизвестные дрожжи levadura desconocida Okänd jäst bilinmeyen maya невідомі дріжджі
|
||||
unknown name TRUE TRUE FALSE TRUE 不明名称 ukendt navn onbekende naam nom inconnu unbekannte Name άγνωστο όνομα nome sconosciuto 名称未知 nieznana nazwa nome desconhecido неизвестное название nombre desconocido okänt namn bilinmeyen isim невідома назва
|
||||
unknown kingdom TRUE TRUE FALSE TRUE 未知王国 ukendt kongerige onbekend koninkrijk règme inconnu unbekanntes Reich άγνωστο βασίλειο regno sconosciuto 未知の王国 nieznane królestwo reino desconhecido неизвестное царство reino desconocido okänt rike bilinmeyen krallık невідоме царство
|
||||
unknown phylum TRUE TRUE FALSE TRUE 未知门 ukendt stamme onbekend fylum embranchement inconnu unbekannter Stamm άγνωστο φύλο phylum sconosciuto 未知の門 nieznany azyl filo desconhecido неизвестный филум filo desconocido okänt fylum bilinmeyen filum невідомий відділ
|
||||
unknown class TRUE TRUE FALSE TRUE 未知类 ukendt klasse onbekende klasse classe inconnue unbekannte Klasse άγνωστη τάξη classe sconosciuta 未知のクラス Nieznana klasa classe desconhecida неизвестный класс clase desconocida okänd klass bilinmeyen sınıf невідомий клас
|
||||
unknown order TRUE TRUE FALSE TRUE 未知目 ukendt orden onbekende orde ordre inconnu unbekannte Ordnung άγνωστη τάξη ordine sconosciuto 未知の目 nieznany rząd ordem desconhecido неизвестный порядок orden desconocido okänd ordning bilinmeyen sipariş невідомий порядок
|
||||
unknown family TRUE TRUE FALSE TRUE 未知科 ukendt familie onbekende familie famille inconnue unbekannte Familie άγνωστη οικογένεια famiglia sconosciuta 未知ファミリー nieznana rodzina família desconhecida неизвестное семейство familia desconocida okänd familj bilinmeyen aile невідома родина
|
||||
unknown genus TRUE TRUE FALSE TRUE 未知属 ukendt slægt onbekend geslacht genre inconnu unbekannte Gattung άγνωστο γένος genere sconosciuto 未知属 nieznany rodzaj gênero desconhecido неизвестный род género desconocido okänt släkte bilinmeyen cins невідомий рід
|
||||
unknown species TRUE TRUE FALSE TRUE 未知种 ukendt art onbekende soort espèce inconnue unbekannte Art άγνωστο είδος specie sconosciute 未知種 nieznany gatunek espécies desconhecida неизвестный вид especie desconocida okänd art bilinmeyen türler невідомий вид
|
||||
unknown subspecies TRUE TRUE FALSE TRUE 未知亚种 ukendt underart onbekende ondersoort sous-espèce inconnue unbekannte Unterart άγνωστο υποείδος sottospecie sconosciute 亜種不明 nieznany podgatunek subespécies desconhecida неизвестный подвид subespecie desconocida okänd underart bilinmeyen alt türler невідомий підвид
|
||||
unknown rank TRUE TRUE FALSE TRUE 未知等级 ukendt rang onbekende rang rang inconnu unbekannter Rang άγνωστη τάξη grado sconosciuto 未知ランク nieznany stopień classificação desconhecido неизвестный ранг rango desconocido okänd rang bilinmeyen rütbe невідомий ранг
|
||||
group TRUE TRUE FALSE TRUE 组 gruppe groep groupe Gruppe ομάδα gruppo グループ grupa grupo группа grupo grupp Grup група
|
||||
Group TRUE TRUE FALSE TRUE 组 Gruppe groep groupe Gruppe Ομάδα Gruppo グループ Grupa Grupo Группа Grupo Grupp Grup Група
|
||||
CoNS FALSE TRUE FALSE TRUE KNS CNS KNS CoNS グラム陰性 CoNS КОС SCN KNS KNS КНС
|
||||
CoPS FALSE TRUE FALSE TRUE KPS CPS KPS CoPS グラム陽性 CoPS КПС SCP KPS KPS КПС
|
||||
Gram-negative TRUE TRUE FALSE FALSE 革兰氏阴性 Gram-negativ Gram-negatief Gram négatif Gramnegativ Αρνητικό κατά Gram Gram negativo ^細菌$ Gram-ujemne Gram negativo Грамотрицательные Gram negativo Gram-negativ Gram-negatif Грамнегативні
|
||||
Gram-positive TRUE TRUE FALSE FALSE 革兰氏阳性 Gram-positiv Gram-positief Gram positif Grampositiv Θετικό κατά Gram Gram positivo ^真菌$ Gram-dodatnie Gram positivo Грамположительные Gram positivo Gram-positiv Gram-pozitif Грампозитивні
|
||||
^Bacteria$ TRUE TRUE FALSE FALSE 细菌 Bakterier Bacteriën Bactéries Bakterien Βακτήρια Batteri 酵母 Bakterie Bactérias Бактерии Bacterias Bakterier Bakteri Бактерії
|
||||
^Fungi$ TRUE TRUE FALSE FALSE 真菌 Støbeforme Schimmels Champignons Pilze Μύκητες Funghi 原生動物 Grzyby Fungos Грибы Hongos Svampar Mantarlar Гриби
|
||||
^Yeasts$ TRUE TRUE FALSE FALSE 酵母菌 Gær Gisten Levures Hefen Ζυμομύκητες Lieviti バイオグループ Drożdże Leveduras Животные Levaduras Jästdjur Mayalar Дріжджі
|
||||
^Protozoa$ TRUE TRUE FALSE FALSE ^原生动物$ Protozoer Protozoën Protozoaires Protozoen Πρωτόζωα Protozoi 生物型 Protozoa Protozoários Протозоа Protozoarios Protozoer Protozoa Найпростіші
|
||||
biogroup TRUE TRUE FALSE FALSE 生物群 biogruppe biogroep biogroupe Biogruppe βιοομάδα biogruppo 植物型 biogrupa biogrupo биогруппа biogrupo biogrupp biyogrup біогрупа
|
||||
biotype TRUE TRUE FALSE FALSE 生物型 biotype Biotyp βιότυπος biotipo ([([ ]*?))) グループ biotyp biótipo биотип biotipo biotyp biyotip біотип
|
||||
vegetative TRUE TRUE FALSE FALSE 无性系 vegetativ vegetatief végétatif vegetativ βλαστικός vegetativo ([[ ]*?)グループ wegetatywna vegetativo вегетативный vegetativo vegetativ vejetatif вегетативний
|
||||
([([ ]*?)group TRUE TRUE FALSE FALSE ([([]*?)组 \\1gruppe \\1groep \\1groupe \\1Gruppe ([([ ]*?)ομάδα \\1gruppo ([([ ]*?)grupa \\1grupo \\1группа \\1grupo \\1grupp ([([ ]*?)grup \\1група
|
||||
([([ ]*?)Group TRUE TRUE FALSE FALSE ([([]*?)组 \\1Gruppe \\1Groep \\1Groupe \\1Gruppe ([([ ]*;)ομάδα \\1Gruppo ない ([([ ]*?)Grupa \\1Grupo \\1Группа \\1Grupo \\1Grupp ([([ ]*?)Grup \\1Група
|
||||
no .*growth FALSE FALSE FALSE FALSE 无.*生长 ingen .*vækst geen .*groei pas .*croissance keine(|n|m|r|s)|nicht .*wachstum όχι .*αύξηση sem .*crescimento 中間体 brak .*wzrostu sem .*crescimento отсутствие.*роста no .*crecimientonon ingen .*tillväxt büyüme yok відсутність .*росту
|
||||
no|not FALSE FALSE FALSE FALSE 不|不 nej|ikke geen|niet non keine? no|not sem 感受性の高い、被ばく量の増加 nie|nie sem нет? no|sin nej|inte hayır|değil|hayir|degil ні
|
||||
Intermediate TRUE FALSE FALSE FALSE 中级 Mellemliggende Intermediair Mittlere Ενδιάμεση 影響を受けやすい。 Pośrednia Intermedio Orta seviye Знижена чутливість
|
||||
Susceptible, incr. exp. FALSE TRUE FALSE FALSE 易感,暴露增加 Modtagelig, øget eksp. Gevoelig bij verh. blootstelling Empfindlich, erh Belastung Ευάλωτος, αυξημένη έκθεση 影響を受けやすい Podatne, zwiększone narażenie Duyarlı, enk. maruziyet Чутливий до підвищеної експозиції
|
||||
susceptible, incr. exp. FALSE TRUE FALSE FALSE 易感,接触增加 modtagelig, øget eksp. gevoelig bij verh. blootstelling empfindlich, erh Belastung Ευαίσθητος, αυξημένη έκθεση 曝露量増加 podatny, zwiększone narażenie duyarlı, enk. maruziyet чутливий до підвищеної експозиції
|
||||
Susceptible TRUE FALSE FALSE FALSE 易受影响 Modtagelig Gevoelig Empfindlich Ευαίσθητο 耐性 Podatny Susceptible Duyarlı Чутливий
|
||||
Incr. exposure TRUE FALSE FALSE FALSE 暴露增加 Øget eksponering 'Incr. exposure' Empfindlich, erh Belastung Αυξημένη έκθεση 抗生物質 Większe narażenie 'Incr. exposure' Enk. maruziyet Підвищена експозиція
|
||||
Resistant TRUE FALSE FALSE FALSE 耐药性 Resistent Resistent Resistent Ανθεκτικός 抗生物質 Odporny Resistente Dayanıklı Стійкий
|
||||
antibiotic TRUE TRUE FALSE FALSE 抗生素 antibiotikum antibioticum antibiotique Antibiotikum αντιβιοτικό antibiotico 薬剤 antybiotyk antibiótico антибиотик antibiótico antibiotika Antibiyotik антибіотик
|
||||
Antibiotic TRUE TRUE FALSE FALSE 抗生素 Antibiotikum Antibioticum Antibiotique Antibiotikum Αντιβιοτικό Antibiotico 薬剤 Antybiotyk Antibiótico Антибиотик Antibiótico Antibiotika Antibiyotik Антибіотик
|
||||
Drug TRUE TRUE FALSE FALSE 药物 Lægemiddel Middel Médicament Medikament Φάρμακο Droga 頻度 Lek Droga Лекарство Fármaco Läkemedel İlaç Лікарський засіб
|
||||
drug TRUE TRUE FALSE FALSE 药物 lægemiddel middel médicament Medikament φάρμακο droga 最小発育阻止濃度(mg / L) lek droga лекарство fármaco läkemedel İlaç лікарський засіб
|
||||
Frequency FALSE TRUE FALSE FALSE 使用频率 Frekvens Aantal Fréquence Zahl Συχνότητα Frequenza ディスク拡散径(mm) Częstotliwość Frequência Частота Frecuencia Frekvens Frekans Частота
|
||||
Minimum Inhibitory Concentration (mg/L) FALSE FALSE FALSE FALSE 最小抑菌浓度(mg/L) Mindste hæmmende koncentration (mg/L) Minimale inhiberende concentratie (mg/L) Concentration minimale inhibitrice (mg/L) Minimale Hemm-Konzentration (mg/L) Ελάχιστη ανασταλτική συγκέντρωση (mg/L) Concentrazione minima inibitoria (mg/L) 抗菌性解釈 Minimalne stężenie hamujące (mg/L) Concentração Inibitória Mínima (mg/L) Минимальная ингибирующая концентрация (мг/л) Concentración mínima inhibitoria (mg/L) Minsta hämmande koncentration (mg/L) Minimum İnhibitör Konsantrasyon (mg/L) Мінімальна інгібуюча концентрація (мг/мл)
|
||||
Disk diffusion diameter (mm) FALSE FALSE FALSE FALSE 磁盘扩散直径(mm) Diskdiffusionsdiameter (mm) Diameter diskzone (mm) Diamètre de diffusion en disque (mm) Durchmesser der Scheibenzone (mm) Διάμετρος διάχυσης δίσκου (mm) Diametro di diffusione del disco (mm) 割合 Średnica dyfuzji dysku (mm) Diâmetro de difusão do disco (mm) Диаметр диффузии диска (мм) Diámetro de difusión en disco (mm) Diskdiffusionsdiameter (mm) Disk difüzyon çapı (mm) Зона затримки росту (мм)
|
||||
Antimicrobial Interpretation FALSE FALSE FALSE FALSE 抗菌性解释 Antimikrobiel fortolkning Antimicrobiële interpretatie Interprétation antimicrobienne Antimikrobielle Auswertung Αντιμικροβιακή ερμηνεία Interpretazione antimicrobica 4-アミノサリチル酸 Interpretacja antybakteryjna Interpretação Antimicrobiana Антимикробная интерпретация Interpretación antimicrobiana Antimikrobiell tolkning Antimikrobiyal Yorumlama Фенотипи чутливості
|
||||
Percentage FALSE FALSE FALSE FALSE 百分比 Procentdel Percentage Pourcentage Prozentsatz Ποσοστό Percentuale アデホビル・ジピボキシル Procent Percentagem Процент Porcentaje Procentuell andel Yüzde Відсоток
|
||||
4-aminosalicylic acid FALSE TRUE TRUE FALSE 4-氨基水杨酸 4-aminosalicylsyre 4-aminosalicylzuur Acide 4-aminosalicylique 4-Aminosalicylsäure 4-αμινοσαλικυλικό οξύ Acido 4-aminosalicilico アルデスルホンナトリウム Kwas 4-aminosalicylowy Ácido 4-aminosalicílico 4-аминосалициловая кислота Ácido 4-aminosalicílico 4-aminosalicylsyra 4-aminosalisilik asit 4-Аміносаліцилова кислота
|
||||
Adefovir dipivoxil FALSE TRUE TRUE FALSE 阿德福韦酯 Adefovir dipivoxil Adefovir Adéfovir dipivoxil Adefovir Dipivoxil Adefovir dipivoxil Adefovir dipivoxil アミカシン Adefovir dipivoxil Adefovir dipivoxil Адефовир дипивоксил Adefovir dipivoxil Adefovir dipivoxil Adefovir dipivoksil Адефовір діпівоксил
|
||||
Aldesulfone sodium FALSE TRUE TRUE FALSE 醛缩酮钠 Aldesulfon-natrium Aldesulfon Aldésulfone sodique Aldesulfon-Natrium Αλδεσουλφονικό νάτριο Aldesulfone sodio アモキシシリン Sól sodowa aldesulfonu Aldesulfona de sódio Альдесульфон натрия Aldesulfona sódica Aldesulfonnatrium Aldesülfon sodyum Альденсульфон натрію
|
||||
Amikacin FALSE TRUE TRUE FALSE 阿米卡星 Amikacin Amikacine Amikacine Amikacin Amikacin Amikacin アモキシシリン/β-ラクタマーゼ阻害剤 Amikacyna Amikacin Амикацин Amikacina Amikacin Amikasin Амікацин
|
||||
Amoxicillin FALSE TRUE TRUE FALSE 阿莫西林 Amoxicillin Amoxicilline Amoxicilline Amoxicillin Αμοξικιλλίνη Amoxicillina アムホテリシンB Amoxicillin Amoxicilina Амоксициллин Amoxicilina Amoxicillin Amoksisilin Амоксицилін
|
||||
Amoxicillin/beta-lactamase inhibitor FALSE TRUE TRUE FALSE 阿莫西林/β-内酰胺酶抑制剂 Amoxicillin/beta-lactamasehæmmer Amoxicilline/enzymremmer Amoxicilline/inhib. de bêta-lactamase Amoxicillin/Beta-Lactamase-Hemmer Αμοξικιλλίνη/αναστολέας της β-λακταμάσης Amoxicillina/inib. d. beta-lattamasi アンピシリン Amoksycylina/inhibitor beta-laktamazy Amoxicilina/inibid. da beta-lactamase Амоксициллин/ингибитор бета-лактамаз Amoxicilina/inhib. de la beta-lactamasa Amoxicillin/betalaktamashämmare Amoksisilin/beta-laktamaz inhibitörü Амоксицилін/інгібітор бета-лактамаз
|
||||
Amphotericin B FALSE TRUE TRUE FALSE 两性霉素B Amfotericin B Amfotericine B Amphotéricine B Amphotericin B Αμφοτερικίνη Β Amfotericina B アンピシリン/β-ラクタマーゼ阻害剤 Amfoterycyna B Anfotericina B Амфотерицин В Anfotericina B Amfotericin B Amfoterisin B Амфотерицин В
|
||||
Ampicillin FALSE TRUE TRUE FALSE 氨苄西林 Ampicillin Ampicilline Ampicilline Ampicillin Αµπικιλλίνη Ampicillina アニデュラファンギン Ampicylina Ampicilina Ампициллин Ampicilina Ampicillin Ampisilin Ампіцилін
|
||||
Ampicillin/beta-lactamase inhibitor FALSE TRUE TRUE FALSE 氨苄西林/β-内酰胺酶抑制剂 Ampicillin/beta-lactamasehæmmer Ampicilline/enzymremmer Ampicilline/inhib. de bêta-lactamase Ampicillin/Beta-Laktamase-Hemmer Αμπικιλλίνη/αναστολέας β-λακταμάσης Ampicillina/inib. d. beta-lattamasi アジドシリン Ampicylina/inhibitor beta-laktamazy Ampicilina/inibid. da beta-lactamase Ампициллин/ингибитор бета-лактамазы Ampicilina/inhib. de la beta-lactamasa Ampicillin/beta-laktamashämmare Ampisilin/beta-laktamaz inhibitörü Ампіцилін/інгібітор бета-лактамаз
|
||||
Anidulafungin FALSE TRUE TRUE FALSE 阿尼芬净 Anidulafungin Anidulafungine Anidulafungine Anidulafungin Ανιδουλαφουνγκίνη Anidulafungin アジスロマイシン Anidulafungina Anidulafungin Анидулафунгин Anidulafungina Anidulafungin Anidulafungin Анідулафунгін
|
||||
Azidocillin FALSE TRUE TRUE FALSE 阿奇霉素 Azidocillin Azidocilline Azidocilline Azidocillin Αζιδοκιλλίνη Azidocillina アズロシリン Azidocillin Azidocillin Азидоциллин Azidocilina Azidocillin Azidosilin Азидоцилін
|
||||
Azithromycin FALSE TRUE TRUE FALSE 阿奇霉素 Azithromycin Azitromycine Azithromycine Azithromycin Αζιθρομυκίνη Azitromicina バカンピシリン Azithromycin Azitromicina Азитромицин Azitromicina Azitromycin Azitromisin Азитроміцин
|
||||
Azlocillin FALSE TRUE TRUE FALSE 阿洛西林 Azlocillin Azlocilline Azlocilline Azlocillin Αζλοκιλλίνη Azlocillina バシトラシン Azlocillin Azlocillin Азлоциллин Azlocilina Azlocillin Azlocillin Азлоцилін
|
||||
Bacampicillin FALSE TRUE TRUE FALSE 巴卡比林 Bacampicillin Bacampicilline Bacampicilline Bacampicillin Μπακαμπικιλλίνη Bacampicillina ベンズシン・ベンジルペニシリン Bakampicylina Bacampicilina Бакампициллин Bacampicilina Bacampicillin Bacampicillin Бакампіцилін
|
||||
Bacitracin FALSE TRUE TRUE FALSE 阿奇霉素 Bacitracin Bacitracine Bacitracine Bacitracin Bacitracin Bacitracina ベンザチンフェノキシメチルペニシリン Bacytracyna Bacitracin Бацитрацин Bacitracina Bacitracin Basitrasin Бацитрацин
|
||||
Benzathine benzylpenicillin FALSE TRUE TRUE FALSE 苄丝肼青霉素 Benzathinbenzylpenicillin Benzylpenicillinebenzathine Benzathine benzylpénicilline Benzathin-Benzylpenicillin Βενζαθίνη βενζυλπενικιλλίνη Benzatina benzilpenicillina ベンジルペニシリン Benzylpenicylina benzylowa Benzatina benzatina benzilpenicilina Бензатин бензилпенициллин Bencilpenicilina benzatínica Benzathinbenzylpenicillin Benzatin benzilpenisilin Бензатину бензилпеніцилін
|
||||
Benzathine phenoxymethylpenicillin FALSE TRUE TRUE FALSE 苄星苯氧甲基青霉素 Benzathinfenoxymethylpenicillin Fenoxymethylpenicillinebenzathine Phénoxyméthylpénicilline benzathine Benzathin-Phenoxymethylpenicillin Βενζαθίνη φαινοξυμεθυλοπενικιλλίνη Benzatina fenossimetilpenicillina アミノサリチル酸カルシウム Fenoksymetylopenicylina benzylowa Benzatina fenoximetilpenicilina Бензатин феноксиметилпенициллин Fenoximetilpenicilina benzatínica Bensathinfenoximetylpenicillin Benzatin fenoksimetilpenisilin Бензатину феноксиметилпеніцилін
|
||||
Benzylpenicillin FALSE TRUE TRUE FALSE 苄基青霉素 Benzylpenicillin Benzylpenicilline Benzylpénicilline Benzylpenicillin Benzylpenicillin Benzilpenicillina カプレオマイシン Benzylpenicylina Benzilpenicilina Бензилпенициллин Bencilpenicilina Bensylpenicillin Benzilpenisilin Бензилпеніцилін
|
||||
Calcium aminosalicylate FALSE TRUE TRUE FALSE 氨基水杨酸钙 Calciumaminosalicylat Aminosalicylzuur Aminosalicylate de calcium Kalzium-Aminosalicylat Αμινοσαλικυλικό ασβέστιο Calcio aminosalicilato カルベニシリン Aminosalicylan wapnia Aminosalicilato de cálcio Аминосалицилат кальция Aminosalicilato de calcio Kalciumaminosalicylat Kalsiyum aminosalisilat Кальцію аміносаліцилат
|
||||
Capreomycin FALSE TRUE TRUE FALSE 氨水杨酸钙 Capreomycin Capreomycine Capréomycine Capreomycin Καπρεομυκίνη Capreomicina カリンダシリン Kapreomycyna Capreomicina Капреомицин Capreomicina Kapreomycin Kapreomisin Капреоміцин
|
||||
Carbenicillin FALSE TRUE TRUE FALSE 羧基青霉素 Carbenicillin Carbenicilline Carbénicilline Carbenicillin Καρβενικιλλίνη Carbenicillina カスポファンギン Karbenicylina Carbenicilina Карбенициллин Carbenicilina Karbenicillin Karbenisilin Карбеніцилін
|
||||
Carindacillin FALSE TRUE TRUE FALSE 卡林达西林 Carindacillin Carindacilline Carindacilline Carindacillin Carindacillin Carindacillina セファセトリル Karindacillin Carindacillin Кариндациллин Carindacilina Carindacillin Karindasilin Кариндацилін
|
||||
Caspofungin FALSE TRUE TRUE FALSE 氨苄青霉素 Caspofungin Caspofungine Caspofungine Caspofungin Caspofungin Caspofungin セファロチン Kaspofungina Caspofungin Каспофунгин Caspofungina Caspofungin Caspofungin Каспофунгін
|
||||
Ce(f|ph)acetrile TRUE TRUE TRUE FALSE 头孢乙腈 Cephacetril Cefacetril Céphacétrile Cefacetril Κεφακετρίλη Cefacetrile セファマンドール Cefacetrile Cephacetrile Цефацетрил Cefacetrilo Cephacetril Sefasetril Цефацетрил
|
||||
Ce(f|ph)alotin TRUE TRUE TRUE FALSE 头孢罗丁 Cephalotin Cefalotine Céphalotine Cefalotin Κεφαλοτίνη Cefalotina セファピリン Cefalotyna Cefalotina Цефалотин Cefalotina Cefalotin Sefalotin Цефалотин
|
||||
Ce(f|ph)amandole TRUE TRUE TRUE FALSE 头孢曼多 Cephamandol Cefamandol Céphamandole Cefamandol Κεφαμανδόλη Cephamandole セファゼドン Cefamandol Cephamandole Цефамандол Cefamandole Cephamandol Cefamandole Цефамандол
|
||||
Ce(f|ph)apirin TRUE TRUE TRUE FALSE 头孢匹林 Cephapirin Cefapirine Céphapirine Cefapirin Κεφαπιρίνη Cefapirina セファゾリン Cefapiryna Cephapirin Цефапирин Cefapirina Cephapirin Sefapirin Цефапірин
|
||||
Ce(f|ph)azedone TRUE TRUE TRUE FALSE 头孢唑酮 Cephazedon Cefazedon Céphazédone Cefazedon Κεφαζεδόνη Cefazedone セファロチン Cefazedon Cephazedone Цефазедон Cefazedona Cephazedon Sefazedon Цефазедон
|
||||
Ce(f|ph)azolin TRUE TRUE TRUE FALSE 头孢唑啉 Cephazolin Cefazoline Céphazoline Cefazolin Κεφαζολίνη Cephazolin セファレキシン Cefazolin Cephazolin Цефазолин Cefazolina Cephazolin Sefazolin Цефазолін
|
||||
Ce(f|ph)alothin TRUE TRUE TRUE FALSE 头孢罗丁 Cephalothin Cefalotine Céphalothine Cefalothin Κεφαλοθίνη Cefalotina セフェパイム Cefalotyna Cephalothin Цефалотин Cefalotina Kefalotin Cefalothin Цефалотин
|
||||
Ce(f|ph)alexin TRUE TRUE TRUE FALSE 头孢莱辛 Cephalexin Cefalexine Céphalexine Cefalexin Κεφαλεξίνη Cephalexin セフィキシム Cefaleksyna Cephalexin Цефалексин Cefalexina Cephalexin Cefalexin Цефалексин
|
||||
Ce(f|ph)epime TRUE TRUE TRUE FALSE 头孢吡肟 Cephepime Cefepim Céphépime Cefepim Κεφεπίμη Cephepime セフメノキシム Cefepime Cephepime Цефепим Cefepime Cephepim Sefepim Цефепім
|
||||
Ce(f|ph)ixime TRUE TRUE TRUE FALSE 头孢克肟 Cephixim Cefixim Céphixime Cefixim Cefixime Cephixime セフメタゾール Cefixime Cephixime Цефиксим Cefixima Cephixim Cefixime Цефіксим
|
||||
Ce(f|ph)menoxime TRUE TRUE TRUE FALSE 头孢米诺肟 Cephmenoxim Cefmenoxim Céphénoxime Cefmenoxim Cefmenoxime Cephmenoxime セフォジジム Cefmenoksym Cephmenoxime Цефменоксим Cefmenoxima Cephmenoxim Sefmenoksim Цефменоксим
|
||||
Ce(f|ph)metazole TRUE TRUE TRUE FALSE 头孢美唑 Cephmetazol Cefmetazol Céphmétazole Cefmetazol Cefmetazole Cephmetazole セフォニキッド Cefmetazol Cefmetazole Цефметазол Cefmetazol Cephmetazol Sefmetazol Цефметазол
|
||||
Ce(f|ph)odizime TRUE TRUE TRUE FALSE 头孢地嗪 Cephodizim Cefodizim Céphodizime Cefodizim Cefodizime Cephodizime セフォペラゾン Cefodizime Cephodizime Цефодизим Cefodixima Cephodizim Sefodizim Цефодізим
|
||||
Ce(f|ph)onicid TRUE TRUE TRUE FALSE 头孢尼西 Cephonicid Cefonicide Céphonicide Cefonicid Cefonicid Cephonicid Cefonicid Cefonicid Цефонизид Cefonicida Cephonicid Cefonicid Цефоніцид
|
||||
Ce(f|ph)operazone TRUE TRUE TRUE FALSE 头孢哌酮 Cephoperazon Cefoperazon Céphopérazone Cefoperazon Κεφοπεραζόνη Cephoperazone セフォタキシム Cefoperazon Cephoperazone Цефоперазон Cefoperazona Cephoperazon Sefoperazon Цефоперазон
|
||||
Ce(f|ph)operazone/beta-lactamase inhibitor TRUE TRUE TRUE FALSE 头孢哌酮/β-内酰胺酶抑制剂 Cephoperazon/beta-lactamasehæmmer Cefoperazon/enzymremmer Céphopérazone/inhib. de bêta-lactamase Cefoperazon/Beta-Lactamase-Hemmer Κεφοπεραζόνη/αναστολέας της β-λακταμάσης Cephoperazone/inib. d. beta-lattamasi Cefoperazon/inhibitor beta-laktamazy Cephoperazona/inibid. da beta-lactamase Цефоперазон/ингибитор бета-лактамаз Cefoperazona/inhib. de betalactamasas Cefoperazon/beta-laktamashämmare Sefoperazon/beta-laktamaz inhibitörü Цефоперазон/інгібітор бета-лактамаз
|
||||
Ce(f|ph)otaxime TRUE TRUE TRUE FALSE 头孢噻肟 Cephotaxim Cefotaxim Céphotaxime Cefotaxim Κεφοταξίμη Cephotaxime セフピロム Cefotaksym Cephotaxime Цефотаксим Cefotaxima Cephotaxim Sefotaksim Цефотаксим
|
||||
Ce(f|ph)oxitin TRUE TRUE TRUE FALSE 头孢西丁 Cephoxitin Cefoxitine Céphoxitine Cefoxitin Κεφοξιτίνη Cefossitina セフポドキシム Cefoksytyna Cephoxitin Цефокситин Cefoxitina Cephoxitin Cefoxitin Цефокситин
|
||||
Ce(f|ph)pirome TRUE TRUE TRUE FALSE 头孢匹罗 Cephpirom Cefpirom Céphpirome Cefpirom Κεφπιρόμη Cephpirome セフラジン Cefpirom Cefpirome Цефпиром Cephpirome Cephpirom Sefpirom Цефпіром
|
||||
Ce(f|ph)podoxime TRUE TRUE TRUE FALSE 头孢泊肟 Cephpodoxim Cefpodoxim Céphpodoxime Cefpodoxim Κεφποδοξίμη Cephpodoxime セフスロジン Cefpodoxime Cephpodoxime Цефподоксим Cefpodoxima Cephpodoxim Sefpodoksim Цефподоксим
|
||||
Ce(f|ph)radine TRUE TRUE TRUE FALSE 头孢拉定 Cephradin Cefradine Céphradine Cefradin Cefradine Cefradina セフタジジム Cefradyna Cephradine Цефрадин Cefradina Cephradin Sefradin Цефрадін
|
||||
Ce(f|ph)sulodin TRUE TRUE TRUE FALSE 头孢苏洛丁 Cephsulodin Cefsulodine Céphsulodine Cefsulodin Cefsulodin Cephsulodin セフテゾール Cefsulodin Cephsulodin Цефсулодин Cefsulodina Cephsulodin Cefsulodin Цефсулодин
|
||||
Ce(f|ph)tazidime TRUE TRUE TRUE FALSE 头孢噻肟 Cephtazidim Ceftazidim Céphtazidime Ceftazidim Κεφταζιδίμη Ceftazidima セフティゾキシム Ceftazidime Ceftazidima Цефтазидим Ceftazidima Cephtazidim Seftazidim Цефтазидим
|
||||
Ce(f|ph)tezole TRUE TRUE TRUE FALSE 头孢特唑 Cephtezol Ceftezol Céphtézole Ceftezol Ceftezole Cephtezole セフトリアキソン Ceftezol Ceftezole Цефтезол Ceftezol Cephtezole Seftezol Цефтезол
|
||||
Ce(f|ph)tizoxime TRUE TRUE TRUE FALSE 头孢唑肟 Cephtizoxim Ceftizoxim Céphtizoxime Ceftizoxim Ceftizoxime Cephtizoxime セフロキシム Ceftizoxime Cephtizoxime Цефтизоксим Ceftizoxima Cephtizoxim Seftizoksim Цефтизоксим
|
||||
Ce(f|ph)triaxone TRUE TRUE TRUE FALSE 头孢曲松 Cephtriaxon Ceftriaxon Céphtriaxone Ceftriaxon Ceftriaxone Ceftriaxone Ceftriakson Cefhtriaxone Цефтриаксон Ceftriaxona Ceftriaxon Ceftriaxone Цефтриаксон
|
||||
Ce(f|ph)uroxime TRUE TRUE TRUE FALSE 头孢呋辛 Cephuroxim Cefuroxim Céphuroxime Cefuroxim Κεφουροξίμη Cefuroxima クロラムフェニコール Cefuroksym Cephuroxime Цефуроксим Cefuroxima Cefuroxim Sefuroksim Цефуроксим
|
||||
Ce(f|ph)uroxime/metronidazole TRUE TRUE TRUE FALSE 头孢呋辛/甲硝唑 Cefuroxim/metronidazol Cefuroxim/andere antibacteriele middelen Céphuroxime/métronidazole Cefuroxim/Metronidazol Κεφουροξίμη/μετρονιδαζόλη Cefuroxima/metronidazolo クロルテトラサイクリン Cefuroksym/metronidazol Cephuroxime/metronidazol Цефуроксим/метронидазол Cefuroxima/metronidazol Cefuroxim/metronidazol Sefuroksim/metronidazol Цефуроксим/метронідазол
|
||||
Chloramphenicol FALSE TRUE TRUE FALSE 氯霉素 Kloramfenicol Chlooramfenicol Chloramphénicol Chloramphenicol Χλωραμφενικόλη Cloramfenicolo シノキサシン Chloramfenikol Cloranfenicol Хлорамфеникол Cloranfenicol Kloramfenikol Kloramfenikol Хлорамфенікол
|
||||
Chlortetracycline FALSE TRUE TRUE FALSE 金霉素 Chlortetracyclin Chloortetracycline Chlortétracycline Chlortetracyclin Χλωροτετρακυκλίνη Clorotetraciclina シプロフロキサシン Chlortetracyklina Chlortetracycline Хлортетрациклин Clortetraciclina Klortetracyklin Klortetrasiklin Хлортетрациклін
|
||||
Cinoxacin FALSE TRUE TRUE FALSE 西诺沙星 Cinoxacin Cinoxacine Cinoxacine Cinoxacin Cinoxacin Cinoxacina クラリスロマイシン Cinoxacin Cinoxacin Циноксацин Cinoxacina Cinoxacin Cinoxacin Циноксацин
|
||||
Ciprofloxacin FALSE TRUE TRUE FALSE 环丙沙星 Ciprofloxacin Ciprofloxacine Ciprofloxacine Ciprofloxacin Σιπροφλοξασίνη Ciprofloxacina クラビュラン酸 Ciprofloksacyna Ciprofloxacin Ципрофлоксацин Ciprofloxacina Ciprofloxacin Siprofloksasin Ципрофлоксацин
|
||||
Clarithromycin FALSE TRUE TRUE FALSE 克拉霉素 Clarithromycin Claritromycine Clarithromycine Clarithromycin Κλαριθρομυκίνη Claritromicina クラビュラン酸 Klarytromycyna Claritromicina Кларитромицин Claritromicina Claritromycin Klaritromisin Кларитроміцин
|
||||
Clavulanic acid FALSE TRUE TRUE FALSE 克拉维酸 Clavulansyre Clavulaanzuur Acide clavulanique Clavulansäure Κλαβουλανικό οξύ Acido clavulanico クリンダマイシン Kwas klawulanowy Ácido clavulânico Клавулановая кислота Ácido clavulánico Clavulansyra Klavulanik asit Клавуланова кислота
|
||||
clavulanic acid FALSE TRUE TRUE FALSE 克拉维酸 clavulansyre clavulaanzuur acide clavulanique Clavulansäure Κλαβουλανικό οξύ acido clavulanico クロメトシリン kwas klawulanowy ácido clavulânico клавулановая кислота ácido clavulánico clavulansyra klavulanik asit клавуланова кислота
|
||||
Clindamycin FALSE TRUE TRUE FALSE 克林霉素 Clindamycin Clindamycine Clindamycine Clindamycin Clindamycin Clindamicina クロトリマゾール Klindamycyna Clindamicina Клиндамицин Clindamicina Clindamycin Klindamisin Кліндаміцин
|
||||
Clometocillin FALSE TRUE TRUE FALSE 克罗米修斯( Clometocillin Clometocilline Clométocilline Clometocillin Clometocillin Clometocillina クロキサシリン Clometocillin Clometocillin Клометоциллин Clometocilina Klometocillin Clometocillin Клометоцилін
|
||||
Clotrimazole FALSE TRUE TRUE FALSE 克霉唑 Clotrimazol Clotrimazol Clotrimazole Clotrimazol Κλοτριμαζόλη Clotrimazolo コリスチン Klotrimazol Clotrimazole Клотримазол Clotrimazol Klotrimazol Klotrimazol Клотримазол
|
||||
Cloxacillin FALSE TRUE TRUE FALSE 克罗西林 Cloxacillin Cloxacilline Cloxacilline Cloxacillin Κλοξακιλλίνη Cloxacillina ダプソン Cloxacillin Cloxacillin Клоксациллин Cloxacilina Kloxacillin Cloxacillin Клоксацилін
|
||||
Colistin FALSE TRUE TRUE FALSE 唑啉酮 Colistin Colistine Colistine Colistin Κολιστίνη Colistina ダプトマイシン Kolistyna Colistin Колистин Colistina Kolistin Kolistin Колістин
|
||||
Dapsone FALSE TRUE TRUE FALSE 多普生 Dapson Dapson Dapsone Dapson Δαψόνη Dapsone ジベカシン Dapson Dapsone Дапсон Dapsona Dapson Dapson Дапсон
|
||||
Daptomycin FALSE TRUE TRUE FALSE 达托霉素 Daptomycin Daptomycine Daptomycine Daptomycin Daptomycin Daptomicina ジクロキサシリン Daptomycyna Daptomicina Даптомицин Daptomicina Daptomycin Daptomisin Даптоміцин
|
||||
Dibekacin FALSE TRUE TRUE FALSE 迪贝卡星 Dibekacin Dibekacine Dibekacine Dibekacin Dibekacin Dibekacin ジリスロマイシン Dibekacin Dibekacin Дибекацин Dibekacina Dibekacin Dibekacin Дібекацин
|
||||
Dicloxacillin FALSE TRUE TRUE FALSE 迪卡西林 Dicloxacillin Dicloxacilline Dicloxacilline Dicloxacillin Dicloxacillin Dicloxacillina エコナゾール Dikloxacillin Dicloxacilina Диклоксациллин Dicloxacilina Dikloxacillin Dikloksasilin Диклоксацилін
|
||||
Dirithromycin FALSE TRUE TRUE FALSE 迪里红霉素 Dirithromycin Diritromycine Dirithromycine Dirithromycin Dirithromycin Diritromicina エノキサシン Dirytromycyna Diritromicina Диритромицин Diritromicina Diritromycin Diritromisin Диритроміцин
|
||||
Econazole FALSE TRUE TRUE FALSE 胺鲜胺 Econazol Econazol Econazole Econazol Econazole Econazolo エピシリン Ekonazol Econazole Эконазол Econazol Ekonazol Ekonazol Еконазол
|
||||
Enoxacin FALSE TRUE TRUE FALSE 伊诺沙星 Enoxacin Enoxacine Enoxacine Enoxacin Enoxacin Enoxacina エリスロマイシン Enoxacin Enoxacin Эноксацин Enoxacina Enoxacin Enoksasin Еноксацин
|
||||
Epicillin FALSE TRUE TRUE FALSE 伊比西林 Epicillin Epicilline Epicilline Epicillin Epicillin Epicillina エタンブトール/イソニアジド Epicillin Epicilina Эпициллин Epicilina Epicillin Episilin Епіцилін
|
||||
Erythromycin FALSE TRUE TRUE FALSE 红霉素 Erythromycin Erytromycine Erythromycine Erythromycin Ερυθρομυκίνη Eritromicina フレロキサシン Erytromycyna Eritromicina Эритромицин Eritromicina Erytromycin Eritromisin Еритроміцин
|
||||
Ethambutol/isoniazid FALSE TRUE TRUE FALSE 乙胺丁醇/异烟肼 Ethambutol/isoniazid Ethambutol/isoniazide Ethambutol/isoniazide Ethambutol/Isoniazid Αιθαμβουτόλη/ισονιαζίδη Etambutolo/isoniazide フルクロキサシリン Etambutol/izoniazyd Ethambutol/isoniazid Этамбутол/изониазид Etambutol/isoniazida Etambutol/isoniazid Etambutol/izoniazid Етамбутол/ізоніазид
|
||||
Fleroxacin FALSE TRUE TRUE FALSE 氨甲喋呤 Fleroxacin Fleroxacine Fléroxacine Fleroxacin Φλεροξακίνη Fleroxacina フルコナゾール Fleroksacyna Fleroxacina Флероксацин Fleroxacina Fleroxacin Fleroxacin Флероксацин
|
||||
Flucloxacillin FALSE TRUE TRUE FALSE 氟氯西林 Flucloxacillin Flucloxacilline Flucloxacilline Flucloxacillin Flucloxacillin Flucloxacillina フルシトシン Flucloxacillin Flucloxacillin Флуклоксациллин Flucloxacilina Flucloxacillin Flukloksasilin Флуклоксацилін
|
||||
Fluconazole FALSE TRUE TRUE FALSE 氟康唑 Fluconazol Fluconazol Fluconazole Fluconazol Φλουκοναζόλη Fluconazolo フルリスロマイシン Flukonazol Fluconazole Флуконазол Fluconazol Flukonazol Flukonazol Флуконазол
|
||||
Flucytosine FALSE TRUE TRUE FALSE 氨甲喋呤 Flucytosin Fluorocytosine Flucytosine Flucytosin Φλουκυτοσίνη Flucytosine ホスホマイシン Flucytozyna Flucytosine Флуцитозин Flucitosina Flucytosin Flusitozin Флуцитозин
|
||||
Flurithromycin FALSE TRUE TRUE FALSE 氟利霉素 Flurithromycin Fluritromycine Flurithromycine Flurithromycin Φλουριθρομυκίνη Fluritromicina フシジン酸 Flurithromycin Fluritromicina Флуритромицин Fluritromicina Fluritromycin Fluritromisin Флуритроміцин
|
||||
Fosfomycin FALSE TRUE TRUE FALSE 福斯霉素 Fosfomycin Fosfomycine Fosfomycine Fosfomycin Φοσφομυκίνη Fosfomicina ガチフロキサシン Fosfomycyna Fosfomycin Фосфомицин Fosfomicina Fosfomycin Fosfomisin Фосфоміцин
|
||||
Fusidic acid FALSE TRUE TRUE FALSE 夫西地酸 Fusidinsyre Fusidinezuur Acide fusidique Fusidinsäure Φουσιδικό οξύ Acido fusidico ゲミフロキサシン Kwas fusydynowy Ácido fusídico Фузидовая кислота Ácido fusídico Fusidinsyra Fusidik asit Фузидова кислота
|
||||
Gatifloxacin FALSE TRUE TRUE FALSE 加替沙星 Gatifloxacin Gatifloxacine Gatifloxacine Gatifloxacin Gatifloxacin Gatifloxacina ゲンタマイシン Gatifloxacin Gatifloxacin Гатифлоксацин Gatifloxacina Gatifloxacin Gatifloksasin Гатифлоксацин
|
||||
Gemifloxacin FALSE TRUE TRUE FALSE 吉非沙星 Gemifloxacin Gemifloxacine Gemifloxacine Gemifloxacin Gemifloxacin Gemifloxacina グレパフロキサシン Gemifloksacyna Gemifloxacin Гемифлоксацин Gemifloxacina Gemifloxacin Gemifloksasin Геміфлоксацин
|
||||
Gentamicin FALSE TRUE TRUE FALSE 庆大霉素 Gentamicin Gentamicine Gentamicine Gentamicin Gentamicin Gentamicina ハチマイシン Gentamicin Gentamicina Гентамицин Gentamicina Gentamicin Gentamisin Гентаміцин
|
||||
Grepafloxacin FALSE TRUE TRUE FALSE 格雷帕沙星 Grepafloxacin Grepafloxacine Grepafloxacine Grepafloxacin Grepafloxacin Grepafloxacina ヘタシリン Grepafloksacyna Grepafloxacin Грепафлоксацин Grepafloxacina Grepafloxacin Grepafloksasin Грепафлоксацин
|
||||
Hachimycin FALSE TRUE TRUE FALSE 哈奇霉素 Hachimycin Hachimycine Hachimycine Hachimycin Hachimycin Hachimycin イミペネム/シラスタチン Hachimycin Hachimycin Хатимицин Hachimycin Hachimycin Hachimycin Хачиміцин
|
||||
Hetacillin FALSE TRUE TRUE FALSE 赫拉西林 Hetacillin Hetacilline Hétacilline Hetacillin Hetacillin Hetacillin イノシン・プラノベックス Hetacylina Hetacillin Гетациллин Hetacilina Hetacillin Hetasilin Гетацилін
|
||||
Imipenem/cilastatin FALSE TRUE TRUE FALSE 亚胺培南/西司他丁 Imipenem/cilastatin Imipenem/enzymremmer Imipénème/cilastatine Imipenem/Cilastatin Ιμιπενέμη/σιλαστατίνη Imipenem/cilastatina イセパマイシン Imipenem/cilastatyna Imipenem/coteltelatina Имипенем/циластатин Imipenem/cilastatina Imipenem/cilastatin İmipenem/silastatin Іміпенем/циластатин
|
||||
Inosine pranobex FALSE TRUE TRUE FALSE 肌苷帕诺贝斯 Inosin pranobex Inosiplex Inosine pranobex Inosin-Pranobex Ινοσίνη pranobex Inosina pranobex イソコナゾール Pranobeks inozyny Pranobex inosine Инозин пранобекс Inosina pranobex Inosin pranobex İnosin pranobeks Інозин пранобекс
|
||||
Isepamicin FALSE TRUE TRUE FALSE 伊西帕米星 Isepamicin Isepamicine Isepamicine Isepamicin Isepamicin Isepamicina イソニアジド Isepamicin Isepamicina Исепамицин Isepamicina Isepamicin İzepamisin Ізепаміцин
|
||||
Isoconazole FALSE TRUE TRUE FALSE 氨甲蝶呤 Isoconazol Isoconazol Isoconazole Isoconazol Ισοκοναζόλη Isoconazolo イトラコナゾール Izokonazol Isoconazole Изоконазол Isoconazol Isokonazol İzokonazol Ізоконазол
|
||||
Isoniazid FALSE TRUE TRUE FALSE 伊索尼克酸 Isoniazid Isoniazide Isoniazide Isoniazid Ιζονιαζίδη Isoniazide ホサマイシン Izoniazyd Isoniazid Изониазид Isoniazida Isoniazid İzoniazid Ізоніазид
|
||||
Itraconazole FALSE TRUE TRUE FALSE 伊曲康唑 Itraconazol Itraconazol Itraconazole Itraconazol Ιτρακοναζόλη Itraconazolo カナマイシン Itrakonazol Itraconazole Итраконазол Itraconazol Itrakonazol İtrakonazol Ітраконазол
|
||||
Josamycin FALSE TRUE TRUE FALSE 肌注 Josamycin Josamycine Josamycine Josamycin Josamycin Josamicina ケトコナゾール Josamycin Josamycin Джозамицин Josamicina Josamycin Josamycin Джозаміцин
|
||||
Kanamycin FALSE TRUE TRUE FALSE 卡那霉素 Kanamycin Kanamycine Kanamycine Kanamycin Kanamycin Kanamicina レボフロキサシン Kanamycin Kanamycin Канамицин Kanamicina Kanamycin Kanamisin Канаміцин
|
||||
Ketoconazole FALSE TRUE TRUE FALSE 酮康唑 Ketoconazol Ketoconazol Kétoconazole Ketoconazol Κετοκοναζόλη Ketoconazolo リンコマイシン Ketokonazol Ketoconazole Кетоконазол Ketoconazol Ketokonazol Ketokonazol Кетоконазол
|
||||
Levofloxacin FALSE TRUE TRUE FALSE 氧氟沙星 Levofloxacin Levofloxacine Lévofloxacine Levofloxacin Λεβοφλοξασίνη Levofloxacina ロメフロキサシン Levofloxacin Levofloxacin Левофлоксацин Levofloxacina Levofloxacin Levofloksasin Левофлоксацин
|
||||
Lincomycin FALSE TRUE TRUE FALSE 林可霉素 Lincomycin Lincomycine Lincomycine Lincomycin Lincomycin Lincomicina リゾチーム Lincomycyna Lincomycin Линкомицин Lincomicina Lincomycin Lincomycin Лінкоміцин
|
||||
Lomefloxacin FALSE TRUE TRUE FALSE 洛美沙星 Lomefloxacin Lomefloxacine Loméfloxacine Lomefloxacin Λομεφλοξασίνη Lomefloxacina マンデル酸 Lomefloxacin Lomefloxacin Ломефлоксацин Lomefloxacina Lomefloxacin Lomefloksasin Ломефлоксацин
|
||||
Lysozyme FALSE TRUE TRUE FALSE 硫酸钠 Lysozym Lysozym Lysozyme Lysozym Λυσοζύμη Lisozima メタンピシリン Lizozym Lysozyme Лизоцим Lisozima Lysozym Lizozim Лізоцим
|
||||
Mandelic acid FALSE TRUE TRUE FALSE 扁桃酸 Mandelinsyre Amandelzuur Acide mandélique Mandelsäure Μανδελικό οξύ Acido mandelico メチシリン Kwas migdałowy Ácido mandélico Мандаловая кислота Ácido mandélico Mandelsyra Mandelik asit Мигдалева кислота
|
||||
Metampicillin FALSE TRUE TRUE FALSE 氨苄青霉素 Metampicillin Metampicilline Métampicilline Metampicillin Metampicillin Metampicillina メチサゾン Metampicylina Metampicilina Метампициллин Metampicilina Metampicillin Metampisilin Метампіцилін
|
||||
Meticillin FALSE TRUE TRUE FALSE 美西林 Meticillin Meticilline Méticilline Meticillin Μετικιλλίνη Meticillina メトロニダゾール Meticillin Meticillin Метициллин Meticilina Meticillin Metisilin Метицилін
|
||||
Metisazone FALSE TRUE TRUE FALSE 氨甲喋呤 Metisazon Metisazon Métisazone Metisazon Μετισαζόνη Metisazone メスロシリン Metisazon Metisazone Метисазон Metisazona Metisazon Metisazon Метисазон
|
||||
Metronidazole FALSE TRUE TRUE FALSE 甲硝唑 Metronidazol Metronidazol Métronidazole Metronidazol Μετρονιδαζόλη Metronidazolo ミカファンギン Metronidazol Metronidazol Метронидазол Metronidazol Metronidazol Metronidazol Метронідазол
|
||||
Mezlocillin FALSE TRUE TRUE FALSE 氨甲蝶呤 Mezlocillin Mezlocilline Mezlocilline Mezlocillin Mezlocillin Mezlocillina ミコナゾール Mezlocillin Mezlocillin Мезлоциллин Mezlocilina Mezlocillin Mezlosilin Мезлоцилін
|
||||
Micafungin FALSE TRUE TRUE FALSE 咪蒙灵 Micafungin Micafungine Micafungine Micafungin Micafungin Micafungin ミデカマイシン Micafungin Micafungin Микафунгин Micafungina Micafungin Mikafungin Мікафунгін
|
||||
Miconazole FALSE TRUE TRUE FALSE 米康唑 Miconazol Miconazol Miconazole Miconazol Miconazole Miconazolo ミオカマイシン Mikonazol Miconazole Миконазол Miconazol Miconazol Mikonazol Міконазол
|
||||
Midecamycin FALSE TRUE TRUE FALSE 咪康霉素 Midecamycin Midecamycine Midecamycine Midecamycin Μεδεκαμυκίνη Midecamicina モキシフロキサシン Midecamycin Midecamycin Мидекамицин Midecamicina Midecamycin Midecamycin Мідекаміцин
|
||||
Miocamycin FALSE TRUE TRUE FALSE 米卡霉素 Miocamycin Miocamycine Miocamycine Miocamycin Miocamycin Miocamicina ムピロシン Miocamycin Miocamicina Миокамицин Miocamycin Miocamycin Miocamycin Міокаміцин
|
||||
Moxifloxacin FALSE TRUE TRUE FALSE 莫西沙星 Moxifloxacin Moxifloxacine Moxifloxacine Moxifloxacin Moxifloxacin Moxifloxacin ナリディキシック酸 Moxifloxacin Moxifloxacina Моксифлоксацин Moxifloxacina Moxifloxacin Moksifloksasin Моксифлоксацин
|
||||
Mupirocin FALSE TRUE TRUE FALSE 莫匹罗星 Mupirocin Mupirocine Mupirocine Mupirocin Mupirocin Mupirocina ネオマイシン Mupirocyna Mupirocina Мупироцин Mupirocina Mupirocin Mupirosin Мупіроцин
|
||||
Nalidixic acid FALSE TRUE TRUE FALSE 萘啶酸 Nalidixinsyre Nalidixinezuur Acide nalidixique Nalidixinsäure Ναλιδιξικό οξύ Acido nalidixico ネチルミシン Kwas nalidyksowy Ácido nalidíxico Налидиксовая кислота Ácido nalidíxico Nalidixinsyra Nalidiksik asit Налідиксова кислота
|
||||
Neomycin FALSE TRUE TRUE FALSE 霉素 Neomycin Neomycine Néomycine Neomycin Νεομυκίνη Neomicina ニトロフラントイン Neomycyna Neomicina Неомицин Neomicina Neomycin Neomisin Неоміцин
|
||||
Netilmicin FALSE TRUE TRUE FALSE 硝苯地平 Netilmicin Netilmicine Netilmicine Netilmicin Netilmicin Netilmicin ノルフロキサシン Netilmicin Netilmicin Нетилмицин Netilmicina Netilmicin Netilmisin Нетилміцин
|
||||
Nitrofurantoin FALSE TRUE TRUE FALSE 硝呋太尔 Nitrofurantoin Nitrofurantoine Nitrofurantoïne Nitrofurantoin Νιτροφουραντοΐνη Nitrofurantoina ノボビオシン Nitrofurantoina Nitrofurantoína Нитрофурантоин Nitrofurantoína Nitrofurantoin Nitrofurantoin Нітрофурантоїн
|
||||
Norfloxacin FALSE TRUE TRUE FALSE 诺氟沙星 Norfloxacin Norfloxacine Norfloxacine Norfloxacin Norfloxacin Norfloxacina ナイスタチン Norfloxacin Norfloxacin Норфлоксацин Norfloxacina Norfloxacin Norfloksasin Норфлоксацин
|
||||
Novobiocin FALSE TRUE TRUE FALSE 诺氟沙星 Novobiocin Novobiocine Novobiocine Novobiocin Novobiocin Novobiocin オフロキサシン Nowobiocyna Novobiocin Новобиоцин Novobiocina Novobiocin Novobiocin Новобіоцин
|
||||
Nystatin FALSE TRUE TRUE FALSE 囊肿 Nystatin Nystatine Nystatine Nystatin Νυστατίνη Nystatin オレアンドマイシン Nystatyna Nystatin Нистатин Nistatina Nystatin Nistatin Ністатин
|
||||
Ofloxacin FALSE TRUE TRUE FALSE 氧氟沙星 Ofloxacin Ofloxacine Ofloxacine Ofloxacin Ofloxacin Ofloxacin オルニダゾール Ofloxacin Ofloxacin Офлоксацин Ofloxacina Ofloxacin Ofloksasin Офлоксацин
|
||||
Oleandomycin FALSE TRUE TRUE FALSE 奥兰多霉素 Oleandomycin Oleandomycine Oleandomycine Oleandomycin Oleandomycin Oleandomicina オキサシリン Oleandomycin Oleandomicina Олеандомицин Oleandomicina Oleandomycin Oleandomisin Олеандоміцин
|
||||
Ornidazole FALSE TRUE TRUE FALSE 奥硝唑 Ornidazol Ornidazol Ornidazole Ornidazol Ορνιδαζόλη Ornidazolo オキソリニック酸 Ornidazol Ornidazole Орнидазол Ornidazol Ornidazol Ornidazol Орнідазол
|
||||
Oxacillin FALSE TRUE TRUE FALSE 奥沙西林 Oxacillin Oxacilline Oxacilline Oxacillin Οξακιλλίνη Oxacillina オキシテトラサイクリン Oksacylina Oxacillin Оксациллин Oxacilina Oxacillin Oksasilin Оксацилін
|
||||
Oxolinic acid FALSE TRUE TRUE FALSE 氧氟沙星 Oxolinsyre Oxolinezuur Acide oxolinique Oxolinsäure Οξολινικό οξύ Acido ossolinico パズフロキサシン Kwas oksolinowy Ácido oxolínico Оксолиновая кислота Ácido oxolínico Oxolinsyra Oksolinik asit Оксолінова кислота
|
||||
Oxytetracycline FALSE TRUE TRUE FALSE 土四环素 Oxytetracyclin Oxytetracycline Oxytétracycline Oxytetracyclin Οξυτετρακυκλίνη Ossitetraciclina ペフロキサシン Oksytetracyklina Oxitetraciclina Окситетрациклин Oxitetraciclina Oxytetracyklin Oksitetrasiklin Окситетрациклін
|
||||
Pazufloxacin FALSE TRUE TRUE FALSE 帕唑沙星 Pazufloxacin Pazufloxacine Pazufloxacine Pazufloxacin Παζουφλοξασίνη Pazufloxacin ペナメシリン Pazufloxacin Pazufloxacin Пазуфлоксацин Pazufloxacina Pazufloxacin Pazufloksasin Пазуфлоксацин
|
||||
Pefloxacin FALSE TRUE TRUE FALSE 培氟沙星 Pefloxacin Pefloxacine Péfloxacine Pefloxacin Pefloxacin Pefloxacina ペニシリン Pefloksacyna Pefloxacin Пефлоксацин Pefloxacina Pefloxacin Pefloksasin Пефлоксацин
|
||||
Penamecillin FALSE TRUE TRUE FALSE 青霉素 Penamecillin Penamecilline Pénamécilline Penamecillin Πεναμεσιλλίνη Penamecillina フェネチシリン Penamecylina Penamecilina Пенамециллин Penamecilina Penamecillin Penamecillin Пенамецилін
|
||||
Penicillin FALSE TRUE TRUE FALSE 青霉素 Penicillin Penicilline Pénicilline Penicillin Πενικιλλίνη Penicillina フェノキシメチルペニシリン Penicylina Penicilina Пенициллин Penicilina Penicillin Penisilin Пеніцилін
|
||||
Pheneticillin FALSE TRUE TRUE FALSE 菲尼克斯 Pheneticillin Feneticilline Phénéticilline Pheneticillin Φαινετικιλλίνη Feneticillina ピペミド酸 Fenicylina Pheneticillin Фенетициллин Feneticilina Feneticillin Pheneticillin Фенетіцилін
|
||||
Phenoxymethylpenicillin FALSE TRUE TRUE FALSE 苯氧甲基青霉素 Phenoxymethylpenicillin Fenoxymethylpenicilline Phénoxyméthylpénicilline Phenoxymethylpenicillin Φαινοξυμεθυλοπενικιλλίνη Fenossimetilpenicillina ピペラシリン Fenoksymetylopenicylina Fenoximetilpenicilina Феноксиметилпенициллин Fenoximetilpenicilina Fenoximetylpenicillin Fenoksimetilpenisilin Феноксиметилпеніцилін
|
||||
Pipemidic acid FALSE TRUE TRUE FALSE 吡哌酸 Pipemidinsyre Pipemidinezuur Acide pipémidique Pipemidinsäure Πιπεμιδικό οξύ Acido pipemidico ピペラシリン/β-ラクタマーゼ阻害剤 Kwas pipemidowy Ácido pipemídico Пипемидовая кислота Ácido pipemídico Pipemidinsyra Pipemidik asit Піпемідова кислота
|
||||
Piperacillin FALSE TRUE TRUE FALSE 哌拉西林 Piperacillin Piperacilline Pipéracilline Piperacillin Πιπερακιλλίνη Piperacillina ピロミジン酸 Piperacillin Piperacilina Пиперациллин Piperacilina Piperacillin Piperasilin Піперацилін
|
||||
Piperacillin/beta-lactamase inhibitor FALSE TRUE TRUE FALSE 哌拉西林/β-内酰胺酶抑制剂 Piperacillin/beta-lactamasehæmmer Piperacilline/enzymremmer Pipéracilline/inhib. de bêta-lactamase Piperacillin/Beta-Lactamase-Hemmer Πιπερακιλλίνη/αναστολέας της β-λακταμάσης Piperacillina/inib. d. beta-lattamasi ピバンピシリン Piperacylina/inhibitor beta-laktamazy Piperacilina/inibid. da beta-lactamase Пиперациллин/ингибитор бета-лактамазы Piperacilina/inhib. de la beta-lactamasa Piperacillin/betalaktamashämmare Piperasilin/beta-laktamaz inhibitörü Піперацилін/інгібітор бета-лактамаз
|
||||
Piromidic acid FALSE TRUE TRUE FALSE 吡罗米酸 Piromidinsyre Piromidinezuur Acide piromidique Piromidinsäure Πηρομιδικό οξύ Acido piromidico ポリミキシンB Kwas piromidowy Ácido piromídico Пиромидовая кислота Ácido piromídico Piromidinsyra Piromidik asit Піромідова кислота
|
||||
Pivampicillin FALSE TRUE TRUE FALSE 哌拉西林 Pivampicillin Pivampicilline Pivampicilline Pivampicillin Pivampicillin Pivampicillina ポサコナゾール Pivampicillin Pivampicilina Пивампициллин Pivampicilina Pivampicillin Pivampisilin Півампіцилін
|
||||
Polymyxin B FALSE TRUE TRUE FALSE 多粘菌素B Polymyxin B Polymyxine B Polymyxine B Polymyxin B Πολυμυξίνη Β Polimixina B プリスチナマイシン Polimyksyna B Polimixina B Полимиксин В Polimixina B Polymyxin B Polimiksin B Поліміксин B
|
||||
Posaconazole FALSE TRUE TRUE FALSE 泊沙康唑 Posaconazol Posaconazol Posaconazole Posaconazol Ποσακοναζόλη Posaconazolo プロカインベンジルペニシリン Posaconazol Posaconazole Посаконазол Posaconazol Posakonazol Posakonazol Позаконазол
|
||||
Pristinamycin FALSE TRUE TRUE FALSE 普利司特霉素 Pristinamycin Pristinamycine Pristinamycine Pristinamycin Πριστιναμυκίνη Pristinamicina プロピシリン Pristinamycin Pristinamicina Пристинамицин Pristinamicina Pristinamycin Pristinamisin Пристинаміцин
|
||||
Procaine benzylpenicillin FALSE TRUE TRUE FALSE 普鲁卡因青霉素 Prokainbenzylpenicillin Benzylpenicillineprocaine Procaïne benzylpénicilline Procain-Benzylpenicillin Βενζυλοπενικιλλίνη προκαΐνης Procaina benzilpenicillina プルリフロキサシン Benzylopenicylina prokainowa Procaína benzilpenicilina Прокаин бензилпенициллин Bencilpenicilina procaína Prokainbenzylpenicillin Prokain benzilpenisilin Прокаїну бензилпеніцилін
|
||||
Propicillin FALSE TRUE TRUE FALSE 普利西林 Propicillin Propicilline Propicilline Propicillin Προπικιλλίνη Propicillina キヌプリスチン/ダルフォプリスチン Propicylina Propicilina Пропициллин Propicilina Propicillin Propisilin Пропіцилін
|
||||
Prulifloxacin FALSE TRUE TRUE FALSE 普利沙星 Prulifloxacin Prulifloxacine Prulifloxacine Prulifloxacin Προυλιφλοξασίνη Prulifloxacina リボスタマイシン Prulifloksacyna Prulifloxacina Прулифлоксацин Prulifloxacina Prulifloxacin Prulifloksasin Пруліфлоксацин
|
||||
Quinupristin/dalfopristin FALSE TRUE TRUE FALSE 奎宁斯丁/达夫普利斯丁 Quinupristin/dalfopristin Quinupristine/dalfopristine Quinupristine/dalfopristine Quinupristin/Dalfopristin Κινουπριστίνη/δαλφοπριστίνη Quinupristina/dalfopristina リファブチン Quinupristin/dalfopristin Quinupristin/dalfopristin Квинупристин/дальфопристин Quinupristina/dalfopristina Quinupristin/dalfopristin Quinupristin/dalfopristin Хінупристин/дальфопристин
|
||||
Ribostamycin FALSE TRUE TRUE FALSE 利波霉素 Ribostamycin Ribostamycine Ribostamycine Ribostamycin Ριμποσταμυκίνη Ribostamicina リファンピシン Ribostamycyna Ribostamicina Рибостамицин Ribostamicina Ribostamycin Ribostamisin Рибостаміцин
|
||||
Rifabutin FALSE TRUE TRUE FALSE 利福布汀 Rifabutin Rifabutine Rifabutine Rifabutin Rifabutin Rifabutina リファンピシン/ピラジナミド/エタンブトール/イソニアジド Rifabutin Rifabutin Рифабутин Rifabutina Rifabutin Rifabutin Рифабутин
|
||||
Rifampicin FALSE TRUE TRUE FALSE 利福平 Rifampicin Rifampicine Rifampicine Rifampicin Ριφαμπικίνη Rifampicina リファンピシン/ピラジナミド/イソニアジド Rifampicyna Rifampicina Рифампицин Rifampicina Rifampicin Rifampisin Рифампіцин
|
||||
Rifampicin/pyrazinamide/ethambutol/isoniazid FALSE TRUE TRUE FALSE 利福平/吡嗪酰胺/乙胺丁醇/异烟肼 Rifampicin/pyrazinamid/ethambutol/isoniazid Rifampicine/pyrazinamide/ethambutol/isoniazide Rifampicine/pyrazinamide/éthambutol/isoniazide Rifampicin/Pyrazinamid/Ethambutol/Isoniazid Ριφαμπικίνη/πυραζιναμίδη/αιθαμβουτόλη/ισονιαζίδη Rifampicina/pirazinamide/etambutolo/isoniazide リファンピシン/イソニアジド Rifampicyna/pirazinamid/etambutol/izoniazyd Rifampicina/pirazinamida/etambutol/isoniazida Рифампицин/пиразинамид/этамбутол/исониазид Rifampicina/pirazinamida/etambutol/isoniazida Rifampicin/pyrazinamid/ethambutol/isoniazid Rifampisin/pirazinamid/etambutol/izoniazid Рифампіцин/піразинамід/етамбутол/ізоніазид
|
||||
Rifampicin/pyrazinamide/isoniazid FALSE TRUE TRUE FALSE 利福平/吡嗪酰胺/异烟肼 Rifampicin/pyrazinamid/isoniazid Rifampicine/pyrazinamide/isoniazide Rifampicine/pyrazinamide/isoniazide Rifampicin/Pyrazinamid/Isoniazid Ριφαμπικίνη/πυραζιναμίδη/ισονιαζίδη Rifampicina/pirazinamide/isoniazide リファマイシン Rifampicyna/pirazynamid/izoniazyd Rifampicina/pirazinamida/isoniazida Рифампицин/пиразинамид/изониазид Rifampicina/pirazinamida/isoniazida Rifampicin/pyrazinamid/isoniazid Rifampisin/pirazinamid/izoniazid Рифампіцин/піразинамід/ізоніазид
|
||||
Rifampicin/isoniazid FALSE TRUE TRUE FALSE 利福平/异烟肼 Rifampicin/isoniazid Rifampicine/isoniazide Rifampicine/isoniazide Rifampicin/Isoniazid Ριφαμπικίνη/ισονιαζίδη Rifampicina/isoniazide リファキシミン Rifampicyna/izoniazyd Rifampicina/isoniazida Рифампицин/изониазид Rifampicina/isoniazida Rifampicin/isoniazid Rifampisin/izoniazid Рифампіцин/ізоніазид
|
||||
Rifamycin FALSE TRUE TRUE FALSE 利福霉素 Rifamycin Rifamycine Rifamycine Rifamycin Ριφαμυκίνη Rifamicina ロキタマイシン Rifamycyna Rifamycin Рифамицин Rifamicina Rifamycin Rifamisin Рифаміцин
|
||||
Rifaximin FALSE TRUE TRUE FALSE 利福昔明 Rifaximin Rifaximine Rifaximine Rifaximin Rifaximin Rifaximina ロソキサシン Rifaximin Rifaximin Рифаксимин Rifaximina Rifaximin Rifaximin Рифаксимін
|
||||
Rokitamycin FALSE TRUE TRUE FALSE 罗奇霉素 Rokitamycin Rokitamycine Rokitamycine Rokitamycin Ροκιταμυκίνη Rokitamicina ロキシスロマイシン Rokitamycyna Rokitamycin Рокитамицин Rokitamicina Rokitamycin Rokitamisin Рокітаміцин
|
||||
Rosoxacin FALSE TRUE TRUE FALSE 罗红霉素 Rosoxacin Rosoxacine Rosoxacine Rosoxacin Rosoxacin Rosoxacina ルフロキサシン Rosoxacin Rosoxacina Розоксацин Rosoxacina Rosoxacin Rosoxacin Розоксацин
|
||||
Roxithromycin FALSE TRUE TRUE FALSE 罗红霉素 Roxithromycin Roxitromycine Roxithromycine Roxithromycin Roxithromycin Roxitromicina シソマイシン Roksytromycyna Roxitromicina Рокситромицин Roxitromicina Roxitromycin Roxithromycin Рокситроміцин
|
||||
Rufloxacin FALSE TRUE TRUE FALSE 罗氟沙星 Rufloxacin Rufloxacine Rufloxacine Rufloxacin Rufloxacin Rufloxacina アミノサリチル酸ソーダ Rufloxacin Rufloxacin Руфлоксацин Rufloxacina Rufloxacin Rufloksasin Руфлоксацин
|
||||
Sisomicin FALSE TRUE TRUE FALSE 西索米星 Sisomicin Sisomicine Sisomicine Sisomicin Sisomicin Sisomicina スパルフロキサシン Sisomicin Sisomicina Сизомицин Sisomicina Sisomicin Sisomisin Сизоміцин
|
||||
Sodium aminosalicylate FALSE TRUE TRUE FALSE 氨基水杨酸钠 Natriumaminosalicylat Aminosalicylzuur Aminosalicylate de sodium Natrium-Aminosalicylat Αμινοσαλικυλικό νάτριο Sodio aminosalicilato スペクチノマイシン Aminosalicylan sodu Aminosalicilato de sódio Аминосалицилат натрия Aminosalicilato de sodio Natriumaminosalicylat Sodyum aminosalisilat Натрію аміносаліцилат
|
||||
Sparfloxacin FALSE TRUE TRUE FALSE 氨水杨酸钠 Sparfloxacin Sparfloxacine Sparfloxacine Sparfloxacin Sparfloxacin Sparfloxacina スピラマイシン Sparfloxacin Sparfloxacin Спарфлоксацин Esparfloxacina Sparfloxacin Sparfloksasin Спарфлоксацин
|
||||
Spectinomycin FALSE TRUE TRUE FALSE 大观霉素 Spectinomycin Spectinomycine Spectinomycine Spectinomycin Spectinomycin Spectinomycin スピラマイシン/メトロニダゾール Spektynomycyna Spectinomycin Спектиномицин Espectinomicina Spektinomycin Spektinomisin Спектиноміцин
|
||||
Spiramycin FALSE TRUE TRUE FALSE 斯皮拉菌素 Spiramycin Spiramycine Spiramycine Spiramycin Σπιραμυκίνη Spiramicina ブドウ球菌免疫グロブリン Spiramycyna Spiramycin Спирамицин Espiramicina Spiramycin Spiramisin Спіраміцин
|
||||
Spiramycin/metronidazole FALSE TRUE TRUE FALSE 螺旋霉素/甲硝唑 Spiramycin/metronidazol Spiramycine/metronidazol Spiramycine/métronidazole Spiramycin/Metronidazol Σπιραμυκίνη/μετρονιδαζόλη Spiramicina/metronidazolo ストレプトデュオシン Spiramycyna/metronidazol Spiramycin/metronidazol Спирамицин/метронидазол Espiramicina/metronidazol Spiramycin/metronidazol Spiramisin/metronidazol Спіраміцин/метронідазол
|
||||
Staphylococcus immunoglobulin FALSE TRUE TRUE FALSE 葡萄球菌免疫球蛋白 Stafylokok-immunglobulin Stafylokokkenimmunoglobuline Immunoglobuline staphylococcique Staphylococcus-Immunoglobulin Σταφυλόκοκκος ανοσοσφαιρίνη Immunoglobulina per stafilococco ストレプトマイシン Immunoglobulina gronkowcowa Imunoglobulina de Staphylococcus Стафилококковый иммуноглобулин Inmunoglobulina estafilocócica Immunoglobulin mot stafylokocker Staphylococcus immünoglobulin Стафілококовий імуноглобулін
|
||||
Streptoduocin FALSE TRUE TRUE FALSE 链霉素 Streptoduocin Streptoduocine Streptoduocine Streptoduocin Streptoduocin Streptoduocin ストレプトマイシン/イソニアジド Streptoduocin Estreptoduocina Стрептодуоцин Estreptoduocina Streptoduocin Streptoduosin Стрептодуоцин
|
||||
Streptomycin FALSE TRUE TRUE FALSE 霉素 Streptomycin Streptomycine Streptomycine Streptomycin Στρεπτομυκίνη Streptomicina スルベニシリン Streptomycyna Streptomycin Стрептомицин Estreptomicina Streptomycin Streptomisin Стрептоміцин
|
||||
Streptomycin/isoniazid FALSE TRUE TRUE FALSE 链霉素/异烟肼 Streptomycin/isoniazid Streptomycine/isoniazide Streptomycine/isoniazide Streptomycin/Isoniazid Στρεπτομυκίνη/ισονιαζίδη Streptomicina/isoniazide スルファダイアジン/テトロキソプリム Streptomycyna/izoniazyd Streptomicina/isoniazida Стрептомицин/изониазид Estreptomicina/isoniazida Streptomycin/isoniazid Streptomisin/izoniazid Стрептоміцин/ізоніазид
|
||||
Sulbenicillin FALSE TRUE TRUE FALSE 磺苄西林 Sulbenicillin Sulbenicilline Sulbenicilline Sulbenicillin Sulbenicillin Sulbenicillina スルファジアジン/トリメトプリム Sulbenicylina Sulbenicilina Сульбенициллин Sulbenicilina Sulbenicillin Sulbenisilin Сульбеніцилін
|
||||
Sulfadiazine/tetroxoprim FALSE TRUE TRUE FALSE 磺胺嘧啶/四氧嘧啶 Sulfadiazin/tetroxoprim Sulfadiazine/tetroxoprim Sulfadiazine/tetroxoprime Sulfadiazin/Tetroxoprim Σουλφαδιαζίνη/τετροξοπρίμη Sulfadiazina/tetroxoprim スルファジミジン/トリメトプリム Sulfadiazyna/tetroksoprim Sulfadiazina/tetroxoprim Сульфадиазин/тетроксоприм Sulfadiazina/tetroxoprim Sulfadiazin/tetroxoprim Sülfadiazin/tetroksoprim Сульфадіазин/тетроксоприм
|
||||
Sulfadiazine/trimethoprim FALSE TRUE TRUE FALSE 磺胺嘧啶/三甲氧苄啶 Sulfadiazin/trimethoprim Sulfadiazine/trimethoprim Sulfadiazine/triméthoprime Sulfadiazin/Trimethoprim Σουλφαδιαζίνη/τριμεθοπρίμη Sulfadiazina/trimetoprim スルファフラゾール Sulfadiazyna/trimetoprim Sulfadiazina/trimethoprim Сульфадиазин/триметоприм Sulfadiazina/trimetoprima Sulfadiazin/trimetoprim Sülfadiazin/trimetoprim Сульфадіазин/триметоприм
|
||||
Sulfadimidine/trimethoprim FALSE TRUE TRUE FALSE 磺胺嘧啶/三甲氧苄啶 Sulfadimidin/trimethoprim Sulfadimidine/trimethoprim Sulfadimidine/triméthoprime Sulfadimidin/Trimethoprim Σουλφαδιμιδίνη/τριμεθοπρίμη Sulfadimidina/trimetoprim スルファイソジミジン Sulfadimidyna/trimetoprim Sulfadimidina/trimethoprim Сульфадимидин/триметоприм Sulfadimidina/trimetoprima Sulfadimidin/trimetoprim Sülfadimidin/trimetoprim Сульфадимідин/триметоприм
|
||||
Sulfafurazole FALSE TRUE TRUE FALSE 磺胺呋喃唑 Sulfafurazol Sulfafurazol Sulfafurazole Sulfafurazol Σουλφαφουραζόλη Sulfafurazolo スルファレン Sulfafurazol Sulfafurazole Сульфафуразол Sulfafurazol Sulfafurazol Sülfafurazol Сульфафуразол
|
||||
Sulfaisodimidine FALSE TRUE TRUE FALSE 磺胺二甲嘧啶 Sulfaisodimidin Sulfisomidine Sulfaisodimidine Sulfaisodimidin Sulfaisodimidine Sulfaisodimidina スルファマゾン Sulfaisodimidine Sulfaisodimidina Сульфаизодимидин Sulfaisodimidina Sulfaisodimidin Sülfaizodimidin Сульфаізодимідин
|
||||
Sulfalene FALSE TRUE TRUE FALSE 磺胺类药物 Sulfalen Sulfaleen Sulfalène Sulfalene Sulfalene Sulfalene スルファメラジン/トリメトプリム Sulfalen Sulfaleno Сульфален Sulfaleno Sulfen Sülfalen Сульфален
|
||||
Sulfamazone FALSE TRUE TRUE FALSE 磺胺脒 Sulfamazon Sulfamazon Sulfamazone Sulfamazon Sulfamazone Sulfamazone スルファメチゾール Sulfamazon Sulfamazona Сульфамазон Sulfamazona Sulfamazon Sülfamazon Сульфамазон
|
||||
Sulfamerazine/trimethoprim FALSE TRUE TRUE FALSE 磺胺脒/三甲氧苄氨嘧啶 Sulfamerazin/trimethoprim Sulfamerazine/trimethoprim Sulfamérazine/triméthoprime Sulfamerazin/Trimethoprim Σουλφαμεραζίνη/τριμεθοπρίμη Sulfamerazina/trimetoprim スルファメトキサゾール Sulfamerazyna/trimetoprim Sulfamerazina/trimethoprim Сульфамеразин/триметоприм Sulfamerazina/trimetoprima Sulfamerazin/trimetoprim Sülfamerazin/trimetoprim Сульфамеразин/триметоприм
|
||||
Sulfamethizole FALSE TRUE TRUE FALSE 磺胺甲基咪唑 Sulfamethizol Sulfamethizol Sulfaméthizole Sulfamethizol Sulfamethizole Sulfamethizolo スルファメトキサゾール/トリメトプリム Sulfamethizole Sulfametizole Сульфаметизол Sulfametozol Sulfamethizol Sülfametizol Сульфаметізол
|
||||
Sulfamethoxazole FALSE TRUE TRUE FALSE 磺胺甲噁唑 Sulfamethoxazol Sulfamethoxazol Sulfaméthoxazole Sulfamethoxazol Σουλφαμεθοξαζόλη Sulfametossazolo スルファメトキシジアジン Sulfametoksazol Sulfamethoxazole Сульфаметоксазол Sulfametoxazol Sulfametoxazol Sülfametoksazol Сульфаметоксазол
|
||||
Sulfamethoxazole/trimethoprim FALSE TRUE TRUE FALSE 磺胺甲噁唑/三甲氧苄啶 Sulfamethoxazol/trimethoprim Sulfamethoxazol/trimethoprim Sulfaméthoxazole/triméthoprime Sulfamethoxazol/Trimethoprim Σουλφαμεθοξαζόλη/τριμεθοπρίμη Sulfametossazolo/trimetoprim スルファメトロール/トリメトプリム Sulfametoksazol/trimetoprim Sulfametoxazol/trimethoprim Сульфаметоксазол/триметоприм Sulfametoxazol/trimetoprima Sulfametoxazol/trimetoprim Sülfametoksazol/trimetoprim Сульфаметоксазол/триметоприм
|
||||
Sulfametoxydiazine FALSE TRUE TRUE FALSE 磺胺甲噁唑 Sulfametoxydiazin Sulfamethoxydiazine Sulfamétoxydiazine Sulfametoxydiazin Sulfametoxydiazine Sulfametoxydiazine スルファモキソール Sulfametoksydiazyna Sulfametoxidiazina Сульфаметоксидиазин Sulfametoxidiazina Sulfametoxydiazin Sulfametoksidiyazin Сульфаметоксидіазин
|
||||
Sulfametrole/trimethoprim FALSE TRUE TRUE FALSE 磺胺甲醚/三甲氧嘧啶 Sulfametrol/trimethoprim Sulfametrol/trimethoprim Sulfamétrole/triméthoprime Sulfametrole/Trimethoprim Σουλφαμετρόλη/τριμεθοπρίμη Sulfametrole/trimetoprim スルファモキソール/トリメトプリム Sulfametrol/trimetoprim Sulfametrole/trimethoprim Сульфаметрол/триметоприм Sulfametrol/trimetoprima Sulfametrol/trimetoprim Sülfametrol/trimetoprim Сульфаметрол/триметоприм
|
||||
Sulfamoxole FALSE TRUE TRUE FALSE 磺胺甲噁唑 Sulfamoxol Sulfamoxol Sulfamoxole Sulfamoxol Sulfamoxole Sulfamoxolo スルファペリン Sulfamoksol Sulfamoxole Сульфамоксол Sulfamoxole Sulfamoxol Sülfamoksol Сульфамоксол
|
||||
Sulfamoxole/trimethoprim FALSE TRUE TRUE FALSE 磺胺甲噁唑/三甲氧苄啶 Sulfamoxol/trimethoprim Sulfamoxol/trimethoprim Sulfamoxole/triméthoprime Sulfamoxol/Trimethoprim Σουλφαμοξόλη/τριμεθοπρίμη Sulfamoxolo/trimetoprim スルファフェナゾール Sulfamoksol/trimetoprim Sulfamoxole/trimethoprim Сульфамоксол/триметоприм Sulfamoxol/trimetoprima Sulfamoxol/trimetoprim Sülfamoksol/trimetoprim Сульфамоксол/триметоприм
|
||||
Sulfaperin FALSE TRUE TRUE FALSE 磺胺类药物 Sulfaperin Sulfaperine Sulfapérine Sulfaperin Sulfaperin Sulfaperin スルファチアゾール Sulfaperin Sulfaperin Сульфаперин Sulfametoxazol Sulfaperin Sülfaperin Сульфаперин
|
||||
Sulfaphenazole FALSE TRUE TRUE FALSE 磺胺苯吡唑 Sulfaphenazol Sulfafenazol Sulfaphénazole Sulfaphenazol Σουλφαφαιναζόλη Sulfafenazolo スルファチオ尿素 Sulfafenazol Sulfafenazol Сульфафеназол Sulfafenazol Sulfafenazol Sülfafenazol Сульфафеназол
|
||||
Sulfathiazole FALSE TRUE TRUE FALSE 磺胺噻唑 Sulfathiazol Sulfathiazol Sulfathiazole Sulfathiazol Sulfathiazole Sulfathiazole スルタミシリン Sulfatiazol Sulfatazol Сульфатиазол Sulfatiazol Sulfathiazol Sulfathiazole Сульфатіазол
|
||||
Sulfathiourea FALSE TRUE TRUE FALSE 磺胺硫脲 Sulfathiourea Sulfathioureum Sulfathiourée Sulfathioharnstoff Sulfathiourea Sulfathiourea タランピシリン Sulfathiourea Sulfathiourea Сульфатиомочевина Sulfathiourea Sulfatiourea Sulfathiourea Сульфатіосечовина
|
||||
Sultamicillin FALSE TRUE TRUE FALSE 苏打米林 Sultamicillin Sultamicilline Sultamicilline Sultamicillin Sultamicillin Sultamicillina テイコプラニン Sultamicillin Sultamicillin Сультамициллин Sultamicilina Sultamicillin Sultamicillin Сультаміцилін
|
||||
Talampicillin FALSE TRUE TRUE FALSE 塔拉比西林 Talampicillin Talampicilline Talampicilline Talampicillin Talampicillin Talampicillina テリスロマイシン Talampicylina Talampicilina Талампициллин Talampicilina Talampicillin Talampisilin Талампіцилін
|
||||
Teicoplanin FALSE TRUE TRUE FALSE 泰科普兰素 Teicoplanin Teicoplanine Teicoplanine Teicoplanin Teicoplanin Teicoplanina テマフロキサシン Teicoplanin Teicoplanin Тейкопланин Teicoplanina Teicoplanin Teikoplanin Тейкопланін
|
||||
Telithromycin FALSE TRUE TRUE FALSE 泰利霉素 Telithromycin Telitromycine Télithromycine Telithromycin Τελιθρομυκίνη Telitromicina テモシリン Telitromycyna Telitromicina Телитромицин Telitromicina Telitromycin Telitromisin Телітроміцин
|
||||
Temafloxacin FALSE TRUE TRUE FALSE 氨甲环酸 Temafloxacin Temafloxacine Temafloxacine Temafloxacin Temafloxacin Temafloxacina テノホビルジソプロキシル Temafloksacyna Temafloxacin Темафлоксацин Temafloxacina Temafloxacin Temafloksasin Темафлоксацин
|
||||
Temocillin FALSE TRUE TRUE FALSE 氨甲蝶呤 Temocillin Temocilline Temocillin Temocillin Temocillin Temocillina テリジドン Temocillin Temocillin Темоциллин Temocilina Temocillin Temocillin Темоцилін
|
||||
Tenofovir disoproxil FALSE TRUE TRUE FALSE 特诺福韦酯 Tenofovir disoproxil Tenofovir Tenofovir disoproxil Tenofovir Disoproxil Tenofovir disoproxil Tenofovir disoproxil チアンフェニコール Tenofovir disoproxil Tenofovir disoproxil Тенофовир дизопроксил Tenofovir disoproxil Tenofovir disoproxil Tenofovir disoproksil Тенофовір дизопроксил
|
||||
Terizidone FALSE TRUE TRUE FALSE 特立兹酮 Terizidon Terizidon Terizidone Terizidon Terizidone Terizidone チオアセタゾン/イソニアジド Terizidon Terizidone Теризидон Terizidona Terizidon Terizidon Теризидон
|
||||
Thiamphenicol FALSE TRUE TRUE FALSE 硫苯尼考 Thiamphenicol Thiamfenicol Thiamphénicol Thiamphenicol Thiamphenicol Tiamfenicolo チカルシリン Tiamfenikol Tiamfenicol Тиамфеникол Tiamfenicol Tiamfenikol Thiamphenicol Тіамфенікол
|
||||
Thioacetazone/isoniazid FALSE TRUE TRUE FALSE 硫乙酰唑酮/异烟肼 Thioacetazon/isoniazid Thioacetazon/isoniazide Thioacétazone/isoniazide Thioacetazon/Isoniazid Θειοακεταζόνη/ισονιαζίδη Tioacetazone/isoniazide チカルシリン/β-ラクタマーゼ阻害剤 Tioacetazon/izoniazyd Thioacetazone/isoniazid Тиоацетазон/изониазид Tioacetazona/isoniazida Thioacetazon/isoniazid Tiyoasetazon/izoniazid Тіоацетазон/ізоніазид
|
||||
Ticarcillin FALSE TRUE TRUE FALSE 替卡西林 Ticarcillin Ticarcilline Ticarcilline Ticarcillin Τικαρκιλλίνη Ticarcillina チカルシリン/クラブラン酸 Ticarcillin Ticarcilina Тикарциллин Ticarcilina Ticarcillin Ticarcillin Тикарцилін
|
||||
Ticarcillin/beta-lactamase inhibitor FALSE TRUE TRUE FALSE 替卡西林/β-内酰胺酶抑制剂 Ticarcillin/beta-lactamasehæmmer Ticarcilline/enzymremmer Ticarcilline/inhib. de bêta-lactamase Ticarcillin/Beta-Lactamase-Hemmer Τικαρκιλλίνη/αναστολέας της β-λακταμάσης Ticarcillina/inib. d. beta-lattamasi チニダゾール Tikarcylina/inhibitor beta-laktamazy Ticarcilina/inibid. da beta-lactamase Тикарциллин/ингибитор бета-лактамазы Ticarcilina/inhib. de la betalactamasa Ticarcillin/beta-laktamashämmare Tikarsilin/beta-laktamaz inhibitörü Тикарцилін/інгібітор бета-лактамаз
|
||||
Ticarcillin/clavulanic acid FALSE TRUE TRUE FALSE 替卡西林/克拉维酸 Ticarcillin/clavulansyre Ticarcilline/clavulaanzuur Ticarcilline/acide clavulanique Ticarcillin/Clavulansäure Τικαρκιλλίνη/κλαβουλανικό οξύ Ticarcillina/acido clavulanico トブラマイシン Tikarcylina/kwas klawulanowy Ticarcilina/ácido clavulanico Тикарциллин/клавулановая кислота Ticarcilina/ácido clavulánico Ticarcillin/clavulansyra Tikarsilin/klavulanik asit Тикарцилін/клавуланова кислота
|
||||
Tinidazole FALSE TRUE TRUE FALSE 替尼唑 Tinidazol Tinidazol Tinidazole Tinidazol Τινιδαζόλη Tinidazolo トリメトプリム/スルファメトキサゾール Tinidazol Tinidazole Тинидазол Tinidazol Tinidazol Tinidazol Тинідазол
|
||||
Tobramycin FALSE TRUE TRUE FALSE 妥布霉素 Tobramycin Tobramycine Tobramycine Tobramycin Τομπραμυκίνη Tobramicina トロレアンドマイシン Tobramycyna Tobramycin Тобрамицин Tobramicina Tobramycin Tobramisin Тобраміцин
|
||||
Trimethoprim/sulfamethoxazole FALSE TRUE TRUE FALSE 三甲氧嘧啶/磺胺甲恶唑 Trimethoprim/sulfamethoxazol Cotrimoxazol Triméthoprime/sulfaméthoxazole Trimethoprim/Sulfamethoxazol Τριμεθοπρίμη/σουλφαμεθοξαζόλη Trimetoprim/sulfametossazolo トロバフロキサシン Trimetoprim/sulfametoksazol Trimethoprim/sulfametoxazol Триметоприм/сульфаметоксазол Trimetoprima/sulfametoxazol Trimetoprim/sulfametoxazol Trimetoprim/sülfametoksazol Триметоприм/сульфаметоксазол
|
||||
Troleandomycin FALSE TRUE TRUE FALSE 托拉多霉素 Troleandomycin Troleandomycine Troleandomycine Troleandomycin Τρολεαντομυκίνη Troleandomicina バンコマイシン Troleandomycyna Troleandomicina Тролеандомицин Troleandomicina Troleandomycin Troleandomisin Тролеандоміцин
|
||||
Trovafloxacin FALSE TRUE TRUE FALSE 特戊沙星 Trovafloxacin Trovafloxacine Trovafloxacine Trovafloxacin Τροβαφλοξασίνη Trovafloxacin ボリコナゾール Trovafloxacin Trovafloxacin Тровафлоксацин Trovafloxacina Trovafloxacin Trovafloksasin Тровафлоксацин
|
||||
Vancomycin FALSE TRUE TRUE FALSE 唑啉酮 Vancomycin Vancomycine Vancomycine Vancomycin Βανκομυκίνη Vancomicina アミノグリコシド系抗生物質 Wankomycyna Vancomycin Ванкомицин Vancomicina Vancomycin Vankomisin Ванкоміцин
|
||||
Voriconazole FALSE TRUE TRUE FALSE 伏立康唑 Voriconazol Voriconazol Voriconazole Voriconazol Voriconazole Voriconazolo アンフェニコール Worikonazol Voriconazol Вориконазол Voriconazol Vorikonazol Vorikonazol Вориконазол
|
||||
Aminoglycosides FALSE TRUE TRUE FALSE 氨基糖苷类 Aminoglykosider Aminoglycosiden Aminoglycosides Aminoglykoside Αμινογλυκοσίδες Aminoglicosidi 抗真菌剤/抗真菌剤 Aminoglikozydy Aminoglycosides Аминогликозиды Aminoglucósidos Aminoglykosider Aminoglikozidler Аміноглікозиди
|
||||
Amphenicols FALSE TRUE TRUE FALSE 安息香醇 Amphenicoler Amfenicolen Amphénicols Amphenicole Αμφενικόλες Amphenicols 抗マイコバクテリア薬 Amfenikol Anfenicóis Амфениколы Anfenicoles Amfenikoler Amphenicols Амфеніколи
|
||||
Antifungals/antimycotics FALSE TRUE TRUE FALSE 抗真菌药/抗真菌药 Antimykotika/antimykotika Antifungica/antimycotica Antifongiques/antimycotiques Antimykotika/Antimykotika Αντιμυκητιασικά/αντιμυκητιασικά Antifungini/antimicotici β-ラクタム系/ペニシリン系 Środki przeciwgrzybicze/przeciwmikotyczne Antifúngicos/antimicóticos Противогрибковые препараты/антимикотики Antifúngicos/antimicóticos Antimykotika/antimykotika Antifungaller/antimikotikler Протигрибкові засоби/антимікотики
|
||||
Antimycobacterials FALSE TRUE TRUE FALSE 抗霉菌素类 Antimycobakterier Antimycobacteriele middelen Antimycobactériens Antimykobakterielle Mittel Αντιμυκοβακτηριακά Antimicobatterici セファロスポリン系(第1世代) Środki przeciwgrzybicze Antimycobacterials Антимикобактериальные препараты Antimicrobianos Antimykobakterier Antimikobakteriyeller Засоби, що діють на мікобактерії
|
||||
Beta-lactams/penicillins FALSE TRUE TRUE FALSE β-内酰胺类/青霉素类 Beta-lactamer/penicilliner Beta-lactams/penicillines Bêta-lactamines/pénicillines Beta-Lactame/Penicilline Β-λακτάμες/πενικιλλίνες Beta-lattami/penicilline セファロスポリン(第2世代) Beta-laktamy/penicyliny Beta-lactâmicas/penicilinas Бета-лактамы/пенициллины Beta-lactámicos/penicilinas Beta-laktamer/penicilliner Beta-laktamlar/penisilinler Бета-лактами/пеніциліни
|
||||
Cephalosporins (1st gen.) FALSE TRUE TRUE FALSE 头孢菌素类(第一代) Cefalosporiner (1. gen.) Cefalosporines (1e gen.) Céphalosporines (1ère génération) Cephalosporine (1. Gen.) Κεφαλοσπορίνες (1ης γενιάς) Cefalosporine (1° gen.) セファロスポリン(第3世代) Cefalosporyny (1. gen.) Cefalosporinas (1º género) Цефалоспорины (1-го пок.) Cefalosporinas (1er gen.) Kefalosporiner (första gen.) Sefalosporinler (1. kuşak) Цефалоспорини (1 пок.)
|
||||
Cephalosporins (2nd gen.) FALSE TRUE TRUE FALSE 头孢菌素类(第二代) Cefalosporiner (2. gen.) Cefalosporines (2e gen.) Céphalosporines (2ème génération) Cephalosporine (2. Gen.) Κεφαλοσπορίνες (2ης γενιάς) Cefalosporine (2° gen.) セファロスポリン(第4世代) Cefalosporyny (2. gen.) Cefalosporinas (2ª gen.) Цефалоспорины (2-го пок.) Cefalosporinas (2do gen.) Kefalosporiner (andra gen.) Sefalosporinler (2. kuşak) Цефалоспорини (2 пок.)
|
||||
Cephalosporins (3rd gen.) FALSE TRUE TRUE FALSE 头孢菌素类(第三代) Cefalosporiner (3. gen.) Cefalosporines (3e gen.) Céphalosporines (3ème génération) Cephalosporine (3. Gen.) Κεφαλοσπορίνες (3ης γενιάς) Cefalosporine (3° gen.) セファロスポリン(第5世代) Cefalosporyny (3 gen.) Cefalosporinas (3ª gen.) Цефалоспорины (3-го пок.) Cefalosporinas (3er gen.) Kefalosporiner (tredje gen.) Sefalosporinler (3. kuşak) Цефалоспорини (3 пок.)
|
||||
Cephalosporins (4th gen.) FALSE TRUE TRUE FALSE 头孢菌素类(第四代) Cefalosporiner (4. gen.) Cefalosporines (4e gen.) Céphalosporines (4ème génération) Cephalosporine (4. Gen.) Κεφαλοσπορίνες (4ης γενιάς) Cefalosporine (4° gen.) セファロスポリン(未分類の世代) Cefalosporyny (4 gen.) Cefalosporinas (4.ª gen.) Цефалоспорины (4-го пок.) Cefalosporinas (4ª gen.) Kefalosporiner (4:e gen.) Sefalosporinler (4. kuşak) Цефалоспорини (4 пок.)
|
||||
Cephalosporins (5th gen.) FALSE TRUE TRUE FALSE 头孢菌素(第五代) Cefalosporiner (5. gen.) Cefalosporines (5e gen.) Céphalosporines (5e gén.) Cephalosporine (5. Gen.) Κεφαλοσπορίνες (5ης γενιάς) Cefalosporine (5° gen.) セファロスポリン Cefalosporyny (5. gen.) Cefalosporinas (5.ª gen.) Цефалоспорины (5-го пок.) Cefalosporinas (5º gen.) Kefalosporiner (5:e gen.) Sefalosporinler (5. kuşak) Цефалоспорини (5 пок.)
|
||||
Cephalosporins (unclassified gen.) FALSE TRUE TRUE FALSE 头孢菌素类(未分类的一代) Cefalosporiner (uklassificeret gen.) Cefalosporines (ongeclassificeerd) Céphalosporines (genre non classifié) Cephalosporine (unklassifiziert) Κεφαλοσπορίνες (μη ταξινομημένη γενιά) Cefalosporine (gen. non classificato) 糖ペプチド系 Cefalosporyny (niesklasyfikowana gen.) Cefalosporinas (não classificado gen.) Цефалоспорины (неклассифицированный род) Cefalosporinas (gen. no clasificado) Kefalosporiner (oklassificerad gen.) Sefalosporinler (sınıflandırılmamış nesil) Цефалоспорини (некласифікованого пок.)
|
||||
Cephalosporins FALSE TRUE TRUE FALSE 头孢菌素类 Cefalosporiner Cefalosporines Céphalosporines Cephalosporine Κεφαλοσπορίνες Cefalosporine マクロライド系/リンコサミド系 Cefalosporyny Cefalosporinas Цефалоспорины Cefalosporinas Kefalosporiner Sefalosporinler Цефалоспорини
|
||||
Glycopeptides FALSE TRUE TRUE FALSE 糖肽类药物 Glykopeptider Glycopeptiden Glycopeptides Glykopeptide Γλυκοπεπτίδια Glicopeptidi その他の抗菌薬 Glikopeptydy Glycopeptides Гликопептиды Glicopéptidos Glykopeptider Glikopeptitler Глікопептиди
|
||||
Macrolides/lincosamides FALSE TRUE TRUE FALSE 大环内酯类/林可酰胺类 Makrolider/lincosamider Macroliden/lincosamiden Macrolides/lincosamides Makrolide/Linkosamide Μακρολίδια/λινκοσαμίδια Macrolidi/lincosamidi ポリミキシン Makrolidy/linkozamidy Macrolides/lincosamidas Макролиды/линкозамиды Macrólidos/lincosamidas Makrolider/linkosamider Makrolidler/linkozamidler Макроліди/лінкозаміди
|
||||
Other antibacterials FALSE TRUE TRUE FALSE 其他抗菌剂 Andre antibakterielle stoffer Overige antibiotica Autres antibactériens Andere Antibiotika Άλλα αντιβακτηριακά Altri antibatterici キノロン Inne środki przeciwbakteryjne Outros antibacterianos Другие антибактериальные препараты Otros antibacterianos Andra antibakteriella medel Diğer antibakteriyeller Інші антибактеріальні засоби
|
||||
Polymyxins FALSE TRUE TRUE FALSE 多粘菌素类 Polymyxiner Polymyxines Polymyxines Polymyxine Πολυμυξίνες Polimixine ポリミキシン Polimyksyny Polimixinas Полимиксины Polimixinas Polymyxiner Polimiksinler Поліміксини
|
||||
Quinolones FALSE TRUE TRUE FALSE 喹诺酮类 Kinoloner Quinolonen Quinolones Quinolone Κινολόνες Chinoloni キノロン Quinolony Quinolones Хинолоны Quinolonas Kinoloner Kinolonlar Хінолони
|
||||
pattern regular_expr case_sensitive affect_ab_name affect_mo_name zh cs da nl fi fr de el it ja no pl pt ro ru es sv tr uk
|
||||
language name English FALSE FALSE FALSE FALSE Chinese Czech Danish Dutch Finnish French German Greek Italian Japanese Norwegian Polish Portuguese Romanian Russian Spanish Swedish Turkish Ukrainian
|
||||
language name FALSE FALSE FALSE FALSE 汉语 Čeština Dansk Nederlands Suomi Français Deutsch Ελληνικά Italiano 日本語 Norsk Polski Português Română Русский Español Svenska Türkçe Українська
|
||||
Coagulase-negative Staphylococcus TRUE TRUE FALSE TRUE 凝固酶阴性葡萄球菌 Koaguláza-negativní stafylokok Koagulase-negative stafylokokker Coagulase-negatieve Staphylococcus Koagulaasinegatiivinen stafylokokki Staphylococcus à coagulase négative Koagulase-negative Staphylococcus Σταφυλόκοκκος με αρνητική πηκτικότητα Staphylococcus negativo coagulasi コアグラーゼ陰性ブドウ球菌 Koagulase-negative stafylokokker Staphylococcus koagulazoujemny Staphylococcus coagulase negativo Stafilococ coagulazo-negativ Коагулазоотрицательный стафилококк Staphylococcus coagulasa negativo Koagulasnegativa stafylokocker Koagülaz-negatif Stafilokok Коагулазонегативний стафілокок
|
||||
Coagulase-positive Staphylococcus TRUE TRUE FALSE TRUE 凝固酶阳性葡萄球菌 Koagulázopozitivní stafylokok Koagulase-positive stafylokokker Coagulase-positieve Staphylococcus Koagulaasipositiivinen stafylokokki Staphylococcus à coagulase positif Koagulase-positive Staphylococcus Σταφυλόκοκκος θετικός στην πήξη Staphylococcus positivo coagulasi コアグラーゼ陽性ブドウ球菌 Koagulase-positive stafylokokker Staphylococcus koagulazo-dodatni Staphylococcus coagulase positivo Stafilococul coagulazo-pozitiv Коагулазоположительный стафилококк Staphylococcus coagulasa positivo Koagulaspositiva stafylokocker Koagülaz-pozitif Stafilokok Коагулазопозитивний стафілокок
|
||||
Beta-haemolytic Streptococcus TRUE TRUE FALSE TRUE β-溶血性链球菌 Beta-hemolytický streptokok Beta-haemolytiske streptokokker Beta-hemolytische Streptococcus Beeta-hemolyyttinen streptokokki Streptococcus Bêta-hémolytique Beta-hämolytischer Streptococcus Β-αιμολυτικός στρεπτόκοκκος Streptococcus Beta-emolitico ベータ溶血性レンサ球菌 Beta-hemolytiske streptokokker Streptococcus beta-hemolityczny Streptococcus Beta-hemolítico Streptococ beta-hemolitic Бета-гемолитический стрептококк Streptococcus Beta-hemolítico Beta-hemolytiska streptokocker Beta-hemolitik Streptokok Бета-гемолітичний стрептокок
|
||||
unknown Gram-negatives TRUE TRUE FALSE TRUE 不明革兰氏阴性菌 neznámé gramnegativní ukendte Gram-negative onbekende Gram-negatieven tuntemattomat gramnegatiiviset Gram négatifs inconnus unbekannte Gramnegativen άγνωστοι αρνητικοί κατά Gram Gram negativi sconosciuti 不明なグラム陰性菌 ukjent Gram-negative Nieznane bakterie Gram-ujemne Gram negativos desconhecidos Gram-negative necunoscute неизвестные грамотрицательные Gram negativos desconocidos okända gramnegativa bakterier bilinmeyen Gram-negatifler невідомі грамнегативні
|
||||
unknown Gram-positives TRUE TRUE FALSE TRUE 不明革兰氏阳性菌 neznámé grampozitivní ukendte Gram-positive onbekende Gram-positieven tuntemattomat grampositiiviset Gram positifs inconnus unbekannte Grampositiven άγνωστοι θετικοί κατά Gram Gram positivi sconosciuti 未知のグラム陽性菌 ukjent Gram-positive Nieznane bakterie Gram-dodatnie Gram positivos desconhecidos Gram-pozitive necunoscute неизвестные грамположительные Gram positivos desconocidos okända Gram-positiva bilinmeyen Gram-pozitifler невідомі грампозитивні
|
||||
unknown fungus TRUE TRUE FALSE TRUE 未知真菌 neznámé houby ukendt svamp onbekende schimmel tuntematon sieni champignon inconnu unbekannter Pilze άγνωστος μύκητας fungo sconosciuto 未知真菌 ukjent sopp Nieznany grzyb fungo desconhecido ciuperci necunoscute неизвестный грибок hongo desconocido Okänd svamp bilinmeyen mantar невідомий гриб
|
||||
unknown yeast TRUE TRUE FALSE TRUE 未知酵母菌 neznámé kvasinky ukendt gær onbekende gist tuntematon hiiva levure inconnue unbekannte Hefe άγνωστος ζυμομύκητας lievito sconosciuto 未知酵母 ukjent gjær Nieznany drożdżak levedura desconhecida drojdie necunoscută неизвестные дрожжи levadura desconocida Okänd jäst bilinmeyen maya невідомі дріжджі
|
||||
unknown name TRUE TRUE FALSE TRUE 不明名称 neznámý název ukendt navn onbekende naam tuntematon nimi nom inconnu unbekannte Name άγνωστο όνομα nome sconosciuto 名称未知 ukjent navn nieznana nazwa nome desconhecido nume necunoscut неизвестное название nombre desconocido okänt namn bilinmeyen isim невідома назва
|
||||
unknown kingdom TRUE TRUE FALSE TRUE 未知王国 neznámá říše ukendt kongerige onbekend koninkrijk tuntematon valtakunta règme inconnu unbekanntes Reich άγνωστο βασίλειο regno sconosciuto 未知の王国 ukjent rike nieznane królestwo reino desconhecido regn necunoscut неизвестное царство reino desconocido okänt rike bilinmeyen krallık невідоме царство
|
||||
unknown phylum TRUE TRUE FALSE TRUE 未知门 neznámý fylém ukendt stamme onbekend fylum tuntematon kantasuku embranchement inconnu unbekannter Stamm άγνωστο φύλο phylum sconosciuto 未知の門 ukjent fylum nieznany azyl filo desconhecido phylum necunoscut неизвестный филум filo desconocido okänt fylum bilinmeyen filum невідомий відділ
|
||||
unknown class TRUE TRUE FALSE TRUE 未知类 neznámá třída ukendt klasse onbekende klasse tuntematon luokka classe inconnue unbekannte Klasse άγνωστη τάξη classe sconosciuta 未知のクラス ukjent klasse Nieznana klasa classe desconhecida clasă necunoscută неизвестный класс clase desconocida okänd klass bilinmeyen sınıf невідомий клас
|
||||
unknown order TRUE TRUE FALSE TRUE 未知目 neznámý řád ukendt orden onbekende orde tuntematon järjestys ordre inconnu unbekannte Ordnung άγνωστη τάξη ordine sconosciuto 未知の目 ukjent orden nieznany rząd ordem desconhecido ordin necunoscut неизвестный порядок orden desconocido okänd ordning bilinmeyen sipariş невідомий порядок
|
||||
unknown family TRUE TRUE FALSE TRUE 未知科 neznámá čeleď ukendt familie onbekende familie tuntematon perhe famille inconnue unbekannte Familie άγνωστη οικογένεια famiglia sconosciuta 未知ファミリー ukjent familie nieznana rodzina família desconhecida familie necunoscută неизвестное семейство familia desconocida okänd familj bilinmeyen aile невідома родина
|
||||
unknown genus TRUE TRUE FALSE TRUE 未知属 neznámý rod ukendt slægt onbekend geslacht tuntematon suku genre inconnu unbekannte Gattung άγνωστο γένος genere sconosciuto 未知属 ukjent slekt nieznany rodzaj gênero desconhecido gen necunoscut неизвестный род género desconocido okänt släkte bilinmeyen cins невідомий рід
|
||||
unknown species TRUE TRUE FALSE TRUE 未知种 neznámý druh ukendt art onbekende soort tuntematon laji espèce inconnue unbekannte Art άγνωστο είδος specie sconosciute 未知種 ukjent art nieznany gatunek espécies desconhecida specie necunoscută неизвестный вид especie desconocida okänd art bilinmeyen türler невідомий вид
|
||||
unknown subspecies TRUE TRUE FALSE TRUE 未知亚种 neznámý poddruh ukendt underart onbekende ondersoort tuntematon alalaji sous-espèce inconnue unbekannte Unterart άγνωστο υποείδος sottospecie sconosciute 亜種不明 ukjent underart nieznany podgatunek subespécies desconhecida subspecie necunoscută неизвестный подвид subespecie desconocida okänd underart bilinmeyen alt türler невідомий підвид
|
||||
unknown rank TRUE TRUE FALSE TRUE 未知等级 neznámý stupeň ukendt rang onbekende rang tuntematon sukuluokka rang inconnu unbekannter Rang άγνωστη τάξη grado sconosciuto 未知ランク ukjent rang nieznany stopień classificação desconhecido rang necunoscut неизвестный ранг rango desconocido okänd rang bilinmeyen rütbe невідомий ранг
|
||||
unknown FALSE TRUE FALSE FALSE 未知 neznámý ukendt onbekend tuntematon inconnu unbekannt άγνωστο sconosciuto 未知 ukjent nieznany desconhecido necunoscut неизвестно desconocido okänd bilinmiyor невідомий
|
||||
group TRUE TRUE FALSE TRUE 组 skupina gruppe groep ryhmä groupe Gruppe ομάδα gruppo グループ gruppe grupa grupo grup группа grupo grupp Grup група
|
||||
Group TRUE TRUE FALSE TRUE 组 Skupina Gruppe groep Ryhmä groupe Gruppe Ομάδα Gruppo グループ Gruppe Grupa Grupo Grup Группа Grupo Grupp Grup Група
|
||||
CoNS FALSE TRUE FALSE TRUE KNS KNS CNS KNS KNS CoNS グラム陰性 KNS CoNS SCN КОС SCN KNS KNS КНС
|
||||
CoPS FALSE TRUE FALSE TRUE KPS KPS CPS KPS KPS CoPS グラム陽性 KPS CoPS SCP КПС SCP KPS KPS КПС
|
||||
Gram-negative TRUE TRUE FALSE FALSE 革兰氏阴性 Gramnegativní Gram-negativ Gram-negatief Gramnegatiiviset Gram négatif Gramnegativ Αρνητικό κατά Gram Gram negativo ^細菌$ Gram-negativ Gram-ujemne Gram negativo Gram-negativ Грамотрицательные Gram negativo Gram-negativ Gram-negatif Грамнегативні
|
||||
Gram-positive TRUE TRUE FALSE FALSE 革兰氏阳性 Grampozitivní Gram-positiv Gram-positief Gram-positiiviset Gram positif Grampositiv Θετικό κατά Gram Gram positivo ^真菌$ Gram-positive Gram-dodatnie Gram positivo Gram-pozitiv Грамположительные Gram positivo Gram-positiv Gram-pozitif Грампозитивні
|
||||
^Bacteria$ TRUE TRUE FALSE FALSE 细菌 Bakterie Bakterier Bacteriën Bakteerit Bactéries Bakterien Βακτήρια Batteri 酵母 Bakterier Bakterie Bactérias Bacterii Бактерии Bacterias Bakterier Bakteri Бактерії
|
||||
^Fungi$ TRUE TRUE FALSE FALSE 真菌 Houby Støbeforme Schimmels Sienet Champignons Pilze Μύκητες Funghi 原生動物 Sopp Grzyby Fungos Ciuperci Грибы Hongos Svampar Mantarlar Гриби
|
||||
^Yeasts$ TRUE TRUE FALSE FALSE 酵母菌 Kvasinky Gær Gisten Hiivat Levures Hefen Ζυμομύκητες Lieviti バイオグループ Gjærsopp Drożdże Leveduras Drojdii Животные Levaduras Jästdjur Mayalar Дріжджі
|
||||
^Protozoa$ TRUE TRUE FALSE FALSE ^原生动物$ Prvoci Protozoer Protozoën Alkueläimet Protozoaires Protozoen Πρωτόζωα Protozoi 生物型 Protozoer Protozoa Protozoários Protozoare Протозоа Protozoarios Protozoer Protozoa Найпростіші
|
||||
biogroup TRUE TRUE FALSE FALSE 生物群 bioskupina biogruppe biogroep Bioryhmä biogroupe Biogruppe βιοομάδα biogruppo 植物型 biogruppe biogrupa biogrupo biogrupul биогруппа biogrupo biogrupp biyogrup біогрупа
|
||||
biotype TRUE TRUE FALSE FALSE 生物型 biotyp biotype biotyyppi Biotyp βιότυπος biotipo ([([ ]*?))) グループ biotype biotyp biótipo biotip биотип biotipo biotyp biyotip біотип
|
||||
vegetative TRUE TRUE FALSE FALSE 无性系 vegetativní vegetativ vegetatief kasvullinen végétatif vegetativ βλαστικός vegetativo ([[ ]*?)グループ vegetativ wegetatywna vegetativo vegetativ вегетативный vegetativo vegetativ vejetatif вегетативний
|
||||
([([ ]*?)group TRUE TRUE FALSE FALSE ([([]*?)组 \\1skupina \\1gruppe \\1groep \\1ryhmä \\1groupe \\1Gruppe ([([ ]*?)ομάδα \\1gruppo \\1グループ \\1gruppe ([([ ]*?)grupa \\1grupo \\1grup \\1группа \\1grupo \\1grupp ([([ ]*?)grup \\1група
|
||||
([([ ]*?)Group TRUE TRUE FALSE FALSE ([([]*?)组 \\1Skupina \\1Gruppe \\1Groep \\1Ryhmä \\1Groupe \\1Gruppe ([([ ]*;)ομάδα \\1Gruppo \\1グループ \\1Gruppe ([([ ]*?)Grupa \\1Grupo \\1Grup \\1Группа \\1Grupo \\1Grupp ([([ ]*?)Grup \\1Група
|
||||
no .*growth FALSE FALSE FALSE FALSE 无.*生长 žádný .*růst ingen .*vækst geen .*groei ei .*kasvua pas .*croissance keine(|n|m|r|s)|nicht .*wachstum όχι .*αύξηση sem .*crescimento 成長なし nei .*vekst brak .*wzrostu sem .*crescimento fără creștere отсутствие.*роста no .*crecimientonon ingen .*tillväxt büyüme yok відсутність .*росту
|
||||
no|not FALSE FALSE FALSE FALSE 不|不 ne nej|ikke geen|niet ei non keine? no|not sem no|ない nei|ikke nie|nie sem nu нет? no|sin nej|inte hayır|değil|hayir|degil ні
|
||||
Intermediate TRUE FALSE FALSE FALSE 中级 Meziprodukt Mellemliggende Intermediair Väliaikainen Mittlere Ενδιάμεση 中間体 Mellomliggende Pośrednia Intermediar Intermedio Mellanliggande Orta seviye Знижена чутливість
|
||||
Susceptible, incr. exp. FALSE TRUE FALSE FALSE 易感,暴露增加 Vnímavý, zvýš. expozice Modtagelig, øget eksp. Gevoelig bij verh. blootstelling Altis, lisääntynyt altist. Empfindlich, erh Belastung Ευάλωτος, αυξημένη έκθεση 感受性、曝露量増加 Mottakelig, økt eksp. Podatne, zwiększone narażenie Susceptibil, exp. crescută Susceptible, mayor exposición Mottaglig, inkr. exponering Duyarlı, enk. maruziyet Чутливий до підвищеної експозиції
|
||||
susceptible, incr. exp. FALSE TRUE FALSE FALSE 易感,接触增加 náchylná,zvýš. Expozice modtagelig, øget eksp. gevoelig bij verh. blootstelling altis, lisääntynyt altist. empfindlich, erh Belastung Ευαίσθητος, αυξημένη έκθεση 影響を受けやすい、露出が増える mottakelig, økt eksp. podatny, zwiększone narażenie susceptibil, exp. crescută susceptible, mayor exposición mottaglig, inkr. exponering duyarlı, enk. maruziyet чутливий до підвищеної експозиції
|
||||
Susceptible TRUE FALSE FALSE FALSE 易受影响 Susceptible Modtagelig Gevoelig Altis Empfindlich Ευαίσθητο 影響を受けやすい Mottakelig Podatny Susceptibil Susceptible Mottaglig Duyarlı Чутливий
|
||||
Incr. exposure TRUE FALSE FALSE FALSE 暴露增加 zvýšená expozice Øget eksponering 'Incr. exposure' Lisääntynyt altistuminen Empfindlich, erh Belastung Αυξημένη έκθεση 曝露量増加 Økt eksp. Większe narażenie Exp. crescută Mayor exposición Inkr. exponering Enk. maruziyet Підвищена експозиція
|
||||
Resistant TRUE FALSE FALSE FALSE 耐药性 Rezistentní Resistent Resistent Kestävä Resistent Ανθεκτικός 耐性 Resistent Odporny Rezistent Resistente Resistent Dayanıklı Стійкий
|
||||
antibiotic TRUE TRUE FALSE FALSE 抗生素 antibiotikum antibiotikum antibioticum antibiootti antibiotique Antibiotikum αντιβιοτικό antibiotico 抗生物質 Antibiotikum antybiotyk antibiótico antibiotic антибиотик antibiótico antibiotika Antibiyotik антибіотик
|
||||
Antibiotic TRUE TRUE FALSE FALSE 抗生素 Antibiotikum Antibiotikum Antibioticum Antibiootti Antibiotique Antibiotikum Αντιβιοτικό Antibiotico 抗生物質 Antibiotikum Antybiotyk Antibiótico Antibiotic Антибиотик Antibiótico Antibiotika Antibiyotik Антибіотик
|
||||
Drug TRUE TRUE FALSE FALSE 药物 Lék Lægemiddel Middel Lääke Médicament Medikament Φάρμακο Droga 薬剤 Legemiddel Lek Droga Medicament Лекарство Fármaco Läkemedel İlaç Лікарський засіб
|
||||
drug TRUE TRUE FALSE FALSE 药物 lék lægemiddel middel lääke médicament Medikament φάρμακο droga 薬剤 legemiddel lek droga medicament лекарство fármaco läkemedel İlaç лікарський засіб
|
||||
Frequency FALSE TRUE FALSE FALSE 使用频率 Frekvence Frekvens Aantal Frekvenssi Fréquence Zahl Συχνότητα Frequenza 頻度 Hyppighet Częstotliwość Frequência Frecvență Частота Frecuencia Frekvens Frekans Частота
|
||||
Minimum Inhibitory Concentration (mg/L) FALSE FALSE FALSE FALSE 最小抑菌浓度(mg/L) Minimální inhibiční koncentrace (mg/l) Mindste hæmmende koncentration (mg/L) Minimale inhiberende concentratie (mg/L) Pienin estävä pitoisuus (mg/l) Concentration minimale inhibitrice (mg/L) Minimale Hemm-Konzentration (mg/L) Ελάχιστη ανασταλτική συγκέντρωση (mg/L) Concentrazione minima inibitoria (mg/L) 最小発育阻止濃度(mg/L) Minste hemmende konsentrasjon (mg/L) Minimalne stężenie hamujące (mg/L) Concentração Inibitória Mínima (mg/L) Concentrația minimă inhibitorie (mg/L) Минимальная ингибирующая концентрация (мг/л) Concentración mínima inhibitoria (mg/L) Minsta hämmande koncentration (mg/L) Minimum İnhibitör Konsantrasyon (mg/L) Мінімальна інгібуюча концентрація (мг/мл)
|
||||
Disk diffusion diameter (mm) FALSE FALSE FALSE FALSE 磁盘扩散直径(mm) Diskový difuzní průměr (mm) Diskdiffusionsdiameter (mm) Diameter diskzone (mm) Levyn diffuusion halkaisija (mm) Diamètre de diffusion en disque (mm) Durchmesser der Scheibenzone (mm) Διάμετρος διάχυσης δίσκου (mm) Diametro di diffusione del disco (mm) ディスク拡散径(mm) Diskdiffusjonsdiameter (mm) Średnica dyfuzji dysku (mm) Diâmetro de difusão do disco (mm) Diametrul de difuzie a discului (mm) Диаметр диффузии диска (мм) Diámetro de difusión en disco (mm) Diskdiffusionsdiameter (mm) Disk difüzyon çapı (mm) Зона затримки росту (мм)
|
||||
Antimicrobial Interpretation FALSE FALSE FALSE FALSE 抗菌性解释 Antimikrobiální interpretace Antimikrobiel fortolkning Antimicrobiële interpretatie Mikrobilääkkeiden tulkinta Interprétation antimicrobienne Antimikrobielle Auswertung Αντιμικροβιακή ερμηνεία Interpretazione antimicrobica 抗菌性解釈 Antimikrobiell tolkning Interpretacja antybakteryjna Interpretação Antimicrobiana Interpretare antimicrobiană Антимикробная интерпретация Interpretación antimicrobiana Antimikrobiell tolkning Antimikrobiyal Yorumlama Фенотипи чутливості
|
||||
Percentage FALSE FALSE FALSE FALSE 百分比 Procento Procentdel Percentage Prosenttiosuus Pourcentage Prozentsatz Ποσοστό Percentuale 割合(%) Prosentandel Procent Percentagem Procentaj Процент Porcentaje Procentuell andel Yüzde Відсоток
|
||||
Syndromic Group FALSE FALSE FALSE FALSE 合并症候群 Syndromová skupina Syndromisk gruppe Syndroomgroep Syndrooma Ryhmä Groupe syndromique Syndromische Gruppe Συνδρομική ομάδα Gruppo sindromico シンドロームグループ Syndromgruppe Grupa syndromiczna Grupo sindrómico Grup sindromic Синдромная группа Grupo sindrómico Syndromisk grupp Sendromik Grup Синдромна група
|
||||
Pathogen FALSE FALSE FALSE FALSE 病原体 Patogen Patogen Pathogeen Taudinaiheuttaja Agent pathogène Erreger Παθογόνο Agente patogeno 病原体 Patogen Patogen Pathogen Agenți patogeni Возбудитель Patógeno Patogen Patojen Збудник
|
||||
4-aminosalicylic acid FALSE TRUE TRUE FALSE 4-氨基水杨酸 kyselina 4-aminosalicylová 4-aminosalicylsyre 4-aminosalicylzuur 4-aminosalisyylihappo Acide 4-aminosalicylique 4-Aminosalicylsäure 4-αμινοσαλικυλικό οξύ Acido 4-aminosalicilico 4-アミノサリチル酸 4-aminosalisylsyre Kwas 4-aminosalicylowy Ácido 4-aminosalicílico Acid 4-aminosalicilic 4-аминосалициловая кислота Ácido 4-aminosalicílico 4-aminosalicylsyra 4-aminosalisilik asit 4-Аміносаліцилова кислота
|
||||
Adefovir dipivoxil FALSE TRUE TRUE FALSE 阿德福韦酯 Adefovir dipivoxil Adefovir dipivoxil Adefovir Adefoviiridipivoksiili Adéfovir dipivoxil Adefovir Dipivoxil Adefovir dipivoxil Adefovir dipivoxil アデホビル・ジピボキシル Adefovirdipivoksil Adefovir dipivoxil Adefovir dipivoxil Adefovir dipivoxil Адефовир дипивоксил Adefovir dipivoxil Adefovir dipivoxil Adefovir dipivoksil Адефовір діпівоксил
|
||||
Aldesulfone sodium FALSE TRUE TRUE FALSE 醛缩酮钠 Aldesulfon sodný Aldesulfon-natrium Aldesulfon Aldesulfoninatrium Aldésulfone sodique Aldesulfon-Natrium Αλδεσουλφονικό νάτριο Aldesulfone sodio アルデスルホンナトリウム Aldesulfon-natrium Sól sodowa aldesulfonu Aldesulfona de sódio Aldesulfonă sodică Альдесульфон натрия Aldesulfona sódica Aldesulfonnatrium Aldesülfon sodyum Альденсульфон натрію
|
||||
Amikacin FALSE TRUE TRUE FALSE 阿米卡星 Amikacin Amikacin Amikacine Amikasiini Amikacine Amikacin Αμικασίνη Amikacin アミカシン Amikacin Amikacyna Amikacin Amikacin Амикацин Amikacina Amikacin Amikasin Амікацин
|
||||
Amoxicillin FALSE TRUE TRUE FALSE 阿莫西林 Amoxicilin Amoxicillin Amoxicilline Amoksisilliini Amoxicilline Amoxicillin Αμοξικιλλίνη Amoxicillina アモキシシリン Amoxicillin Amoxicillin Amoxicilina Amoxicilină Амоксициллин Amoxicilina Amoxicillin Amoksisilin Амоксицилін
|
||||
Amoxicillin/beta-lactamase inhibitor FALSE TRUE TRUE FALSE 阿莫西林/β-内酰胺酶抑制剂 Amoxicilin/inhibitor beta-laktamázy Amoxicillin/beta-lactamasehæmmer Amoxicilline/enzymremmer Amoksisilliini/beeta-laktamaasin estäjä Amoxicilline/inhib. de bêta-lactamase Amoxicillin/Beta-Lactamase-Hemmer Αμοξικιλλίνη/αναστολέας της β-λακταμάσης Amoxicillina/inib. d. beta-lattamasi アモキシシリン/β-ラクタマーゼ阻害剤 Amoxicillin/betalaktamase-hemmer Amoksycylina/inhibitor beta-laktamazy Amoxicilina/inibid. da beta-lactamase Amoxicilină/inhibitor de beta-lactamază Амоксициллин/ингибитор бета-лактамаз Amoxicilina/inhib. de la beta-lactamasa Amoxicillin/betalaktamashämmare Amoksisilin/beta-laktamaz inhibitörü Амоксицилін/інгібітор бета-лактамаз
|
||||
Amphotericin B FALSE TRUE TRUE FALSE 两性霉素B Amfotericin B Amfotericin B Amfotericine B Amfoterisiini B Amphotéricine B Amphotericin B Αμφοτερικίνη Β Amfotericina B アムホテリシンB Amfotericin B Amfoterycyna B Anfotericina B Amfotericină B Амфотерицин В Anfotericina B Amfotericin B Amfoterisin B Амфотерицин В
|
||||
Ampicillin FALSE TRUE TRUE FALSE 氨苄西林 Ampicilin Ampicillin Ampicilline Ampisilliini Ampicilline Ampicillin Αµπικιλλίνη Ampicillina アンピシリン Ampicillin Ampicylina Ampicilina Ampicilină Ампициллин Ampicilina Ampicillin Ampisilin Ампіцилін
|
||||
Ampicillin/beta-lactamase inhibitor FALSE TRUE TRUE FALSE 氨苄西林/β-内酰胺酶抑制剂 Inhibitor ampicilinu/beta-laktamázy Ampicillin/beta-lactamasehæmmer Ampicilline/enzymremmer Ampisilliini/beeta-laktamaasin estäjä Ampicilline/inhib. de bêta-lactamase Ampicillin/Beta-Laktamase-Hemmer Αμπικιλλίνη/αναστολέας β-λακταμάσης Ampicillina/inib. d. beta-lattamasi アンピシリン/β-ラクタマーゼ阻害剤 Ampicillin/betalaktamasehemmer Ampicylina/inhibitor beta-laktamazy Ampicilina/inibid. da beta-lactamase Ampicilină/inhibitor de beta-lactamază Ампициллин/ингибитор бета-лактамазы Ampicilina/inhib. de la beta-lactamasa Ampicillin/beta-laktamashämmare Ampisilin/beta-laktamaz inhibitörü Ампіцилін/інгібітор бета-лактамаз
|
||||
Anidulafungin FALSE TRUE TRUE FALSE 阿尼芬净 Anidulafungin Anidulafungin Anidulafungine Anidulafungiini Anidulafungine Anidulafungin Ανιδουλαφουνγκίνη Anidulafungin アニデュラファンギン Anidulafungin Anidulafungina Anidulafungin Anidulafungin Анидулафунгин Anidulafungina Anidulafungin Anidulafungin Анідулафунгін
|
||||
Azidocillin FALSE TRUE TRUE FALSE 阿奇霉素 Azidocillin Azidocillin Azidocilline Azidosilliini Azidocilline Azidocillin Αζιδοκιλλίνη Azidocillina アジドシリン Azidocillin Azidocillin Azidocillin Azidocilină Азидоциллин Azidocilina Azidocillin Azidosilin Азидоцилін
|
||||
Azithromycin FALSE TRUE TRUE FALSE 阿奇霉素 Azitromycin Azithromycin Azitromycine Atsitromysiini Azithromycine Azithromycin Αζιθρομυκίνη Azitromicina アジスロマイシン Azitromycin Azithromycin Azitromicina Azitromicină Азитромицин Azitromicina Azitromycin Azitromisin Азитроміцин
|
||||
Azlocillin FALSE TRUE TRUE FALSE 阿洛西林 Azlocillin Azlocillin Azlocilline Azlocillin Azlocilline Azlocillin Αζλοκιλλίνη Azlocillina アズロシリン Azlocillin Azlocillin Azlocillin Azlocilină Азлоциллин Azlocilina Azlocillin Azlocillin Азлоцилін
|
||||
Bacampicillin FALSE TRUE TRUE FALSE 巴卡比林 Bacampicilin Bacampicillin Bacampicilline Bacampicillin Bacampicilline Bacampicillin Μπακαμπικιλλίνη Bacampicillina バカンピシリン Bacampicillin Bakampicylina Bacampicilina Bacampicilină Бакампициллин Bacampicilina Bacampicillin Bacampicillin Бакампіцилін
|
||||
Bacitracin FALSE TRUE TRUE FALSE 阿奇霉素 Bacitracin Bacitracin Bacitracine Bacitrasiini Bacitracine Bacitracin Βακιτρακίνη Bacitracina バシトラシン Bacitracin Bacytracyna Bacitracin Bacitracină Бацитрацин Bacitracina Bacitracin Basitrasin Бацитрацин
|
||||
Benzathine benzylpenicillin FALSE TRUE TRUE FALSE 苄丝肼青霉素 Benzathine benzylpenicillin Benzathinbenzylpenicillin Benzylpenicillinebenzathine Bentsatiinibentsyylipenisilliini Benzathine benzylpénicilline Benzathin-Benzylpenicillin Βενζαθίνη βενζυλπενικιλλίνη Benzatina benzilpenicillina ベンズシン・ベンジルペニシリン Benzathine benzylpenicillin Benzylpenicylina benzylowa Benzatina benzatina benzilpenicilina Benzatină benzilpenicilină Бензатин бензилпенициллин Bencilpenicilina benzatínica Benzathinbenzylpenicillin Benzatin benzilpenisilin Бензатину бензилпеніцилін
|
||||
Benzathine phenoxymethylpenicillin FALSE TRUE TRUE FALSE 苄星苯氧甲基青霉素 Benzatinový fenoxymethylpenicilin Benzathinfenoxymethylpenicillin Fenoxymethylpenicillinebenzathine Bentsatiinifenoksimetyylipenisilliini Phénoxyméthylpénicilline benzathine Benzathin-Phenoxymethylpenicillin Βενζαθίνη φαινοξυμεθυλοπενικιλλίνη Benzatina fenossimetilpenicillina ベンザチンフェノキシメチルペニシリン Benzathine fenoksymetylpenicillin Fenoksymetylopenicylina benzylowa Benzatina fenoximetilpenicilina Benzatină fenoximetilpenicilină Бензатин феноксиметилпенициллин Fenoximetilpenicilina benzatínica Bensathinfenoximetylpenicillin Benzatin fenoksimetilpenisilin Бензатину феноксиметилпеніцилін
|
||||
Benzylpenicillin FALSE TRUE TRUE FALSE 苄基青霉素 Benzylpenicilin Benzylpenicillin Benzylpenicilline Bentsyylipenisilliini Benzylpénicilline Benzylpenicillin Βενζυλοπενικιλλίνη Benzilpenicillina ベンジルペニシリン Benzylpenicillin Benzylpenicylina Benzilpenicilina Benzilpenicilină Бензилпенициллин Bencilpenicilina Bensylpenicillin Benzilpenisilin Бензилпеніцилін
|
||||
Calcium aminosalicylate FALSE TRUE TRUE FALSE 氨基水杨酸钙 Aminosalicylát vápenatý Calciumaminosalicylat Aminosalicylzuur Kalsiumaminosalisylaatti Aminosalicylate de calcium Kalzium-Aminosalicylat Αμινοσαλικυλικό ασβέστιο Calcio aminosalicilato アミノサリチル酸カルシウム Kalsiumaminosalicylat Aminosalicylan wapnia Aminosalicilato de cálcio Aminosalicilat de calciu Аминосалицилат кальция Aminosalicilato de calcio Kalciumaminosalicylat Kalsiyum aminosalisilat Кальцію аміносаліцилат
|
||||
Capreomycin FALSE TRUE TRUE FALSE 氨水杨酸钙 Kapreomycin Capreomycin Capreomycine Kapreomysiini Capréomycine Capreomycin Καπρεομυκίνη Capreomicina カプレオマイシン Capreomycin Kapreomycyna Capreomicina Capreomicină Капреомицин Capreomicina Kapreomycin Kapreomisin Капреоміцин
|
||||
Carbenicillin FALSE TRUE TRUE FALSE 羧基青霉素 Karbenicilin Carbenicillin Carbenicilline Karbenisilliini Carbénicilline Carbenicillin Καρβενικιλλίνη Carbenicillina カルベニシリン Karbenicillin Karbenicylina Carbenicilina Carbenicilină Карбенициллин Carbenicilina Karbenicillin Karbenisilin Карбеніцилін
|
||||
Carindacillin FALSE TRUE TRUE FALSE 卡林达西林 Karindacilin Carindacillin Carindacilline Karindasilliini Carindacilline Carindacillin Καρινδακιλλίνη Carindacillina カリンダシリン Karindacillin Karindacillin Carindacillin Carindacilină Кариндациллин Carindacilina Carindacillin Karindasilin Кариндацилін
|
||||
Caspofungin FALSE TRUE TRUE FALSE 氨苄青霉素 Kaspofungin Caspofungin Caspofungine Kaspofungiini Caspofungine Caspofungin Κασποφουνγκίνη Caspofungin カスポファンギン Caspofungin Kaspofungina Caspofungin Caspofungin Каспофунгин Caspofungina Caspofungin Caspofungin Каспофунгін
|
||||
Ce(f|ph)acetrile TRUE TRUE TRUE FALSE 头孢乙腈 Cefacetril Cephacetril Cefacetril Kefasetriili Céphacétrile Cefacetril Κεφακετρίλη Cefacetrile セファセトリル Cefacetril Cefacetrile Cephacetrile Cefacetril Цефацетрил Cefacetrilo Cephacetril Sefasetril Цефацетрил
|
||||
Ce(f|ph)alotin TRUE TRUE TRUE FALSE 头孢罗丁 Cefalotin Cephalotin Cefalotine Kefalotin Céphalotine Cefalotin Κεφαλοτίνη Cefalotina セファロチン Cefalotin Cefalotyna Cefalotina Cefalotin Цефалотин Cefalotina Cefalotin Sefalotin Цефалотин
|
||||
Ce(f|ph)amandole TRUE TRUE TRUE FALSE 头孢曼多 Cefamandol Cephamandol Cefamandol Kefamandoli Céphamandole Cefamandol Κεφαμανδόλη Cephamandole セファマンドール Cefamandol Cefamandol Cephamandole Cefamandole Цефамандол Cefamandole Cephamandol Cefamandole Цефамандол
|
||||
Ce(f|ph)apirin TRUE TRUE TRUE FALSE 头孢匹林 Cefapirin Cephapirin Cefapirine Kefapiriini Céphapirine Cefapirin Κεφαπιρίνη Cefapirina セファピリン Cefapirin Cefapiryna Cephapirin Cefapirină Цефапирин Cefapirina Cephapirin Sefapirin Цефапірин
|
||||
Ce(f|ph)azedone TRUE TRUE TRUE FALSE 头孢唑酮 Cefazedon Cephazedon Cefazedon Kefatsedoni Céphazédone Cefazedon Κεφαζεδόνη Cefazedone セファゼドン Cefazedon Cefazedon Cephazedone Cefazedonă Цефазедон Cefazedona Cephazedon Sefazedon Цефазедон
|
||||
Ce(f|ph)azolin TRUE TRUE TRUE FALSE 头孢唑啉 Cefazolin Cephazolin Cefazoline Kefatsoliini Céphazoline Cefazolin Κεφαζολίνη Cephazolin セファゾリン Cefazolin Cefazolin Cephazolin Cefazolin Цефазолин Cefazolina Cephazolin Sefazolin Цефазолін
|
||||
Ce(f|ph)alothin TRUE TRUE TRUE FALSE 头孢罗丁 Cefalotin Cephalothin Cefalotine Kefalotiini Céphalothine Cefalothin Κεφαλοθίνη Cefalotina セファロチン Cefalotin Cefalotyna Cephalothin Cefalotin Цефалотин Cefalotina Kefalotin Cefalothin Цефалотин
|
||||
Ce(f|ph)alexin TRUE TRUE TRUE FALSE 头孢莱辛 Cefalexin Cephalexin Cefalexine Kefaleksiini Céphalexine Cefalexin Κεφαλεξίνη Cephalexin セファレキシン Cefalexin Cefaleksyna Cephalexin Cefalexină Цефалексин Cefalexina Cephalexin Cefalexin Цефалексин
|
||||
Ce(f|ph)epime TRUE TRUE TRUE FALSE 头孢吡肟 Cefepim Cephepime Cefepim Kefepiimi Céphépime Cefepim Κεφεπίμη Cephepime セフェパイム Cefepime Cefepime Cephepime Cefepime Цефепим Cefepime Cephepim Sefepim Цефепім
|
||||
Ce(f|ph)ixime TRUE TRUE TRUE FALSE 头孢克肟 Cefixim Cephixim Cefixim Kefiksiimi Céphixime Cefixim Cefixime Cephixime セフィキシム Cefixime Cefixime Cephixime Cefixime Цефиксим Cefixima Cephixim Cefixime Цефіксим
|
||||
Ce(f|ph)menoxime TRUE TRUE TRUE FALSE 头孢米诺肟 Cefmenoxim Cephmenoxim Cefmenoxim Cefmenoksiimi Céphénoxime Cefmenoxim Κεφμενοξίμη Cephmenoxime セフメノキシム Cefmenoxime Cefmenoksym Cephmenoxime Cefmenoxime Цефменоксим Cefmenoxima Cephmenoxim Sefmenoksim Цефменоксим
|
||||
Ce(f|ph)metazole TRUE TRUE TRUE FALSE 头孢美唑 Cefmetazol Cephmetazol Cefmetazol Kefmetatsoli Céphmétazole Cefmetazol Κεφμεταζόλη Cephmetazole セフメタゾール Cefmetazole Cefmetazol Cefmetazole Cefmetazol Цефметазол Cefmetazol Cephmetazol Sefmetazol Цефметазол
|
||||
Ce(f|ph)odizime TRUE TRUE TRUE FALSE 头孢地嗪 Cefodizim Cephodizim Cefodizim Kefodisiimi Céphodizime Cefodizim Κεφοδιζίμη Cephodizime セフォジジム Cefodizim Cefodizime Cephodizime Cefodizime Цефодизим Cefodixima Cephodizim Sefodizim Цефодізим
|
||||
Ce(f|ph)onicid TRUE TRUE TRUE FALSE 头孢尼西 Cefonicid Cephonicid Cefonicide Cefonicid Céphonicide Cefonicid Κεφονικίδη Cephonicid セフォニキッド Cefonicid Cefonicid Cefonicid Cefonicid Цефонизид Cefonicida Cephonicid Cefonicid Цефоніцид
|
||||
Ce(f|ph)operazone TRUE TRUE TRUE FALSE 头孢哌酮 Cefoperazon Cephoperazon Cefoperazon Kefoperatsoni Céphopérazone Cefoperazon Κεφοπεραζόνη Cephoperazone セフペラゾン Cefoperazon Cefoperazon Cephoperazone Cefoperazonă Цефоперазон Cefoperazona Cephoperazon Sefoperazon Цефоперазон
|
||||
Ce(f|ph)operazone/beta-lactamase inhibitor TRUE TRUE TRUE FALSE 头孢哌酮/β-内酰胺酶抑制剂 Cefoperazon/inhibitor beta-laktamázy Cephoperazon/beta-lactamasehæmmer Cefoperazon/enzymremmer Kefoperatsoni/beeta-laktamaasin estäjä Céphopérazone/inhib. de bêta-lactamase Cefoperazon/Beta-Lactamase-Hemmer Κεφοπεραζόνη/αναστολέας της β-λακταμάσης Cephoperazone/inib. d. beta-lattamasi Cefoperazone/β-ラクタマーゼ阻害剤 Cefoperazon/beta-laktamasehemmere Cefoperazon/inhibitor beta-laktamazy Cephoperazona/inibid. da beta-lactamase Cefoperazonă/inhibitor de beta-lactamază Цефоперазон/ингибитор бета-лактамаз Cefoperazona/inhib. de betalactamasas Cefoperazon/beta-laktamashämmare Sefoperazon/beta-laktamaz inhibitörü Цефоперазон/інгібітор бета-лактамаз
|
||||
Ce(f|ph)otaxime TRUE TRUE TRUE FALSE 头孢噻肟 Cefotaxim Cephotaxim Cefotaxim Kefotaksiimi Céphotaxime Cefotaxim Κεφοταξίμη Cephotaxime セフォタキシム Cefotaxim Cefotaksym Cephotaxime Cefotaximă Цефотаксим Cefotaxima Cephotaxim Sefotaksim Цефотаксим
|
||||
Ce(f|ph)oxitin TRUE TRUE TRUE FALSE 头孢西丁 Cefoxitin Cephoxitin Cefoxitine Kefoksitiini Céphoxitine Cefoxitin Κεφοξιτίνη Cefossitina Cefoxitin Cefoxitin Cefoksytyna Cephoxitin Cefoxitină Цефокситин Cefoxitina Cephoxitin Cefoxitin Цефокситин
|
||||
Ce(f|ph)pirome TRUE TRUE TRUE FALSE 头孢匹罗 Cefpirom Cephpirom Cefpirom Kefpiromi Céphpirome Cefpirom Κεφπιρόμη Cephpirome セフピロム Cefpirom Cefpirom Cefpirome Cefpirom Цефпиром Cephpirome Cephpirom Sefpirom Цефпіром
|
||||
Ce(f|ph)podoxime TRUE TRUE TRUE FALSE 头孢泊肟 Cefpodoxim Cephpodoxim Cefpodoxim Kefpodoksiimi Céphpodoxime Cefpodoxim Κεφποδοξίμη Cephpodoxime セフポドキシム Cefpodoxime Cefpodoxime Cephpodoxime Cefpodoximă Цефподоксим Cefpodoxima Cephpodoxim Sefpodoksim Цефподоксим
|
||||
Ce(f|ph)radine TRUE TRUE TRUE FALSE 头孢拉定 Cefradin Cephradin Cefradine Cefradiini Céphradine Cefradin Κεφραντίνη Cefradina セフラジン Cefradin Cefradyna Cephradine Cefradina Цефрадин Cefradina Cephradin Sefradin Цефрадін
|
||||
Ce(f|ph)sulodin TRUE TRUE TRUE FALSE 头孢苏洛丁 Cefsulodin Cephsulodin Cefsulodine Kefsulodiini Céphsulodine Cefsulodin Κεφσουλοδίνη Cephsulodin セフスロジン Cefsulodin Cefsulodin Cephsulodin Cefsulodin Цефсулодин Cefsulodina Cephsulodin Cefsulodin Цефсулодин
|
||||
Ce(f|ph)tazidime TRUE TRUE TRUE FALSE 头孢噻肟 Ceftazidim Cephtazidim Ceftazidim Keftatsidiimi Céphtazidime Ceftazidim Κεφταζιδίμη Ceftazidima セフタジジム Ceftazidim Ceftazidime Ceftazidima Ceftazidime Цефтазидим Ceftazidima Cephtazidim Seftazidim Цефтазидим
|
||||
Ce(f|ph)tezole TRUE TRUE TRUE FALSE 头孢特唑 Ceftezol Cephtezol Ceftezol Ceftezole Céphtézole Ceftezol Τζεφεζόλη Cephtezole セフテゾール Ceftezole Ceftezol Ceftezole Ceftezol Цефтезол Ceftezol Cephtezole Seftezol Цефтезол
|
||||
Ce(f|ph)tizoxime TRUE TRUE TRUE FALSE 头孢唑肟 Ceftizoxim Cephtizoxim Ceftizoxim Keftatsoksiimi Céphtizoxime Ceftizoxim Κεφτιζοξίμη Cephtizoxime セフティゾキシム Ceftizoxim Ceftizoxime Cephtizoxime Ceftizoxime Цефтизоксим Ceftizoxima Cephtizoxim Seftizoksim Цефтизоксим
|
||||
Ce(f|ph)triaxone TRUE TRUE TRUE FALSE 头孢曲松 Ceftriaxon Cephtriaxon Ceftriaxon Ceftriaksoni Céphtriaxone Ceftriaxon Κεφτριαξόνη Ceftriaxone セフトリアキソン Ceftriaxone Ceftriakson Cefhtriaxone Ceftriaxonă Цефтриаксон Ceftriaxona Ceftriaxon Ceftriaxone Цефтриаксон
|
||||
Ce(f|ph)uroxime TRUE TRUE TRUE FALSE 头孢呋辛 Cefuroxim Cephuroxim Cefuroxim Kefuroksiimi Céphuroxime Cefuroxim Κεφουροξίμη Cefuroxima セフロキシム Cefuroxim Cefuroksym Cephuroxime Cefuroxime Цефуроксим Cefuroxima Cefuroxim Sefuroksim Цефуроксим
|
||||
Ce(f|ph)uroxime/metronidazole TRUE TRUE TRUE FALSE 头孢呋辛/甲硝唑 Cefuroxim/metronidazol Cefuroxim/metronidazol Cefuroxim/andere antibacteriele middelen Kefuroksiimi/metronidatsoli Céphuroxime/métronidazole Cefuroxim/Metronidazol Κεφουροξίμη/μετρονιδαζόλη Cefuroxima/metronidazolo セフロキシム/メトロニダゾール Cefuroxim/metronidazol Cefuroksym/metronidazol Cephuroxime/metronidazol Cefuroximă/metronidazol Цефуроксим/метронидазол Cefuroxima/metronidazol Cefuroxim/metronidazol Sefuroksim/metronidazol Цефуроксим/метронідазол
|
||||
Chloramphenicol FALSE TRUE TRUE FALSE 氯霉素 Chloramfenikol Kloramfenicol Chlooramfenicol Kloramfenikoli Chloramphénicol Chloramphenicol Χλωραμφενικόλη Cloramfenicolo クロラムフェニコール Kloramfenikol Chloramfenikol Cloranfenicol Cloramfenicol Хлорамфеникол Cloranfenicol Kloramfenikol Kloramfenikol Хлорамфенікол
|
||||
Chlortetracycline FALSE TRUE TRUE FALSE 金霉素 Chlortetracyklin Chlortetracyclin Chloortetracycline Klortetasykliini Chlortétracycline Chlortetracyclin Χλωροτετρακυκλίνη Clorotetraciclina クロルテトラサイクリン Klortetracyklin Chlortetracyklina Chlortetracycline Clortetraciclină Хлортетрациклин Clortetraciclina Klortetracyklin Klortetrasiklin Хлортетрациклін
|
||||
Cinoxacin FALSE TRUE TRUE FALSE 西诺沙星 Cinoxacin Cinoxacin Cinoxacine Kinoksasiini Cinoxacine Cinoxacin Τσινοξακίνη Cinoxacina シノキサシン Cinoxacin Cinoxacin Cinoxacin Cinoxacină Циноксацин Cinoxacina Cinoxacin Cinoxacin Циноксацин
|
||||
Ciprofloxacin FALSE TRUE TRUE FALSE 环丙沙星 Ciprofloxacin Ciprofloxacin Ciprofloxacine Siprofloksasiini Ciprofloxacine Ciprofloxacin Σιπροφλοξασίνη Ciprofloxacina シプロフロキサシン Ciprofloxacin Ciprofloksacyna Ciprofloxacin Ciprofloxacină Ципрофлоксацин Ciprofloxacina Ciprofloxacin Siprofloksasin Ципрофлоксацин
|
||||
Clarithromycin FALSE TRUE TRUE FALSE 克拉霉素 Klaritromycin Clarithromycin Claritromycine Klaritromysiini Clarithromycine Clarithromycin Κλαριθρομυκίνη Claritromicina クラリスロマイシン Klaritromycin Klarytromycyna Claritromicina Claritromicină Кларитромицин Claritromicina Claritromycin Klaritromisin Кларитроміцин
|
||||
Clavulanic acid FALSE TRUE TRUE FALSE 克拉维酸 Kyselina klavulanová Clavulansyre Clavulaanzuur Klavulaanihappo Acide clavulanique Clavulansäure Κλαβουλανικό οξύ Acido clavulanico クラビュラン酸 Klavulansyre Kwas klawulanowy Ácido clavulânico Acid clavulanic Клавулановая кислота Ácido clavulánico Clavulansyra Klavulanik asit Клавуланова кислота
|
||||
clavulanic acid FALSE TRUE TRUE FALSE 克拉维酸 kyselina klavulanová clavulansyre clavulaanzuur klavulaanihappo acide clavulanique Clavulansäure Κλαβουλανικό οξύ acido clavulanico クラビュラン酸 klavulansyre kwas klawulanowy ácido clavulânico acid clavulanic клавулановая кислота ácido clavulánico clavulansyra klavulanik asit клавуланова кислота
|
||||
Clindamycin FALSE TRUE TRUE FALSE 克林霉素 Klindamycin Clindamycin Clindamycine Klindamysiini Clindamycine Clindamycin Κλινδαμυκίνη Clindamicina クリンダマイシン Klindamycin Klindamycyna Clindamicina Clindamicină Клиндамицин Clindamicina Clindamycin Klindamisin Кліндаміцин
|
||||
Clometocillin FALSE TRUE TRUE FALSE 克罗米修斯( Clometocillin Clometocillin Clometocilline Klometosilliini Clométocilline Clometocillin Κλομετοκιλλίνη Clometocillina クロメトシリン Klometocillin Clometocillin Clometocillin Clometocilină Клометоциллин Clometocilina Klometocillin Clometocillin Клометоцилін
|
||||
Clotrimazole FALSE TRUE TRUE FALSE 克霉唑 Klotrimazol Clotrimazol Clotrimazol Klotrimatsoli Clotrimazole Clotrimazol Κλοτριμαζόλη Clotrimazolo クロトリマゾール Klotrimazol Klotrimazol Clotrimazole Clotrimazol Клотримазол Clotrimazol Klotrimazol Klotrimazol Клотримазол
|
||||
Cloxacillin FALSE TRUE TRUE FALSE 克罗西林 Kloxacilin Cloxacillin Cloxacilline Kloksasilliini Cloxacilline Cloxacillin Κλοξακιλλίνη Cloxacillina クロキサシリン Cloxacillin Cloxacillin Cloxacillin Cloxacilină Клоксациллин Cloxacilina Kloxacillin Cloxacillin Клоксацилін
|
||||
Colistin FALSE TRUE TRUE FALSE 唑啉酮 Kolistin Colistin Colistine Kolistiini Colistine Colistin Κολιστίνη Colistina コリスチン Kolistin Kolistyna Colistin Colistină Колистин Colistina Kolistin Kolistin Колістин
|
||||
Dapsone FALSE TRUE TRUE FALSE 多普生 Dapson Dapson Dapson Dapsoni Dapsone Dapson Δαψόνη Dapsone ダプソン Dapsone Dapson Dapsone Dapsone Дапсон Dapsona Dapson Dapson Дапсон
|
||||
Daptomycin FALSE TRUE TRUE FALSE 达托霉素 Daptomycin Daptomycin Daptomycine Daptomysiini Daptomycine Daptomycin Δαπτομυκίνη Daptomicina ダプトマイシン Daptomycin Daptomycyna Daptomicina Daptomicină Даптомицин Daptomicina Daptomycin Daptomisin Даптоміцин
|
||||
Dibekacin FALSE TRUE TRUE FALSE 迪贝卡星 Dibekacin Dibekacin Dibekacine Dibekasiini Dibekacine Dibekacin Διβεκακίνη Dibekacin ジベカシン Dibekacin Dibekacin Dibekacin Dibekacin Дибекацин Dibekacina Dibekacin Dibekacin Дібекацин
|
||||
Dicloxacillin FALSE TRUE TRUE FALSE 迪卡西林 Dikloxacilin Dicloxacillin Dicloxacilline Dikloksasilliini Dicloxacilline Dicloxacillin Δικλοξακιλλίνη Dicloxacillina ジクロキサシリン Dikloxacillin Dikloxacillin Dicloxacilina Dicloxacilină Диклоксациллин Dicloxacilina Dikloxacillin Dikloksasilin Диклоксацилін
|
||||
Dirithromycin FALSE TRUE TRUE FALSE 迪里红霉素 Dirithromycin Dirithromycin Diritromycine Diritromysiini Dirithromycine Dirithromycin Διριθρομυκίνη Diritromicina ジリスロマイシン Diritromycin Dirytromycyna Diritromicina Diritromicină Диритромицин Diritromicina Diritromycin Diritromisin Диритроміцин
|
||||
Econazole FALSE TRUE TRUE FALSE 胺鲜胺 Ekonazol Econazol Econazol Ekonatsoli Econazole Econazol Εκοναζόλη Econazolo エコナゾール Econazol Ekonazol Econazole Econazol Эконазол Econazol Ekonazol Ekonazol Еконазол
|
||||
Enoxacin FALSE TRUE TRUE FALSE 伊诺沙星 Enoxacin Enoxacin Enoxacine Enoksasiini Enoxacine Enoxacin Ενοξακίνη Enoxacina エノキサシン Enoksacin Enoxacin Enoxacin Enoxacin Эноксацин Enoxacina Enoxacin Enoksasin Еноксацин
|
||||
Epicillin FALSE TRUE TRUE FALSE 伊比西林 Epicilin Epicillin Epicilline Episilliini Epicilline Epicillin Επικιλλίνη Epicillina エピシリン Epikillin Epicillin Epicilina Epicilină Эпициллин Epicilina Epicillin Episilin Епіцилін
|
||||
Erythromycin FALSE TRUE TRUE FALSE 红霉素 Erytromycin Erythromycin Erytromycine Erytromysiini Erythromycine Erythromycin Ερυθρομυκίνη Eritromicina エリスロマイシン Erytromycin Erytromycyna Eritromicina Eritromicină Эритромицин Eritromicina Erytromycin Eritromisin Еритроміцин
|
||||
Ethambutol/isoniazid FALSE TRUE TRUE FALSE 乙胺丁醇/异烟肼 Ethambutol/isoniazid Ethambutol/isoniazid Ethambutol/isoniazide Etambutoli/isonitsidi Ethambutol/isoniazide Ethambutol/Isoniazid Αιθαμβουτόλη/ισονιαζίδη Etambutolo/isoniazide エタンブトール/イソニアジド Etambutol/isoniazid Etambutol/izoniazyd Ethambutol/isoniazid Etambutol/isoniazidă Этамбутол/изониазид Etambutol/isoniazida Etambutol/isoniazid Etambutol/izoniazid Етамбутол/ізоніазид
|
||||
Fleroxacin FALSE TRUE TRUE FALSE 氨甲喋呤 Fleroxacin Fleroxacin Fleroxacine Fleroksasiini Fléroxacine Fleroxacin Φλεροξακίνη Fleroxacina フレロキサシン Fleroksacin Fleroksacyna Fleroxacina Fleroxacin Флероксацин Fleroxacina Fleroxacin Fleroxacin Флероксацин
|
||||
Flucloxacillin FALSE TRUE TRUE FALSE 氟氯西林 Flucloxacillin Flucloxacillin Flucloxacilline Flukloksasilliini Flucloxacilline Flucloxacillin Φλουκλοξακιλλίνη Flucloxacillina フルクロキサシリン Flukloxacillin Flucloxacillin Flucloxacillin Flucloxacilină Флуклоксациллин Flucloxacilina Flucloxacillin Flukloksasilin Флуклоксацилін
|
||||
Fluconazole FALSE TRUE TRUE FALSE 氟康唑 Flukonazol Fluconazol Fluconazol Flukonatsoli Fluconazole Fluconazol Φλουκοναζόλη Fluconazolo フルコナゾール Flukonazol Flukonazol Fluconazole Fluconazol Флуконазол Fluconazol Flukonazol Flukonazol Флуконазол
|
||||
Flucytosine FALSE TRUE TRUE FALSE 氨甲喋呤 Flucytosin Flucytosin Fluorocytosine Flukosiini Flucytosine Flucytosin Φλουκυτοσίνη Flucytosine フルシトシン Flucytosin Flucytozyna Flucytosine Flucitozină Флуцитозин Flucitosina Flucytosin Flusitozin Флуцитозин
|
||||
Flurithromycin FALSE TRUE TRUE FALSE 氟利霉素 Fluritromycin Flurithromycin Fluritromycine Fluritromysiini Flurithromycine Flurithromycin Φλουριθρομυκίνη Fluritromicina フルリスロマイシン Fluritromycin Flurithromycin Fluritromicina Fluritromicină Флуритромицин Fluritromicina Fluritromycin Fluritromisin Флуритроміцин
|
||||
Fosfomycin FALSE TRUE TRUE FALSE 福斯霉素 Fosfomycin Fosfomycin Fosfomycine Fosfomysiini Fosfomycine Fosfomycin Φοσφομυκίνη Fosfomicina ホスホマイシン Fosfomycin Fosfomycyna Fosfomycin Fosfomicină Фосфомицин Fosfomicina Fosfomycin Fosfomisin Фосфоміцин
|
||||
Fusidic acid FALSE TRUE TRUE FALSE 夫西地酸 Kyselina fusidová Fusidinsyre Fusidinezuur Fusidiinihappo Acide fusidique Fusidinsäure Φουσιδικό οξύ Acido fusidico フシジン酸 Fusidinsyre Kwas fusydynowy Ácido fusídico Acid fuzidic Фузидовая кислота Ácido fusídico Fusidinsyra Fusidik asit Фузидова кислота
|
||||
Gatifloxacin FALSE TRUE TRUE FALSE 加替沙星 Gatifloxacin Gatifloxacin Gatifloxacine Gatifloksasiini Gatifloxacine Gatifloxacin Gatifloxacin Gatifloxacina ガチフロキサシン Gatifloxacin Gatifloxacin Gatifloxacin Gatifloxacină Гатифлоксацин Gatifloxacina Gatifloxacin Gatifloksasin Гатифлоксацин
|
||||
Gemifloxacin FALSE TRUE TRUE FALSE 吉非沙星 Gemifloxacin Gemifloxacin Gemifloxacine Gemifloksasiini Gemifloxacine Gemifloxacin Γεμιφλοξασίνη Gemifloxacina ゲミフロキサシン Gemifloxacin Gemifloksacyna Gemifloxacin Gemifloxacin Гемифлоксацин Gemifloxacina Gemifloxacin Gemifloksasin Геміфлоксацин
|
||||
Gentamicin FALSE TRUE TRUE FALSE 庆大霉素 Gentamicin Gentamicin Gentamicine Gentamysiini Gentamicine Gentamicin Γενταμικίνη Gentamicina ゲンタマイシン Gentamicin Gentamicin Gentamicina Gentamicină Гентамицин Gentamicina Gentamicin Gentamisin Гентаміцин
|
||||
Grepafloxacin FALSE TRUE TRUE FALSE 格雷帕沙星 Grepafloxacin Grepafloxacin Grepafloxacine Grepafloksasiini Grepafloxacine Grepafloxacin Γρεπαφλοξασίνη Grepafloxacina グレパフロキサシン Grepafloxacin Grepafloksacyna Grepafloxacin Grepafloxacină Грепафлоксацин Grepafloxacina Grepafloxacin Grepafloksasin Грепафлоксацин
|
||||
Hachimycin FALSE TRUE TRUE FALSE 哈奇霉素 Hachimycin Hachimycin Hachimycine Hachimysiini Hachimycine Hachimycin Χαχιμυκίνη Hachimycin ハチマイシン Hachimycin Hachimycin Hachimycin Hachimicină Хатимицин Hachimycin Hachimycin Hachimycin Хачиміцин
|
||||
Hetacillin FALSE TRUE TRUE FALSE 赫拉西林 Hetacilin Hetacillin Hetacilline Hetasilliini Hétacilline Hetacillin Ετακιλλίνη Hetacillin ヘタシリン Hetacillin Hetacylina Hetacillin Hetacilină Гетациллин Hetacilina Hetacillin Hetasilin Гетацилін
|
||||
Imipenem FALSE TRUE TRUE FALSE 亚胺培南/西司他丁 Imipenem Imipenem Imipenem Imipeneemi Imipénème Imipenem Ιμιπενέμη Imipenem イミペネム Imipenem Imipenem Imipenem Imipenem Имипенем Imipenem Imipenem İmipenem Іміпенем
|
||||
Imipenem/cilastatin FALSE TRUE TRUE FALSE 亚胺培南/西司他丁 Imipenem/cilastatin Imipenem/cilastatin Imipenem/enzymremmer Imipeneemi/cilastatiini Imipénème/cilastatine Imipenem/Cilastatin Ιμιπενέμη/σιλαστατίνη Imipenem/cilastatina イミペネム/シラスタチン Imipenem/cilastatin Imipenem/cilastatyna Imipenem/coteltelatina Imipenem/cilastatină Имипенем/циластатин Imipenem/cilastatina Imipenem/cilastatin İmipenem/silastatin Іміпенем/циластатин
|
||||
Inosine pranobex FALSE TRUE TRUE FALSE 肌苷帕诺贝斯 Inosin pranobex Inosin pranobex Inosiplex Inosiinipranobeksi Inosine pranobex Inosin-Pranobex Ινοσίνη pranobex Inosina pranobex イノシン・プラノベックス Inosin pranobex Pranobeks inozyny Pranobex inosine Inosină pranobex Инозин пранобекс Inosina pranobex Inosin pranobex İnosin pranobeks Інозин пранобекс
|
||||
Isepamicin FALSE TRUE TRUE FALSE 伊西帕米星 Isepamicin Isepamicin Isepamicine Isepamysiini Isepamicine Isepamicin Ισεπαµικίνη Isepamicina イセパマイシン Isepamicin Isepamicin Isepamicina Isepamicină Исепамицин Isepamicina Isepamicin İzepamisin Ізепаміцин
|
||||
Isoconazole FALSE TRUE TRUE FALSE 氨甲蝶呤 Isokonazol Isoconazol Isoconazol Isokonatsoli Isoconazole Isoconazol Ισοκοναζόλη Isoconazolo イソコナゾール Isokonazol Izokonazol Isoconazole Isoconazol Изоконазол Isoconazol Isokonazol İzokonazol Ізоконазол
|
||||
Isoniazid FALSE TRUE TRUE FALSE 伊索尼克酸 Isoniazid Isoniazid Isoniazide Isoniatsidi Isoniazide Isoniazid Ιζονιαζίδη Isoniazide イソニアジド Isoniazid Izoniazyd Isoniazid Isoniazidă Изониазид Isoniazida Isoniazid İzoniazid Ізоніазид
|
||||
Itraconazole FALSE TRUE TRUE FALSE 伊曲康唑 Itrakonazol Itraconazol Itraconazol Itrakonatsoli Itraconazole Itraconazol Ιτρακοναζόλη Itraconazolo イトラコナゾール Itrakonazol Itrakonazol Itraconazole Itraconazol Итраконазол Itraconazol Itrakonazol İtrakonazol Ітраконазол
|
||||
Josamycin FALSE TRUE TRUE FALSE 肌注 Josamycin Josamycin Josamycine Josamysiini Josamycine Josamycin Ζοζαμυκίνη Josamicina ホサマイシン Josamycin Josamycin Josamycin Josamicină Джозамицин Josamicina Josamycin Josamycin Джозаміцин
|
||||
Kanamycin FALSE TRUE TRUE FALSE 卡那霉素 Kanamycin Kanamycin Kanamycine Kanamysiini Kanamycine Kanamycin Καναμυκίνη Kanamicina カナマイシン Kanamycin Kanamycin Kanamycin Kanamicină Канамицин Kanamicina Kanamycin Kanamisin Канаміцин
|
||||
Ketoconazole FALSE TRUE TRUE FALSE 酮康唑 Ketokonazol Ketoconazol Ketoconazol Ketokonatsoli Kétoconazole Ketoconazol Κετοκοναζόλη Ketoconazolo ケトコナゾール Ketokonazol Ketokonazol Ketoconazole Ketoconazol Кетоконазол Ketoconazol Ketokonazol Ketokonazol Кетоконазол
|
||||
Levofloxacin FALSE TRUE TRUE FALSE 氧氟沙星 Levofloxacin Levofloxacin Levofloxacine Levofloksasiini Lévofloxacine Levofloxacin Λεβοφλοξασίνη Levofloxacina レボフロキサシン Levofloxacin Levofloxacin Levofloxacin Levofloxacină Левофлоксацин Levofloxacina Levofloxacin Levofloksasin Левофлоксацин
|
||||
Lincomycin FALSE TRUE TRUE FALSE 林可霉素 Linkomycin Lincomycin Lincomycine Lincomycin Lincomycine Lincomycin Λινκομυκίνη Lincomicina リンコマイシン Lincomycin Lincomycyna Lincomycin Lincomicină Линкомицин Lincomicina Lincomycin Lincomycin Лінкоміцин
|
||||
Lomefloxacin FALSE TRUE TRUE FALSE 洛美沙星 Lomefloxacin Lomefloxacin Lomefloxacine Lomefloksasiini Loméfloxacine Lomefloxacin Λομεφλοξασίνη Lomefloxacina ロメフロキサシン Lomefloksacin Lomefloxacin Lomefloxacin Lomefloxacină Ломефлоксацин Lomefloxacina Lomefloxacin Lomefloksasin Ломефлоксацин
|
||||
Lysozyme FALSE TRUE TRUE FALSE 硫酸钠 Lysozym Lysozym Lysozym Lysotsyymi Lysozyme Lysozym Λυσοζύμη Lisozima リゾチーム Lysozym Lizozym Lysozyme Lizozimă Лизоцим Lisozima Lysozym Lizozim Лізоцим
|
||||
Mandelic acid FALSE TRUE TRUE FALSE 扁桃酸 Kyselina mandlová Mandelinsyre Amandelzuur Mandelihappo Acide mandélique Mandelsäure Μανδελικό οξύ Acido mandelico マンデル酸 Mandelsyre Kwas migdałowy Ácido mandélico Acid mandelic Мандаловая кислота Ácido mandélico Mandelsyra Mandelik asit Мигдалева кислота
|
||||
Meropenem FALSE TRUE TRUE FALSE 美罗培南 Meropenem Meropenem Meropenem Meropeneemi Méropénème Meropenem Μεροπενέμη Meropenem メロペネム Meropenem Meropenem Meropenem Meropenem Меропенем Meropenem Meropenem Meropenem Меропенем
|
||||
Metampicillin FALSE TRUE TRUE FALSE 氨苄青霉素 Metampicilin Metampicillin Metampicilline Metampisilliini Métampicilline Metampicillin Μεταμπικιλλίνη Metampicillina メタンピシリン Metampicillin Metampicylina Metampicilina Metampicilină Метампициллин Metampicilina Metampicillin Metampisilin Метампіцилін
|
||||
Meticillin FALSE TRUE TRUE FALSE 美西林 Meticilin Meticillin Meticilline Metisilliini Méticilline Meticillin Μετικιλλίνη Meticillina メチシリン Meticillin Meticillin Meticillin Meticilină Метициллин Meticilina Meticillin Metisilin Метицилін
|
||||
Metisazone FALSE TRUE TRUE FALSE 氨甲喋呤 Metisazon Metisazon Metisazon Metisatsoni Métisazone Metisazon Μετισαζόνη Metisazone メチサゾン Metisazon Metisazon Metisazone Metisazonă Метисазон Metisazona Metisazon Metisazon Метисазон
|
||||
Metronidazole FALSE TRUE TRUE FALSE 甲硝唑 Metronidazol Metronidazol Metronidazol Metronidatsoli Métronidazole Metronidazol Μετρονιδαζόλη Metronidazolo メトロニダゾール Metronidazol Metronidazol Metronidazol Metronidazol Метронидазол Metronidazol Metronidazol Metronidazol Метронідазол
|
||||
Mezlocillin FALSE TRUE TRUE FALSE 氨甲蝶呤 Mezlocillin Mezlocillin Mezlocilline Mezlocillin Mezlocilline Mezlocillin Μεζλοκιλλίνη Mezlocillina メスロシリン Mezlocillin Mezlocillin Mezlocillin Mezlocilină Мезлоциллин Mezlocilina Mezlocillin Mezlosilin Мезлоцилін
|
||||
Micafungin FALSE TRUE TRUE FALSE 咪蒙灵 Mikafungin Micafungin Micafungine Mikafungiini Micafungine Micafungin Μικαφουνγκίνη Micafungin ミカファンギン Micafungin Micafungin Micafungin Micafungin Микафунгин Micafungina Micafungin Mikafungin Мікафунгін
|
||||
Miconazole FALSE TRUE TRUE FALSE 米康唑 Mikonazol Miconazol Miconazol Miconazole Miconazole Miconazol Μικροναζόλη Miconazolo ミコナゾール Miconazol Mikonazol Miconazole Miconazol Миконазол Miconazol Miconazol Mikonazol Міконазол
|
||||
Midecamycin FALSE TRUE TRUE FALSE 咪康霉素 Midekamycin Midecamycin Midecamycine Midecamycin Midecamycine Midecamycin Μεδεκαμυκίνη Midecamicina ミデカマイシン Midecamycin Midecamycin Midecamycin Midecamicină Мидекамицин Midecamicina Midecamycin Midecamycin Мідекаміцин
|
||||
Miocamycin FALSE TRUE TRUE FALSE 米卡霉素 Miocamycin Miocamycin Miocamycine Miocamycin Miocamycine Miocamycin Μειοκαμυκίνη Miocamicina ミオカマイシン Miocamycin Miocamycin Miocamicina Miocamicină Миокамицин Miocamycin Miocamycin Miocamycin Міокаміцин
|
||||
Moxifloxacin FALSE TRUE TRUE FALSE 莫西沙星 Moxifloxacin Moxifloxacin Moxifloxacine Moksifloksasiini Moxifloxacine Moxifloxacin Μοξιφλοξασίνη Moxifloxacin モキシフロキサシン Moxifloxacin Moxifloxacin Moxifloxacina Moxifloxacin Моксифлоксацин Moxifloxacina Moxifloxacin Moksifloksasin Моксифлоксацин
|
||||
Mupirocin FALSE TRUE TRUE FALSE 莫匹罗星 Mupirocin Mupirocin Mupirocine Mupirosiini Mupirocine Mupirocin Μουπιροκίνη Mupirocina ムピロシン Mupirocin Mupirocyna Mupirocina Mupirocin Мупироцин Mupirocina Mupirocin Mupirosin Мупіроцин
|
||||
Nalidixic acid FALSE TRUE TRUE FALSE 萘啶酸 Kyselina nalidixová Nalidixinsyre Nalidixinezuur Nalidiksiinihappo Acide nalidixique Nalidixinsäure Ναλιδιξικό οξύ Acido nalidixico ナリディキシック酸 Nalidixinsyre Kwas nalidyksowy Ácido nalidíxico Acid nalidixic Налидиксовая кислота Ácido nalidíxico Nalidixinsyra Nalidiksik asit Налідиксова кислота
|
||||
Neomycin FALSE TRUE TRUE FALSE 霉素 Neomycin Neomycin Neomycine Neomysiini Néomycine Neomycin Νεομυκίνη Neomicina ネオマイシン Neomycin Neomycyna Neomicina Neomicină Неомицин Neomicina Neomycin Neomisin Неоміцин
|
||||
Netilmicin FALSE TRUE TRUE FALSE 硝苯地平 Netilmicin Netilmicin Netilmicine Netilmisiini Netilmicine Netilmicin Νετιλµικίνη Netilmicin ネチルミシン Netilmicin Netilmicin Netilmicin Netilmicină Нетилмицин Netilmicina Netilmicin Netilmisin Нетилміцин
|
||||
Nitrofurantoin FALSE TRUE TRUE FALSE 硝呋太尔 Nitrofurantoin Nitrofurantoin Nitrofurantoine Nitrofurantoiini Nitrofurantoïne Nitrofurantoin Νιτροφουραντοΐνη Nitrofurantoina ニトロフラントイン Nitrofurantoin Nitrofurantoina Nitrofurantoína Nitrofurantoină Нитрофурантоин Nitrofurantoína Nitrofurantoin Nitrofurantoin Нітрофурантоїн
|
||||
Norfloxacin FALSE TRUE TRUE FALSE 诺氟沙星 Norfloxacin Norfloxacin Norfloxacine Norfloksasiini Norfloxacine Norfloxacin Νορφλοξασίνη Norfloxacina ノルフロキサシン Norfloxacin Norfloxacin Norfloxacin Norfloxacină Норфлоксацин Norfloxacina Norfloxacin Norfloksasin Норфлоксацин
|
||||
Novobiocin FALSE TRUE TRUE FALSE 诺氟沙星 Novobiocin Novobiocin Novobiocine Novobiosiini Novobiocine Novobiocin Νοβοβιοκίνη Novobiocin ノボビオシン Novobiocin Nowobiocyna Novobiocin Novobiocin Новобиоцин Novobiocina Novobiocin Novobiocin Новобіоцин
|
||||
Nystatin FALSE TRUE TRUE FALSE 囊肿 Nystatin Nystatin Nystatine Nystatin Nystatine Nystatin Νυστατίνη Nystatin ナイスタチン Nystatin Nystatyna Nystatin Nistatină Нистатин Nistatina Nystatin Nistatin Ністатин
|
||||
Ofloxacin FALSE TRUE TRUE FALSE 氧氟沙星 Ofloxacin Ofloxacin Ofloxacine Ofloksasiini Ofloxacine Ofloxacin Οφλοξασίνη Ofloxacin オフロキサシン Ofloxacin Ofloxacin Ofloxacin Ofloxacin Офлоксацин Ofloxacina Ofloxacin Ofloksasin Офлоксацин
|
||||
Oleandomycin FALSE TRUE TRUE FALSE 奥兰多霉素 Oleandomycin Oleandomycin Oleandomycine Oleandomysiini Oleandomycine Oleandomycin Ολεαντομυκίνη Oleandomicina オレアンドマイシン Oleandomycin Oleandomycin Oleandomicina Oleandomicină Олеандомицин Oleandomicina Oleandomycin Oleandomisin Олеандоміцин
|
||||
Ornidazole FALSE TRUE TRUE FALSE 奥硝唑 Ornidazol Ornidazol Ornidazol Ornidatsoli Ornidazole Ornidazol Ορνιδαζόλη Ornidazolo オルニダゾール Ornidazol Ornidazol Ornidazole Ornidazol Орнидазол Ornidazol Ornidazol Ornidazol Орнідазол
|
||||
Oxacillin FALSE TRUE TRUE FALSE 奥沙西林 Oxacilin Oxacillin Oxacilline Oksasilliini Oxacilline Oxacillin Οξακιλλίνη Oxacillina オキサシリン Oksacillin Oksacylina Oxacillin Oxacilină Оксациллин Oxacilina Oxacillin Oksasilin Оксацилін
|
||||
Oxolinic acid FALSE TRUE TRUE FALSE 氧氟沙星 Kyselina oxolinová Oxolinsyre Oxolinezuur Oksoliinihappo Acide oxolinique Oxolinsäure Οξολινικό οξύ Acido ossolinico オキソリニック酸 Oksolinsyre Kwas oksolinowy Ácido oxolínico Acid oxolinic Оксолиновая кислота Ácido oxolínico Oxolinsyra Oksolinik asit Оксолінова кислота
|
||||
Oxytetracycline FALSE TRUE TRUE FALSE 土四环素 Oxytetracyklin Oxytetracyclin Oxytetracycline Oksitetrasykliini Oxytétracycline Oxytetracyclin Οξυτετρακυκλίνη Ossitetraciclina オキシテトラサイクリン Oksytetracyklin Oksytetracyklina Oxitetraciclina Oxitetraciclină Окситетрациклин Oxitetraciclina Oxytetracyklin Oksitetrasiklin Окситетрациклін
|
||||
Pazufloxacin FALSE TRUE TRUE FALSE 帕唑沙星 Pazufloxacin Pazufloxacin Pazufloxacine Pazufloksasiini Pazufloxacine Pazufloxacin Παζουφλοξασίνη Pazufloxacin パズフロキサシン Pazufloxacin Pazufloxacin Pazufloxacin Pazufloxacin Пазуфлоксацин Pazufloxacina Pazufloxacin Pazufloksasin Пазуфлоксацин
|
||||
Pefloxacin FALSE TRUE TRUE FALSE 培氟沙星 Pefloxacin Pefloxacin Pefloxacine Pefloksasiini Péfloxacine Pefloxacin Πεφλοξασίνη Pefloxacina ペフロキサシン Pefloxacin Pefloksacyna Pefloxacin Pefloxacina Пефлоксацин Pefloxacina Pefloxacin Pefloksasin Пефлоксацин
|
||||
Penamecillin FALSE TRUE TRUE FALSE 青霉素 Penamecilin Penamecillin Penamecilline Penamekilliini Pénamécilline Penamecillin Πεναμεσιλλίνη Penamecillina ペナメシリン Penamecillin Penamecylina Penamecilina Penamecilină Пенамециллин Penamecilina Penamecillin Penamecillin Пенамецилін
|
||||
Penicillin FALSE TRUE TRUE FALSE 青霉素 Penicilin Penicillin Penicilline Penisilliini Pénicilline Penicillin Πενικιλλίνη Penicillina ペニシリン Penicillin Penicylina Penicilina Penicilină Пенициллин Penicilina Penicillin Penisilin Пеніцилін
|
||||
Pheneticillin FALSE TRUE TRUE FALSE 菲尼克斯 Feneticilin Pheneticillin Feneticilline Fenetisilliini Phénéticilline Pheneticillin Φαινετικιλλίνη Feneticillina フェネチシリン Feneticillin Fenicylina Pheneticillin Feneticilină Фенетициллин Feneticilina Feneticillin Pheneticillin Фенетіцилін
|
||||
Phenoxymethylpenicillin FALSE TRUE TRUE FALSE 苯氧甲基青霉素 Fenoxymethylpenicilin Phenoxymethylpenicillin Fenoxymethylpenicilline Fenoksimetyylipenisilliini Phénoxyméthylpénicilline Phenoxymethylpenicillin Φαινοξυμεθυλοπενικιλλίνη Fenossimetilpenicillina フェノキシメチルペニシリン Fenoksymetylpenicillin Fenoksymetylopenicylina Fenoximetilpenicilina Fenoximetilpenicilină Феноксиметилпенициллин Fenoximetilpenicilina Fenoximetylpenicillin Fenoksimetilpenisilin Феноксиметилпеніцилін
|
||||
Pipemidic acid FALSE TRUE TRUE FALSE 吡哌酸 Kyselina pipemidová Pipemidinsyre Pipemidinezuur Pipemidiinihappo Acide pipémidique Pipemidinsäure Πιπεμιδικό οξύ Acido pipemidico ピペミド酸 Pipemidinsyre Kwas pipemidowy Ácido pipemídico Acid pipemidic Пипемидовая кислота Ácido pipemídico Pipemidinsyra Pipemidik asit Піпемідова кислота
|
||||
Piperacillin FALSE TRUE TRUE FALSE 哌拉西林 Piperacilin Piperacillin Piperacilline Piperasilliini Pipéracilline Piperacillin Πιπερακιλλίνη Piperacillina ピペラシリン Piperacillin Piperacillin Piperacilina Piperacilină Пиперациллин Piperacilina Piperacillin Piperasilin Піперацилін
|
||||
Piperacillin/beta-lactamase inhibitor FALSE TRUE TRUE FALSE 哌拉西林/β-内酰胺酶抑制剂 Piperacilin/inhibitor beta-laktamázy Piperacillin/beta-lactamasehæmmer Piperacilline/enzymremmer Piperasilliini/beeta-laktamaasin estäjä Pipéracilline/inhib. de bêta-lactamase Piperacillin/Beta-Lactamase-Hemmer Αναστολέας της πιπερακιλλίνης/β-λακταμάσης Piperacillina/inib. d. beta-lattamasi ピペラシリン/β-ラクタマーゼ阻害剤 Piperacillin/beta-laktamasehemmer Piperacylina/inhibitor beta-laktamazy Piperacilina/inibid. da beta-lactamase Inhibitor de piperacilină/beta-lactamază Пиперациллин/ингибитор бета-лактамазы Piperacilina/inhib. de la beta-lactamasa Piperacillin/betalaktamashämmare Piperasilin/beta-laktamaz inhibitörü Піперацилін/інгібітор бета-лактамаз
|
||||
Piromidic acid FALSE TRUE TRUE FALSE 吡罗米酸 Kyselina piromidová Piromidinsyre Piromidinezuur Piromidiinihappo Acide piromidique Piromidinsäure Πηρομιδικό οξύ Acido piromidico ピロミジン酸 Piromidinsyre Kwas piromidowy Ácido piromídico Acid piromidic Пиромидовая кислота Ácido piromídico Piromidinsyra Piromidik asit Піромідова кислота
|
||||
Pivampicillin FALSE TRUE TRUE FALSE 哌拉西林 Pivampicilin Pivampicillin Pivampicilline Pivampisilliini Pivampicilline Pivampicillin Πιβαµπικιλλίνη Pivampicillina ピバンピシリン Pivampicillin Pivampicillin Pivampicilina Pivampicilină Пивампициллин Pivampicilina Pivampicillin Pivampisilin Півампіцилін
|
||||
Polymyxin B FALSE TRUE TRUE FALSE 多粘菌素B Polymyxin B Polymyxin B Polymyxine B Polymysiini B Polymyxine B Polymyxin B Πολυμυξίνη Β Polimixina B ポリミキシンB Polymyxin B Polimyksyna B Polimixina B Polimixină B Полимиксин В Polimixina B Polymyxin B Polimiksin B Поліміксин B
|
||||
Posaconazole FALSE TRUE TRUE FALSE 泊沙康唑 Posakonazol Posaconazol Posaconazol Posakonatsoli Posaconazole Posaconazol Ποσακοναζόλη Posaconazolo ポサコナゾール Posakonazol Posaconazol Posaconazole Posaconazol Посаконазол Posaconazol Posakonazol Posakonazol Позаконазол
|
||||
Pristinamycin FALSE TRUE TRUE FALSE 普利司特霉素 Pristinamycin Pristinamycin Pristinamycine Pristinamysiini Pristinamycine Pristinamycin Πριστιναμυκίνη Pristinamicina プリスチナマイシン Pristinamycin Pristinamycin Pristinamicina Pristinamicină Пристинамицин Pristinamicina Pristinamycin Pristinamisin Пристинаміцин
|
||||
Procaine benzylpenicillin FALSE TRUE TRUE FALSE 普鲁卡因青霉素 Prokain benzylpenicilin Prokainbenzylpenicillin Benzylpenicillineprocaine Prokaiinibentsyylipenisilliini Procaïne benzylpénicilline Procain-Benzylpenicillin Βενζυλοπενικιλλίνη προκαΐνης Procaina benzilpenicillina プロカインベンジルペニシリン Prokain benzylpenicillin Benzylopenicylina prokainowa Procaína benzilpenicilina Benzilpenicilină procaină Прокаин бензилпенициллин Bencilpenicilina procaína Prokainbenzylpenicillin Prokain benzilpenisilin Прокаїну бензилпеніцилін
|
||||
Propicillin FALSE TRUE TRUE FALSE 普利西林 Propicilin Propicillin Propicilline Propisilliini Propicilline Propicillin Προπικιλλίνη Propicillina プロピシリン Propicillin Propicylina Propicilina Propicilină Пропициллин Propicilina Propicillin Propisilin Пропіцилін
|
||||
Prulifloxacin FALSE TRUE TRUE FALSE 普利沙星 Prulifloxacin Prulifloxacin Prulifloxacine Prulifloksasiini Prulifloxacine Prulifloxacin Προυλιφλοξασίνη Prulifloxacina プルリフロキサシン Prulifloxacin Prulifloksacyna Prulifloxacina Prulifloxacină Прулифлоксацин Prulifloxacina Prulifloxacin Prulifloksasin Пруліфлоксацин
|
||||
Quinupristin/dalfopristin FALSE TRUE TRUE FALSE 奎宁斯丁/达夫普利斯丁 Chinupristin/dalfopristin Quinupristin/dalfopristin Quinupristine/dalfopristine Kinupristiini/dalfopristiini Quinupristine/dalfopristine Quinupristin/Dalfopristin Κινουπριστίνη/νταλφοπριστίνη Quinupristina/dalfopristina キヌプリスチン/ダルフォプリスチン Quinupristin/dalfopristin Quinupristin/dalfopristin Quinupristin/dalfopristin Quinupristin/dalfopristin Квинупристин/дальфопристин Quinupristina/dalfopristina Quinupristin/dalfopristin Quinupristin/dalfopristin Хінупристин/дальфопристин
|
||||
Ribostamycin FALSE TRUE TRUE FALSE 利波霉素 Ribostamycin Ribostamycin Ribostamycine Ribostamysiini Ribostamycine Ribostamycin Ριμποσταμυκίνη Ribostamicina リボスタマイシン Ribostamycin Ribostamycyna Ribostamicina Ribostamicină Рибостамицин Ribostamicina Ribostamycin Ribostamisin Рибостаміцин
|
||||
Rifabutin FALSE TRUE TRUE FALSE 利福布汀 Rifabutin Rifabutin Rifabutine Rifabutiini Rifabutine Rifabutin Ριφαμπουτίνη Rifabutina リファブチン Rifabutin Rifabutin Rifabutin Rifabutină Рифабутин Rifabutina Rifabutin Rifabutin Рифабутин
|
||||
Rifampicin FALSE TRUE TRUE FALSE 利福平 Rifampicin Rifampicin Rifampicine Rifampisiini Rifampicine Rifampicin Ριφαμπικίνη Rifampicina リファンピシン Rifampicin Rifampicyna Rifampicina Rifampicină Рифампицин Rifampicina Rifampicin Rifampisin Рифампіцин
|
||||
Rifampicin/pyrazinamide/ethambutol/isoniazid FALSE TRUE TRUE FALSE 利福平/吡嗪酰胺/乙胺丁醇/异烟肼 Rifampicin/pyrazinamid/ethambutol/isoniazid Rifampicin/pyrazinamid/ethambutol/isoniazid Rifampicine/pyrazinamide/ethambutol/isoniazide Rifampisiini/pyratsiiniamidi/etambutoli/isonatsidi Rifampisiini/pyratsiiniamidi/etambutoli/isonatsidi Rifampicine/pyrazinamide/éthambutol/isoniazide Rifampicin/Pyrazinamid/Ethambutol/Isoniazid Ριφαμπικίνη/πυραζιναμίδη/εθαμβουτόλη/ισονιαζίδη Rifampicina/pirazinamide/etambutolo/isoniazide リファンピシン/ピラジナミド/エタンブトール/イソニアジド Rifampicin/pyrazinamid/etambutol/isoniazid Rifampicyna/pirazinamid/etambutol/izoniazyd Rifampicina/pirazinamida/etambutol/isoniazida Rifampicină/pirazinamidă/etambutol/isoniazidă Рифампицин/пиразинамид/этамбутол/исониазид Rifampicina/pirazinamida/etambutol/isoniazida Rifampicin/pyrazinamid/ethambutol/isoniazid Rifampisin/pirazinamid/etambutol/izoniazid Рифампіцин/піразинамід/етамбутол/ізоніазид
|
||||
Rifampicin/pyrazinamide/isoniazid FALSE TRUE TRUE FALSE 利福平/吡嗪酰胺/异烟肼 Rifampicin/pyrazinamid/isoniazid Rifampicin/pyrazinamid/isoniazid Rifampicine/pyrazinamide/isoniazide Rifampisiini/pyratsiiniamidi/isonitsidi Rifampisiini/pyratsiiniamidi/isonitsidi Rifampicine/pyrazinamide/isoniazide Rifampicin/Pyrazinamid/Isoniazid Ριφαμπικίνη/πυραζιναμίδη/ισονιαζίδη Rifampicina/pirazinamide/isoniazide リファンピシン/ピラジナミド/イソニアジド Rifampicin/pyrazinamid/isoniazid Rifampicyna/pirazynamid/izoniazyd Rifampicina/pirazinamida/isoniazida Rifampicină/pirazinamidă/isoniazidă Рифампицин/пиразинамид/изониазид Rifampicina/pirazinamida/isoniazida Rifampicin/pyrazinamid/isoniazid Rifampisin/pirazinamid/izoniazid Рифампіцин/піразинамід/ізоніазид
|
||||
Rifampicin/isoniazid FALSE TRUE TRUE FALSE 利福平/异烟肼 Rifampicin/isoniazid Rifampicin/isoniazid Rifampicine/isoniazide Rifampisiini/isonitsidi Rifampicine/isoniazide Rifampicin/Isoniazid Ριφαμπικίνη/ισονιαζίδη Rifampicina/isoniazide リファンピシン/イソニアジド Rifampicin/isoniazid Rifampicyna/izoniazyd Rifampicina/isoniazida Rifampicină/isoniazidă Рифампицин/изониазид Rifampicina/isoniazida Rifampicin/isoniazid Rifampisin/izoniazid Рифампіцин/ізоніазид
|
||||
Rifamycin FALSE TRUE TRUE FALSE 利福霉素 Rifamycin Rifamycin Rifamycine Rifamysiini Rifamycine Rifamycin Ριφαμυκίνη Rifamicina リファマイシン Rifamycin Rifamycyna Rifamycin Rifamicină Рифамицин Rifamicina Rifamycin Rifamisin Рифаміцин
|
||||
Rifaximin FALSE TRUE TRUE FALSE 利福昔明 Rifaximin Rifaximin Rifaximine Rifaksimiini Rifaximine Rifaximin Ριφαξιμίνη Rifaximina リファキシミン Rifaximin Rifaximin Rifaximin Rifaximin Рифаксимин Rifaximina Rifaximin Rifaximin Рифаксимін
|
||||
Rokitamycin FALSE TRUE TRUE FALSE 罗奇霉素 Rokitamycin Rokitamycin Rokitamycine Rokitamysiini Rokitamycine Rokitamycin Ροκιταμυκίνη Rokitamicina ロキタマイシン Rokitamycin Rokitamycyna Rokitamycin Rokitamicină Рокитамицин Rokitamicina Rokitamycin Rokitamisin Рокітаміцин
|
||||
Rosoxacin FALSE TRUE TRUE FALSE 罗红霉素 Rosoxacin Rosoxacin Rosoxacine Rosoksasiini Rosoxacine Rosoxacin Ροζοξακίνη Rosoxacina ロソキサシン Rosoksacin Rosoxacin Rosoxacina Rosoxacin Розоксацин Rosoxacina Rosoxacin Rosoxacin Розоксацин
|
||||
Roxithromycin FALSE TRUE TRUE FALSE 罗红霉素 Roxithromycin Roxithromycin Roxitromycine Roksitromysiini Roxithromycine Roxithromycin Ροξιθρομυκίνη Roxitromicina ロキシスロマイシン Roxitromycin Roksytromycyna Roxitromicina Roxitromicină Рокситромицин Roxitromicina Roxitromycin Roxithromycin Рокситроміцин
|
||||
Rufloxacin FALSE TRUE TRUE FALSE 罗氟沙星 Rufloxacin Rufloxacin Rufloxacine Rufloksasiini Rufloxacine Rufloxacin Ρουφλοξασίνη Rufloxacina ルフロキサシン Rufloxacin Rufloxacin Rufloxacin Rufloxacin Руфлоксацин Rufloxacina Rufloxacin Rufloksasin Руфлоксацин
|
||||
Sisomicin FALSE TRUE TRUE FALSE 西索米星 Sisomicin Sisomicin Sisomicine Sisomisiini Sisomicine Sisomicin Σισομικίνη Sisomicina シソマイシン Sisomicin Sisomicin Sisomicina Sisomicină Сизомицин Sisomicina Sisomicin Sisomisin Сизоміцин
|
||||
Sodium aminosalicylate FALSE TRUE TRUE FALSE 氨基水杨酸钠 Aminosalicylát sodný Natriumaminosalicylat Aminosalicylzuur Natriumaminosalisylaatti Aminosalicylate de sodium Natrium-Aminosalicylat Αμινοσαλικυλικό νάτριο Sodio aminosalicilato アミノサリチル酸ソーダ Natriumaminosalicylat Aminosalicylan sodu Aminosalicilato de sódio Aminosalicilat de sodiu Аминосалицилат натрия Aminosalicilato de sodio Natriumaminosalicylat Sodyum aminosalisilat Натрію аміносаліцилат
|
||||
Sparfloxacin FALSE TRUE TRUE FALSE 氨水杨酸钠 Sparfloxacin Sparfloxacin Sparfloxacine Sparfloksasiini Sparfloxacine Sparfloxacin Σπαρφλοξασίνη Sparfloxacina スパルフロキサシン Sparfloxacin Sparfloxacin Sparfloxacin Sparfloxacina Спарфлоксацин Esparfloxacina Sparfloxacin Sparfloksasin Спарфлоксацин
|
||||
Spectinomycin FALSE TRUE TRUE FALSE 大观霉素 Spectinomycin Spectinomycin Spectinomycine Spectinomycin Spectinomycine Spectinomycin Σπεκτινομυκίνη Spectinomycin スペクチノマイシン Spectinomycin Spektynomycyna Spectinomycin Spectinomicină Спектиномицин Espectinomicina Spektinomycin Spektinomisin Спектиноміцин
|
||||
Spiramycin FALSE TRUE TRUE FALSE 斯皮拉菌素 Spiramycin Spiramycin Spiramycine Spiramysiini Spiramycine Spiramycin Σπιραμυκίνη Spiramicina スピラマイシン Spiramycin Spiramycyna Spiramycin Spiramicină Спирамицин Espiramicina Spiramycin Spiramisin Спіраміцин
|
||||
Spiramycin/metronidazole FALSE TRUE TRUE FALSE 螺旋霉素/甲硝唑 Spiramycin/metronidazol Spiramycin/metronidazol Spiramycine/metronidazol Spiramysiini/metronidatsoli Spiramycine/métronidazole Spiramycin/Metronidazol Σπιραμυκίνη/μετρονιδαζόλη Spiramicina/metronidazolo スピラマイシン/メトロニダゾール Spiramycin/metronidazol Spiramycyna/metronidazol Spiramycin/metronidazol Spiramicină/metronidazol Спирамицин/метронидазол Espiramicina/metronidazol Spiramycin/metronidazol Spiramisin/metronidazol Спіраміцин/метронідазол
|
||||
Staphylococcus immunoglobulin FALSE TRUE TRUE FALSE 葡萄球菌免疫球蛋白 Stafylokokový imunoglobulin Stafylokok-immunglobulin Stafylokokkenimmunoglobuline Staphylococcus-immunoglobuliini Immunoglobuline staphylococcique Staphylococcus-Immunoglobulin Σταφυλόκοκκος ανοσοσφαιρίνη Immunoglobulina per stafilococco ブドウ球菌免疫グロブリン Staphylococcus immunglobulin Immunoglobulina gronkowcowa Imunoglobulina de Staphylococcus Imunoglobulină stafilococică Стафилококковый иммуноглобулин Inmunoglobulina estafilocócica Immunoglobulin mot stafylokocker Staphylococcus immünoglobulin Стафілококовий імуноглобулін
|
||||
Streptoduocin FALSE TRUE TRUE FALSE 链霉素 Streptoduocin Streptoduocin Streptoduocine Streptoduocin Streptoduocine Streptoduocin Στρεπτοδουοκίνη Streptoduocin ストレプトデュオシン Streptoduocin Streptoduocin Estreptoduocina Streptoduocin Стрептодуоцин Estreptoduocina Streptoduocin Streptoduosin Стрептодуоцин
|
||||
Streptomycin FALSE TRUE TRUE FALSE 霉素 Streptomycin Streptomycin Streptomycine Streptomysiini Streptomycine Streptomycin Στρεπτομυκίνη Streptomicina ストレプトマイシン Streptomycin Streptomycyna Streptomycin Streptomicină Стрептомицин Estreptomicina Streptomycin Streptomisin Стрептоміцин
|
||||
Streptomycin/isoniazid FALSE TRUE TRUE FALSE 链霉素/异烟肼 Streptomycin/izoniazid Streptomycin/isoniazid Streptomycine/isoniazide Streptomysiini/isoniasidi Streptomycine/isoniazide Streptomycin/Isoniazid Στρεπτομυκίνη/ισονιαζίδη Streptomicina/isoniazide ストレプトマイシン/イソニアジド Streptomycin/isoniazid Streptomycyna/izoniazyd Streptomicina/isoniazida Streptomicină/isoniazidă Стрептомицин/изониазид Estreptomicina/isoniazida Streptomycin/isoniazid Streptomisin/izoniazid Стрептоміцин/ізоніазид
|
||||
Sulbenicillin FALSE TRUE TRUE FALSE 磺苄西林 Sulbenicillin Sulbenicillin Sulbenicilline Sulbenisilliini Sulbenicilline Sulbenicillin Σουλμπενικιλλίνη Sulbenicillina スルベニシリン Sulbenicillin Sulbenicylina Sulbenicilina Sulbenicilină Сульбенициллин Sulbenicilina Sulbenicillin Sulbenisilin Сульбеніцилін
|
||||
Sulfadiazine/tetroxoprim FALSE TRUE TRUE FALSE 磺胺嘧啶/四氧嘧啶 Sulfadiazin/tetroxoprim Sulfadiazin/tetroxoprim Sulfadiazine/tetroxoprim Sulfadiatsiini/tetroksopriimi Sulfadiazine/tetroxoprime Sulfadiazin/Tetroxoprim Σουλφαδιαζίνη/τετροξοπρίμη Sulfadiazina/tetroxoprim スルファジアジン/テトロキソプリム Sulfadiazin/tetroksoprim Sulfadiazyna/tetroksoprim Sulfadiazina/tetroxoprim Sulfadiazină/tetroxoprim Сульфадиазин/тетроксоприм Sulfadiazina/tetroxoprim Sulfadiazin/tetroxoprim Sülfadiazin/tetroksoprim Сульфадіазин/тетроксоприм
|
||||
Sulfadiazine/trimethoprim FALSE TRUE TRUE FALSE 磺胺嘧啶/三甲氧苄啶 Sulfadiazin/trimetoprim Sulfadiazin/trimethoprim Sulfadiazine/trimethoprim Sulfadiatsiini/trimetopriimi Sulfadiazine/triméthoprime Sulfadiazin/Trimethoprim Σουλφαδιαζίνη/τριμεθοπρίμη Sulfadiazina/trimetoprim スルファジアジン/トリメトプリム Sulfadiazin/trimetoprim Sulfadiazyna/trimetoprim Sulfadiazina/trimethoprim Sulfadiazină/trimetoprim Сульфадиазин/триметоприм Sulfadiazina/trimetoprima Sulfadiazin/trimetoprim Sülfadiazin/trimetoprim Сульфадіазин/триметоприм
|
||||
Sulfadimidine/trimethoprim FALSE TRUE TRUE FALSE 磺胺嘧啶/三甲氧苄啶 Sulfadimidin/trimetoprim Sulfadimidin/trimethoprim Sulfadimidine/trimethoprim Sulfadimidiini/trimetopriimi Sulfadimidine/triméthoprime Sulfadimidin/Trimethoprim Σουλφαδιμιδίνη/τριμεθοπρίμη Sulfadimidina/trimetoprim スルファジミジン/トリメトプリム Sulfadimidin/trimetoprim Sulfadimidyna/trimetoprim Sulfadimidina/trimethoprim Sulfadimidină/trimetoprim Сульфадимидин/триметоприм Sulfadimidina/trimetoprima Sulfadimidin/trimetoprim Sülfadimidin/trimetoprim Сульфадимідин/триметоприм
|
||||
Sulfafurazole FALSE TRUE TRUE FALSE 磺胺呋喃唑 Sulfafurazol Sulfafurazol Sulfafurazol Sulfafuratsoli Sulfafurazole Sulfafurazol Σουλφαφουραζόλη Sulfafurazolo スルファフラゾール Sulfafurazol Sulfafurazol Sulfafurazole Sulfafurazol Сульфафуразол Sulfafurazol Sulfafurazol Sülfafurazol Сульфафуразол
|
||||
Sulfaisodimidine FALSE TRUE TRUE FALSE 磺胺二甲嘧啶 Sulfaisodimidin Sulfaisodimidin Sulfisomidine Sulfaisodimidiini Sulfaisodimidine Sulfaisodimidin Σουλφαϊζοδιμιδίνη Sulfaisodimidina スルファイソジミジン Sulfaisodimidin Sulfaisodimidine Sulfaisodimidina Sulfaisodimidină Сульфаизодимидин Sulfaisodimidina Sulfaisodimidin Sülfaizodimidin Сульфаізодимідин
|
||||
Sulfalene FALSE TRUE TRUE FALSE 磺胺类药物 Sulfalen Sulfalen Sulfaleen Sulfaleeni Sulfalène Sulfalene Σουλφαλένιο Sulfalene スルファレン Sulfen Sulfalen Sulfaleno Sulfalenă Сульфален Sulfaleno Sulfen Sülfalen Сульфален
|
||||
Sulfamazone FALSE TRUE TRUE FALSE 磺胺脒 Sulfamazon Sulfamazon Sulfamazon Sulfamatsoni Sulfamazone Sulfamazon Σουλφαμαζόνη Sulfamazone スルファマゾン Sulfamazon Sulfamazon Sulfamazona Sulfamazonă Сульфамазон Sulfamazona Sulfamazon Sülfamazon Сульфамазон
|
||||
Sulfamerazine/trimethoprim FALSE TRUE TRUE FALSE 磺胺脒/三甲氧苄氨嘧啶 Sulfamerazin/trimetoprim Sulfamerazin/trimethoprim Sulfamerazine/trimethoprim Sulfameratsiini/trimetopriimi Sulfamérazine/triméthoprime Sulfamerazin/Trimethoprim Σουλφαμεραζίνη/τριμεθοπρίμη Sulfamerazina/trimetoprim スルファメラジン/トリメトプリム Sulfamerazin/trimetoprim Sulfamerazyna/trimetoprim Sulfamerazina/trimethoprim Sulfamerazină/trimetoprim Сульфамеразин/триметоприм Sulfamerazina/trimetoprima Sulfamerazin/trimetoprim Sülfamerazin/trimetoprim Сульфамеразин/триметоприм
|
||||
Sulfamethizole FALSE TRUE TRUE FALSE 磺胺甲基咪唑 Sulfamethizol Sulfamethizol Sulfamethizol Sulfametatsoli Sulfaméthizole Sulfamethizol Sulfamethizole Sulfamethizolo スルファメチゾール Sulfametizol Sulfamethizole Sulfametizole Sulfamețizol Сульфаметизол Sulfametozol Sulfamethizol Sülfametizol Сульфаметізол
|
||||
Sulfamethoxazole FALSE TRUE TRUE FALSE 磺胺甲噁唑 Sulfamethoxazol Sulfamethoxazol Sulfamethoxazol Sulfametoksatsoli Sulfaméthoxazole Sulfamethoxazol Σουλφαμεθοξαζόλη Sulfametossazolo スルファメトキサゾール Sulfametoksazol Sulfametoksazol Sulfamethoxazole Sulfametoxazol Сульфаметоксазол Sulfametoxazol Sulfametoxazol Sülfametoksazol Сульфаметоксазол
|
||||
Sulfamethoxazole/trimethoprim FALSE TRUE TRUE FALSE 磺胺甲噁唑/三甲氧苄啶 Sulfamethoxazol/trimethoprim Sulfamethoxazol/trimethoprim Sulfamethoxazol/trimethoprim Sulfametoksatsoli/trimetopriimi Sulfaméthoxazole/triméthoprime Sulfamethoxazol/Trimethoprim Σουλφαμεθοξαζόλη/τριμεθοπρίμη Sulfametossazolo/trimetoprim スルファメトキサゾール/トリメトプリム Sulfametoksazol/trimetoprim Sulfametoksazol/trimetoprim Sulfametoxazol/trimethoprim Sulfametoxazol/trimetoprim Сульфаметоксазол/триметоприм Sulfametoxazol/trimetoprima Sulfametoxazol/trimetoprim Sülfametoksazol/trimetoprim Сульфаметоксазол/триметоприм
|
||||
Sulfametoxydiazine FALSE TRUE TRUE FALSE 磺胺甲噁唑 Sulfametoxydiazin Sulfametoxydiazin Sulfamethoxydiazine Sulfametoksidiatsiini Sulfamétoxydiazine Sulfametoxydiazin Σουλφαμετοξυδιαζίνη Sulfametoxydiazine スルファメトキシジアジン Sulfametoksydiazin Sulfametoksydiazyna Sulfametoxidiazina Sulfametoxidiazină Сульфаметоксидиазин Sulfametoxidiazina Sulfametoxydiazin Sulfametoksidiyazin Сульфаметоксидіазин
|
||||
Sulfametrole/trimethoprim FALSE TRUE TRUE FALSE 磺胺甲醚/三甲氧嘧啶 Sulfametrol/trimetoprim Sulfametrol/trimethoprim Sulfametrol/trimethoprim Sulfametroli/trimetopriimi Sulfamétrole/triméthoprime Sulfametrole/Trimethoprim Σουλφαμετρόλη/τριμεθοπρίμη Sulfametrole/trimetoprim スルファメトロール/トリメトプリム Sulfametrol/trimetoprim Sulfametrol/trimetoprim Sulfametrole/trimethoprim Sulfametrole/trimetoprim Сульфаметрол/триметоприм Sulfametrol/trimetoprima Sulfametrol/trimetoprim Sülfametrol/trimetoprim Сульфаметрол/триметоприм
|
||||
Sulfamoxole FALSE TRUE TRUE FALSE 磺胺甲噁唑 Sulfamoxol Sulfamoxol Sulfamoxol Sulfamoksoli Sulfamoxole Sulfamoxol Σουλφαμοξόλη Sulfamoxolo スルファモキソール Sulfamoksol Sulfamoksol Sulfamoxole Sulfamoxol Сульфамоксол Sulfamoxole Sulfamoxol Sülfamoksol Сульфамоксол
|
||||
Sulfamoxole/trimethoprim FALSE TRUE TRUE FALSE 磺胺甲噁唑/三甲氧苄啶 Sulfamoxol/trimetoprim Sulfamoxol/trimethoprim Sulfamoxol/trimethoprim Sulfamoksoli/trimetopriimi Sulfamoxole/triméthoprime Sulfamoxol/Trimethoprim Σουλφαμοξόλη/τριμεθοπρίμη Sulfamoxolo/trimetoprim スルファモキソール/トリメトプリム Sulfamoksol/trimetoprim Sulfamoksol/trimetoprim Sulfamoxole/trimethoprim Sulfamoxol/trimetoprim Сульфамоксол/триметоприм Sulfamoxol/trimetoprima Sulfamoxol/trimetoprim Sülfamoksol/trimetoprim Сульфамоксол/триметоприм
|
||||
Sulfaperin FALSE TRUE TRUE FALSE 磺胺类药物 Sulfaperin Sulfaperin Sulfaperine Sulfaperiini Sulfapérine Sulfaperin Σουλφαπερίνη Sulfaperin スルファペリン Sulfaperin Sulfaperin Sulfaperin Sulfaperin Сульфаперин Sulfametoxazol Sulfaperin Sülfaperin Сульфаперин
|
||||
Sulfaphenazole FALSE TRUE TRUE FALSE 磺胺苯吡唑 Sulfafenazol Sulfaphenazol Sulfafenazol Sulfafenatsoli Sulfaphénazole Sulfaphenazol Σουλφαφαιναζόλη Sulfafenazolo スルファフェナゾール Sulfafenazol Sulfafenazol Sulfafenazol Sulfafenazol Сульфафеназол Sulfafenazol Sulfafenazol Sülfafenazol Сульфафеназол
|
||||
Sulfathiazole FALSE TRUE TRUE FALSE 磺胺噻唑 Sulfathiazol Sulfathiazol Sulfathiazol Sulfatiatsoli Sulfathiazole Sulfathiazol Σουλφαθειαζόλη Sulfathiazole スルファチアゾール Sulfatiazol Sulfatiazol Sulfatazol Sulfatiazol Сульфатиазол Sulfatiazol Sulfathiazol Sulfathiazole Сульфатіазол
|
||||
Sulfathiourea FALSE TRUE TRUE FALSE 磺胺硫脲 Sulfathiomočovina Sulfathiourea Sulfathioureum Sulfathiourea Sulfathiourée Sulfathioharnstoff Σουλφαθειουρία Sulfathiourea スルファチオ尿素 Sulfathiourea Sulfathiourea Sulfathiourea Sulfathiourea Сульфатиомочевина Sulfathiourea Sulfatiourea Sulfathiourea Сульфатіосечовина
|
||||
Sultamicillin FALSE TRUE TRUE FALSE 苏打米林 Sultamicilin Sultamicillin Sultamicilline Sultamisilliini Sultamicilline Sultamicillin Σουλταμικιλλίνη Sultamicillina スルタミシリン Sultamicillin Sultamicillin Sultamicillin Sultamicilină Сультамициллин Sultamicilina Sultamicillin Sultamicillin Сультаміцилін
|
||||
Talampicillin FALSE TRUE TRUE FALSE 塔拉比西林 Talampicilin Talampicillin Talampicilline Talampisilliini Talampicilline Talampicillin Ταλαμπικιλλίνη Talampicillina タランピシリン Talampicillin Talampicylina Talampicilina Talampicilină Талампициллин Talampicilina Talampicillin Talampisilin Талампіцилін
|
||||
Teicoplanin FALSE TRUE TRUE FALSE 泰科普兰素 Teicoplanin Teicoplanin Teicoplanine Teikoplaniini Teicoplanine Teicoplanin Τεϊκοπλανίνη Teicoplanina テイコプラニン Teicoplanin Teicoplanin Teicoplanin Teicoplanin Тейкопланин Teicoplanina Teicoplanin Teikoplanin Тейкопланін
|
||||
Telithromycin FALSE TRUE TRUE FALSE 泰利霉素 Telithromycin Telithromycin Telitromycine Telitromysiini Télithromycine Telithromycin Τελιθρομυκίνη Telitromicina テリスロマイシン Telitromycin Telitromycyna Telitromicina Telitromicină Телитромицин Telitromicina Telitromycin Telitromisin Телітроміцин
|
||||
Temafloxacin FALSE TRUE TRUE FALSE 氨甲环酸 Temafloxacin Temafloxacin Temafloxacine Temafloksasiini Temafloxacine Temafloxacin Τεμαφλοξασίνη Temafloxacina テマフロキサシン Temafloxacin Temafloksacyna Temafloxacin Temafloxacin Темафлоксацин Temafloxacina Temafloxacin Temafloksasin Темафлоксацин
|
||||
Temocillin FALSE TRUE TRUE FALSE 氨甲蝶呤 Temocillin Temocillin Temocilline Temosilliini Temocillin Temocillin Τεμοκιλλίνη Temocillina テモシリン Temocillin Temocillin Temocillin Temocilină Темоциллин Temocilina Temocillin Temocillin Темоцилін
|
||||
Tenofovir disoproxil FALSE TRUE TRUE FALSE 特诺福韦酯 Tenofovir disoproxil Tenofovir disoproxil Tenofovir Tenofoviiridisoproksiili Tenofovir disoproxil Tenofovir Disoproxil Τενοφοβίρη δισοπροξίλη Tenofovir disoproxil テノホビルジソプロキシル Tenofovir disoproxil Tenofovir disoproxil Tenofovir disoproxil Tenofovir disoproxil Тенофовир дизопроксил Tenofovir disoproxil Tenofovir disoproxil Tenofovir disoproksil Тенофовір дизопроксил
|
||||
Terizidone FALSE TRUE TRUE FALSE 特立兹酮 Terizidon Terizidon Terizidon Teritsidoni Terizidone Terizidon Τεριζιδόνη Terizidone テリジドン Terizidon Terizidon Terizidone Terizidonă Теризидон Terizidona Terizidon Terizidon Теризидон
|
||||
Thiamphenicol FALSE TRUE TRUE FALSE 硫苯尼考 Thiamfenikol Thiamphenicol Thiamfenicol Tiamfenikoli Thiamphénicol Thiamphenicol Θειαμφενικόλη Tiamfenicolo チアンフェニコール Tiamfenikol Tiamfenikol Tiamfenicol Tiamfenicol Тиамфеникол Tiamfenicol Tiamfenikol Thiamphenicol Тіамфенікол
|
||||
Thioacetazone/isoniazid FALSE TRUE TRUE FALSE 硫乙酰唑酮/异烟肼 Thioacetazon/isoniazid Thioacetazon/isoniazid Thioacetazon/isoniazide Tioasetatsoni/isonatsidi Thioacétazone/isoniazide Thioacetazon/Isoniazid Θειοακεταζόνη/ισονιαζίδη Tioacetazone/isoniazide チオアセタゾン/イソニアジド Thioacetazon/isoniazid Tioacetazon/izoniazyd Thioacetazone/isoniazid Tioacetazonă/isoniazidă Тиоацетазон/изониазид Tioacetazona/isoniazida Thioacetazon/isoniazid Tiyoasetazon/izoniazid Тіоацетазон/ізоніазид
|
||||
Ticarcillin FALSE TRUE TRUE FALSE 替卡西林 Tykarcilinu Ticarcillin Ticarcilline Ticarcillin Ticarcilline Ticarcillin Τικαρκιλλίνη Ticarcillina チカルシリン Ticarcillin Ticarcillin Ticarcilina Ticarcilină Тикарциллин Ticarcilina Ticarcillin Ticarcillin Тикарцилін
|
||||
Ticarcillin/beta-lactamase inhibitor FALSE TRUE TRUE FALSE 替卡西林/β-内酰胺酶抑制剂 Tykarcilinu/beta-laktamázy Inhibitor Ticarcillin/beta-lactamasehæmmer Ticarcilline/enzymremmer Tikarsilliini/beeta-laktamaasin estäjä Ticarcilline/inhib. de bêta-lactamase Ticarcillin/Beta-Lactamase-Hemmer Αναστολέας της τικαρκιλλίνης/β-λακταμάσης Ticarcillina/inib. d. beta-lattamasi チカルシリン/β-ラクタマーゼ阻害剤 Ticarcillin/betalaktamaseinhibitor Tikarcylina/inhibitor beta-laktamazy Ticarcilina/inibid. da beta-lactamase Inhibitor de ticarcilină/beta-lactamază Тикарциллин/ингибитор бета-лактамазы Ticarcilina/inhib. de la betalactamasa Ticarcillin/beta-laktamashämmare Tikarsilin/beta-laktamaz inhibitörü Тикарцилін/інгібітор бета-лактамаз
|
||||
Ticarcillin/clavulanic acid FALSE TRUE TRUE FALSE 替卡西林/克拉维酸 Ticarcillin/kyselina klavulanová Ticarcillin/clavulansyre Ticarcilline/clavulaanzuur Tikarsilliini/klavulaanihappo Ticarcilline/acide clavulanique Ticarcillin/Clavulansäure Τικαρκιλλίνη/κλαβουλανικό οξύ Ticarcillina/acido clavulanico チカルシリン/クラブラン酸 Ticarcillin/klavulansyre Tikarcylina/kwas klawulanowy Ticarcilina/ácido clavulanico Ticarcilină/acid clavulanic Тикарциллин/клавулановая кислота Ticarcilina/ácido clavulánico Ticarcillin/clavulansyra Tikarsilin/klavulanik asit Тикарцилін/клавуланова кислота
|
||||
Tinidazole FALSE TRUE TRUE FALSE 替尼唑 Tinidazol Tinidazol Tinidazol Tinidatsoli Tinidazole Tinidazol Τινιδαζόλη Tinidazolo チニダゾール Tinidazol Tinidazol Tinidazole Tinidazol Тинидазол Tinidazol Tinidazol Tinidazol Тинідазол
|
||||
Tobramycin FALSE TRUE TRUE FALSE 妥布霉素 Tobramycin Tobramycin Tobramycine Tobramysiini Tobramycine Tobramycin Τομπραμυκίνη Tobramicina トブラマイシン Tobramycin Tobramycyna Tobramycin Tobramicină Тобрамицин Tobramicina Tobramycin Tobramisin Тобраміцин
|
||||
Trimethoprim/sulfamethoxazole FALSE TRUE TRUE FALSE 三甲氧嘧啶/磺胺甲恶唑 Trimethoprim/sulfametoxazol Trimethoprim/sulfamethoxazol Cotrimoxazol Trimetopriimi/sulfametoksatsoli Triméthoprime/sulfaméthoxazole Trimethoprim/Sulfamethoxazol Τριµεθοπρίµη/σουλφαµεθοξαζόλη Trimetoprim/sulfametossazolo トリメトプリム/スルファメトキサゾール Trimetoprim/sulfametoksazol Trimetoprim/sulfametoksazol Trimethoprim/sulfametoxazol Trimetoprim/sulfametoxazol Триметоприм/сульфаметоксазол Trimetoprima/sulfametoxazol Trimetoprim/sulfametoxazol Trimetoprim/sülfametoksazol Триметоприм/сульфаметоксазол
|
||||
Troleandomycin FALSE TRUE TRUE FALSE 托拉多霉素 Troleandomycin Troleandomycin Troleandomycine Troleandomysiini Troleandomycine Troleandomycin Τρολεαντομυκίνη Troleandomicina トロレアンドマイシン Troleandomycin Troleandomycyna Troleandomicina Troleandomicină Тролеандомицин Troleandomicina Troleandomycin Troleandomisin Тролеандоміцин
|
||||
Trovafloxacin FALSE TRUE TRUE FALSE 特戊沙星 Trovafloxacin Trovafloxacin Trovafloxacine Trovafloksasiini Trovafloxacine Trovafloxacin Τροβαφλοξασίνη Trovafloxacin トロバフロキサシン Trovafloxacin Trovafloxacin Trovafloxacin Trovafloxacină Тровафлоксацин Trovafloxacina Trovafloxacin Trovafloksasin Тровафлоксацин
|
||||
Vancomycin FALSE TRUE TRUE FALSE 唑啉酮 Vankomycin Vancomycin Vancomycine Vankomysiini Vancomycine Vancomycin Βανκομυκίνη Vancomicina バンコマイシン Vancomycin Wankomycyna Vancomycin Vancomicină Ванкомицин Vancomicina Vancomycin Vankomisin Ванкоміцин
|
||||
Voriconazole FALSE TRUE TRUE FALSE 伏立康唑 Vorikonazol Voriconazol Voriconazol Vorikonatsoli Voriconazole Voriconazol Βορικοναζόλη Voriconazolo ボリコナゾール Vorikonazol Worikonazol Voriconazol Voriconazol Вориконазол Voriconazol Vorikonazol Vorikonazol Вориконазол
|
||||
Aminoglycosides FALSE TRUE TRUE FALSE 氨基糖苷类 Aminoglykosidy Aminoglykosider Aminoglycosiden Aminoglykosidit Aminoglycosides Aminoglykoside Αμινογλυκοσίδες Aminoglicosidi アミノグリコシド系抗生物質 Aminoglykosider Aminoglikozydy Aminoglycosides Aminoglicozide Аминогликозиды Aminoglucósidos Aminoglykosider Aminoglikozidler Аміноглікозиди
|
||||
Amphenicols FALSE TRUE TRUE FALSE 安息香醇 Amfenikoly Amphenicoler Amfenicolen Amfenikolit Amphénicols Amphenicole Αμφενικόλες Amphenicols アンフェニコール Amfenikoler Amfenikol Anfenicóis Amfenicoli Амфениколы Anfenicoles Amfenikoler Amphenicols Амфеніколи
|
||||
Antifungals/antimycotics FALSE TRUE TRUE FALSE 抗真菌药/抗真菌药 Antimykotika/antimykotika Antimykotika/antimykotika Antifungica/antimycotica Sienilääkkeet/antimykootit Antifongiques/antimycotiques Antimykotika/Antimykotika Αντιμυκητιασικά/αντιμυκητιασικά Antifungini/antimicotici 抗真菌剤/抗真菌剤 Soppdrepende midler/antimykotika Środki przeciwgrzybicze/przeciwmikotyczne Antifúngicos/antimicóticos Antifungice/antimicrotice Противогрибковые препараты/антимикотики Antifúngicos/antimicóticos Antimykotika/antimykotika Antifungaller/antimikotikler Протигрибкові засоби/антимікотики
|
||||
Antimycobacterials FALSE TRUE TRUE FALSE 抗霉菌素类 Antimykobakteriální látky Antimycobakterier Antimycobacteriele middelen Antimykobakteerit Antimycobactériens Antimykobakterielle Mittel Αντιμυκοβακτηριακά Antimicobatterici 抗マイコバクテリア薬 Antimykobakterielle midler Środki przeciwgrzybicze Antimycobacterials Antimicobacteriene Антимикобактериальные препараты Antimicrobianos Antimykobakterier Antimikobakteriyeller Засоби, що діють на мікобактерії
|
||||
Beta-lactams/penicillins FALSE TRUE TRUE FALSE β-内酰胺类/青霉素类 Beta-laktamy/peniciliny Beta-lactamer/penicilliner Beta-lactams/penicillines Beetalaktaamit/penisilliinit Bêta-lactamines/pénicillines Beta-Lactame/Penicilline Β-λακτάμες/πενικιλλίνες Beta-lattami/penicilline β-ラクタム系/ペニシリン系抗菌薬 Betalaktamer/penicilliner Beta-laktamy/penicyliny Beta-lactâmicas/penicilinas Beta-lactame/peniciline Бета-лактамы/пенициллины Beta-lactámicos/penicilinas Beta-laktamer/penicilliner Beta-laktamlar/penisilinler Бета-лактами/пеніциліни
|
||||
Cephalosporins (1st gen.) FALSE TRUE TRUE FALSE 头孢菌素类(第一代) Cefalosporiny (1. gen.) Cefalosporiner (1. gen.) Cefalosporines (1e gen.) Kefalosporiinit (1. suk.) Céphalosporines (1ère génération) Cephalosporine (1. Gen.) Κεφαλοσπορίνες (1ου γένους) Cefalosporine (1° gen.) セファロスポリン系抗生物質(第1世代) Cefalosporiner (1. generasjon) Cefalosporyny (1. gen.) Cefalosporinas (1º género) Cefalosporine (prima generație) Цефалоспорины (1-го пок.) Cefalosporinas (1er gen.) Kefalosporiner (första gen.) Sefalosporinler (1. kuşak) Цефалоспорини (1 пок.)
|
||||
Cephalosporins (2nd gen.) FALSE TRUE TRUE FALSE 头孢菌素类(第二代) Cefalosporiny (2. gen.) Cefalosporiner (2. gen.) Cefalosporines (2e gen.) Kefalosporiinit (2. suk.) Céphalosporines (2ème génération) Cephalosporine (2. Gen.) Κεφαλοσπορίνες (2ο γένος) Cefalosporine (2° gen.) セファロスポリン(第2世代) Cefalosporiner (2. generasjon) Cefalosporyny (2. gen.) Cefalosporinas (2ª gen.) Cefalosporine (a doua generație) Цефалоспорины (2-го пок.) Cefalosporinas (2do gen.) Kefalosporiner (andra gen.) Sefalosporinler (2. kuşak) Цефалоспорини (2 пок.)
|
||||
Cephalosporins (3rd gen.) FALSE TRUE TRUE FALSE 头孢菌素类(第三代) Cefalosporiny (3. gen.) Cefalosporiner (3. gen.) Cefalosporines (3e gen.) Kefalosporiinit (3. suk.) Céphalosporines (3ème génération) Cephalosporine (3. Gen.) Κεφαλοσπορίνες (3ο γένος) Cefalosporine (3° gen.) セファロスポリン(第3世代) Cefalosporiner (3. generasjon) Cefalosporyny (3 gen.) Cefalosporinas (3ª gen.) Cefalosporine (a treia generație) Цефалоспорины (3-го пок.) Cefalosporinas (3er gen.) Kefalosporiner (tredje gen.) Sefalosporinler (3. kuşak) Цефалоспорини (3 пок.)
|
||||
Cephalosporins (4th gen.) FALSE TRUE TRUE FALSE 头孢菌素类(第四代) Cefalosporiny (4. gen.) Cefalosporiner (4. gen.) Cefalosporines (4e gen.) Kefalosporiinit (4. suk.) Céphalosporines (4ème génération) Cephalosporine (4. Gen.) Κεφαλοσπορίνες (4ο γένος) Cefalosporine (4° gen.) セファロスポリン(第4世代) Cefalosporiner (4. generasjon) Cefalosporyny (4 gen.) Cefalosporinas (4.ª gen.) Cefalosporine (a 4-a generație) Цефалоспорины (4-го пок.) Cefalosporinas (4ª gen.) Kefalosporiner (4:e gen.) Sefalosporinler (4. kuşak) Цефалоспорини (4 пок.)
|
||||
Cephalosporins (5th gen.) FALSE TRUE TRUE FALSE 头孢菌素(第五代) Cefalosporiny (5. gen.) Cefalosporiner (5. gen.) Cefalosporines (5e gen.) Kefalosporiinit (5. suk.) Céphalosporines (5e gén.) Cephalosporine (5. Gen.) Κεφαλοσπορίνες (5ο γένος) Cefalosporine (5° gen.) セファロスポリン(第5世代) Cefalosporiner (5. generasjon) Cefalosporyny (5. gen.) Cefalosporinas (5.ª gen.) Cefalosporine (a 5-a generație) Цефалоспорины (5-го пок.) Cefalosporinas (5º gen.) Kefalosporiner (5:e gen.) Sefalosporinler (5. kuşak) Цефалоспорини (5 пок.)
|
||||
Cephalosporins (unclassified gen.) FALSE TRUE TRUE FALSE 头孢菌素类(未分类的一代) Cefalosporiny (nezařazené) Cefalosporiner (uklassificeret gen.) Cefalosporines (ongeclassificeerd) Kefalosporiinit (luokittelematon suk.) Céphalosporines (genre non classifié) Cephalosporine (unklassifiziert) Κεφαλοσπορίνες (μη ταξινομημένο γένος) Cefalosporine (gen. non classificato) セファロスポリン(未分類の世代) Cefalosporiner (uklassifisert generasjon) Cefalosporyny (niesklasyfikowana gen.) Cefalosporinas (não classificado gen.) Cefalosporine (generație neclasificată) Цефалоспорины (неклассифицированный род) Cefalosporinas (gen. no clasificado) Kefalosporiner (oklassificerad gen.) Sefalosporinler (sınıflandırılmamış nesil) Цефалоспорини (некласифікованого пок.)
|
||||
Cephalosporins FALSE TRUE TRUE FALSE 头孢菌素类 Cefalosporiny Cefalosporiner Cefalosporines Kefalosporiinit Céphalosporines Cephalosporine Κεφαλοσπορίνες Cefalosporine セファロスポリン Cefalosporiner Cefalosporyny Cefalosporinas Cefalosporine Цефалоспорины Cefalosporinas Kefalosporiner Sefalosporinler Цефалоспорини
|
||||
Glycopeptides FALSE TRUE TRUE FALSE 糖肽类药物 Glykopeptidy Glykopeptider Glycopeptiden Glykopeptidit Glycopeptides Glykopeptide Γλυκοπεπτίδια Glicopeptidi 糖ペプチド系 Glykopeptider Glikopeptydy Glycopeptides Glicopeptide Гликопептиды Glicopéptidos Glykopeptider Glikopeptitler Глікопептиди
|
||||
Macrolides/lincosamides FALSE TRUE TRUE FALSE 大环内酯类/林可酰胺类 Makrolidy/linkosamidy Makrolider/lincosamider Macroliden/lincosamiden Makrolidit/linkosamidit Macrolides/lincosamides Makrolide/Linkosamide Μακρολίδια/λινκοσαμίδια Macrolidi/lincosamidi マクロライド系/リンコサミド系 Makrolider/lincosamider Makrolidy/linkozamidy Macrolides/lincosamidas Macrolide/lincosamide Макролиды/линкозамиды Macrólidos/lincosamidas Makrolider/linkosamider Makrolidler/linkozamidler Макроліди/лінкозаміди
|
||||
Other antibacterials FALSE TRUE TRUE FALSE 其他抗菌剂 Ostatní antibakteriální látky Andre antibakterielle stoffer Overige antibiotica Muut antibakteeriset aineet Autres antibactériens Andere Antibiotika Άλλα αντιβακτηριακά Altri antibatterici その他の抗菌薬 Andre antibakterielle midler Inne środki przeciwbakteryjne Outros antibacterianos Alte antibacteriene Другие антибактериальные препараты Otros antibacterianos Andra antibakteriella medel Diğer antibakteriyeller Інші антибактеріальні засоби
|
||||
Polymyxins FALSE TRUE TRUE FALSE 多粘菌素类 Polymyxiny Polymyxiner Polymyxines Polymysiinit Polymyxines Polymyxine Πολυμυξίνες Polimixine ポリミキシン Polymyxiner Polimyksyny Polimixinas Polimixine Полимиксины Polimixinas Polymyxiner Polimiksinler Поліміксини
|
||||
Quinolones FALSE TRUE TRUE FALSE 喹诺酮类 Chinolony Kinoloner Quinolonen Kinolonit Quinolones Quinolone Κινολόνες Chinoloni キノロン Kinoloner Quinolony Quinolones Quinolone Хинолоны Quinolonas Kinoloner Kinolonlar Хінолони
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,12 +1,13 @@
|
||||
# The `AMR` Package for R <a href="https://msberends.github.io/AMR/"><img src="./logo.svg" align="right" height="139" /></a>
|
||||
|
||||
* Generates **antibiograms** - traditional, combined, syndromic, and even WISCA
|
||||
* Provides the **full microbiological taxonomy** and data on **all antimicrobial drugs**
|
||||
* Applies all recent **CLSI and EUCAST clinical breakpoints** for MICs and disk zones
|
||||
* Corrects for duplicate isolates, **calculates and predicts AMR** per antibiotic class
|
||||
* Integrates with **WHONET**, ATC, **EARS-Net**, PubChem, **LOINC** and **SNOMED CT**
|
||||
* Works on Windows, macOS and Linux with **all versions of R** since R-3.0 and is completely **dependency-free**, highly suitable for places with **limited resources**
|
||||
|
||||
<div style="display: flex;">
|
||||
<div style="display: flex; font-size: 0.8em;">
|
||||
<p style="text-align:left; width: 50%;"><small><a href="https://msberends.github.io/AMR/">https://msberends.github.io/AMR</a></small></p>
|
||||
<p style="text-align:right; width: 50%;"><small><a href="https://doi.org/10.18637/jss.v104.i03">https://doi.org/10.18637/jss.v104.i03</a></small></p>
|
||||
</div>
|
||||
@@ -21,18 +22,20 @@ This work was published in the Journal of Statistical Software (Volume 104(3); [
|
||||
|
||||
After installing this package, R knows [**~52,000 distinct microbial species**](./reference/microorganisms.html) (updated December 2022) and all [**~600 antibiotic, antimycotic and antiviral drugs**](./reference/antibiotics.html) by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral breakpoint guidelines from CLSI and EUCAST are included from the last 10 years. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). **It was designed to work in any setting, including those with very limited resources**. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the [University of Groningen](https://www.rug.nl), in collaboration with non-profit organisations [Certe Medical Diagnostics and Advice Foundation](https://www.certe.nl) and [University Medical Center Groningen](https://www.umcg.nl).
|
||||
|
||||
##### Used in 175 countries, translated to 16 languages
|
||||
##### Used in over 175 countries, translated into 20 languages
|
||||
|
||||
<a href="./countries_large.png"><img src="./countries.png" target="_blank" align="right" style="max-width: 300px;" /></a>
|
||||
|
||||
Since its first public release in early 2018, this R package has been used in almost all countries in the world. Click the map to enlarge and to see the country names.
|
||||
|
||||
With the help of contributors from all corners of the world, the `AMR` package is available in <img src="lang_en.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> English, <img src="lang_zh.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Chinese, <img src="lang_da.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Danish, <img src="lang_nl.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Dutch, <img src="lang_fr.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> French, <img src="lang_de.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> German, <img src="lang_el.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Greek, <img src="lang_it.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Italian, <img src="lang_ja.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Japanese, <img src="lang_pl.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Polish, <img src="lang_pt.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Portuguese, <img src="lang_ru.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Russian, <img src="lang_es.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Spanish, <img src="lang_sv.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Swedish, <img src="lang_tr.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Turkish, and <img src="lang_uk.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Ukrainian. Antimicrobial drug (group) names and colloquial microorganism names are provided in these languages.
|
||||
With the help of contributors from all corners of the world, the `AMR` package is available in <img src="lang_en.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> English, <img src="lang_cs.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Czech, <img src="lang_zh.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Chinese, <img src="lang_da.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Danish, <img src="lang_nl.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Dutch, <img src="lang_fi.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Finnish, <img src="lang_fr.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> French, <img src="lang_de.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> German, <img src="lang_el.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Greek, <img src="lang_it.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Italian, <img src="lang_ja.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Japanese, <img src="lang_no.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Norwegian, <img src="lang_pl.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Polish, <img src="lang_pt.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Portuguese, <img src="lang_ro.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Romanian, <img src="lang_ru.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Russian, <img src="lang_es.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Spanish, <img src="lang_sv.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Swedish, <img src="lang_tr.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Turkish, and <img src="lang_uk.svg" style="height: 13px !important; border: 1px solid #cccccc; vertical-align: initial !important;"> Ukrainian. Antimicrobial drug (group) names and colloquial microorganism names are provided in these languages.
|
||||
|
||||
### Practical examples
|
||||
|
||||
#### Filtering and selecting data
|
||||
|
||||
One of the most powerful functions of this package, aside from calculating and plotting AMR, is selecting and filtering based on antibiotic columns. This can be done using the so-called [antibiotic class selectors](https://msberends.github.io/AMR/reference/antibiotic_class_selectors.html) that work in base R, `dplyr` and `data.table`:
|
||||
|
||||
```r
|
||||
# AMR works great with dplyr, but it's not required or neccesary
|
||||
library(AMR)
|
||||
@@ -40,8 +43,10 @@ library(dplyr)
|
||||
|
||||
example_isolates %>%
|
||||
mutate(bacteria = mo_fullname()) %>%
|
||||
# filtering functions for microorganisms:
|
||||
filter(mo_is_gram_negative(),
|
||||
mo_is_intrinsic_resistant(ab = "cefotax")) %>%
|
||||
# antibiotic selectors:
|
||||
select(bacteria,
|
||||
aminoglycosides(),
|
||||
carbapenems())
|
||||
@@ -65,16 +70,95 @@ With only having defined a row filter on Gram-negative bacteria with intrinsic r
|
||||
A base R equivalent would be:
|
||||
|
||||
```r
|
||||
library(AMR)
|
||||
example_isolates$bacteria <- mo_fullname(example_isolates$mo)
|
||||
example_isolates[which(mo_is_gram_negative() &
|
||||
mo_is_intrinsic_resistant(ab = "cefotax")),
|
||||
c("bacteria", aminoglycosides(), carbapenems())]
|
||||
```
|
||||
|
||||
This base R snippet will work in any version of R since April 2013 (R-3.0).
|
||||
This base R code will work in any version of R since April 2013 (R-3.0). Moreover, this code works identically with the `data.table` package, only by starting with:
|
||||
|
||||
```r
|
||||
example_isolates <- data.table::as.data.table(example_isolates)
|
||||
```
|
||||
|
||||
#### Generating antibiograms
|
||||
|
||||
The `AMR` package supports generating traditional, combined, syndromic, and even weighted-incidence syndromic combination antibiograms (WISCA).
|
||||
|
||||
If used inside R Markdown or Quarto, the table will be printed in the right output format automatically (such as markdown, LaTeX, HTML, etc.).
|
||||
|
||||
```r
|
||||
antibiogram(example_isolates,
|
||||
antibiotics = c(aminoglycosides(), carbapenems()))
|
||||
```
|
||||
|
||||
|Pathogen (N min-max) | AMK| GEN| IPM| KAN| MEM| TOB|
|
||||
|:------------------------|---:|---:|---:|---:|---:|---:|
|
||||
|CoNS (43-309) | 0| 86| 52| 0| 52| 22|
|
||||
|*E. coli* (0-462) | 100| 98| 100| | 100| 97|
|
||||
|*E. faecalis* (0-39) | 0| 0| 100| 0| | 0|
|
||||
|*K. pneumoniae* (0-58) | | 90| 100| | 100| 90|
|
||||
|*P. aeruginosa* (17-30) | | 100| | 0| | 100|
|
||||
|*P. mirabilis* (0-34) | | 94| 94| | | 94|
|
||||
|*S. aureus* (2-233) | | 99| | | | 98|
|
||||
|*S. epidermidis* (8-163) | 0| 79| | 0| | 51|
|
||||
|*S. hominis* (3-80) | | 92| | | | 85|
|
||||
|*S. pneumoniae* (11-117) | 0| 0| | 0| | 0|
|
||||
|
||||
In combination antibiograms, it is clear that combined antibiotics yield higher empiric coverage:
|
||||
|
||||
```r
|
||||
antibiogram(example_isolates,
|
||||
antibiotics = c("TZP", "TZP+TOB", "TZP+GEN"),
|
||||
mo_transform = "gramstain")
|
||||
```
|
||||
|
||||
|Pathogen (N min-max) | TZP| TZP + GEN| TZP + TOB|
|
||||
|:------------------------|---:|---------:|---------:|
|
||||
|Gram-negative (641-693) | 88| 99| 98|
|
||||
|Gram-positive (345-1044) | 86| 98| 95|
|
||||
|
||||
Like many other functions in this package, `antibiogram()` comes with support for 20 languages that are often detected automatically based on system language:
|
||||
|
||||
```r
|
||||
antibiogram(example_isolates,
|
||||
antibiotics = c("cipro", "tobra", "genta"), # any arbitrary name or code will work
|
||||
mo_transform = "gramstain",
|
||||
ab_transform = "name",
|
||||
language = "uk") # Ukrainian
|
||||
```
|
||||
|
||||
|Збудник (N min-max) | Гентаміцин| Тобраміцин| Ципрофлоксацин|
|
||||
|:------------------------|----------:|----------:|--------------:|
|
||||
|Грамнегативні (684-686) | 96| 96| 91|
|
||||
|Грампозитивні (665-1170) | 63| 34| 77|
|
||||
|
||||
|
||||
#### Calculating resistance per group
|
||||
|
||||
For a manual approach, you can use the `resistance` or `susceptibility()` function:
|
||||
|
||||
```r
|
||||
example_isolates %>%
|
||||
# group by ward:
|
||||
group_by(ward) %>%
|
||||
# calculate AMR using resistance() for gentamicin and tobramycin
|
||||
# and get their 95% confidence intervals using sir_confidence_interval():
|
||||
summarise(across(c(GEN, TOB),
|
||||
list(total_R = resistance,
|
||||
conf_int = function(x) sir_confidence_interval(x, collapse = "-"))))
|
||||
```
|
||||
|
||||
|ward | GEN_total_R|GEN_conf_int | TOB_total_R|TOB_conf_int |
|
||||
|:---------:|:----------:|:-----------:|:----------:|:-----------:|
|
||||
|Clinical | 0.229 |0.205-0.254 | 0.315 |0.284-0.347 |
|
||||
|ICU | 0.290 |0.253-0.330 | 0.400 |0.353-0.449 |
|
||||
|Outpatient | 0.200 |0.131-0.285 | 0.368 |0.254-0.493 |
|
||||
|
||||
Or use [antibiotic class selectors](https://msberends.github.io/AMR/reference/antibiotic_class_selectors.html) to select a series of antibiotic columns:
|
||||
|
||||
```r
|
||||
library(AMR)
|
||||
library(dplyr)
|
||||
@@ -82,8 +166,7 @@ library(dplyr)
|
||||
out <- example_isolates %>%
|
||||
# group by ward:
|
||||
group_by(ward) %>%
|
||||
# calculate AMR using resistance(), over all aminoglycosides
|
||||
# and polymyxins:
|
||||
# calculate AMR using resistance(), over all aminoglycosides and polymyxins:
|
||||
summarise(across(c(aminoglycosides(), polymyxins()),
|
||||
resistance))
|
||||
out
|
||||
@@ -93,7 +176,7 @@ out
|
||||
|:-----------|------:|------:|------:|------:|------:|
|
||||
| Clinical | 0.229 | 0.315 | 0.626 | 1 | 0.780 |
|
||||
| ICU | 0.290 | 0.400 | 0.662 | 1 | 0.857 |
|
||||
| Outpatient | 0.200 | 0.368 | 0.605 | NA | 0.889 |
|
||||
| Outpatient | 0.200 | 0.368 | 0.605 | | 0.889 |
|
||||
|
||||
```r
|
||||
# transform the antibiotic columns to names:
|
||||
@@ -104,7 +187,7 @@ out %>% set_ab_names()
|
||||
|:-----------|-----------:|-----------:|----------|----------:|----------:|
|
||||
| Clinical | 0.229 | 0.315 | 0.626 | 1 | 0.780 |
|
||||
| ICU | 0.290 | 0.400 | 0.662 | 1 | 0.857 |
|
||||
| Outpatient | 0.200 | 0.368 | 0.605 | NA | 0.889 |
|
||||
| Outpatient | 0.200 | 0.368 | 0.605 | | 0.889 |
|
||||
|
||||
```r
|
||||
# transform the antibiotic column to ATC codes:
|
||||
@@ -115,7 +198,7 @@ out %>% set_ab_names(property = "atc")
|
||||
|:-----------|-----------:|-----------:|----------|----------:|----------:|
|
||||
| Clinical | 0.229 | 0.315 | 0.626 | 1 | 0.780 |
|
||||
| ICU | 0.290 | 0.400 | 0.662 | 1 | 0.857 |
|
||||
| Outpatient | 0.200 | 0.368 | 0.605 | NA | 0.889 |
|
||||
| Outpatient | 0.200 | 0.368 | 0.605 | | 0.889 |
|
||||
|
||||
### What else can you do with this package?
|
||||
|
||||
|
||||
@@ -26,3 +26,39 @@
|
||||
# Visit our website for the full manual and a complete tutorial about #
|
||||
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
||||
# ==================================================================== #
|
||||
|
||||
sir <- random_sir(100)
|
||||
rsi <- sir
|
||||
class(rsi) <- gsub("sir", "rsi", class(rsi))
|
||||
mic <- random_mic(100)
|
||||
disk <- random_disk(100)
|
||||
|
||||
expect_identical(summary(sir), summary(rsi))
|
||||
expect_identical(c(sir), c(rsi))
|
||||
|
||||
expect_identical(suppressWarnings(suppressMessages(as.rsi(as.character(rsi)))),
|
||||
suppressWarnings(suppressMessages(as.sir(as.character(sir)))))
|
||||
expect_identical(suppressWarnings(suppressMessages(as.rsi(mic, mo = "Escherichia coli", ab = "CIP"))),
|
||||
suppressWarnings(suppressMessages(as.sir(mic, mo = "Escherichia coli", ab = "CIP"))))
|
||||
expect_identical(suppressWarnings(suppressMessages(as.rsi(disk, mo = "Escherichia coli", ab = "CIP"))),
|
||||
suppressWarnings(suppressMessages(as.sir(disk, mo = "Escherichia coli", ab = "CIP"))))
|
||||
expect_identical(suppressWarnings(suppressMessages(as.rsi(data.frame(CIP = mic, mo = "Escherichia coli")))),
|
||||
suppressWarnings(suppressMessages(as.sir(data.frame(CIP = mic, mo = "Escherichia coli")))))
|
||||
|
||||
expect_identical(suppressWarnings(n_rsi(example_isolates$CIP)),
|
||||
suppressWarnings(n_sir(example_isolates$CIP)))
|
||||
|
||||
expect_identical(suppressWarnings(rsi_df(example_isolates)),
|
||||
suppressWarnings(sir_df(example_isolates)))
|
||||
|
||||
expect_identical(suppressWarnings(is.rsi.eligible(example_isolates)),
|
||||
suppressWarnings(is_sir_eligible(example_isolates)))
|
||||
|
||||
if (AMR:::pkg_is_available("ggplot2")) {
|
||||
expect_equal(suppressWarnings(ggplot_rsi(example_isolates[, c("CIP", "GEN", "TOB")])),
|
||||
suppressWarnings(ggplot_sir(example_isolates[, c("CIP", "GEN", "TOB")])))
|
||||
|
||||
p <- ggplot2::ggplot(example_isolates[, c("CIP", "GEN", "TOB")])
|
||||
expect_equal(suppressWarnings(p + geom_rsi() + scale_rsi_colours() + labels_rsi_count() + facet_rsi() + theme_rsi()),
|
||||
suppressWarnings(p + geom_sir() + scale_sir_colours() + labels_sir_count() + facet_sir() + theme_sir()))
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user