new EUCAST rules algorithm
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
install_if_needed <- function(pkg, repos, quiet) {
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
stages:
|
||||
|
@ -1,6 +1,6 @@
|
||||
Package: AMR
|
||||
Version: 0.6.1.9001
|
||||
Date: 2019-03-29
|
||||
Version: 0.6.1.9002
|
||||
Date: 2019-04-05
|
||||
Title: Antimicrobial Resistance Analysis
|
||||
Authors@R: c(
|
||||
person(
|
||||
|
@ -40,7 +40,6 @@ S3method(summary,mic)
|
||||
S3method(summary,mo)
|
||||
S3method(summary,rsi)
|
||||
export("%like%")
|
||||
export(EUCAST_rules)
|
||||
export(ab_atc)
|
||||
export(ab_certe)
|
||||
export(ab_name)
|
||||
@ -82,6 +81,7 @@ export(count_all)
|
||||
export(count_df)
|
||||
export(eucast_exceptional_phenotypes)
|
||||
export(eucast_rules)
|
||||
export(eucast_rules_file)
|
||||
export(facet_rsi)
|
||||
export(filter_1st_cephalosporins)
|
||||
export(filter_2nd_cephalosporins)
|
||||
@ -108,11 +108,8 @@ export(get_mo_source)
|
||||
export(ggplot_rsi)
|
||||
export(ggplot_rsi_predict)
|
||||
export(guess_ab_col)
|
||||
export(guess_atc)
|
||||
export(guess_mo)
|
||||
export(header)
|
||||
export(inner_join_microorganisms)
|
||||
export(interpretive_reading)
|
||||
export(is.atc)
|
||||
export(is.mic)
|
||||
export(is.mo)
|
||||
@ -281,6 +278,7 @@ importFrom(graphics,points)
|
||||
importFrom(graphics,text)
|
||||
importFrom(hms,is.hms)
|
||||
importFrom(knitr,kable)
|
||||
importFrom(microbenchmark,microbenchmark)
|
||||
importFrom(rlang,as_label)
|
||||
importFrom(rlang,enquos)
|
||||
importFrom(rlang,eval_tidy)
|
||||
|
5
NEWS.md
@ -1,6 +1,11 @@
|
||||
# AMR 0.6.1.9001
|
||||
**Note: latest development version**
|
||||
|
||||
#### Changed
|
||||
* Removed deprecated functions `guess_mo()`, `guess_atc()`, `EUCAST_rules()`, `interpretive_reading()`
|
||||
* Added more old taxonomic names to the `microorganisms.old` data set, which leads to better results finding when using the `as.mo()` function
|
||||
* Frequency tables of microbial IDs speed improvement
|
||||
* Removed all hardcoded EUCAST rules and replaced them with a new reference file: `./inst/eucast/eucast.tsv`.
|
||||
|
||||
# AMR 0.6.1
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Name of an antibiotic
|
||||
|
2
R/age.R
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Age in years of individuals
|
||||
|
4
R/amr.R
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' The \code{AMR} Package
|
||||
@ -64,4 +64,6 @@
|
||||
#' \url{https://gitlab.com/msberends/AMR/issues}
|
||||
#' @name AMR
|
||||
#' @rdname AMR
|
||||
# # prevent NOTE on R >= 3.6
|
||||
#' @importFrom microbenchmark microbenchmark
|
||||
NULL
|
||||
|
2
R/atc.R
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Transform to ATC code
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Get ATC properties from WHOCC website
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Property of an antibiotic
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Check availability of columns
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' The Catalogue of Life
|
||||
@ -33,7 +33,7 @@
|
||||
#' \item{All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria and Protozoa}
|
||||
#' \item{All ~3,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of \emph{Aspergillus}, \emph{Candida}, \emph{Cryptococcus}, \emph{Histplasma}, \emph{Pneumocystis}, \emph{Saccharomyces} and \emph{Trichophyton}).}
|
||||
#' \item{All ~2,000 (sub)species from ~100 other relevant genera, from the kingdoms of Animalia and Plantae (like \emph{Strongyloides} and \emph{Taenia})}
|
||||
#' \item{All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed}
|
||||
#' \item{All ~21,000 previously accepted names of included (sub)species that have been taxonomically renamed}
|
||||
#' \item{The complete taxonomic tree of all included (sub)species: from kingdom to subspecies}
|
||||
#' \item{The responsible author(s) and year of scientific publication}
|
||||
#' }
|
||||
|
10
R/count.R
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Count isolates
|
||||
@ -74,15 +74,15 @@
|
||||
#' # Count co-resistance between amoxicillin/clav acid and gentamicin,
|
||||
#' # so we can see that combination therapy does a lot more than mono therapy.
|
||||
#' # Please mind that `portion_S` calculates percentages right away instead.
|
||||
#' count_S(septic_patients$amcl) # S = 1057 (67.1%)
|
||||
#' count_all(septic_patients$amcl) # n = 1576
|
||||
#' count_S(septic_patients$amcl) # S = 1342 (71.4%)
|
||||
#' count_all(septic_patients$amcl) # n = 1879
|
||||
#'
|
||||
#' count_S(septic_patients$gent) # S = 1372 (74.0%)
|
||||
#' count_all(septic_patients$gent) # n = 1855
|
||||
#'
|
||||
#' with(septic_patients,
|
||||
#' count_S(amcl, gent)) # S = 1396 (92.0%)
|
||||
#' with(septic_patients, # n = 1517
|
||||
#' count_S(amcl, gent)) # S = 1660 (92.3%)
|
||||
#' with(septic_patients, # n = 1798
|
||||
#' n_rsi(amcl, gent))
|
||||
#'
|
||||
#' # Get portions S/I/R immediately of all rsi columns
|
||||
|
32
R/data.R
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Data set with ~500 antibiotics
|
||||
@ -183,14 +183,14 @@ catalogue_of_life <- list(
|
||||
#'
|
||||
#' A data set containing old (previously valid or accepted) taxonomic names according to the Catalogue of Life. This data set is used internally by \code{\link{as.mo}}.
|
||||
#' @inheritSection catalogue_of_life Catalogue of Life
|
||||
#' @format A \code{\link{data.frame}} with 16,911 observations and 4 variables:
|
||||
#' @format A \code{\link{data.frame}} with 21,342 observations and 4 variables:
|
||||
#' \describe{
|
||||
#' \item{\code{col_id}}{Catalogue of Life ID}
|
||||
#' \item{\code{tsn_new}}{New Catalogue of Life ID}
|
||||
#' \item{\code{fullname}}{Old taxonomic name of the microorganism}
|
||||
#' \item{\code{col_id}}{Catalogue of Life ID that was originally given}
|
||||
#' \item{\code{col_id_new}}{New Catalogue of Life ID that responds to an entry in the \code{\link{microorganisms}} data set}
|
||||
#' \item{\code{fullname}}{Old full taxonomic name of the microorganism}
|
||||
#' \item{\code{ref}}{Author(s) and year of concerning scientific publication}
|
||||
#' }
|
||||
#' @source [3] Catalogue of Life: Annual Checklist (public online database), \url{www.catalogueoflife.org}.
|
||||
#' @source Catalogue of Life: Annual Checklist (public online taxonomic database), \url{www.catalogueoflife.org} (check included annual version with \code{\link{catalogue_of_life_version}()}).
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
#' @seealso \code{\link{as.mo}} \code{\link{mo_property}} \code{\link{microorganisms}}
|
||||
"microorganisms.old"
|
||||
@ -261,3 +261,23 @@ catalogue_of_life <- list(
|
||||
#' }
|
||||
#' @inheritSection AMR Read more on our website!
|
||||
"WHONET"
|
||||
|
||||
# transforms data set to data.frame with only ASCII values, to comply with CRAN policies
|
||||
dataset_UTF8_to_ASCII <- function(df) {
|
||||
trans <- function(vect) {
|
||||
iconv(vect, from = "UTF-8", to = "ASCII//TRANSLIT")
|
||||
}
|
||||
df <- as.data.frame(df, stringsAsFactors = FALSE)
|
||||
for (i in 1:NCOL(df)) {
|
||||
col <- df[, i]
|
||||
if (is.factor(col)) {
|
||||
levels(col) <- trans(levels(col))
|
||||
} else if (is.character(col)) {
|
||||
col <- trans(col)
|
||||
} else {
|
||||
col
|
||||
}
|
||||
df[, i] <- col
|
||||
}
|
||||
df
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Deprecated functions
|
||||
@ -47,20 +47,6 @@ ratio <- function(x, ratio) {
|
||||
sum(x, na.rm = TRUE) * (ratio / sum(ratio, na.rm = TRUE))
|
||||
}
|
||||
|
||||
#' @rdname AMR-deprecated
|
||||
#' @export
|
||||
guess_mo <- function(...) {
|
||||
.Deprecated(new = "as.mo", package = "AMR")
|
||||
as.mo(...)
|
||||
}
|
||||
|
||||
#' @rdname AMR-deprecated
|
||||
#' @export
|
||||
guess_atc <- function(...) {
|
||||
.Deprecated(new = "as.atc", package = "AMR")
|
||||
as.atc(...)
|
||||
}
|
||||
|
||||
#' @rdname AMR-deprecated
|
||||
#' @export
|
||||
ab_property <- function(...) {
|
||||
|
1831
R/eucast_rules.R
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Filter isolates on result in antibiotic class
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Determine first (weighted) isolates
|
||||
|
2
R/freq.R
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Frequency table
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' \emph{G}-test for Count Data
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Get language for AMR
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' AMR plots with \code{ggplot2}
|
||||
|
11
R/globals.R
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
globalVariables(c(".",
|
||||
@ -28,6 +28,7 @@ globalVariables(c(".",
|
||||
"authors",
|
||||
"Becker",
|
||||
"certe",
|
||||
"CNS_CPS",
|
||||
"cnt",
|
||||
"col_id",
|
||||
"count",
|
||||
@ -46,8 +47,8 @@ globalVariables(c(".",
|
||||
"genus",
|
||||
"gramstain",
|
||||
"index",
|
||||
"Interpretation",
|
||||
"input",
|
||||
"Interpretation",
|
||||
"item",
|
||||
"key_ab",
|
||||
"key_ab_lag",
|
||||
@ -81,6 +82,7 @@ globalVariables(c(".",
|
||||
"Pasted",
|
||||
"patient_id",
|
||||
"phylum",
|
||||
"plural",
|
||||
"prevalence",
|
||||
"prevalent",
|
||||
"property",
|
||||
@ -88,6 +90,10 @@ globalVariables(c(".",
|
||||
"R",
|
||||
"real_first_isolate",
|
||||
"ref",
|
||||
"reference.rule",
|
||||
"reference.rule_group",
|
||||
"rule_group",
|
||||
"rule_name",
|
||||
"S",
|
||||
"se_max",
|
||||
"se_min",
|
||||
@ -101,6 +107,7 @@ globalVariables(c(".",
|
||||
"transmute",
|
||||
"tsn",
|
||||
"tsn_new",
|
||||
"txt",
|
||||
"umcg",
|
||||
"value",
|
||||
"Value",
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Guess antibiotic column
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Join a table with \code{microorganisms}
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Key antibiotics for first \emph{weighted} isolates
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Kurtosis of the sample
|
||||
|
2
R/like.R
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Pattern Matching
|
||||
|
2
R/mdro.R
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Determine multidrug-resistant organisms (MDRO)
|
||||
|
2
R/mic.R
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Class 'mic'
|
||||
|
8
R/misc.R
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
# No export, no Rd
|
||||
@ -76,18 +76,18 @@ check_available_columns <- function(tbl, col.list, info = TRUE) {
|
||||
# are they available as upper case or lower case then?
|
||||
for (i in 1:length(col.list)) {
|
||||
if (is.null(col.list[i]) | isTRUE(is.na(col.list[i]))) {
|
||||
col.list[i] <- NULL
|
||||
col.list[i] <- NA
|
||||
} else if (toupper(col.list[i]) %in% colnames(tbl)) {
|
||||
col.list[i] <- toupper(col.list[i])
|
||||
} else if (tolower(col.list[i]) %in% colnames(tbl)) {
|
||||
col.list[i] <- tolower(col.list[i])
|
||||
} else if (!col.list[i] %in% colnames(tbl)) {
|
||||
col.list[i] <- NULL
|
||||
col.list[i] <- NA
|
||||
}
|
||||
}
|
||||
if (!all(col.list %in% colnames(tbl))) {
|
||||
if (info == TRUE) {
|
||||
warning('These columns do not exist and will be ignored: ',
|
||||
warning('Some columns do not exist and will be ignored: ',
|
||||
col.list.bak[!(col.list %in% colnames(tbl))] %>% toString(),
|
||||
'.\nTHIS MAY STRONGLY INFLUENCE THE OUTCOME.',
|
||||
immediate. = TRUE,
|
||||
|
3
R/mo.R
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Transform to microorganism ID
|
||||
@ -229,7 +229,6 @@ as.mo <- function(x, Becker = FALSE, Lancefield = FALSE, allow_uncertain = TRUE,
|
||||
& isFALSE(Lancefield)) {
|
||||
y <- x
|
||||
|
||||
|
||||
} else if (!any(is.na(mo_hist))
|
||||
& isFALSE(Becker)
|
||||
& isFALSE(Lancefield)) {
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
# print successful as.mo coercions to AMR environment
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Property of a microorganism
|
||||
@ -136,7 +136,7 @@ mo_fullname <- function(x, language = get_locale(), ...) {
|
||||
}
|
||||
|
||||
#' @rdname mo_property
|
||||
#' @importFrom dplyr %>% left_join mutate pull
|
||||
#' @importFrom dplyr %>% mutate pull
|
||||
#' @export
|
||||
mo_shortname <- function(x, language = get_locale(), ...) {
|
||||
dots <- list(...)
|
||||
@ -247,7 +247,12 @@ mo_phylum <- function(x, language = get_locale(), ...) {
|
||||
#' @rdname mo_property
|
||||
#' @export
|
||||
mo_kingdom <- function(x, language = get_locale(), ...) {
|
||||
mo_translate(mo_validate(x = x, property = "kingdom", ...), language = language)
|
||||
kngdm <- mo_validate(x = x, property = "kingdom", ...)
|
||||
if (language != "en") {
|
||||
unknowns <- as.mo(x, ...) == "UNKOWN"
|
||||
kngdm[unknowns] <- mo_translate(kngdm[unknowns], language = language)
|
||||
}
|
||||
kngdm
|
||||
}
|
||||
|
||||
#' @rdname mo_property
|
||||
@ -260,14 +265,14 @@ mo_type <- function(x, language = get_locale(), ...) {
|
||||
#' @export
|
||||
mo_gramstain <- function(x, language = get_locale(), ...) {
|
||||
x.bak <- x
|
||||
x.mo <- as.mo(x, ...)
|
||||
x.phylum <- mo_phylum(x.mo)
|
||||
x.mo <- as.mo(x, language = "en", ...)
|
||||
x.phylum <- mo_phylum(x.mo, language = "en")
|
||||
x[x.phylum %in% c("Actinobacteria",
|
||||
"Chloroflexi",
|
||||
"Firmicutes",
|
||||
"Tenericutes")] <- "Gram positive"
|
||||
x[x != "Gram positive"] <- "Gram negative"
|
||||
x[mo_kingdom(x.mo) != "Bacteria"] <- NA_character_
|
||||
x[mo_kingdom(x.mo, language = "en") != "Bacteria"] <- NA_character_
|
||||
x[x.mo == "B_GRAMP"] <- "Gram positive"
|
||||
x[x.mo == "B_GRAMN"] <- "Gram negative"
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Use predefined reference data set
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Symbol of a p value
|
||||
|
10
R/portion.R
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Calculate resistance of isolates
|
||||
@ -100,14 +100,14 @@
|
||||
#'
|
||||
#' # Calculate co-resistance between amoxicillin/clav acid and gentamicin,
|
||||
#' # so we can see that combination therapy does a lot more than mono therapy:
|
||||
#' septic_patients %>% portion_S(amcl) # S = 67.1%
|
||||
#' septic_patients %>% count_all(amcl) # n = 1576
|
||||
#' septic_patients %>% portion_S(amcl) # S = 71.4%
|
||||
#' septic_patients %>% count_all(amcl) # n = 1879
|
||||
#'
|
||||
#' septic_patients %>% portion_S(gent) # S = 74.0%
|
||||
#' septic_patients %>% count_all(gent) # n = 1855
|
||||
#'
|
||||
#' septic_patients %>% portion_S(amcl, gent) # S = 92.0%
|
||||
#' septic_patients %>% count_all(amcl, gent) # n = 1517
|
||||
#' septic_patients %>% portion_S(amcl, gent) # S = 92.3%
|
||||
#' septic_patients %>% count_all(amcl, gent) # n = 1798
|
||||
#'
|
||||
#'
|
||||
#' septic_patients %>%
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Read data from 4D database
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Predict antimicrobial resistance
|
||||
|
9
R/rsi.R
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Class 'rsi'
|
||||
@ -114,7 +114,12 @@ mic_like <- function(x) {
|
||||
gsub("[^0-9.,]+", "", .) %>%
|
||||
unique()
|
||||
mic_valid <- suppressWarnings(as.mic(mic))
|
||||
sum(!is.na(mic_valid)) / length(mic)
|
||||
result <- sum(!is.na(mic_valid)) / length(mic)
|
||||
if (is.na(result)) {
|
||||
0
|
||||
} else {
|
||||
result
|
||||
}
|
||||
}
|
||||
|
||||
#' @rdname as.rsi
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' @importFrom dplyr %>% pull all_vars any_vars filter_all funs mutate_all
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' Skewness of the sample
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' WHOCC: WHO Collaborating Centre for Drug Statistics Methodology
|
||||
|
11
R/zzz.R
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
#' @importFrom data.table as.data.table setkey
|
||||
@ -44,6 +44,15 @@
|
||||
assign(x = "mo_codes_v0.5.0",
|
||||
value = make_trans_tbl(),
|
||||
envir = asNamespace("AMR"))
|
||||
|
||||
assign(x = "mo_history",
|
||||
value = data.frame(x = character(0),
|
||||
mo = character(0),
|
||||
uncertainty_level = integer(0),
|
||||
package_v = character(0),
|
||||
stringsAsFactors = FALSE),
|
||||
envir = asNamespace("AMR"))
|
||||
|
||||
}
|
||||
|
||||
#' @importFrom dplyr mutate case_when
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
url: 'https://msberends.gitlab.io/AMR'
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
# Download script file from GitHub
|
||||
|
BIN
data/WHONET.rda
@ -78,7 +78,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.1.9002</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.1.9002</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -192,7 +192,7 @@
|
||||
<h1>How to conduct AMR analysis</h1>
|
||||
<h4 class="author">Matthijs S. Berends</h4>
|
||||
|
||||
<h4 class="date">27 March 2019</h4>
|
||||
<h4 class="date">05 April 2019</h4>
|
||||
|
||||
|
||||
<div class="hidden name"><code>AMR.Rmd</code></div>
|
||||
@ -201,7 +201,7 @@
|
||||
|
||||
|
||||
|
||||
<p><strong>Note:</strong> values on this page will change with every website update since they are based on randomly created values and the page was written in <a href="https://rmarkdown.rstudio.com/">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 27 March 2019.</p>
|
||||
<p><strong>Note:</strong> values on this page will change with every website update since they are based on randomly created values and the page was written in <a href="https://rmarkdown.rstudio.com/">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 05 April 2019.</p>
|
||||
<div id="introduction" class="section level1">
|
||||
<h1 class="hasAnchor">
|
||||
<a href="#introduction" class="anchor"></a>Introduction</h1>
|
||||
@ -217,21 +217,21 @@
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="center">2019-03-27</td>
|
||||
<td align="center">2019-04-05</td>
|
||||
<td align="center">abcd</td>
|
||||
<td align="center">Escherichia coli</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">2019-03-27</td>
|
||||
<td align="center">2019-04-05</td>
|
||||
<td align="center">abcd</td>
|
||||
<td align="center">Escherichia coli</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">2019-03-27</td>
|
||||
<td align="center">2019-04-05</td>
|
||||
<td align="center">efgh</td>
|
||||
<td align="center">Escherichia coli</td>
|
||||
<td align="center">R</td>
|
||||
@ -327,30 +327,19 @@
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="center">2015-10-28</td>
|
||||
<td align="center">A4</td>
|
||||
<td align="center">2015-03-05</td>
|
||||
<td align="center">Z5</td>
|
||||
<td align="center">Hospital B</td>
|
||||
<td align="center">Escherichia coli</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">M</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">2011-07-22</td>
|
||||
<td align="center">Y8</td>
|
||||
<td align="center">Hospital C</td>
|
||||
<td align="center">Streptococcus pneumoniae</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">F</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">2014-09-30</td>
|
||||
<td align="center">N3</td>
|
||||
<tr class="even">
|
||||
<td align="center">2017-08-05</td>
|
||||
<td align="center">K5</td>
|
||||
<td align="center">Hospital B</td>
|
||||
<td align="center">Streptococcus pneumoniae</td>
|
||||
<td align="center">S</td>
|
||||
@ -359,38 +348,49 @@
|
||||
<td align="center">S</td>
|
||||
<td align="center">M</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">2012-08-31</td>
|
||||
<td align="center">V4</td>
|
||||
<td align="center">Hospital A</td>
|
||||
<td align="center">Klebsiella pneumoniae</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">F</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">2013-02-14</td>
|
||||
<td align="center">Z6</td>
|
||||
<td align="center">2013-07-07</td>
|
||||
<td align="center">G5</td>
|
||||
<td align="center">Hospital A</td>
|
||||
<td align="center">Escherichia coli</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">M</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">2015-09-03</td>
|
||||
<td align="center">O2</td>
|
||||
<td align="center">Hospital A</td>
|
||||
<td align="center">Escherichia coli</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">F</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">2015-02-01</td>
|
||||
<td align="center">D5</td>
|
||||
<td align="center">Hospital C</td>
|
||||
<td align="center">Escherichia coli</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">I</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">M</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">2013-12-28</td>
|
||||
<td align="center">V6</td>
|
||||
<td align="center">Hospital B</td>
|
||||
<td align="center">Staphylococcus aureus</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">2014-03-20</td>
|
||||
<td align="center">K9</td>
|
||||
<td align="center">Hospital D</td>
|
||||
<td align="center">Escherichia coli</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">F</td>
|
||||
<td align="center">M</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -411,8 +411,8 @@
|
||||
#>
|
||||
#> Item Count Percent Cum. Count Cum. Percent
|
||||
#> --- ----- ------- -------- ----------- -------------
|
||||
#> 1 M 10,344 51.7% 10,344 51.7%
|
||||
#> 2 F 9,656 48.3% 20,000 100.0%</code></pre>
|
||||
#> 1 M 10,405 52.0% 10,405 52.0%
|
||||
#> 2 F 9,595 48.0% 20,000 100.0%</code></pre>
|
||||
<p>So, we can draw at least two conclusions immediately. From a data scientist perspective, the data looks clean: only values <code>M</code> and <code>F</code>. From a researcher perspective: there are slightly more men. Nothing we didn’t already know.</p>
|
||||
<p>The data is already quite clean, but we still need to transform some variables. The <code>bacteria</code> column now consists of text, and we want to add more variables based on microbial IDs later on. So, we will transform this column to valid IDs. The <code><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate()</a></code> function of the <code>dplyr</code> package makes this really easy:</p>
|
||||
<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb12-1" title="1">data <-<span class="st"> </span>data <span class="op">%>%</span></a>
|
||||
@ -425,46 +425,59 @@
|
||||
<div class="sourceCode" id="cb14"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb14-1" title="1">data <-<span class="st"> </span><span class="kw"><a href="../reference/eucast_rules.html">eucast_rules</a></span>(data, <span class="dt">col_mo =</span> <span class="st">"bacteria"</span>)</a>
|
||||
<a class="sourceLine" id="cb14-2" title="2"><span class="co">#> </span></a>
|
||||
<a class="sourceLine" id="cb14-3" title="3"><span class="co">#> Rules by the European Committee on Antimicrobial Susceptibility Testing (EUCAST)</span></a>
|
||||
<a class="sourceLine" id="cb14-4" title="4"><span class="co">#> </span></a>
|
||||
<a class="sourceLine" id="cb14-5" title="5"><span class="co">#> EUCAST Clinical Breakpoints (v9.0, 2019)</span></a>
|
||||
<a class="sourceLine" id="cb14-6" title="6"><span class="co">#> Enterobacteriales (Order) (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-7" title="7"><span class="co">#> Staphylococcus (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-8" title="8"><span class="co">#> Enterococcus (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-9" title="9"><span class="co">#> Streptococcus groups A, B, C, G (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-10" title="10"><span class="co">#> Streptococcus pneumoniae (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-11" title="11"><span class="co">#> Viridans group streptococci (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-12" title="12"><span class="co">#> Haemophilus influenzae (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-13" title="13"><span class="co">#> Moraxella catarrhalis (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-14" title="14"><span class="co">#> Anaerobic Gram positives (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-15" title="15"><span class="co">#> Anaerobic Gram negatives (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-16" title="16"><span class="co">#> Pasteurella multocida (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-17" title="17"><span class="co">#> Campylobacter jejuni and C. coli (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-18" title="18"><span class="co">#> Aerococcus sanguinicola and A. urinae (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-19" title="19"><span class="co">#> Kingella kingae (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-20" title="20"><span class="co">#> </span></a>
|
||||
<a class="sourceLine" id="cb14-21" title="21"><span class="co">#> EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes (v3.1, 2016)</span></a>
|
||||
<a class="sourceLine" id="cb14-22" title="22"><span class="co">#> Table 1: Intrinsic resistance in Enterobacteriaceae (1342 changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-23" title="23"><span class="co">#> Table 2: Intrinsic resistance in non-fermentative Gram-negative bacteria (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-24" title="24"><span class="co">#> Table 3: Intrinsic resistance in other Gram-negative bacteria (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-25" title="25"><span class="co">#> Table 4: Intrinsic resistance in Gram-positive bacteria (2726 changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-26" title="26"><span class="co">#> Table 8: Interpretive rules for B-lactam agents and Gram-positive cocci (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-27" title="27"><span class="co">#> Table 9: Interpretive rules for B-lactam agents and Gram-negative rods (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-28" title="28"><span class="co">#> Table 10: Interpretive rules for B-lactam agents and other Gram-negative bacteria (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-29" title="29"><span class="co">#> Table 11: Interpretive rules for macrolides, lincosamides, and streptogramins (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-30" title="30"><span class="co">#> Table 12: Interpretive rules for aminoglycosides (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-31" title="31"><span class="co">#> Table 13: Interpretive rules for quinolones (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-32" title="32"><span class="co">#> </span></a>
|
||||
<a class="sourceLine" id="cb14-33" title="33"><span class="co">#> Other rules</span></a>
|
||||
<a class="sourceLine" id="cb14-34" title="34"><span class="co">#> Non-EUCAST: ampicillin = R where amoxicillin/clav acid = R (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-35" title="35"><span class="co">#> Non-EUCAST: piperacillin = R where piperacillin/tazobactam = R (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-36" title="36"><span class="co">#> Non-EUCAST: trimethoprim = R where trimethoprim/sulfa = R (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-37" title="37"><span class="co">#> Non-EUCAST: amoxicillin/clav acid = S where ampicillin = S (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-38" title="38"><span class="co">#> Non-EUCAST: piperacillin/tazobactam = S where piperacillin = S (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-39" title="39"><span class="co">#> Non-EUCAST: trimethoprim/sulfa = S where trimethoprim = S (no changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-40" title="40"><span class="co">#> </span></a>
|
||||
<a class="sourceLine" id="cb14-41" title="41"><span class="co">#> => EUCAST rules affected 7,400 out of 20,000 rows</span></a>
|
||||
<a class="sourceLine" id="cb14-42" title="42"><span class="co">#> -> added 0 test results</span></a>
|
||||
<a class="sourceLine" id="cb14-43" title="43"><span class="co">#> -> changed 4,068 test results (0 to S; 0 to I; 4,068 to R)</span></a></code></pre></div>
|
||||
<a class="sourceLine" id="cb14-4" title="4"><span class="co">#> http://eucast.org/</span></a>
|
||||
<a class="sourceLine" id="cb14-5" title="5"><span class="co">#> </span></a>
|
||||
<a class="sourceLine" id="cb14-6" title="6"><span class="co">#> EUCAST Clinical Breakpoints (v9.0, 2019)</span></a>
|
||||
<a class="sourceLine" id="cb14-7" title="7"><span class="co">#> Aerococcus sanguinicola (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-8" title="8"><span class="co">#> Aerococcus urinae (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-9" title="9"><span class="co">#> Anaerobic Gram negatives (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-10" title="10"><span class="co">#> Anaerobic Gram positives (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-11" title="11"><span class="co">#> Campylobacter coli (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-12" title="12"><span class="co">#> Campylobacter jejuni (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-13" title="13"><span class="co">#> Enterobacteriales (Order) (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-14" title="14"><span class="co">#> Enterococcus (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-15" title="15"><span class="co">#> Haemophilus influenzae (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-16" title="16"><span class="co">#> Kingella kingae (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-17" title="17"><span class="co">#> Moraxella catarrhalis (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-18" title="18"><span class="co">#> Pasteurella multocida (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-19" title="19"><span class="co">#> Staphylococcus (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-20" title="20"><span class="co">#> Streptococcus groups A, B, C, G (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-21" title="21"><span class="co">#> Streptococcus pneumoniae (1476 new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-22" title="22"><span class="co">#> Viridans group streptococci (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-23" title="23"><span class="co">#> </span></a>
|
||||
<a class="sourceLine" id="cb14-24" title="24"><span class="co">#> EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes (v3.1, 2016)</span></a>
|
||||
<a class="sourceLine" id="cb14-25" title="25"><span class="co">#> Table 01: Intrinsic resistance in Enterobacteriaceae (1290 new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-26" title="26"><span class="co">#> Table 02: Intrinsic resistance in non-fermentative Gram-negative bacteria (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-27" title="27"><span class="co">#> Table 03: Intrinsic resistance in other Gram-negative bacteria (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-28" title="28"><span class="co">#> Table 04: Intrinsic resistance in Gram-positive bacteria (2758 new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-29" title="29"><span class="co">#> Table 08: Interpretive rules for B-lactam agents and Gram-positive cocci (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-30" title="30"><span class="co">#> Table 09: Interpretive rules for B-lactam agents and Gram-negative rods (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-31" title="31"><span class="co">#> Table 11: Interpretive rules for macrolides, lincosamides, and streptogramins (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-32" title="32"><span class="co">#> Table 12: Interpretive rules for aminoglycosides (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-33" title="33"><span class="co">#> Table 13: Interpretive rules for quinolones (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-34" title="34"><span class="co">#> </span></a>
|
||||
<a class="sourceLine" id="cb14-35" title="35"><span class="co">#> Other rules</span></a>
|
||||
<a class="sourceLine" id="cb14-36" title="36"><span class="co">#> Non-EUCAST: amoxicillin/clav acid = S where ampicillin = S (2311 new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-37" title="37"><span class="co">#> Non-EUCAST: ampicillin = R where amoxicillin/clav acid = R (107 new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-38" title="38"><span class="co">#> Non-EUCAST: piperacillin = R where piperacillin/tazobactam = R (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-39" title="39"><span class="co">#> Non-EUCAST: piperacillin/tazobactam = S where piperacillin = S (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-40" title="40"><span class="co">#> Non-EUCAST: trimethoprim = R where trimethoprim/sulfa = R (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-41" title="41"><span class="co">#> Non-EUCAST: trimethoprim/sulfa = S where trimethoprim = S (no new changes)</span></a>
|
||||
<a class="sourceLine" id="cb14-42" title="42"><span class="co">#> </span></a>
|
||||
<a class="sourceLine" id="cb14-43" title="43"><span class="co">#> --------------------------------------------------------------------------</span></a>
|
||||
<a class="sourceLine" id="cb14-44" title="44"><span class="co">#> EUCAST rules affected 6,584 out of 20,000 rows, making a total of 7,942 edits</span></a>
|
||||
<a class="sourceLine" id="cb14-45" title="45"><span class="co">#> => added 0 test results</span></a>
|
||||
<a class="sourceLine" id="cb14-46" title="46"><span class="co">#> </span></a>
|
||||
<a class="sourceLine" id="cb14-47" title="47"><span class="co">#> => changed 7,942 test results</span></a>
|
||||
<a class="sourceLine" id="cb14-48" title="48"><span class="co">#> - 125 test results changed from S to I</span></a>
|
||||
<a class="sourceLine" id="cb14-49" title="49"><span class="co">#> - 4,719 test results changed from S to R</span></a>
|
||||
<a class="sourceLine" id="cb14-50" title="50"><span class="co">#> - 1,093 test results changed from I to S</span></a>
|
||||
<a class="sourceLine" id="cb14-51" title="51"><span class="co">#> - 299 test results changed from I to R</span></a>
|
||||
<a class="sourceLine" id="cb14-52" title="52"><span class="co">#> - 1,682 test results changed from R to S</span></a>
|
||||
<a class="sourceLine" id="cb14-53" title="53"><span class="co">#> - 24 test results changed from R to I</span></a>
|
||||
<a class="sourceLine" id="cb14-54" title="54"><span class="co">#> --------------------------------------------------------------------------</span></a>
|
||||
<a class="sourceLine" id="cb14-55" title="55"><span class="co">#> </span></a>
|
||||
<a class="sourceLine" id="cb14-56" title="56"><span class="co">#> Use verbose = TRUE to get a data.frame with all specified edits instead.</span></a></code></pre></div>
|
||||
</div>
|
||||
<div id="adding-new-variables" class="section level1">
|
||||
<h1 class="hasAnchor">
|
||||
@ -489,8 +502,8 @@
|
||||
<a class="sourceLine" id="cb16-3" title="3"><span class="co">#> </span><span class="al">NOTE</span><span class="co">: Using column `bacteria` as input for `col_mo`.</span></a>
|
||||
<a class="sourceLine" id="cb16-4" title="4"><span class="co">#> </span><span class="al">NOTE</span><span class="co">: Using column `date` as input for `col_date`.</span></a>
|
||||
<a class="sourceLine" id="cb16-5" title="5"><span class="co">#> </span><span class="al">NOTE</span><span class="co">: Using column `patient_id` as input for `col_patient_id`.</span></a>
|
||||
<a class="sourceLine" id="cb16-6" title="6"><span class="co">#> => Found 5,665 first isolates (28.3% of total)</span></a></code></pre></div>
|
||||
<p>So only 28.3% is suitable for resistance analysis! We can now filter on it with the <code><a href="https://dplyr.tidyverse.org/reference/filter.html">filter()</a></code> function, also from the <code>dplyr</code> package:</p>
|
||||
<a class="sourceLine" id="cb16-6" title="6"><span class="co">#> => Found 5,681 first isolates (28.4% of total)</span></a></code></pre></div>
|
||||
<p>So only 28.4% is suitable for resistance analysis! We can now filter on it with the <code><a href="https://dplyr.tidyverse.org/reference/filter.html">filter()</a></code> function, also from the <code>dplyr</code> package:</p>
|
||||
<div class="sourceCode" id="cb17"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb17-1" title="1">data_1st <-<span class="st"> </span>data <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb17-2" title="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(first <span class="op">==</span><span class="st"> </span><span class="ot">TRUE</span>)</a></code></pre></div>
|
||||
<p>For future use, the above two syntaxes can be shortened with the <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code> function:</p>
|
||||
@ -516,87 +529,87 @@
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="center">1</td>
|
||||
<td align="center">2010-09-11</td>
|
||||
<td align="center">L7</td>
|
||||
<td align="center">2010-01-24</td>
|
||||
<td align="center">N5</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">I</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">TRUE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">2</td>
|
||||
<td align="center">2010-11-07</td>
|
||||
<td align="center">L7</td>
|
||||
<td align="center">2010-07-22</td>
|
||||
<td align="center">N5</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">3</td>
|
||||
<td align="center">2011-01-16</td>
|
||||
<td align="center">L7</td>
|
||||
<td align="center">2010-07-29</td>
|
||||
<td align="center">N5</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">4</td>
|
||||
<td align="center">2011-02-25</td>
|
||||
<td align="center">L7</td>
|
||||
<td align="center">2010-09-17</td>
|
||||
<td align="center">N5</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">I</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">5</td>
|
||||
<td align="center">2011-08-07</td>
|
||||
<td align="center">L7</td>
|
||||
<td align="center">2011-02-27</td>
|
||||
<td align="center">N5</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">6</td>
|
||||
<td align="center">2011-08-16</td>
|
||||
<td align="center">L7</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">7</td>
|
||||
<td align="center">2011-10-08</td>
|
||||
<td align="center">L7</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">TRUE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">8</td>
|
||||
<td align="center">2011-10-26</td>
|
||||
<td align="center">L7</td>
|
||||
<td align="center">6</td>
|
||||
<td align="center">2011-04-25</td>
|
||||
<td align="center">N5</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">7</td>
|
||||
<td align="center">2011-04-30</td>
|
||||
<td align="center">N5</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">8</td>
|
||||
<td align="center">2011-05-27</td>
|
||||
<td align="center">N5</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
@ -604,23 +617,23 @@
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">9</td>
|
||||
<td align="center">2012-01-15</td>
|
||||
<td align="center">L7</td>
|
||||
<td align="center">2011-06-24</td>
|
||||
<td align="center">N5</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">I</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">10</td>
|
||||
<td align="center">2012-02-08</td>
|
||||
<td align="center">L7</td>
|
||||
<td align="center">2011-10-29</td>
|
||||
<td align="center">N5</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
@ -637,7 +650,7 @@
|
||||
<a class="sourceLine" id="cb19-7" title="7"><span class="co">#> </span><span class="al">NOTE</span><span class="co">: Using column `patient_id` as input for `col_patient_id`.</span></a>
|
||||
<a class="sourceLine" id="cb19-8" title="8"><span class="co">#> </span><span class="al">NOTE</span><span class="co">: Using column `keyab` as input for `col_keyantibiotics`. Use col_keyantibiotics = FALSE to prevent this.</span></a>
|
||||
<a class="sourceLine" id="cb19-9" title="9"><span class="co">#> [Criterion] Inclusion based on key antibiotics, ignoring I.</span></a>
|
||||
<a class="sourceLine" id="cb19-10" title="10"><span class="co">#> => Found 15,729 first weighted isolates (78.6% of total)</span></a></code></pre></div>
|
||||
<a class="sourceLine" id="cb19-10" title="10"><span class="co">#> => Found 15,059 first weighted isolates (75.3% of total)</span></a></code></pre></div>
|
||||
<table class="table">
|
||||
<thead><tr class="header">
|
||||
<th align="center">isolate</th>
|
||||
@ -654,11 +667,11 @@
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="center">1</td>
|
||||
<td align="center">2010-09-11</td>
|
||||
<td align="center">L7</td>
|
||||
<td align="center">2010-01-24</td>
|
||||
<td align="center">N5</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">I</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">TRUE</td>
|
||||
@ -666,119 +679,119 @@
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">2</td>
|
||||
<td align="center">2010-11-07</td>
|
||||
<td align="center">L7</td>
|
||||
<td align="center">2010-07-22</td>
|
||||
<td align="center">N5</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">FALSE</td>
|
||||
<td align="center">FALSE</td>
|
||||
<td align="center">TRUE</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">3</td>
|
||||
<td align="center">2011-01-16</td>
|
||||
<td align="center">L7</td>
|
||||
<td align="center">2010-07-29</td>
|
||||
<td align="center">N5</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">FALSE</td>
|
||||
<td align="center">TRUE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">4</td>
|
||||
<td align="center">2011-02-25</td>
|
||||
<td align="center">L7</td>
|
||||
<td align="center">2010-09-17</td>
|
||||
<td align="center">N5</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">I</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">FALSE</td>
|
||||
<td align="center">TRUE</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">5</td>
|
||||
<td align="center">2011-08-07</td>
|
||||
<td align="center">L7</td>
|
||||
<td align="center">2011-02-27</td>
|
||||
<td align="center">N5</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">FALSE</td>
|
||||
<td align="center">TRUE</td>
|
||||
<td align="center">TRUE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">6</td>
|
||||
<td align="center">2011-08-16</td>
|
||||
<td align="center">L7</td>
|
||||
<td align="center">2011-04-25</td>
|
||||
<td align="center">N5</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">FALSE</td>
|
||||
<td align="center">TRUE</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">7</td>
|
||||
<td align="center">2011-10-08</td>
|
||||
<td align="center">L7</td>
|
||||
<td align="center">2011-04-30</td>
|
||||
<td align="center">N5</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">TRUE</td>
|
||||
<td align="center">TRUE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">8</td>
|
||||
<td align="center">2011-10-26</td>
|
||||
<td align="center">L7</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">FALSE</td>
|
||||
<td align="center">TRUE</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">8</td>
|
||||
<td align="center">2011-05-27</td>
|
||||
<td align="center">N5</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">FALSE</td>
|
||||
<td align="center">FALSE</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">9</td>
|
||||
<td align="center">2012-01-15</td>
|
||||
<td align="center">L7</td>
|
||||
<td align="center">2011-06-24</td>
|
||||
<td align="center">N5</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">I</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">FALSE</td>
|
||||
<td align="center">TRUE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">10</td>
|
||||
<td align="center">2012-02-08</td>
|
||||
<td align="center">L7</td>
|
||||
<td align="center">2011-10-29</td>
|
||||
<td align="center">N5</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">FALSE</td>
|
||||
<td align="center">TRUE</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Instead of 2, now 10 isolates are flagged. In total, 78.6% of all isolates are marked ‘first weighted’ - 50.3% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.</p>
|
||||
<p>Instead of 2, now 5 isolates are flagged. In total, 75.3% of all isolates are marked ‘first weighted’ - 46.9% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.</p>
|
||||
<p>As with <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code>, there’s a shortcut for this new algorithm too:</p>
|
||||
<div class="sourceCode" id="cb20"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb20-1" title="1">data_1st <-<span class="st"> </span>data <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb20-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/first_isolate.html">filter_first_weighted_isolate</a></span>()</a></code></pre></div>
|
||||
<p>So we end up with 15,729 isolates for analysis.</p>
|
||||
<p>So we end up with 15,059 isolates for analysis.</p>
|
||||
<p>We can remove unneeded columns:</p>
|
||||
<div class="sourceCode" id="cb21"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb21-1" title="1">data_1st <-<span class="st"> </span>data_1st <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb21-2" title="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span>(<span class="op">-</span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(first, keyab))</a></code></pre></div>
|
||||
@ -802,13 +815,58 @@
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="center">2015-10-28</td>
|
||||
<td align="center">A4</td>
|
||||
<td align="center">2015-03-05</td>
|
||||
<td align="center">Z5</td>
|
||||
<td align="center">Hospital B</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">F</td>
|
||||
<td align="center">Gram negative</td>
|
||||
<td align="center">Escherichia</td>
|
||||
<td align="center">coli</td>
|
||||
<td align="center">TRUE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">2017-08-05</td>
|
||||
<td align="center">K5</td>
|
||||
<td align="center">Hospital B</td>
|
||||
<td align="center">B_STRPT_PNE</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">M</td>
|
||||
<td align="center">Gram positive</td>
|
||||
<td align="center">Streptococcus</td>
|
||||
<td align="center">pneumoniae</td>
|
||||
<td align="center">TRUE</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">2012-08-31</td>
|
||||
<td align="center">V4</td>
|
||||
<td align="center">Hospital A</td>
|
||||
<td align="center">B_KLBSL_PNE</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">F</td>
|
||||
<td align="center">Gram negative</td>
|
||||
<td align="center">Klebsiella</td>
|
||||
<td align="center">pneumoniae</td>
|
||||
<td align="center">TRUE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">2013-07-07</td>
|
||||
<td align="center">G5</td>
|
||||
<td align="center">Hospital A</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">M</td>
|
||||
<td align="center">Gram negative</td>
|
||||
@ -816,44 +874,14 @@
|
||||
<td align="center">coli</td>
|
||||
<td align="center">TRUE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">2011-07-22</td>
|
||||
<td align="center">Y8</td>
|
||||
<td align="center">Hospital C</td>
|
||||
<td align="center">B_STRPT_PNE</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">F</td>
|
||||
<td align="center">Gram positive</td>
|
||||
<td align="center">Streptococcus</td>
|
||||
<td align="center">pneumoniae</td>
|
||||
<td align="center">TRUE</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">2014-09-30</td>
|
||||
<td align="center">N3</td>
|
||||
<td align="center">Hospital B</td>
|
||||
<td align="center">B_STRPT_PNE</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">M</td>
|
||||
<td align="center">Gram positive</td>
|
||||
<td align="center">Streptococcus</td>
|
||||
<td align="center">pneumoniae</td>
|
||||
<td align="center">TRUE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">2013-02-14</td>
|
||||
<td align="center">Z6</td>
|
||||
<td align="center">2015-09-03</td>
|
||||
<td align="center">O2</td>
|
||||
<td align="center">Hospital A</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">F</td>
|
||||
<td align="center">Gram negative</td>
|
||||
@ -861,34 +889,19 @@
|
||||
<td align="center">coli</td>
|
||||
<td align="center">TRUE</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">2015-02-01</td>
|
||||
<td align="center">D5</td>
|
||||
<td align="center">Hospital C</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">I</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">M</td>
|
||||
<td align="center">Gram negative</td>
|
||||
<td align="center">Escherichia</td>
|
||||
<td align="center">coli</td>
|
||||
<td align="center">TRUE</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">2013-12-28</td>
|
||||
<td align="center">V6</td>
|
||||
<td align="center">Hospital B</td>
|
||||
<td align="center">B_STPHY_AUR</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">2014-03-20</td>
|
||||
<td align="center">K9</td>
|
||||
<td align="center">Hospital D</td>
|
||||
<td align="center">B_ESCHR_COL</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">R</td>
|
||||
<td align="center">S</td>
|
||||
<td align="center">F</td>
|
||||
<td align="center">Gram positive</td>
|
||||
<td align="center">Staphylococcus</td>
|
||||
<td align="center">aureus</td>
|
||||
<td align="center">M</td>
|
||||
<td align="center">Gram negative</td>
|
||||
<td align="center">Escherichia</td>
|
||||
<td align="center">coli</td>
|
||||
<td align="center">TRUE</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -908,9 +921,9 @@
|
||||
<div class="sourceCode" id="cb23"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb23-1" title="1"><span class="kw"><a href="../reference/freq.html">freq</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/paste">paste</a></span>(data_1st<span class="op">$</span>genus, data_1st<span class="op">$</span>species))</a></code></pre></div>
|
||||
<p>Or can be used like the <code>dplyr</code> way, which is easier readable:</p>
|
||||
<div class="sourceCode" id="cb24"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb24-1" title="1">data_1st <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(genus, species)</a></code></pre></div>
|
||||
<p><strong>Frequency table of <code>genus</code> and <code>species</code> from a <code>data.frame</code> (15,729 x 13)</strong></p>
|
||||
<p><strong>Frequency table of <code>genus</code> and <code>species</code> from a <code>data.frame</code> (15,059 x 13)</strong></p>
|
||||
<p>Columns: 2<br>
|
||||
Length: 15,729 (of which NA: 0 = 0.00%)<br>
|
||||
Length: 15,059 (of which NA: 0 = 0.00%)<br>
|
||||
Unique: 4</p>
|
||||
<p>Shortest: 16<br>
|
||||
Longest: 24</p>
|
||||
@ -927,33 +940,33 @@ Longest: 24</p>
|
||||
<tr class="odd">
|
||||
<td align="left">1</td>
|
||||
<td align="left">Escherichia coli</td>
|
||||
<td align="right">7,807</td>
|
||||
<td align="right">49.6%</td>
|
||||
<td align="right">7,807</td>
|
||||
<td align="right">49.6%</td>
|
||||
<td align="right">7,494</td>
|
||||
<td align="right">49.8%</td>
|
||||
<td align="right">7,494</td>
|
||||
<td align="right">49.8%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">2</td>
|
||||
<td align="left">Staphylococcus aureus</td>
|
||||
<td align="right">3,919</td>
|
||||
<td align="right">24.9%</td>
|
||||
<td align="right">11,726</td>
|
||||
<td align="right">74.6%</td>
|
||||
<td align="right">3,673</td>
|
||||
<td align="right">24.4%</td>
|
||||
<td align="right">11,167</td>
|
||||
<td align="right">74.2%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">3</td>
|
||||
<td align="left">Streptococcus pneumoniae</td>
|
||||
<td align="right">2,426</td>
|
||||
<td align="right">2,325</td>
|
||||
<td align="right">15.4%</td>
|
||||
<td align="right">14,152</td>
|
||||
<td align="right">90.0%</td>
|
||||
<td align="right">13,492</td>
|
||||
<td align="right">89.6%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">4</td>
|
||||
<td align="left">Klebsiella pneumoniae</td>
|
||||
<td align="right">1,577</td>
|
||||
<td align="right">10.0%</td>
|
||||
<td align="right">15,729</td>
|
||||
<td align="right">1,567</td>
|
||||
<td align="right">10.4%</td>
|
||||
<td align="right">15,059</td>
|
||||
<td align="right">100.0%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -964,7 +977,7 @@ Longest: 24</p>
|
||||
<a href="#resistance-percentages" class="anchor"></a>Resistance percentages</h2>
|
||||
<p>The functions <code><a href="../reference/portion.html">portion_S()</a></code>, <code><a href="../reference/portion.html">portion_SI()</a></code>, <code><a href="../reference/portion.html">portion_I()</a></code>, <code><a href="../reference/portion.html">portion_IR()</a></code> and <code><a href="../reference/portion.html">portion_R()</a></code> can be used to determine the portion of a specific antimicrobial outcome. They can be used on their own:</p>
|
||||
<div class="sourceCode" id="cb25"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb25-1" title="1">data_1st <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/portion.html">portion_IR</a></span>(amox)</a>
|
||||
<a class="sourceLine" id="cb25-2" title="2"><span class="co">#> [1] 0.4796236</span></a></code></pre></div>
|
||||
<a class="sourceLine" id="cb25-2" title="2"><span class="co">#> [1] 0.4999668</span></a></code></pre></div>
|
||||
<p>Or can be used in conjuction with <code><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by()</a></code> and <code><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarise()</a></code>, both from the <code>dplyr</code> package:</p>
|
||||
<div class="sourceCode" id="cb26"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb26-1" title="1">data_1st <span class="op">%>%</span><span class="st"> </span></a>
|
||||
<a class="sourceLine" id="cb26-2" title="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span>(hospital) <span class="op">%>%</span><span class="st"> </span></a>
|
||||
@ -977,19 +990,19 @@ Longest: 24</p>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="center">Hospital A</td>
|
||||
<td align="center">0.4841779</td>
|
||||
<td align="center">0.5037963</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Hospital B</td>
|
||||
<td align="center">0.4800215</td>
|
||||
<td align="center">0.5007457</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Hospital C</td>
|
||||
<td align="center">0.4663419</td>
|
||||
<td align="center">0.5111524</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Hospital D</td>
|
||||
<td align="center">0.4815057</td>
|
||||
<td align="center">0.4851550</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -1007,23 +1020,23 @@ Longest: 24</p>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="center">Hospital A</td>
|
||||
<td align="center">0.4841779</td>
|
||||
<td align="center">4835</td>
|
||||
<td align="center">0.5037963</td>
|
||||
<td align="center">4478</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Hospital B</td>
|
||||
<td align="center">0.4800215</td>
|
||||
<td align="center">5581</td>
|
||||
<td align="center">0.5007457</td>
|
||||
<td align="center">5364</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Hospital C</td>
|
||||
<td align="center">0.4663419</td>
|
||||
<td align="center">2258</td>
|
||||
<td align="center">0.5111524</td>
|
||||
<td align="center">2152</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Hospital D</td>
|
||||
<td align="center">0.4815057</td>
|
||||
<td align="center">3055</td>
|
||||
<td align="center">0.4851550</td>
|
||||
<td align="center">3065</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -1043,27 +1056,27 @@ Longest: 24</p>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td align="center">Escherichia</td>
|
||||
<td align="center">0.7376713</td>
|
||||
<td align="center">0.8986807</td>
|
||||
<td align="center">0.9754067</td>
|
||||
<td align="center">0.8796370</td>
|
||||
<td align="center">0.8973846</td>
|
||||
<td align="center">0.9902589</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Klebsiella</td>
|
||||
<td align="center">0.7305010</td>
|
||||
<td align="center">0.8953710</td>
|
||||
<td align="center">0.9727330</td>
|
||||
<td align="center">0.7172942</td>
|
||||
<td align="center">0.9081047</td>
|
||||
<td align="center">0.9821315</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="center">Staphylococcus</td>
|
||||
<td align="center">0.7305435</td>
|
||||
<td align="center">0.9275325</td>
|
||||
<td align="center">0.9793315</td>
|
||||
<td align="center">0.8829295</td>
|
||||
<td align="center">0.9221345</td>
|
||||
<td align="center">0.9918323</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="center">Streptococcus</td>
|
||||
<td align="center">0.7320692</td>
|
||||
<td align="center">0.5767742</td>
|
||||
<td align="center">0.0000000</td>
|
||||
<td align="center">0.7320692</td>
|
||||
<td align="center">0.5767742</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
@ -40,7 +40,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.1.9002</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -192,7 +192,7 @@
|
||||
<h1>How to import data from SPSS / SAS / Stata</h1>
|
||||
<h4 class="author">Matthijs S. Berends</h4>
|
||||
|
||||
<h4 class="date">27 March 2019</h4>
|
||||
<h4 class="date">05 April 2019</h4>
|
||||
|
||||
|
||||
<div class="hidden name"><code>SPSS.Rmd</code></div>
|
||||
|
@ -40,7 +40,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.1.9002</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -192,7 +192,7 @@
|
||||
<h1>Benchmarks</h1>
|
||||
<h4 class="author">Matthijs S. Berends</h4>
|
||||
|
||||
<h4 class="date">27 March 2019</h4>
|
||||
<h4 class="date">05 April 2019</h4>
|
||||
|
||||
|
||||
<div class="hidden name"><code>benchmarks.Rmd</code></div>
|
||||
@ -218,13 +218,13 @@
|
||||
<a class="sourceLine" id="cb2-9" title="9"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(S.aureus, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">2</span>)</a>
|
||||
<a class="sourceLine" id="cb2-10" title="10"><span class="co">#> Unit: milliseconds</span></a>
|
||||
<a class="sourceLine" id="cb2-11" title="11"><span class="co">#> expr min lq mean median uq max neval</span></a>
|
||||
<a class="sourceLine" id="cb2-12" title="12"><span class="co">#> as.mo("sau") 18.0 18.0 22 18.0 20.0 48 10</span></a>
|
||||
<a class="sourceLine" id="cb2-13" title="13"><span class="co">#> as.mo("stau") 48.0 48.0 76 67.0 92.0 150 10</span></a>
|
||||
<a class="sourceLine" id="cb2-14" title="14"><span class="co">#> as.mo("staaur") 18.0 18.0 24 19.0 22.0 62 10</span></a>
|
||||
<a class="sourceLine" id="cb2-15" title="15"><span class="co">#> as.mo("STAAUR") 18.0 18.0 23 18.0 20.0 61 10</span></a>
|
||||
<a class="sourceLine" id="cb2-16" title="16"><span class="co">#> as.mo("S. aureus") 29.0 29.0 35 29.0 30.0 76 10</span></a>
|
||||
<a class="sourceLine" id="cb2-17" title="17"><span class="co">#> as.mo("S. aureus") 29.0 29.0 37 29.0 30.0 79 10</span></a>
|
||||
<a class="sourceLine" id="cb2-18" title="18"><span class="co">#> as.mo("Staphylococcus aureus") 8.2 8.2 13 8.2 8.4 52 10</span></a></code></pre></div>
|
||||
<a class="sourceLine" id="cb2-12" title="12"><span class="co">#> as.mo("sau") 18.0 18.0 27 18.0 20.0 62 10</span></a>
|
||||
<a class="sourceLine" id="cb2-13" title="13"><span class="co">#> as.mo("stau") 48.0 48.0 61 49.0 91.0 92 10</span></a>
|
||||
<a class="sourceLine" id="cb2-14" title="14"><span class="co">#> as.mo("staaur") 18.0 18.0 18 18.0 18.0 19 10</span></a>
|
||||
<a class="sourceLine" id="cb2-15" title="15"><span class="co">#> as.mo("STAAUR") 18.0 18.0 18 18.0 18.0 20 10</span></a>
|
||||
<a class="sourceLine" id="cb2-16" title="16"><span class="co">#> as.mo("S. aureus") 29.0 29.0 29 29.0 29.0 29 10</span></a>
|
||||
<a class="sourceLine" id="cb2-17" title="17"><span class="co">#> as.mo("S. aureus") 28.0 29.0 48 29.0 73.0 130 10</span></a>
|
||||
<a class="sourceLine" id="cb2-18" title="18"><span class="co">#> as.mo("Staphylococcus aureus") 8.1 8.1 13 8.2 8.6 52 10</span></a></code></pre></div>
|
||||
<p>In the table above, all measurements are shown in milliseconds (thousands of seconds). A value of 5 milliseconds means it can determine 200 input values per second. It case of 100 milliseconds, this is only 10 input values per second. The second input is the only one that has to be looked up thoroughly. All the others are known codes (the first one is a WHONET code) or common laboratory codes, or common full organism names like the last one. Full organism names are always preferred.</p>
|
||||
<p>To achieve this speed, the <code>as.mo</code> function also takes into account the prevalence of human pathogenic microorganisms. The downside is of course that less prevalent microorganisms will be determined less fast. See this example for the ID of <em>Thermus islandicus</em> (<code>B_THERMS_ISL</code>), a bug probably never found before in humans:</p>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1">T.islandicus <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"theisl"</span>),</a>
|
||||
@ -236,12 +236,12 @@
|
||||
<a class="sourceLine" id="cb3-7" title="7"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(T.islandicus, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">2</span>)</a>
|
||||
<a class="sourceLine" id="cb3-8" title="8"><span class="co">#> Unit: milliseconds</span></a>
|
||||
<a class="sourceLine" id="cb3-9" title="9"><span class="co">#> expr min lq mean median uq max neval</span></a>
|
||||
<a class="sourceLine" id="cb3-10" title="10"><span class="co">#> as.mo("theisl") 460 460 500 510 510 560 10</span></a>
|
||||
<a class="sourceLine" id="cb3-11" title="11"><span class="co">#> as.mo("THEISL") 460 470 490 490 510 530 10</span></a>
|
||||
<a class="sourceLine" id="cb3-12" title="12"><span class="co">#> as.mo("T. islandicus") 74 74 84 75 78 120 10</span></a>
|
||||
<a class="sourceLine" id="cb3-13" title="13"><span class="co">#> as.mo("T. islandicus") 74 75 88 75 120 120 10</span></a>
|
||||
<a class="sourceLine" id="cb3-14" title="14"><span class="co">#> as.mo("Thermus islandicus") 73 73 84 74 75 130 10</span></a></code></pre></div>
|
||||
<p>That takes 7.6 times as much time on average. A value of 100 milliseconds means it can only determine ~10 different input values per second. We can conclude that looking up arbitrary codes of less prevalent microorganisms is the worst way to go, in terms of calculation performance. Full names (like <em>Thermus islandicus</em>) are almost fast - these are the most probable input from most data sets.</p>
|
||||
<a class="sourceLine" id="cb3-10" title="10"><span class="co">#> as.mo("theisl") 460 460 480 470 510 510 10</span></a>
|
||||
<a class="sourceLine" id="cb3-11" title="11"><span class="co">#> as.mo("THEISL") 460 470 490 490 510 540 10</span></a>
|
||||
<a class="sourceLine" id="cb3-12" title="12"><span class="co">#> as.mo("T. islandicus") 73 73 84 73 77 130 10</span></a>
|
||||
<a class="sourceLine" id="cb3-13" title="13"><span class="co">#> as.mo("T. islandicus") 73 73 88 75 120 120 10</span></a>
|
||||
<a class="sourceLine" id="cb3-14" title="14"><span class="co">#> as.mo("Thermus islandicus") 73 73 80 73 74 130 10</span></a></code></pre></div>
|
||||
<p>That takes 8 times as much time on average. A value of 100 milliseconds means it can only determine ~10 different input values per second. We can conclude that looking up arbitrary codes of less prevalent microorganisms is the worst way to go, in terms of calculation performance. Full names (like <em>Thermus islandicus</em>) are almost fast - these are the most probable input from most data sets.</p>
|
||||
<p>In the figure below, we compare <em>Escherichia coli</em> (which is very common) with <em>Prevotella brevis</em> (which is moderately common) and with <em>Thermus islandicus</em> (which is very uncommon):</p>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/graphics/topics/par">par</a></span>(<span class="dt">mar =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">5</span>, <span class="dv">16</span>, <span class="dv">4</span>, <span class="dv">2</span>)) <span class="co"># set more space for left margin text (16)</span></a>
|
||||
<a class="sourceLine" id="cb4-2" title="2"></a>
|
||||
@ -257,111 +257,110 @@
|
||||
<a class="sourceLine" id="cb4-12" title="12"> <span class="dt">main =</span> <span class="st">"Benchmarks per prevalence"</span>)</a></code></pre></div>
|
||||
<p><img src="benchmarks_files/figure-html/unnamed-chunk-5-1.png" width="720"></p>
|
||||
<p>In reality, the <code><a href="../reference/as.mo.html">as.mo()</a></code> functions <strong>learns from its own output to speed up determinations for next times</strong>. In above figure, this effect was disabled to show the difference with the boxplot below - when you would use <code><a href="../reference/as.mo.html">as.mo()</a></code> yourself:</p>
|
||||
<pre><code>#> File /home/uscloud/.Rhistory_mo removed.</code></pre>
|
||||
<p><img src="benchmarks_files/figure-html/unnamed-chunk-6-1.png" width="720"></p>
|
||||
<p>The highest outliers are the first times. All next determinations were done in only thousands of seconds.</p>
|
||||
<p>The highest outliers are the first times. All next determinations were done in only thousands of seconds. For now, learning only works per session. If R is closed or terminated, the algorithms reset. This will probably be resolved in a next version.</p>
|
||||
<p>Still, uncommon microorganisms take a lot more time than common microorganisms, especially the first time. To relieve this pitfall and further improve performance, two important calculations take almost no time at all: <strong>repetitive results</strong> and <strong>already precalculated results</strong>.</p>
|
||||
<div id="repetitive-results" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#repetitive-results" class="anchor"></a>Repetitive results</h3>
|
||||
<p>Repetitive results are unique values that are present more than once. Unique values will only be calculated once by <code><a href="../reference/as.mo.html">as.mo()</a></code>. We will use <code><a href="../reference/mo_property.html">mo_fullname()</a></code> for this test - a helper function that returns the full microbial name (genus, species and possibly subspecies) which uses <code><a href="../reference/as.mo.html">as.mo()</a></code> internally.</p>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(dplyr)</a>
|
||||
<a class="sourceLine" id="cb6-2" title="2"><span class="co"># take all MO codes from the septic_patients data set</span></a>
|
||||
<a class="sourceLine" id="cb6-3" title="3">x <-<span class="st"> </span>septic_patients<span class="op">$</span>mo <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb6-4" title="4"><span class="st"> </span><span class="co"># keep only the unique ones</span></a>
|
||||
<a class="sourceLine" id="cb6-5" title="5"><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/unique">unique</a></span>() <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb6-6" title="6"><span class="st"> </span><span class="co"># pick 50 of them at random</span></a>
|
||||
<a class="sourceLine" id="cb6-7" title="7"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/sample.html">sample</a></span>(<span class="dv">50</span>) <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb6-8" title="8"><span class="st"> </span><span class="co"># paste that 10,000 times</span></a>
|
||||
<a class="sourceLine" id="cb6-9" title="9"><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/rep">rep</a></span>(<span class="dv">10000</span>) <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb6-10" title="10"><span class="st"> </span><span class="co"># scramble it</span></a>
|
||||
<a class="sourceLine" id="cb6-11" title="11"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/sample.html">sample</a></span>()</a>
|
||||
<a class="sourceLine" id="cb6-12" title="12"> </a>
|
||||
<a class="sourceLine" id="cb6-13" title="13"><span class="co"># got indeed 50 times 10,000 = half a million?</span></a>
|
||||
<a class="sourceLine" id="cb6-14" title="14"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/length">length</a></span>(x)</a>
|
||||
<a class="sourceLine" id="cb6-15" title="15"><span class="co">#> [1] 500000</span></a>
|
||||
<a class="sourceLine" id="cb6-16" title="16"></a>
|
||||
<a class="sourceLine" id="cb6-17" title="17"><span class="co"># and how many unique values do we have?</span></a>
|
||||
<a class="sourceLine" id="cb6-18" title="18"><span class="kw"><a href="https://dplyr.tidyverse.org/reference/n_distinct.html">n_distinct</a></span>(x)</a>
|
||||
<a class="sourceLine" id="cb6-19" title="19"><span class="co">#> [1] 50</span></a>
|
||||
<a class="sourceLine" id="cb6-20" title="20"></a>
|
||||
<a class="sourceLine" id="cb6-21" title="21"><span class="co"># now let's see:</span></a>
|
||||
<a class="sourceLine" id="cb6-22" title="22">run_it <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(x),</a>
|
||||
<a class="sourceLine" id="cb6-23" title="23"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
||||
<a class="sourceLine" id="cb6-24" title="24"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a>
|
||||
<a class="sourceLine" id="cb6-25" title="25"><span class="co">#> Unit: milliseconds</span></a>
|
||||
<a class="sourceLine" id="cb6-26" title="26"><span class="co">#> expr min lq mean median uq max neval</span></a>
|
||||
<a class="sourceLine" id="cb6-27" title="27"><span class="co">#> mo_fullname(x) 825 845 887 867 903 1080 10</span></a></code></pre></div>
|
||||
<p>So transforming 500,000 values (!!) of 50 unique values only takes 0.87 seconds (867 ms). You only lose time on your unique input values.</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(dplyr)</a>
|
||||
<a class="sourceLine" id="cb5-2" title="2"><span class="co"># take all MO codes from the septic_patients data set</span></a>
|
||||
<a class="sourceLine" id="cb5-3" title="3">x <-<span class="st"> </span>septic_patients<span class="op">$</span>mo <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb5-4" title="4"><span class="st"> </span><span class="co"># keep only the unique ones</span></a>
|
||||
<a class="sourceLine" id="cb5-5" title="5"><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/unique">unique</a></span>() <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb5-6" title="6"><span class="st"> </span><span class="co"># pick 50 of them at random</span></a>
|
||||
<a class="sourceLine" id="cb5-7" title="7"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/sample.html">sample</a></span>(<span class="dv">50</span>) <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb5-8" title="8"><span class="st"> </span><span class="co"># paste that 10,000 times</span></a>
|
||||
<a class="sourceLine" id="cb5-9" title="9"><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/rep">rep</a></span>(<span class="dv">10000</span>) <span class="op">%>%</span></a>
|
||||
<a class="sourceLine" id="cb5-10" title="10"><span class="st"> </span><span class="co"># scramble it</span></a>
|
||||
<a class="sourceLine" id="cb5-11" title="11"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/sample.html">sample</a></span>()</a>
|
||||
<a class="sourceLine" id="cb5-12" title="12"> </a>
|
||||
<a class="sourceLine" id="cb5-13" title="13"><span class="co"># got indeed 50 times 10,000 = half a million?</span></a>
|
||||
<a class="sourceLine" id="cb5-14" title="14"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/length">length</a></span>(x)</a>
|
||||
<a class="sourceLine" id="cb5-15" title="15"><span class="co">#> [1] 500000</span></a>
|
||||
<a class="sourceLine" id="cb5-16" title="16"></a>
|
||||
<a class="sourceLine" id="cb5-17" title="17"><span class="co"># and how many unique values do we have?</span></a>
|
||||
<a class="sourceLine" id="cb5-18" title="18"><span class="kw"><a href="https://dplyr.tidyverse.org/reference/n_distinct.html">n_distinct</a></span>(x)</a>
|
||||
<a class="sourceLine" id="cb5-19" title="19"><span class="co">#> [1] 50</span></a>
|
||||
<a class="sourceLine" id="cb5-20" title="20"></a>
|
||||
<a class="sourceLine" id="cb5-21" title="21"><span class="co"># now let's see:</span></a>
|
||||
<a class="sourceLine" id="cb5-22" title="22">run_it <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(x),</a>
|
||||
<a class="sourceLine" id="cb5-23" title="23"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
||||
<a class="sourceLine" id="cb5-24" title="24"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a>
|
||||
<a class="sourceLine" id="cb5-25" title="25"><span class="co">#> Unit: milliseconds</span></a>
|
||||
<a class="sourceLine" id="cb5-26" title="26"><span class="co">#> expr min lq mean median uq max neval</span></a>
|
||||
<a class="sourceLine" id="cb5-27" title="27"><span class="co">#> mo_fullname(x) 689 730 762 752 778 938 10</span></a></code></pre></div>
|
||||
<p>So transforming 500,000 values (!!) of 50 unique values only takes 0.75 seconds (751 ms). You only lose time on your unique input values.</p>
|
||||
</div>
|
||||
<div id="precalculated-results" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#precalculated-results" class="anchor"></a>Precalculated results</h3>
|
||||
<p>What about precalculated results? If the input is an already precalculated result of a helper function like <code><a href="../reference/mo_property.html">mo_fullname()</a></code>, it almost doesn’t take any time at all (see ‘C’ below):</p>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" title="1">run_it <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="dt">A =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"B_STPHY_AUR"</span>),</a>
|
||||
<a class="sourceLine" id="cb7-2" title="2"> <span class="dt">B =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"S. aureus"</span>),</a>
|
||||
<a class="sourceLine" id="cb7-3" title="3"> <span class="dt">C =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"Staphylococcus aureus"</span>),</a>
|
||||
<a class="sourceLine" id="cb7-4" title="4"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
||||
<a class="sourceLine" id="cb7-5" title="5"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a>
|
||||
<a class="sourceLine" id="cb7-6" title="6"><span class="co">#> Unit: milliseconds</span></a>
|
||||
<a class="sourceLine" id="cb7-7" title="7"><span class="co">#> expr min lq mean median uq max neval</span></a>
|
||||
<a class="sourceLine" id="cb7-8" title="8"><span class="co">#> A 12.400 12.700 13.100 13.000 13.400 13.700 10</span></a>
|
||||
<a class="sourceLine" id="cb7-9" title="9"><span class="co">#> B 26.300 26.600 27.900 28.400 28.700 29.000 10</span></a>
|
||||
<a class="sourceLine" id="cb7-10" title="10"><span class="co">#> C 0.486 0.502 0.727 0.821 0.849 0.982 10</span></a></code></pre></div>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" title="1">run_it <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="dt">A =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"B_STPHY_AUR"</span>),</a>
|
||||
<a class="sourceLine" id="cb6-2" title="2"> <span class="dt">B =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"S. aureus"</span>),</a>
|
||||
<a class="sourceLine" id="cb6-3" title="3"> <span class="dt">C =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"Staphylococcus aureus"</span>),</a>
|
||||
<a class="sourceLine" id="cb6-4" title="4"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
||||
<a class="sourceLine" id="cb6-5" title="5"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a>
|
||||
<a class="sourceLine" id="cb6-6" title="6"><span class="co">#> Unit: milliseconds</span></a>
|
||||
<a class="sourceLine" id="cb6-7" title="7"><span class="co">#> expr min lq mean median uq max neval</span></a>
|
||||
<a class="sourceLine" id="cb6-8" title="8"><span class="co">#> A 12.200 12.300 12.500 12.400 12.600 13.40 10</span></a>
|
||||
<a class="sourceLine" id="cb6-9" title="9"><span class="co">#> B 25.800 26.300 26.800 26.600 26.900 28.50 10</span></a>
|
||||
<a class="sourceLine" id="cb6-10" title="10"><span class="co">#> C 0.477 0.724 0.779 0.825 0.848 1.07 10</span></a></code></pre></div>
|
||||
<p>So going from <code><a href="../reference/mo_property.html">mo_fullname("Staphylococcus aureus")</a></code> to <code>"Staphylococcus aureus"</code> takes 0.0008 seconds - it doesn’t even start calculating <em>if the result would be the same as the expected resulting value</em>. That goes for all helper functions:</p>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" title="1">run_it <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="dt">A =</span> <span class="kw"><a href="../reference/mo_property.html">mo_species</a></span>(<span class="st">"aureus"</span>),</a>
|
||||
<a class="sourceLine" id="cb8-2" title="2"> <span class="dt">B =</span> <span class="kw"><a href="../reference/mo_property.html">mo_genus</a></span>(<span class="st">"Staphylococcus"</span>),</a>
|
||||
<a class="sourceLine" id="cb8-3" title="3"> <span class="dt">C =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"Staphylococcus aureus"</span>),</a>
|
||||
<a class="sourceLine" id="cb8-4" title="4"> <span class="dt">D =</span> <span class="kw"><a href="../reference/mo_property.html">mo_family</a></span>(<span class="st">"Staphylococcaceae"</span>),</a>
|
||||
<a class="sourceLine" id="cb8-5" title="5"> <span class="dt">E =</span> <span class="kw"><a href="../reference/mo_property.html">mo_order</a></span>(<span class="st">"Bacillales"</span>),</a>
|
||||
<a class="sourceLine" id="cb8-6" title="6"> <span class="dt">F =</span> <span class="kw"><a href="../reference/mo_property.html">mo_class</a></span>(<span class="st">"Bacilli"</span>),</a>
|
||||
<a class="sourceLine" id="cb8-7" title="7"> <span class="dt">G =</span> <span class="kw"><a href="../reference/mo_property.html">mo_phylum</a></span>(<span class="st">"Firmicutes"</span>),</a>
|
||||
<a class="sourceLine" id="cb8-8" title="8"> <span class="dt">H =</span> <span class="kw"><a href="../reference/mo_property.html">mo_kingdom</a></span>(<span class="st">"Bacteria"</span>),</a>
|
||||
<a class="sourceLine" id="cb8-9" title="9"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
||||
<a class="sourceLine" id="cb8-10" title="10"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a>
|
||||
<a class="sourceLine" id="cb8-11" title="11"><span class="co">#> Unit: milliseconds</span></a>
|
||||
<a class="sourceLine" id="cb8-12" title="12"><span class="co">#> expr min lq mean median uq max neval</span></a>
|
||||
<a class="sourceLine" id="cb8-13" title="13"><span class="co">#> A 0.371 0.432 0.463 0.471 0.500 0.525 10</span></a>
|
||||
<a class="sourceLine" id="cb8-14" title="14"><span class="co">#> B 0.479 0.531 0.557 0.553 0.566 0.631 10</span></a>
|
||||
<a class="sourceLine" id="cb8-15" title="15"><span class="co">#> C 0.511 0.676 0.834 0.904 0.959 1.090 10</span></a>
|
||||
<a class="sourceLine" id="cb8-16" title="16"><span class="co">#> D 0.422 0.444 0.483 0.494 0.501 0.559 10</span></a>
|
||||
<a class="sourceLine" id="cb8-17" title="17"><span class="co">#> E 0.383 0.458 0.502 0.477 0.507 0.778 10</span></a>
|
||||
<a class="sourceLine" id="cb8-18" title="18"><span class="co">#> F 0.362 0.376 0.476 0.426 0.473 0.947 10</span></a>
|
||||
<a class="sourceLine" id="cb8-19" title="19"><span class="co">#> G 0.361 0.368 0.451 0.452 0.500 0.610 10</span></a>
|
||||
<a class="sourceLine" id="cb8-20" title="20"><span class="co">#> H 0.359 0.383 0.431 0.437 0.458 0.505 10</span></a></code></pre></div>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" title="1">run_it <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="dt">A =</span> <span class="kw"><a href="../reference/mo_property.html">mo_species</a></span>(<span class="st">"aureus"</span>),</a>
|
||||
<a class="sourceLine" id="cb7-2" title="2"> <span class="dt">B =</span> <span class="kw"><a href="../reference/mo_property.html">mo_genus</a></span>(<span class="st">"Staphylococcus"</span>),</a>
|
||||
<a class="sourceLine" id="cb7-3" title="3"> <span class="dt">C =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"Staphylococcus aureus"</span>),</a>
|
||||
<a class="sourceLine" id="cb7-4" title="4"> <span class="dt">D =</span> <span class="kw"><a href="../reference/mo_property.html">mo_family</a></span>(<span class="st">"Staphylococcaceae"</span>),</a>
|
||||
<a class="sourceLine" id="cb7-5" title="5"> <span class="dt">E =</span> <span class="kw"><a href="../reference/mo_property.html">mo_order</a></span>(<span class="st">"Bacillales"</span>),</a>
|
||||
<a class="sourceLine" id="cb7-6" title="6"> <span class="dt">F =</span> <span class="kw"><a href="../reference/mo_property.html">mo_class</a></span>(<span class="st">"Bacilli"</span>),</a>
|
||||
<a class="sourceLine" id="cb7-7" title="7"> <span class="dt">G =</span> <span class="kw"><a href="../reference/mo_property.html">mo_phylum</a></span>(<span class="st">"Firmicutes"</span>),</a>
|
||||
<a class="sourceLine" id="cb7-8" title="8"> <span class="dt">H =</span> <span class="kw"><a href="../reference/mo_property.html">mo_kingdom</a></span>(<span class="st">"Bacteria"</span>),</a>
|
||||
<a class="sourceLine" id="cb7-9" title="9"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
||||
<a class="sourceLine" id="cb7-10" title="10"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a>
|
||||
<a class="sourceLine" id="cb7-11" title="11"><span class="co">#> Unit: milliseconds</span></a>
|
||||
<a class="sourceLine" id="cb7-12" title="12"><span class="co">#> expr min lq mean median uq max neval</span></a>
|
||||
<a class="sourceLine" id="cb7-13" title="13"><span class="co">#> A 0.376 0.386 0.436 0.436 0.479 0.516 10</span></a>
|
||||
<a class="sourceLine" id="cb7-14" title="14"><span class="co">#> B 0.467 0.501 0.561 0.567 0.599 0.700 10</span></a>
|
||||
<a class="sourceLine" id="cb7-15" title="15"><span class="co">#> C 0.503 0.782 0.850 0.918 0.971 1.040 10</span></a>
|
||||
<a class="sourceLine" id="cb7-16" title="16"><span class="co">#> D 0.403 0.471 0.488 0.491 0.525 0.588 10</span></a>
|
||||
<a class="sourceLine" id="cb7-17" title="17"><span class="co">#> E 0.343 0.429 0.456 0.445 0.485 0.638 10</span></a>
|
||||
<a class="sourceLine" id="cb7-18" title="18"><span class="co">#> F 0.380 0.403 0.447 0.453 0.491 0.520 10</span></a>
|
||||
<a class="sourceLine" id="cb7-19" title="19"><span class="co">#> G 0.385 0.421 0.458 0.447 0.487 0.575 10</span></a>
|
||||
<a class="sourceLine" id="cb7-20" title="20"><span class="co">#> H 0.396 0.455 0.484 0.491 0.515 0.549 10</span></a></code></pre></div>
|
||||
<p>Of course, when running <code><a href="../reference/mo_property.html">mo_phylum("Firmicutes")</a></code> the function has zero knowledge about the actual microorganism, namely <em>S. aureus</em>. But since the result would be <code>"Firmicutes"</code> too, there is no point in calculating the result. And because this package ‘knows’ all phyla of all known bacteria (according to the Catalogue of Life), it can just return the initial value immediately.</p>
|
||||
</div>
|
||||
<div id="results-in-other-languages" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#results-in-other-languages" class="anchor"></a>Results in other languages</h3>
|
||||
<p>When the system language is non-English and supported by this <code>AMR</code> package, some functions will have a translated result. This almost does’t take extra time:</p>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" title="1"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"en"</span>) <span class="co"># or just mo_fullname("CoNS") on an English system</span></a>
|
||||
<a class="sourceLine" id="cb9-2" title="2"><span class="co">#> [1] "Coagulase-negative Staphylococcus (CoNS)"</span></a>
|
||||
<a class="sourceLine" id="cb9-3" title="3"></a>
|
||||
<a class="sourceLine" id="cb9-4" title="4"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"es"</span>) <span class="co"># or just mo_fullname("CoNS") on a Spanish system</span></a>
|
||||
<a class="sourceLine" id="cb9-5" title="5"><span class="co">#> [1] "Staphylococcus coagulasa negativo (SCN)"</span></a>
|
||||
<a class="sourceLine" id="cb9-6" title="6"></a>
|
||||
<a class="sourceLine" id="cb9-7" title="7"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"nl"</span>) <span class="co"># or just mo_fullname("CoNS") on a Dutch system</span></a>
|
||||
<a class="sourceLine" id="cb9-8" title="8"><span class="co">#> [1] "Coagulase-negatieve Staphylococcus (CNS)"</span></a>
|
||||
<a class="sourceLine" id="cb9-9" title="9"></a>
|
||||
<a class="sourceLine" id="cb9-10" title="10">run_it <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="dt">en =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"en"</span>),</a>
|
||||
<a class="sourceLine" id="cb9-11" title="11"> <span class="dt">de =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"de"</span>),</a>
|
||||
<a class="sourceLine" id="cb9-12" title="12"> <span class="dt">nl =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"nl"</span>),</a>
|
||||
<a class="sourceLine" id="cb9-13" title="13"> <span class="dt">es =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"es"</span>),</a>
|
||||
<a class="sourceLine" id="cb9-14" title="14"> <span class="dt">it =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"it"</span>),</a>
|
||||
<a class="sourceLine" id="cb9-15" title="15"> <span class="dt">fr =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"fr"</span>),</a>
|
||||
<a class="sourceLine" id="cb9-16" title="16"> <span class="dt">pt =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"pt"</span>),</a>
|
||||
<a class="sourceLine" id="cb9-17" title="17"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
||||
<a class="sourceLine" id="cb9-18" title="18"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">4</span>)</a>
|
||||
<a class="sourceLine" id="cb9-19" title="19"><span class="co">#> Unit: milliseconds</span></a>
|
||||
<a class="sourceLine" id="cb9-20" title="20"><span class="co">#> expr min lq mean median uq max neval</span></a>
|
||||
<a class="sourceLine" id="cb9-21" title="21"><span class="co">#> en 18.83 19.19 24.20 19.53 20.67 63.66 10</span></a>
|
||||
<a class="sourceLine" id="cb9-22" title="22"><span class="co">#> de 31.53 32.10 36.79 32.22 33.81 75.80 10</span></a>
|
||||
<a class="sourceLine" id="cb9-23" title="23"><span class="co">#> nl 31.24 31.78 32.22 32.10 32.24 33.43 10</span></a>
|
||||
<a class="sourceLine" id="cb9-24" title="24"><span class="co">#> es 31.40 32.07 45.82 33.08 75.31 76.95 10</span></a>
|
||||
<a class="sourceLine" id="cb9-25" title="25"><span class="co">#> it 31.17 31.95 36.82 32.09 32.19 79.48 10</span></a>
|
||||
<a class="sourceLine" id="cb9-26" title="26"><span class="co">#> fr 31.48 31.64 31.89 31.96 32.07 32.33 10</span></a>
|
||||
<a class="sourceLine" id="cb9-27" title="27"><span class="co">#> pt 31.27 31.66 36.80 32.06 32.34 80.53 10</span></a></code></pre></div>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" title="1"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"en"</span>) <span class="co"># or just mo_fullname("CoNS") on an English system</span></a>
|
||||
<a class="sourceLine" id="cb8-2" title="2"><span class="co">#> [1] "Coagulase-negative Staphylococcus (CoNS)"</span></a>
|
||||
<a class="sourceLine" id="cb8-3" title="3"></a>
|
||||
<a class="sourceLine" id="cb8-4" title="4"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"es"</span>) <span class="co"># or just mo_fullname("CoNS") on a Spanish system</span></a>
|
||||
<a class="sourceLine" id="cb8-5" title="5"><span class="co">#> [1] "Staphylococcus coagulasa negativo (SCN)"</span></a>
|
||||
<a class="sourceLine" id="cb8-6" title="6"></a>
|
||||
<a class="sourceLine" id="cb8-7" title="7"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"nl"</span>) <span class="co"># or just mo_fullname("CoNS") on a Dutch system</span></a>
|
||||
<a class="sourceLine" id="cb8-8" title="8"><span class="co">#> [1] "Coagulase-negatieve Staphylococcus (CNS)"</span></a>
|
||||
<a class="sourceLine" id="cb8-9" title="9"></a>
|
||||
<a class="sourceLine" id="cb8-10" title="10">run_it <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="dt">en =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"en"</span>),</a>
|
||||
<a class="sourceLine" id="cb8-11" title="11"> <span class="dt">de =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"de"</span>),</a>
|
||||
<a class="sourceLine" id="cb8-12" title="12"> <span class="dt">nl =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"nl"</span>),</a>
|
||||
<a class="sourceLine" id="cb8-13" title="13"> <span class="dt">es =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"es"</span>),</a>
|
||||
<a class="sourceLine" id="cb8-14" title="14"> <span class="dt">it =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"it"</span>),</a>
|
||||
<a class="sourceLine" id="cb8-15" title="15"> <span class="dt">fr =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"fr"</span>),</a>
|
||||
<a class="sourceLine" id="cb8-16" title="16"> <span class="dt">pt =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"pt"</span>),</a>
|
||||
<a class="sourceLine" id="cb8-17" title="17"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
||||
<a class="sourceLine" id="cb8-18" title="18"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">4</span>)</a>
|
||||
<a class="sourceLine" id="cb8-19" title="19"><span class="co">#> Unit: milliseconds</span></a>
|
||||
<a class="sourceLine" id="cb8-20" title="20"><span class="co">#> expr min lq mean median uq max neval</span></a>
|
||||
<a class="sourceLine" id="cb8-21" title="21"><span class="co">#> en 18.96 19.05 19.17 19.10 19.28 19.50 10</span></a>
|
||||
<a class="sourceLine" id="cb8-22" title="22"><span class="co">#> de 31.11 31.58 40.75 32.11 33.36 75.57 10</span></a>
|
||||
<a class="sourceLine" id="cb8-23" title="23"><span class="co">#> nl 31.18 31.55 39.10 31.77 32.52 75.92 10</span></a>
|
||||
<a class="sourceLine" id="cb8-24" title="24"><span class="co">#> es 30.76 31.46 40.46 31.62 33.07 75.85 10</span></a>
|
||||
<a class="sourceLine" id="cb8-25" title="25"><span class="co">#> it 31.02 31.41 36.06 31.67 31.95 76.19 10</span></a>
|
||||
<a class="sourceLine" id="cb8-26" title="26"><span class="co">#> fr 31.02 31.66 36.36 31.84 32.46 76.22 10</span></a>
|
||||
<a class="sourceLine" id="cb8-27" title="27"><span class="co">#> pt 31.13 31.58 31.78 31.65 31.74 33.00 10</span></a></code></pre></div>
|
||||
<p>Currently supported are German, Dutch, Spanish, Italian, French and Portuguese.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
@ -78,7 +78,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.1.9002</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -78,7 +78,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.1.9002</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.1.9002</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -281,7 +281,7 @@
|
||||
<p>The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Cryptococcus</em>, <em>Histoplasma</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>).</p>
|
||||
</li>
|
||||
<li><p>All ~2,000 (sub)species from ~100 other relevant genera, from the kingdoms of Animalia and Plantae (like <em>Strongyloides</em> and <em>Taenia</em>)</p></li>
|
||||
<li><p>All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed</p></li>
|
||||
<li><p>All ~21,000 previously accepted names of included (sub)species that have been taxonomically renamed</p></li>
|
||||
<li><p>The responsible author(s) and year of scientific publication</p></li>
|
||||
</ul>
|
||||
<p>This data is updated annually - check the included version with <code><a href="reference/catalogue_of_life_version.html">catalogue_of_life_version()</a></code>.</p>
|
||||
|
@ -78,7 +78,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.1.9002</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -232,9 +232,40 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div id="amr-0619001" class="section level1">
|
||||
<h1 class="page-header">
|
||||
<a href="#amr-0619001" class="anchor"></a>AMR 0.6.1.9001<small> Unreleased </small>
|
||||
</h1>
|
||||
<p><strong>Note: latest development version</strong></p>
|
||||
<div id="changed" class="section level4">
|
||||
<h4 class="hasAnchor">
|
||||
<a href="#changed" class="anchor"></a>Changed</h4>
|
||||
<ul>
|
||||
<li>Removed deprecated functions <code>guess_mo()</code>, <code>guess_atc()</code>, <code>EUCAST_rules()</code>, <code>interpretive_reading()</code>
|
||||
</li>
|
||||
<li>Added more old taxonomic names to the <code>microorganisms.old</code> data set, which leads to better results finding when using the <code><a href="../reference/as.mo.html">as.mo()</a></code> function</li>
|
||||
<li>Frequency tables of microbial IDs speed improvement</li>
|
||||
<li>Removed all hardcoded EUCAST rules and replaced them with a new reference file: <code>./inst/eucast/eucast.tsv</code>.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="amr-061" class="section level1">
|
||||
<h1 class="page-header">
|
||||
<a href="#amr-061" class="anchor"></a>AMR 0.6.1<small> 2019-03-29 </small>
|
||||
</h1>
|
||||
<div id="changed-1" class="section level4">
|
||||
<h4 class="hasAnchor">
|
||||
<a href="#changed-1" class="anchor"></a>Changed</h4>
|
||||
<ul>
|
||||
<li>Fixed a critical bug when using <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code> with <code>verbose = TRUE</code>
|
||||
</li>
|
||||
<li>Coercion of microbial IDs are now written to the package namespace instead of the user’s home folder, to comply with the CRAN policy</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="amr-060" class="section level1">
|
||||
<h1 class="page-header">
|
||||
<a href="#amr-060" class="anchor"></a>AMR 0.6.0<small> Unreleased </small>
|
||||
<a href="#amr-060" class="anchor"></a>AMR 0.6.0<small> 2019-03-27 </small>
|
||||
</h1>
|
||||
<p><strong>New website!</strong></p>
|
||||
<p>We’ve got a new website: <a href="https://msberends.gitlab.io/AMR/">https://msberends.gitlab.io/AMR</a> (built with the great <a href="https://pkgdown.r-lib.org/"><code>pkgdown</code></a>)</p>
|
||||
@ -328,9 +359,9 @@ These functions use <code><a href="../reference/as.atc.html">as.atc()</a></code>
|
||||
<li><p>New vignettes about how to conduct AMR analysis, predict antimicrobial resistance, use the <em>G</em>-test and more. These are also available (and even easier readable) on our website: <a href="https://msberends.gitlab.io/AMR" class="uri">https://msberends.gitlab.io/AMR</a>.</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="changed" class="section level4">
|
||||
<div id="changed-2" class="section level4">
|
||||
<h4 class="hasAnchor">
|
||||
<a href="#changed" class="anchor"></a>Changed</h4>
|
||||
<a href="#changed-2" class="anchor"></a>Changed</h4>
|
||||
<ul>
|
||||
<li>Function <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code>:
|
||||
<ul>
|
||||
@ -344,8 +375,8 @@ These functions use <code><a href="../reference/as.atc.html">as.atc()</a></code>
|
||||
<li>Added 65 antibiotics to the <code>antibiotics</code> data set, from the <a href="http://ec.europa.eu/health/documents/community-register/html/atc.htm">Pharmaceuticals Community Register</a> of the European Commission</li>
|
||||
<li>Removed columns <code>atc_group1_nl</code> and <code>atc_group2_nl</code> from the <code>antibiotics</code> data set</li>
|
||||
<li>Functions <code><a href="../reference/AMR-deprecated.html">atc_ddd()</a></code> and <code><a href="../reference/AMR-deprecated.html">atc_groups()</a></code> have been renamed <code><a href="../reference/atc_online.html">atc_online_ddd()</a></code> and <code><a href="../reference/atc_online.html">atc_online_groups()</a></code>. The old functions are deprecated and will be removed in a future version.</li>
|
||||
<li>Function <code><a href="../reference/AMR-deprecated.html">guess_mo()</a></code> is now deprecated in favour of <code><a href="../reference/as.mo.html">as.mo()</a></code> and will be removed in future versions</li>
|
||||
<li>Function <code><a href="../reference/AMR-deprecated.html">guess_atc()</a></code> is now deprecated in favour of <code><a href="../reference/as.atc.html">as.atc()</a></code> and will be removed in future versions</li>
|
||||
<li>Function <code>guess_mo()</code> is now deprecated in favour of <code><a href="../reference/as.mo.html">as.mo()</a></code> and will be removed in future versions</li>
|
||||
<li>Function <code>guess_atc()</code> is now deprecated in favour of <code><a href="../reference/as.atc.html">as.atc()</a></code> and will be removed in future versions</li>
|
||||
<li>Improvements for <code><a href="../reference/as.mo.html">as.mo()</a></code>:
|
||||
<ul>
|
||||
<li>
|
||||
@ -483,9 +514,9 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
||||
<li>Functions <code>mo_authors</code> and <code>mo_year</code> to get specific values about the scientific reference of a taxonomic entry</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="changed-1" class="section level4">
|
||||
<div id="changed-3" class="section level4">
|
||||
<h4 class="hasAnchor">
|
||||
<a href="#changed-1" class="anchor"></a>Changed</h4>
|
||||
<a href="#changed-3" class="anchor"></a>Changed</h4>
|
||||
<ul>
|
||||
<li>Functions <code>MDRO</code>, <code>BRMO</code>, <code>MRGN</code> and <code>EUCAST_exceptional_phenotypes</code> were renamed to <code>mdro</code>, <code>brmo</code>, <code>mrgn</code> and <code>eucast_exceptional_phenotypes</code>
|
||||
</li>
|
||||
@ -667,9 +698,9 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
||||
<li><p>Renamed <code>septic_patients$sex</code> to <code>septic_patients$gender</code></p></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="changed-2" class="section level4">
|
||||
<div id="changed-4" class="section level4">
|
||||
<h4 class="hasAnchor">
|
||||
<a href="#changed-2" class="anchor"></a>Changed</h4>
|
||||
<a href="#changed-4" class="anchor"></a>Changed</h4>
|
||||
<ul>
|
||||
<li>Added three antimicrobial agents to the <code>antibiotics</code> data set: Terbinafine (D01BA02), Rifaximin (A07AA11) and Isoconazole (D01AC05)</li>
|
||||
<li>
|
||||
@ -804,9 +835,9 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="changed-3" class="section level4">
|
||||
<div id="changed-5" class="section level4">
|
||||
<h4 class="hasAnchor">
|
||||
<a href="#changed-3" class="anchor"></a>Changed</h4>
|
||||
<a href="#changed-5" class="anchor"></a>Changed</h4>
|
||||
<ul>
|
||||
<li>Improvements for forecasting with <code>resistance_predict</code> and added more examples</li>
|
||||
<li>More antibiotics added as parameters for EUCAST rules</li>
|
||||
@ -890,9 +921,9 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
||||
<li>New print format for <code>tibble</code>s and <code>data.table</code>s</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="changed-4" class="section level4">
|
||||
<div id="changed-6" class="section level4">
|
||||
<h4 class="hasAnchor">
|
||||
<a href="#changed-4" class="anchor"></a>Changed</h4>
|
||||
<a href="#changed-6" class="anchor"></a>Changed</h4>
|
||||
<ul>
|
||||
<li>Fixed <code>rsi</code> class for vectors that contain only invalid antimicrobial interpretations</li>
|
||||
<li>Renamed dataset <code>ablist</code> to <code>antibiotics</code>
|
||||
@ -949,6 +980,8 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
|
||||
<div id="tocnav">
|
||||
<h2>Contents</h2>
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li><a href="#amr-0619001">0.6.1.9001</a></li>
|
||||
<li><a href="#amr-061">0.6.1</a></li>
|
||||
<li><a href="#amr-060">0.6.0</a></li>
|
||||
<li><a href="#amr-050">0.5.0</a></li>
|
||||
<li><a href="#amr-040">0.4.0</a></li>
|
||||
|
@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.1.9002</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -243,10 +243,6 @@
|
||||
|
||||
<pre class="usage"><span class='fu'>ratio</span>(<span class='no'>x</span>, <span class='no'>ratio</span>)
|
||||
|
||||
<span class='fu'>guess_mo</span>(<span class='no'>...</span>)
|
||||
|
||||
<span class='fu'>guess_atc</span>(<span class='no'>...</span>)
|
||||
|
||||
<span class='fu'>ab_property</span>(<span class='no'>...</span>)
|
||||
|
||||
<span class='fu'>ab_atc</span>(<span class='no'>...</span>)
|
||||
|
@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.1.9002</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -311,7 +311,9 @@ A microbial ID from this package (class: <code>mo</code>) typically looks like t
|
||||
<p>Use the <code><a href='mo_property.html'>mo_property</a>_*</code> functions to get properties based on the returned code, see Examples.</p>
|
||||
<p>The algorithm uses data from the Catalogue of Life (see below) and from one other source (see <code><a href='microorganisms.html'>?microorganisms</a></code>).</p>
|
||||
<p><strong>Self-learning algoritm</strong> <br />
|
||||
The <code>as.mo()</code> function gains experience from previously determined microbial IDs and learns from it. This drastically improves both speed and reliability. Use <code>clean_mo_history()</code> to reset the algorithms. Only experience from your current <code>AMR</code> package version is used. This is done because in the future the taxonomic tree (which is included in this package) may change for any organism and it consequently has to rebuild its knowledge. Usually, any guess after the first try runs 80-95% faster than the first try. The algorithm saves its previous findings to <code>~/.Rhistory_mo</code>.</p>
|
||||
The <code>as.mo()</code> function gains experience from previously determined microbial IDs and learns from it. This drastically improves both speed and reliability. Use <code>clean_mo_history()</code> to reset the algorithms. Only experience from your current <code>AMR</code> package version is used. This is done because in the future the taxonomic tree (which is included in this package) may change for any organism and it consequently has to rebuild its knowledge.</p>
|
||||
<p>Usually, any guess after the first try runs 80-95% faster than the first try.</p>
|
||||
<p>For now, learning only works per session. If R is closed or terminated, the algorithms reset. This will probably be resolved in a next version.</p>
|
||||
<p><strong>Intelligent rules</strong> <br />
|
||||
This function uses intelligent rules to help getting fast and logical results. It tries to find matches in this order:</p><ul>
|
||||
<li><p>Valid MO codes and full names: it first searches in already valid MO code and known genus/species combinations</p></li>
|
||||
|
@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.1.9002</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -256,7 +256,7 @@ This package contains the complete taxonomic tree of almost all microorganisms (
|
||||
<li><p>All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria and Protozoa</p></li>
|
||||
<li><p>All ~3,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Cryptococcus</em>, <em>Histplasma</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>).</p></li>
|
||||
<li><p>All ~2,000 (sub)species from ~100 other relevant genera, from the kingdoms of Animalia and Plantae (like <em>Strongyloides</em> and <em>Taenia</em>)</p></li>
|
||||
<li><p>All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed</p></li>
|
||||
<li><p>All ~21,000 previously accepted names of included (sub)species that have been taxonomically renamed</p></li>
|
||||
<li><p>The complete taxonomic tree of all included (sub)species: from kingdom to subspecies</p></li>
|
||||
<li><p>The responsible author(s) and year of scientific publication</p></li>
|
||||
</ul>
|
||||
|
@ -81,7 +81,7 @@ count_R and count_IR can be used to count resistant isolates, count_S and count_
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.1.9002</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -345,15 +345,15 @@ count_R and count_IR can be used to count resistant isolates, count_S and count_
|
||||
<span class='co'># Count co-resistance between amoxicillin/clav acid and gentamicin,</span>
|
||||
<span class='co'># so we can see that combination therapy does a lot more than mono therapy.</span>
|
||||
<span class='co'># Please mind that `portion_S` calculates percentages right away instead.</span>
|
||||
<span class='fu'>count_S</span>(<span class='no'>septic_patients</span>$<span class='no'>amcl</span>) <span class='co'># S = 1057 (67.1%)</span>
|
||||
<span class='fu'>count_all</span>(<span class='no'>septic_patients</span>$<span class='no'>amcl</span>) <span class='co'># n = 1576</span>
|
||||
<span class='fu'>count_S</span>(<span class='no'>septic_patients</span>$<span class='no'>amcl</span>) <span class='co'># S = 1342 (71.4%)</span>
|
||||
<span class='fu'>count_all</span>(<span class='no'>septic_patients</span>$<span class='no'>amcl</span>) <span class='co'># n = 1879</span>
|
||||
|
||||
<span class='fu'>count_S</span>(<span class='no'>septic_patients</span>$<span class='no'>gent</span>) <span class='co'># S = 1372 (74.0%)</span>
|
||||
<span class='fu'>count_all</span>(<span class='no'>septic_patients</span>$<span class='no'>gent</span>) <span class='co'># n = 1855</span>
|
||||
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/with'>with</a></span>(<span class='no'>septic_patients</span>,
|
||||
<span class='fu'>count_S</span>(<span class='no'>amcl</span>, <span class='no'>gent</span>)) <span class='co'># S = 1396 (92.0%)</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/with'>with</a></span>(<span class='no'>septic_patients</span>, <span class='co'># n = 1517</span>
|
||||
<span class='fu'>count_S</span>(<span class='no'>amcl</span>, <span class='no'>gent</span>)) <span class='co'># S = 1660 (92.3%)</span>
|
||||
<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/with'>with</a></span>(<span class='no'>septic_patients</span>, <span class='co'># n = 1798</span>
|
||||
<span class='fu'>n_rsi</span>(<span class='no'>amcl</span>, <span class='no'>gent</span>))
|
||||
|
||||
<span class='co'># Get portions S/I/R immediately of all rsi columns</span>
|
||||
|
@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.1.9002</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -241,51 +241,48 @@
|
||||
|
||||
</div>
|
||||
|
||||
<pre class="usage"><span class='fu'>eucast_rules</span>(<span class='no'>tbl</span>, <span class='kw'>col_mo</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>info</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
|
||||
<span class='kw'>rules</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"breakpoints"</span>, <span class='st'>"expert"</span>, <span class='st'>"other"</span>, <span class='st'>"all"</span>), <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
|
||||
<span class='kw'>amcl</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>amik</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>amox</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>ampi</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>azit</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>azlo</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>aztr</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>cefa</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>cfep</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>cfot</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>cfox</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>cfra</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>cfta</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>cftr</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>cfur</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>chlo</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>cipr</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>clar</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>clin</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>clox</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>coli</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>czol</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>dapt</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>doxy</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>erta</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>eryt</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>fosf</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>fusi</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>gent</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>imip</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>kana</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>levo</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>linc</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>line</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>mero</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>mezl</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>mino</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>moxi</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>nali</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>neom</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>neti</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>nitr</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>norf</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>novo</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>oflo</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>oxac</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>peni</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>pipe</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>pita</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>poly</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>pris</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>qida</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>rifa</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>roxi</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>siso</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>teic</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>tetr</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>tica</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>tige</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>tobr</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>trim</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>trsu</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>vanc</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>())
|
||||
<pre class="usage"><span class='fu'>eucast_rules</span>(<span class='no'>x</span>, <span class='kw'>col_mo</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>info</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>rules</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"breakpoints"</span>,
|
||||
<span class='st'>"expert"</span>, <span class='st'>"other"</span>, <span class='st'>"all"</span>), <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>amcl</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>amik</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>amox</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>ampi</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>azit</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>azlo</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>aztr</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>cefa</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>cfep</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>cfot</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>cfox</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>cfra</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>cfta</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>cftr</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>cfur</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>chlo</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>cipr</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>clar</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>clin</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>clox</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>coli</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>czol</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>dapt</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>doxy</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>erta</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>eryt</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>fosf</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>fusi</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>gent</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>imip</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>kana</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>levo</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>linc</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>line</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>mero</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>mezl</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>mino</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>moxi</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>nali</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>neom</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>neti</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>nitr</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>norf</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>novo</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>oflo</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>oxac</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>peni</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>pipe</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>pita</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>poly</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>pris</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>qida</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>rifa</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>roxi</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>siso</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>teic</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>tetr</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>tica</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>tige</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>tobr</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>trim</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(),
|
||||
<span class='kw'>trsu</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='kw'>vanc</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>(), <span class='no'>...</span>)
|
||||
|
||||
<span class='fu'>EUCAST_rules</span>(<span class='no'>...</span>)
|
||||
|
||||
<span class='fu'>interpretive_reading</span>(<span class='no'>...</span>)</pre>
|
||||
<span class='fu'>eucast_rules_file</span>()</pre>
|
||||
|
||||
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
|
||||
<table class="ref-arguments">
|
||||
<colgroup><col class="name" /><col class="desc" /></colgroup>
|
||||
<tr>
|
||||
<th>tbl</th>
|
||||
<td><p>table with antibiotic columns, like e.g. <code>amox</code> and <code>amcl</code></p></td>
|
||||
<th>x</th>
|
||||
<td><p>data with antibiotic columns, like e.g. <code>amox</code> and <code>amcl</code></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>col_mo</th>
|
||||
@ -324,10 +321,18 @@
|
||||
<li><p>EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 9.0, 2019. <br />
|
||||
<a href='http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_9.0_Breakpoint_Tables.xlsx'>http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_9.0_Breakpoint_Tables.xlsx</a></p></li>
|
||||
</ul>
|
||||
<p>For editing the reference file (which is available with <code>eucast_rules_file</code>), these values can all be used for target antibiotics: aminoglycosides, tetracyclines, polymyxins, macrolides, glycopeptides, streptogramins, cephalosporins, cephalosporins_without_cfta, carbapenems, aminopenicillins, ureidopenicillins, fluoroquinolones, all_betalactams, and all separate four letter codes like amcl. They can be separated by comma: <code>"amcl, fluoroquinolones"</code>. The mo_property can be any column name from the <code><a href='microorganisms.html'>microorganisms</a></code> data set, or <code>genus_species</code> or <code>gramstain</code>. This file contains references to the 'Burkholderia cepacia complex'. The species in this group can be found in: LiPuma JJ, 2015 (PMID 16217180).</p>
|
||||
|
||||
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
|
||||
|
||||
<p>The input of <code>tbl</code>, possibly with edited values of antibiotics. Or, if <code>verbose = TRUE</code>, a <code>data.frame</code> with all original and new values of the affected bug-drug combinations.</p>
|
||||
<p>The input of <code>tbl_</code>, possibly with edited values of antibiotics. Or, if <code>verbose = TRUE</code>, a <code>data.frame</code> with all original and new values of the affected bug-drug combinations.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
|
||||
|
||||
<p>The file used for applying all EUCAST rules can be retrieved with <code>eucast_rules_file()</code>. It returns an easily readable data set containing all rules. The original TSV file (tab separated file) that is being read by this function can be found when running this command: <br />
|
||||
<code>AMR::EUCAST_RULES_FILE_LOCATION</code> (without brackets).</p>
|
||||
<p>In the source code it is located under <a href='https://gitlab.com/msberends/AMR/blob/master/inst/eucast/eucast_rules.tsv'><code>./inst/eucast/eucast_rules.tsv</code></a>.</p>
|
||||
<p><strong>Note:</strong> When ampicillin (J01CA01) is not available but amoxicillin (J01CA04) is, the latter will be used for all rules where there is a dependency on ampicillin. These drugs are interchangeable when it comes to expression of antimicrobial resistance.</p>
|
||||
|
||||
<h2 class="hasAnchor" id="antibiotics"><a class="anchor" href="#antibiotics"></a>Antibiotics</h2>
|
||||
|
||||
@ -456,6 +461,8 @@
|
||||
|
||||
<li><a href="#value">Value</a></li>
|
||||
|
||||
<li><a href="#details">Details</a></li>
|
||||
|
||||
<li><a href="#antibiotics">Antibiotics</a></li>
|
||||
|
||||
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
|
||||
|
@ -78,7 +78,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.1.9002</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -311,7 +311,7 @@
|
||||
</tr><tr>
|
||||
|
||||
<td>
|
||||
<p><code><a href="eucast_rules.html">eucast_rules()</a></code> <code><a href="eucast_rules.html">EUCAST_rules()</a></code> <code><a href="eucast_rules.html">interpretive_reading()</a></code> </p>
|
||||
<p><code><a href="eucast_rules.html">eucast_rules()</a></code> <code><a href="eucast_rules.html">eucast_rules_file()</a></code> </p>
|
||||
</td>
|
||||
<td><p>EUCAST rules</p></td>
|
||||
</tr><tr>
|
||||
@ -549,7 +549,7 @@
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
<p><code><a href="AMR-deprecated.html">ratio()</a></code> <code><a href="AMR-deprecated.html">guess_mo()</a></code> <code><a href="AMR-deprecated.html">guess_atc()</a></code> <code><a href="AMR-deprecated.html">ab_property()</a></code> <code><a href="AMR-deprecated.html">ab_atc()</a></code> <code><a href="AMR-deprecated.html">ab_official()</a></code> <code><a href="AMR-deprecated.html">ab_name()</a></code> <code><a href="AMR-deprecated.html">ab_trivial_nl()</a></code> <code><a href="AMR-deprecated.html">ab_certe()</a></code> <code><a href="AMR-deprecated.html">ab_umcg()</a></code> <code><a href="AMR-deprecated.html">ab_tradenames()</a></code> <code><a href="AMR-deprecated.html">atc_ddd()</a></code> <code><a href="AMR-deprecated.html">atc_groups()</a></code> </p>
|
||||
<p><code><a href="AMR-deprecated.html">ratio()</a></code> <code><a href="AMR-deprecated.html">ab_property()</a></code> <code><a href="AMR-deprecated.html">ab_atc()</a></code> <code><a href="AMR-deprecated.html">ab_official()</a></code> <code><a href="AMR-deprecated.html">ab_name()</a></code> <code><a href="AMR-deprecated.html">ab_trivial_nl()</a></code> <code><a href="AMR-deprecated.html">ab_certe()</a></code> <code><a href="AMR-deprecated.html">ab_umcg()</a></code> <code><a href="AMR-deprecated.html">ab_tradenames()</a></code> <code><a href="AMR-deprecated.html">atc_ddd()</a></code> <code><a href="AMR-deprecated.html">atc_groups()</a></code> </p>
|
||||
</td>
|
||||
<td><p>Deprecated functions</p></td>
|
||||
</tr>
|
||||
|
@ -80,7 +80,7 @@
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.1.9002</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -245,16 +245,16 @@
|
||||
|
||||
<h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
|
||||
|
||||
<p>A <code><a href='https://www.rdocumentation.org/packages/base/topics/data.frame'>data.frame</a></code> with 16,911 observations and 4 variables:</p><dl class='dl-horizontal'>
|
||||
<dt><code>col_id</code></dt><dd><p>Catalogue of Life ID</p></dd>
|
||||
<dt><code>tsn_new</code></dt><dd><p>New Catalogue of Life ID</p></dd>
|
||||
<dt><code>fullname</code></dt><dd><p>Old taxonomic name of the microorganism</p></dd>
|
||||
<p>A <code><a href='https://www.rdocumentation.org/packages/base/topics/data.frame'>data.frame</a></code> with 21,342 observations and 4 variables:</p><dl class='dl-horizontal'>
|
||||
<dt><code>col_id</code></dt><dd><p>Catalogue of Life ID that was originally given</p></dd>
|
||||
<dt><code>col_id_new</code></dt><dd><p>New Catalogue of Life ID that responds to an entry in the <code><a href='microorganisms.html'>microorganisms</a></code> data set</p></dd>
|
||||
<dt><code>fullname</code></dt><dd><p>Old full taxonomic name of the microorganism</p></dd>
|
||||
<dt><code>ref</code></dt><dd><p>Author(s) and year of concerning scientific publication</p></dd>
|
||||
</dl>
|
||||
|
||||
<h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
|
||||
|
||||
<p>[3] Catalogue of Life: Annual Checklist (public online database), <a href='www.catalogueoflife.org'>www.catalogueoflife.org</a>.</p>
|
||||
<p>Catalogue of Life: Annual Checklist (public online taxonomic database), <a href='www.catalogueoflife.org'>www.catalogueoflife.org</a> (check included annual version with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version</a>()</code>).</p>
|
||||
|
||||
<h2 class="hasAnchor" id="catalogue-of-life"><a class="anchor" href="#catalogue-of-life"></a>Catalogue of Life</h2>
|
||||
|
||||
|
@ -81,7 +81,7 @@ portion_R and portion_IR can be used to calculate resistance, portion_S and port
|
||||
</button>
|
||||
<span class="navbar-brand">
|
||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.0</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.6.1.9002</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -368,14 +368,14 @@ portion_R and portion_IR can be used to calculate resistance, portion_S and port
|
||||
|
||||
<span class='co'># Calculate co-resistance between amoxicillin/clav acid and gentamicin,</span>
|
||||
<span class='co'># so we can see that combination therapy does a lot more than mono therapy:</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span> <span class='fu'>portion_S</span>(<span class='no'>amcl</span>) <span class='co'># S = 67.1%</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span> <span class='fu'><a href='count.html'>count_all</a></span>(<span class='no'>amcl</span>) <span class='co'># n = 1576</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span> <span class='fu'>portion_S</span>(<span class='no'>amcl</span>) <span class='co'># S = 71.4%</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span> <span class='fu'><a href='count.html'>count_all</a></span>(<span class='no'>amcl</span>) <span class='co'># n = 1879</span>
|
||||
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span> <span class='fu'>portion_S</span>(<span class='no'>gent</span>) <span class='co'># S = 74.0%</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span> <span class='fu'><a href='count.html'>count_all</a></span>(<span class='no'>gent</span>) <span class='co'># n = 1855</span>
|
||||
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span> <span class='fu'>portion_S</span>(<span class='no'>amcl</span>, <span class='no'>gent</span>) <span class='co'># S = 92.0%</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span> <span class='fu'><a href='count.html'>count_all</a></span>(<span class='no'>amcl</span>, <span class='no'>gent</span>) <span class='co'># n = 1517</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span> <span class='fu'>portion_S</span>(<span class='no'>amcl</span>, <span class='no'>gent</span>) <span class='co'># S = 92.3%</span>
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span> <span class='fu'><a href='count.html'>count_all</a></span>(<span class='no'>amcl</span>, <span class='no'>gent</span>) <span class='co'># n = 1798</span>
|
||||
|
||||
|
||||
<span class='no'>septic_patients</span> <span class='kw'>%>%</span>
|
||||
|
2
index.md
@ -98,7 +98,7 @@ Included are:
|
||||
|
||||
* All ~2,000 (sub)species from ~100 other relevant genera, from the kingdoms of Animalia and Plantae (like *Strongyloides* and *Taenia*)
|
||||
|
||||
* All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed
|
||||
* All ~21,000 previously accepted names of included (sub)species that have been taxonomically renamed
|
||||
|
||||
* The responsible author(s) and year of scientific publication
|
||||
|
||||
|
182
inst/eucast/eucast_rules.tsv
Normal file
@ -0,0 +1,182 @@
|
||||
if_mo_property like_is_one_of this_value and_these_antibiotics have_these_values then_change_these_antibiotics to_value reference.rule reference.rule_group
|
||||
order is Enterobacteriales ampi S amox S Enterobacteriales (Order) Breakpoints
|
||||
order is Enterobacteriales ampi I amox I Enterobacteriales (Order) Breakpoints
|
||||
order is Enterobacteriales ampi R amox R Enterobacteriales (Order) Breakpoints
|
||||
genus is Staphylococcus peni, cfox S ampi, amox, pipe, tica S Staphylococcus Breakpoints
|
||||
genus is Staphylococcus peni, cfox R, S oxac, clox S Staphylococcus Breakpoints
|
||||
genus is Staphylococcus cfox R all_betalactams R Staphylococcus Breakpoints
|
||||
genus_species is Staphylococcus saprophyticus ampi S amox, amcl, pipe, pita S Staphylococcus Breakpoints
|
||||
genus is Staphylococcus cfox S carbapenems, cephalosporins_without_cfta S Staphylococcus Breakpoints
|
||||
genus is Staphylococcus cfox I carbapenems, cephalosporins_without_cfta I Staphylococcus Breakpoints
|
||||
genus is Staphylococcus cfox R carbapenems, cephalosporins_without_cfta R Staphylococcus Breakpoints
|
||||
genus is Staphylococcus norf S cipr, levo, moxi, oflo S Staphylococcus Breakpoints
|
||||
genus is Staphylococcus eryt S azit, clar, roxi S Staphylococcus Breakpoints
|
||||
genus is Staphylococcus eryt I azit, clar, roxi I Staphylococcus Breakpoints
|
||||
genus is Staphylococcus eryt R azit, clar, roxi R Staphylococcus Breakpoints
|
||||
genus is Staphylococcus tetr S doxy, mino S Staphylococcus Breakpoints
|
||||
genus_species is Enterococcus faecium ampi R all_betalactams R Enterococcus Breakpoints
|
||||
genus is Enterococcus ampi S amox, amcl, pipe, pita S Enterococcus Breakpoints
|
||||
genus is Enterococcus ampi I amox, amcl, pipe, pita I Enterococcus Breakpoints
|
||||
genus is Enterococcus ampi R amox, amcl, pipe, pita R Enterococcus Breakpoints
|
||||
genus is Enterococcus norf S cipr, levo S Enterococcus Breakpoints
|
||||
genus is Enterococcus norf I cipr, levo I Enterococcus Breakpoints
|
||||
genus is Enterococcus norf R cipr, levo R Enterococcus Breakpoints
|
||||
genus_species like ^Streptococcus (pyogenes|agalactiae|dysgalactiae|group A|group B|group C|group G)$ peni S aminopenicillins, ureidopenicillins, cephalosporins, carbapenems, clox, amcl S Streptococcus groups A, B, C, G Breakpoints
|
||||
genus_species like ^Streptococcus (pyogenes|agalactiae|dysgalactiae|group A|group B|group C|group G)$ peni I aminopenicillins, ureidopenicillins, cephalosporins, carbapenems, clox, amcl I Streptococcus groups A, B, C, G Breakpoints
|
||||
genus_species like ^Streptococcus (pyogenes|agalactiae|dysgalactiae|group A|group B|group C|group G)$ peni R aminopenicillins, ureidopenicillins, cephalosporins, carbapenems, clox, amcl R Streptococcus groups A, B, C, G Breakpoints
|
||||
genus_species like ^Streptococcus (pyogenes|agalactiae|dysgalactiae|group A|group B|group C|group G)$ norf S levo, moxi S Streptococcus groups A, B, C, G Breakpoints
|
||||
genus_species like ^Streptococcus (pyogenes|agalactiae|dysgalactiae|group A|group B|group C|group G)$ eryt S azit, clar, roxi S Streptococcus groups A, B, C, G Breakpoints
|
||||
genus_species like ^Streptococcus (pyogenes|agalactiae|dysgalactiae|group A|group B|group C|group G)$ eryt I azit, clar, roxi I Streptococcus groups A, B, C, G Breakpoints
|
||||
genus_species like ^Streptococcus (pyogenes|agalactiae|dysgalactiae|group A|group B|group C|group G)$ eryt R azit, clar, roxi R Streptococcus groups A, B, C, G Breakpoints
|
||||
genus_species like ^Streptococcus (pyogenes|agalactiae|dysgalactiae|group A|group B|group C|group G)$ tetr S doxy, mino S Streptococcus groups A, B, C, G Breakpoints
|
||||
genus_species is Streptococcus pneumoniae peni S ampi, amox, amcl, pipe, pita S Streptococcus pneumoniae Breakpoints
|
||||
genus_species is Streptococcus pneumoniae ampi S amox, amcl, pipe, pita S Streptococcus pneumoniae Breakpoints
|
||||
genus_species is Streptococcus pneumoniae ampi I amox, amcl, pipe, pita I Streptococcus pneumoniae Breakpoints
|
||||
genus_species is Streptococcus pneumoniae ampi R amox, amcl, pipe, pita R Streptococcus pneumoniae Breakpoints
|
||||
genus_species is Streptococcus pneumoniae norf S levo, moxi S Streptococcus pneumoniae Breakpoints
|
||||
genus_species is Streptococcus pneumoniae eryt S azit, clar, roxi S Streptococcus pneumoniae Breakpoints
|
||||
genus_species is Streptococcus pneumoniae eryt I azit, clar, roxi I Streptococcus pneumoniae Breakpoints
|
||||
genus_species is Streptococcus pneumoniae eryt R azit, clar, roxi R Streptococcus pneumoniae Breakpoints
|
||||
genus_species is Streptococcus pneumoniae tetr S doxy, mino S Streptococcus pneumoniae Breakpoints
|
||||
genus_species like ^Streptococcus (australis|bovis|constellatus|cristatus|gallolyticus|gordonii|infantarius|infantis|mitis|mutans|oligofermentans|oralis|peroris|pseudopneumoniae|salivarius|sinensis|sobrinus|thermophilus|vestibularis|anginosus|equinus|intermedius|parasanguinis|sanguinis)$ peni S ampi, amox, amcl, pipe, pita S Viridans group streptococci Breakpoints
|
||||
genus_species like ^Streptococcus (australis|bovis|constellatus|cristatus|gallolyticus|gordonii|infantarius|infantis|mitis|mutans|oligofermentans|oralis|peroris|pseudopneumoniae|salivarius|sinensis|sobrinus|thermophilus|vestibularis|anginosus|equinus|intermedius|parasanguinis|sanguinis)$ ampi S amox, amcl, pipe, pita S Viridans group streptococci Breakpoints
|
||||
genus_species like ^Streptococcus (australis|bovis|constellatus|cristatus|gallolyticus|gordonii|infantarius|infantis|mitis|mutans|oligofermentans|oralis|peroris|pseudopneumoniae|salivarius|sinensis|sobrinus|thermophilus|vestibularis|anginosus|equinus|intermedius|parasanguinis|sanguinis)$ ampi I amox, amcl, pipe, pita I Viridans group streptococci Breakpoints
|
||||
genus_species like ^Streptococcus (australis|bovis|constellatus|cristatus|gallolyticus|gordonii|infantarius|infantis|mitis|mutans|oligofermentans|oralis|peroris|pseudopneumoniae|salivarius|sinensis|sobrinus|thermophilus|vestibularis|anginosus|equinus|intermedius|parasanguinis|sanguinis)$ ampi R amox, amcl, pipe, pita R Viridans group streptococci Breakpoints
|
||||
genus_species is Haemophilus influenzae ampi S amox, pipe S Haemophilus influenzae Breakpoints
|
||||
genus_species is ^Haemophilus influenzae ampi I amox, pipe I Haemophilus influenzae Breakpoints
|
||||
genus_species is Haemophilus influenzae ampi R amox, pipe R Haemophilus influenzae Breakpoints
|
||||
genus_species is Haemophilus influenzae peni S ampi, amox, amcl, pipe, pita S Haemophilus influenzae Breakpoints
|
||||
genus_species is Haemophilus influenzae amcl S pita S Haemophilus influenzae Breakpoints
|
||||
genus_species is Haemophilus influenzae amcl I pita I Haemophilus influenzae Breakpoints
|
||||
genus_species is Haemophilus influenzae amcl R pita R Haemophilus influenzae Breakpoints
|
||||
genus_species is Haemophilus influenzae nali S cipr, levo, moxi, oflo S Haemophilus influenzae Breakpoints
|
||||
genus_species is Haemophilus influenzae tetr S doxy, mino S Haemophilus influenzae Breakpoints
|
||||
genus_species is Moraxella catarrhalis amcl S pita S Moraxella catarrhalis Breakpoints
|
||||
genus_species is Moraxella catarrhalis amcl I pita I Moraxella catarrhalis Breakpoints
|
||||
genus_species is Moraxella catarrhalis amcl R pita R Moraxella catarrhalis Breakpoints
|
||||
genus_species is Moraxella catarrhalis nali S cipr, levo, moxi, oflo S Moraxella catarrhalis Breakpoints
|
||||
genus_species is Moraxella catarrhalis eryt S azit, clar, roxi S Moraxella catarrhalis Breakpoints
|
||||
genus_species is Moraxella catarrhalis eryt I azit, clar, roxi I Moraxella catarrhalis Breakpoints
|
||||
genus_species is Moraxella catarrhalis eryt R azit, clar, roxi R Moraxella catarrhalis Breakpoints
|
||||
genus_species is Moraxella catarrhalis tetr S doxy, mino S Moraxella catarrhalis Breakpoints
|
||||
genus one_of Actinomyces, Bifidobacterium, Clostridium, Cutibacterium, Eggerthella, Eubacterium, Lactobacillus , Propionibacterium peni S ampi, amox, pipe, pita, tica S Anaerobic Gram positives Breakpoints
|
||||
genus one_of Actinomyces, Bifidobacterium, Clostridium, Cutibacterium, Eggerthella, Eubacterium, Lactobacillus , Propionibacterium peni I ampi, amox, pipe, pita, tica I Anaerobic Gram positives Breakpoints
|
||||
genus one_of Actinomyces, Bifidobacterium, Clostridium, Cutibacterium, Eggerthella, Eubacterium, Lactobacillus , Propionibacterium peni R ampi, amox, pipe, pita, tica R Anaerobic Gram positives Breakpoints
|
||||
genus one_of Bacteroides, Bilophila , Fusobacterium, Mobiluncus, Porphyromonas, Prevotella peni S ampi, amox, pipe, pita, tica S Anaerobic Gram negatives Breakpoints
|
||||
genus one_of Bacteroides, Bilophila , Fusobacterium, Mobiluncus, Porphyromonas, Prevotella peni I ampi, amox, pipe, pita, tica I Anaerobic Gram negatives Breakpoints
|
||||
genus one_of Bacteroides, Bilophila , Fusobacterium, Mobiluncus, Porphyromonas, Prevotella peni R ampi, amox, pipe, pita, tica R Anaerobic Gram negatives Breakpoints
|
||||
genus_species is Pasteurella multocida peni S ampi, amox S Pasteurella multocida Breakpoints
|
||||
genus_species is Pasteurella multocida peni I ampi, amox I Pasteurella multocida Breakpoints
|
||||
genus_species is Pasteurella multocida peni R ampi, amox R Pasteurella multocida Breakpoints
|
||||
genus_species is Campylobacter coli eryt S azit, clar S Campylobacter coli Breakpoints
|
||||
genus_species is Campylobacter coli eryt I azit, clar I Campylobacter coli Breakpoints
|
||||
genus_species is Campylobacter coli eryt R azit, clar R Campylobacter coli Breakpoints
|
||||
genus_species is Campylobacter coli tetr S doxy S Campylobacter coli Breakpoints
|
||||
genus_species is Campylobacter coli tetr I doxy I Campylobacter coli Breakpoints
|
||||
genus_species is Campylobacter coli tetr R doxy R Campylobacter coli Breakpoints
|
||||
genus_species is Campylobacter jejuni eryt S azit, clar S Campylobacter jejuni Breakpoints
|
||||
genus_species is Campylobacter jejuni eryt I azit, clar I Campylobacter jejuni Breakpoints
|
||||
genus_species is Campylobacter jejuni eryt R azit, clar R Campylobacter jejuni Breakpoints
|
||||
genus_species is Campylobacter jejuni tetr S doxy S Campylobacter jejuni Breakpoints
|
||||
genus_species is Campylobacter jejuni tetr I doxy I Campylobacter jejuni Breakpoints
|
||||
genus_species is Campylobacter jejuni tetr R doxy R Campylobacter jejuni Breakpoints
|
||||
genus_species is Aerococcus sanguinicola norf S fluoroquinolones S Aerococcus sanguinicola Breakpoints
|
||||
genus_species is Aerococcus sanguinicola norf I fluoroquinolones I Aerococcus sanguinicola Breakpoints
|
||||
genus_species is Aerococcus sanguinicola norf R fluoroquinolones R Aerococcus sanguinicola Breakpoints
|
||||
genus_species is Aerococcus sanguinicola cipr S levo S Aerococcus sanguinicola Breakpoints
|
||||
genus_species is Aerococcus sanguinicola cipr I levo I Aerococcus sanguinicola Breakpoints
|
||||
genus_species is Aerococcus sanguinicola cipr R levo R Aerococcus urinae Breakpoints
|
||||
genus_species is Aerococcus urinae norf S fluoroquinolones S Aerococcus urinae Breakpoints
|
||||
genus_species is Aerococcus urinae norf I fluoroquinolones I Aerococcus urinae Breakpoints
|
||||
genus_species is Aerococcus urinae norf R fluoroquinolones R Aerococcus urinae Breakpoints
|
||||
genus_species is Aerococcus urinae cipr S levo S Aerococcus urinae Breakpoints
|
||||
genus_species is Aerococcus urinae cipr I levo I Aerococcus urinae Breakpoints
|
||||
genus_species is Aerococcus urinae cipr R levo R Aerococcus urinae Breakpoints
|
||||
genus_species is Kingella kingae peni S ampi, amox S Kingella kingae Breakpoints
|
||||
genus_species is Kingella kingae peni I ampi, amox I Kingella kingae Breakpoints
|
||||
genus_species is Kingella kingae peni R ampi, amox R Kingella kingae Breakpoints
|
||||
genus_species is Kingella kingae eryt S azit, clar S Kingella kingae Breakpoints
|
||||
genus_species is Kingella kingae eryt I azit, clar I Kingella kingae Breakpoints
|
||||
genus_species is Kingella kingae eryt R azit, clar R Kingella kingae Breakpoints
|
||||
genus_species is Kingella kingae tetr S doxy S Kingella kingae Breakpoints
|
||||
family is Enterobacteriaceae peni, glycopeptides, fusi, macrolides, linc, streptogramins, rifa, dapt, line R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
|
||||
fullname like ^Citrobacter (koseri|amalonaticus|sedlakii|farmeri|rodentium) aminopenicillins, tica R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
|
||||
fullname like ^Citrobacter (freundii|braakii|murliniae|werkmanii|youngae) aminopenicillins, amcl, czol, cfox R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
|
||||
genus_species is Enterobacter cloacae aminopenicillins, amcl, czol, cfox R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
|
||||
genus_species is Enterobacter aerogenes aminopenicillins, amcl, czol, cfox R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
|
||||
genus_species is Escherichia hermanni aminopenicillins, tica R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
|
||||
genus_species is Hafnia alvei aminopenicillins, amcl, czol, cfox R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
|
||||
genus is Klebsiella aminopenicillins, tica R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
|
||||
genus_species is Morganella morganii aminopenicillins, amcl, czol, tetracyclines, polymyxins, nitr R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
|
||||
genus_species is Proteus mirabilis tetracyclines, tige, polymyxins, nitr R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
|
||||
genus_species is Proteus penneri aminopenicillins, czol, cfur, tetracyclines, tige, polymyxins, nitr R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
|
||||
genus_species is Proteus vulgaris aminopenicillins, czol, cfur, tetracyclines, tige, polymyxins, nitr R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
|
||||
genus_species is Providencia rettgeri aminopenicillins, amcl, czol, cfur, tetracyclines, tige, polymyxins, nitr R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
|
||||
genus_species is Providencia stuartii aminopenicillins, amcl, czol, cfur, tetracyclines, tige, polymyxins, nitr R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
|
||||
genus is Raoultella aminopenicillins, tica R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
|
||||
genus_species is Serratia marcescens aminopenicillins, amcl, czol, cfox, cfur, tetracyclines[tetracyclines != na.rm(mino)], polymyxins, nitr R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
|
||||
genus_species is Yersinia enterocolitica aminopenicillins, amcl, tica, czol, cfox R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
|
||||
genus_species is Yersinia pseudotuberculosis poly, coli R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
|
||||
genus one_of Achromobacter, Acinetobacter, Alcaligenes, Bordatella, Burkholderia, Elizabethkingia, Flavobacterium, Ochrobactrum, Pseudomonas, Stenotrophomonas peni, cfox, cfur, glycopeptides, fusi, macrolides, linc, streptogramins, rifa, dapt, line R Table 02: Intrinsic resistance in non-fermentative Gram-negative bacteria Expert Rules
|
||||
genus_species is Acinetobacter baumannii aminopenicillins, amcl, czol, cfot, cftr, aztr, erta, trim, fosf, doxy, tetr R Table 02: Intrinsic resistance in non-fermentative Gram-negative bacteria Expert Rules
|
||||
genus_species is Acinetobacter pittii aminopenicillins, amcl, czol, cfot, cftr, aztr, erta, trim, fosf, doxy, tetr R Table 02: Intrinsic resistance in non-fermentative Gram-negative bacteria Expert Rules
|
||||
genus_species is Acinetobacter nosocomialis aminopenicillins, amcl, czol, cfot, cftr, aztr, erta, trim, fosf, doxy, tetr R Table 02: Intrinsic resistance in non-fermentative Gram-negative bacteria Expert Rules
|
||||
genus_species is Acinetobacter calcoaceticus aminopenicillins, amcl, czol, cfot, cftr, aztr, erta, trim, fosf, doxy, tetr R Table 02: Intrinsic resistance in non-fermentative Gram-negative bacteria Expert Rules
|
||||
genus_species is Achromobacter xylosoxidans aminopenicillins, czol, cfot, cftr, erta R Table 02: Intrinsic resistance in non-fermentative Gram-negative bacteria Expert Rules
|
||||
fullname like ^Burkholderia (cepacia|multivorans|cenocepacia|stabilis|vietnamiensis|dolosa|ambifaria|anthina|pyrrocinia|ubonensis) aminopenicillins, amcl, tica, pipe, pita, czol, cfot, cftr, aztr, erta, cipr, chlo, aminoglycosides, trim, fosf, polymyxins R Table 02: Intrinsic resistance in non-fermentative Gram-negative bacteria Expert Rules
|
||||
genus_species is Elizabethkingia meningoseptica aminopenicillins, amcl, tica, czol, cfot, cftr, cfta, cfep, aztr, erta, imip, mero, polymyxins R Table 02: Intrinsic resistance in non-fermentative Gram-negative bacteria Expert Rules
|
||||
genus_species is Ochrobactrum anthropi aminopenicillins, amcl, tica, pipe, pita, czol, cfot, cftr, cfta, cfep, aztr, erta R Table 02: Intrinsic resistance in non-fermentative Gram-negative bacteria Expert Rules
|
||||
genus_species is Pseudomonas aeruginosa aminopenicillins, amcl, czol, cfot, cftr, erta, chlo, kana, neom, trim, trsu, tetracyclines, tige R Table 02: Intrinsic resistance in non-fermentative Gram-negative bacteria Expert Rules
|
||||
genus_species is Stenotrophomonas maltophilia aminopenicillins, amcl, tica, pipe, pita, czol, cfot, cftr, cfta, aztr, erta, imip, mero, aminoglycosides, trim, fosf, tetr R Table 02: Intrinsic resistance in non-fermentative Gram-negative bacteria Expert Rules
|
||||
genus one_of Haemophilus, Moraxella, Neisseria, Campylobacter glycopeptides, linc, dapt, line R Table 03: Intrinsic resistance in other Gram-negative bacteria Expert Rules
|
||||
genus_species is Haemophilus influenzae fusi, streptogramins R Table 03: Intrinsic resistance in other Gram-negative bacteria Expert Rules
|
||||
genus_species is Moraxella catarrhalis trim R Table 03: Intrinsic resistance in other Gram-negative bacteria Expert Rules
|
||||
genus is Neisseria trim R Table 03: Intrinsic resistance in other Gram-negative bacteria Expert Rules
|
||||
genus_species is Campylobacter fetus fusi, streptogramins, trim, nali R Table 03: Intrinsic resistance in other Gram-negative bacteria Expert Rules
|
||||
genus_species is Campylobacter jejuni fusi, streptogramins, trim R Table 03: Intrinsic resistance in other Gram-negative bacteria Expert Rules
|
||||
genus_species is Campylobacter coli fusi, streptogramins, trim R Table 03: Intrinsic resistance in other Gram-negative bacteria Expert Rules
|
||||
gramstain is Gram positive aztr, polymyxins, nali R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
|
||||
genus_species is Staphylococcus saprophyticus fusi, cfta, fosf, novo R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
|
||||
genus_species is Staphylococcus cohnii cfta, novo R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
|
||||
genus_species is Staphylococcus xylosus cfta, novo R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
|
||||
genus_species is Staphylococcus capitis cfta, fosf R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
|
||||
genus_species is Staphylococcus aureus cfta R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
|
||||
genus_species is Staphylococcus epidermidis cfta R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
|
||||
genus_species is Staphylococcus coagulase-negative cfta R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
|
||||
genus_species is Staphylococcus hominis cfta R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
|
||||
genus_species is Staphylococcus haemolyticus cfta R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
|
||||
genus_species is Staphylococcus intermedius cfta R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
|
||||
genus_species is Staphylococcus pseudintermedius cfta R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
|
||||
genus is Streptococcus fusi, aminoglycosides R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
|
||||
genus_species is Enterococcus faecalis fusi, cfta, cephalosporins_without_cfta, aminoglycosides, macrolides, clin, qida, trim, trsu R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
|
||||
genus_species is Enterococcus gallinarum fusi, cfta, cephalosporins_without_cfta, aminoglycosides, macrolides, clin, qida, vanc, trim, trsu R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
|
||||
genus_species is Enterococcus casseliflavus fusi, cfta, cephalosporins_without_cfta, aminoglycosides, macrolides, clin, qida, vanc, trim, trsu R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
|
||||
genus_species is Enterococcus faecium fusi, cfta, cephalosporins_without_cfta, aminoglycosides, macrolides, trim, trsu R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
|
||||
genus is Corynebacterium fosf R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
|
||||
genus_species is Listeria monocytogenes cephalosporins R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
|
||||
genus is Leuconostoc, Pediococcus glycopeptides R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
|
||||
genus is Lactobacillus glycopeptides R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
|
||||
genus_species is Clostridium ramosum vanc R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
|
||||
genus_species is Clostridium innocuum vanc R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
|
||||
genus_species like ^Streptococcus (pyogenes|agalactiae|dysgalactiae|group A|group B|group C|group G) peni S aminopenicillins, cephalosporins, carbapenems S Table 08: Interpretive rules for B-lactam agents and Gram-positive cocci Expert Rules
|
||||
genus is Enterococcus ampi R ureidopenicillins, carbapenems R Table 08: Interpretive rules for B-lactam agents and Gram-positive cocci Expert Rules
|
||||
genus is Enterococcus amox R ureidopenicillins, carbapenems R Table 08: Interpretive rules for B-lactam agents and Gram-positive cocci Expert Rules
|
||||
family is Enterobacteriaceae tica, pipe R, S pipe R Table 09: Interpretive rules for B-lactam agents and Gram-negative rods Expert Rules
|
||||
genus is .* eryt S azit, clar S Table 11: Interpretive rules for macrolides, lincosamides, and streptogramins Expert Rules
|
||||
genus is .* eryt I azit, clar I Table 11: Interpretive rules for macrolides, lincosamides, and streptogramins Expert Rules
|
||||
genus is .* eryt R azit, clar R Table 11: Interpretive rules for macrolides, lincosamides, and streptogramins Expert Rules
|
||||
genus is Staphylococcus tobr R kana, amik R Table 12: Interpretive rules for aminoglycosides Expert Rules
|
||||
genus is Staphylococcus gent R aminoglycosides R Table 12: Interpretive rules for aminoglycosides Expert Rules
|
||||
family is Enterobacteriaceae gent, tobr I, S gent R Table 12: Interpretive rules for aminoglycosides Expert Rules
|
||||
family is Enterobacteriaceae gent, tobr R, I tobr R Table 12: Interpretive rules for aminoglycosides Expert Rules
|
||||
genus is Staphylococcus moxi R fluoroquinolones R Table 13: Interpretive rules for quinolones Expert Rules
|
||||
genus_species is Streptococcus pneumoniae moxi R fluoroquinolones R Table 13: Interpretive rules for quinolones Expert Rules
|
||||
family is Enterobacteriaceae cipr R fluoroquinolones R Table 13: Interpretive rules for quinolones Expert Rules
|
||||
genus_species is Neisseria gonorrhoeae cipr R fluoroquinolones R Table 13: Interpretive rules for quinolones Expert Rules
|
||||
genus is .* amcl R ampi, amox R Non-EUCAST: ampicillin = R where amoxicillin/clav acid = R Other rules
|
||||
genus is .* pita R pipe R Non-EUCAST: piperacillin = R where piperacillin/tazobactam = R Other rules
|
||||
genus is .* trsu R trim R Non-EUCAST: trimethoprim = R where trimethoprim/sulfa = R Other rules
|
||||
genus is .* ampi S amcl S Non-EUCAST: amoxicillin/clav acid = S where ampicillin = S Other rules
|
||||
genus is .* amox S amcl S Non-EUCAST: amoxicillin/clav acid = S where ampicillin = S Other rules
|
||||
genus is .* pipe S pita S Non-EUCAST: piperacillin/tazobactam = S where piperacillin = S Other rules
|
||||
genus is .* trim S trsu S Non-EUCAST: trimethoprim/sulfa = S where trimethoprim = S Other rules
|
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
Name: Insert %in%
|
||||
|
@ -3,8 +3,6 @@
|
||||
\name{AMR-deprecated}
|
||||
\alias{AMR-deprecated}
|
||||
\alias{ratio}
|
||||
\alias{guess_mo}
|
||||
\alias{guess_atc}
|
||||
\alias{ab_property}
|
||||
\alias{ab_atc}
|
||||
\alias{ab_official}
|
||||
@ -19,10 +17,6 @@
|
||||
\usage{
|
||||
ratio(x, ratio)
|
||||
|
||||
guess_mo(...)
|
||||
|
||||
guess_atc(...)
|
||||
|
||||
ab_property(...)
|
||||
|
||||
ab_atc(...)
|
||||
|
@ -21,7 +21,7 @@ Included are:
|
||||
\item{All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria and Protozoa}
|
||||
\item{All ~3,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of \emph{Aspergillus}, \emph{Candida}, \emph{Cryptococcus}, \emph{Histplasma}, \emph{Pneumocystis}, \emph{Saccharomyces} and \emph{Trichophyton}).}
|
||||
\item{All ~2,000 (sub)species from ~100 other relevant genera, from the kingdoms of Animalia and Plantae (like \emph{Strongyloides} and \emph{Taenia})}
|
||||
\item{All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed}
|
||||
\item{All ~21,000 previously accepted names of included (sub)species that have been taxonomically renamed}
|
||||
\item{The complete taxonomic tree of all included (sub)species: from kingdom to subspecies}
|
||||
\item{The responsible author(s) and year of scientific publication}
|
||||
}
|
||||
|
@ -98,15 +98,15 @@ septic_patients \%>\%
|
||||
# Count co-resistance between amoxicillin/clav acid and gentamicin,
|
||||
# so we can see that combination therapy does a lot more than mono therapy.
|
||||
# Please mind that `portion_S` calculates percentages right away instead.
|
||||
count_S(septic_patients$amcl) # S = 1057 (67.1\%)
|
||||
count_all(septic_patients$amcl) # n = 1576
|
||||
count_S(septic_patients$amcl) # S = 1342 (71.4\%)
|
||||
count_all(septic_patients$amcl) # n = 1879
|
||||
|
||||
count_S(septic_patients$gent) # S = 1372 (74.0\%)
|
||||
count_all(septic_patients$gent) # n = 1855
|
||||
|
||||
with(septic_patients,
|
||||
count_S(amcl, gent)) # S = 1396 (92.0\%)
|
||||
with(septic_patients, # n = 1517
|
||||
count_S(amcl, gent)) # S = 1660 (92.3\%)
|
||||
with(septic_patients, # n = 1798
|
||||
n_rsi(amcl, gent))
|
||||
|
||||
# Get portions S/I/R immediately of all rsi columns
|
||||
|
@ -2,8 +2,7 @@
|
||||
% Please edit documentation in R/eucast_rules.R
|
||||
\name{eucast_rules}
|
||||
\alias{eucast_rules}
|
||||
\alias{EUCAST_rules}
|
||||
\alias{interpretive_reading}
|
||||
\alias{eucast_rules_file}
|
||||
\title{EUCAST rules}
|
||||
\source{
|
||||
\itemize{
|
||||
@ -21,49 +20,48 @@
|
||||
\url{http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_9.0_Breakpoint_Tables.xlsx}
|
||||
}
|
||||
}
|
||||
|
||||
For editing the reference file (which is available with \code{\link{eucast_rules_file}}), these values can all be used for target antibiotics: aminoglycosides, tetracyclines, polymyxins, macrolides, glycopeptides, streptogramins, cephalosporins, cephalosporins_without_cfta, carbapenems, aminopenicillins, ureidopenicillins, fluoroquinolones, all_betalactams, and all separate four letter codes like amcl. They can be separated by comma: \code{"amcl, fluoroquinolones"}. The mo_property can be any column name from the \code{\link{microorganisms}} data set, or \code{genus_species} or \code{gramstain}. This file contains references to the 'Burkholderia cepacia complex'. The species in this group can be found in: LiPuma JJ, 2015 (PMID 16217180).
|
||||
}
|
||||
\usage{
|
||||
eucast_rules(tbl, col_mo = NULL, info = TRUE,
|
||||
rules = c("breakpoints", "expert", "other", "all"), verbose = FALSE,
|
||||
amcl = guess_ab_col(), amik = guess_ab_col(),
|
||||
amox = guess_ab_col(), ampi = guess_ab_col(),
|
||||
azit = guess_ab_col(), azlo = guess_ab_col(),
|
||||
aztr = guess_ab_col(), cefa = guess_ab_col(),
|
||||
cfep = guess_ab_col(), cfot = guess_ab_col(),
|
||||
cfox = guess_ab_col(), cfra = guess_ab_col(),
|
||||
cfta = guess_ab_col(), cftr = guess_ab_col(),
|
||||
cfur = guess_ab_col(), chlo = guess_ab_col(),
|
||||
cipr = guess_ab_col(), clar = guess_ab_col(),
|
||||
clin = guess_ab_col(), clox = guess_ab_col(),
|
||||
coli = guess_ab_col(), czol = guess_ab_col(),
|
||||
dapt = guess_ab_col(), doxy = guess_ab_col(),
|
||||
erta = guess_ab_col(), eryt = guess_ab_col(),
|
||||
fosf = guess_ab_col(), fusi = guess_ab_col(),
|
||||
gent = guess_ab_col(), imip = guess_ab_col(),
|
||||
kana = guess_ab_col(), levo = guess_ab_col(),
|
||||
linc = guess_ab_col(), line = guess_ab_col(),
|
||||
mero = guess_ab_col(), mezl = guess_ab_col(),
|
||||
mino = guess_ab_col(), moxi = guess_ab_col(),
|
||||
nali = guess_ab_col(), neom = guess_ab_col(),
|
||||
neti = guess_ab_col(), nitr = guess_ab_col(),
|
||||
norf = guess_ab_col(), novo = guess_ab_col(),
|
||||
oflo = guess_ab_col(), oxac = guess_ab_col(),
|
||||
peni = guess_ab_col(), pipe = guess_ab_col(),
|
||||
pita = guess_ab_col(), poly = guess_ab_col(),
|
||||
pris = guess_ab_col(), qida = guess_ab_col(),
|
||||
rifa = guess_ab_col(), roxi = guess_ab_col(),
|
||||
siso = guess_ab_col(), teic = guess_ab_col(),
|
||||
tetr = guess_ab_col(), tica = guess_ab_col(),
|
||||
tige = guess_ab_col(), tobr = guess_ab_col(),
|
||||
trim = guess_ab_col(), trsu = guess_ab_col(),
|
||||
vanc = guess_ab_col())
|
||||
eucast_rules(x, col_mo = NULL, info = TRUE, rules = c("breakpoints",
|
||||
"expert", "other", "all"), verbose = FALSE, amcl = guess_ab_col(),
|
||||
amik = guess_ab_col(), amox = guess_ab_col(),
|
||||
ampi = guess_ab_col(), azit = guess_ab_col(),
|
||||
azlo = guess_ab_col(), aztr = guess_ab_col(),
|
||||
cefa = guess_ab_col(), cfep = guess_ab_col(),
|
||||
cfot = guess_ab_col(), cfox = guess_ab_col(),
|
||||
cfra = guess_ab_col(), cfta = guess_ab_col(),
|
||||
cftr = guess_ab_col(), cfur = guess_ab_col(),
|
||||
chlo = guess_ab_col(), cipr = guess_ab_col(),
|
||||
clar = guess_ab_col(), clin = guess_ab_col(),
|
||||
clox = guess_ab_col(), coli = guess_ab_col(),
|
||||
czol = guess_ab_col(), dapt = guess_ab_col(),
|
||||
doxy = guess_ab_col(), erta = guess_ab_col(),
|
||||
eryt = guess_ab_col(), fosf = guess_ab_col(),
|
||||
fusi = guess_ab_col(), gent = guess_ab_col(),
|
||||
imip = guess_ab_col(), kana = guess_ab_col(),
|
||||
levo = guess_ab_col(), linc = guess_ab_col(),
|
||||
line = guess_ab_col(), mero = guess_ab_col(),
|
||||
mezl = guess_ab_col(), mino = guess_ab_col(),
|
||||
moxi = guess_ab_col(), nali = guess_ab_col(),
|
||||
neom = guess_ab_col(), neti = guess_ab_col(),
|
||||
nitr = guess_ab_col(), norf = guess_ab_col(),
|
||||
novo = guess_ab_col(), oflo = guess_ab_col(),
|
||||
oxac = guess_ab_col(), peni = guess_ab_col(),
|
||||
pipe = guess_ab_col(), pita = guess_ab_col(),
|
||||
poly = guess_ab_col(), pris = guess_ab_col(),
|
||||
qida = guess_ab_col(), rifa = guess_ab_col(),
|
||||
roxi = guess_ab_col(), siso = guess_ab_col(),
|
||||
teic = guess_ab_col(), tetr = guess_ab_col(),
|
||||
tica = guess_ab_col(), tige = guess_ab_col(),
|
||||
tobr = guess_ab_col(), trim = guess_ab_col(),
|
||||
trsu = guess_ab_col(), vanc = guess_ab_col(), ...)
|
||||
|
||||
EUCAST_rules(...)
|
||||
|
||||
interpretive_reading(...)
|
||||
eucast_rules_file()
|
||||
}
|
||||
\arguments{
|
||||
\item{tbl}{table with antibiotic columns, like e.g. \code{amox} and \code{amcl}}
|
||||
\item{x}{data with antibiotic columns, like e.g. \code{amox} and \code{amcl}}
|
||||
|
||||
\item{col_mo}{column name of the unique IDs of the microorganisms (see \code{\link{mo}}), defaults to the first column of class \code{mo}. Values will be coerced using \code{\link{as.mo}}.}
|
||||
|
||||
@ -78,11 +76,19 @@ interpretive_reading(...)
|
||||
\item{...}{parameters that are passed on to \code{eucast_rules}}
|
||||
}
|
||||
\value{
|
||||
The input of \code{tbl}, possibly with edited values of antibiotics. Or, if \code{verbose = TRUE}, a \code{data.frame} with all original and new values of the affected bug-drug combinations.
|
||||
The input of \code{tbl_}, possibly with edited values of antibiotics. Or, if \code{verbose = TRUE}, a \code{data.frame} with all original and new values of the affected bug-drug combinations.
|
||||
}
|
||||
\description{
|
||||
Apply susceptibility rules as defined by the European Committee on Antimicrobial Susceptibility Testing (EUCAST, \url{http://eucast.org}), see \emph{Source}. This includes (1) expert rules, (2) intrinsic resistance and (3) inferred resistance as defined in their breakpoint tables.
|
||||
}
|
||||
\details{
|
||||
The file used for applying all EUCAST rules can be retrieved with \code{\link{eucast_rules_file}()}. It returns an easily readable data set containing all rules. The original TSV file (tab separated file) that is being read by this function can be found when running this command: \cr
|
||||
\code{AMR::EUCAST_RULES_FILE_LOCATION} (without brackets).
|
||||
|
||||
In the source code it is located under \href{https://gitlab.com/msberends/AMR/blob/master/inst/eucast/eucast_rules.tsv}{\code{./inst/eucast/eucast_rules.tsv}}.
|
||||
|
||||
\strong{Note:} When ampicillin (J01CA01) is not available but amoxicillin (J01CA04) is, the latter will be used for all rules where there is a dependency on ampicillin. These drugs are interchangeable when it comes to expression of antimicrobial resistance.
|
||||
}
|
||||
\section{Antibiotics}{
|
||||
|
||||
To define antibiotics column names, leave as it is to determine it automatically with \code{\link{guess_ab_col}} or input a text (case-insensitive) or use \code{NULL} to skip a column (e.g. \code{tica = NULL}). Non-existing columns will anyway be skipped with a warning.
|
||||
|
@ -4,15 +4,15 @@
|
||||
\name{microorganisms.old}
|
||||
\alias{microorganisms.old}
|
||||
\title{Data set with previously accepted taxonomic names}
|
||||
\format{A \code{\link{data.frame}} with 16,911 observations and 4 variables:
|
||||
\format{A \code{\link{data.frame}} with 21,342 observations and 4 variables:
|
||||
\describe{
|
||||
\item{\code{col_id}}{Catalogue of Life ID}
|
||||
\item{\code{tsn_new}}{New Catalogue of Life ID}
|
||||
\item{\code{fullname}}{Old taxonomic name of the microorganism}
|
||||
\item{\code{col_id}}{Catalogue of Life ID that was originally given}
|
||||
\item{\code{col_id_new}}{New Catalogue of Life ID that responds to an entry in the \code{\link{microorganisms}} data set}
|
||||
\item{\code{fullname}}{Old full taxonomic name of the microorganism}
|
||||
\item{\code{ref}}{Author(s) and year of concerning scientific publication}
|
||||
}}
|
||||
\source{
|
||||
[3] Catalogue of Life: Annual Checklist (public online database), \url{www.catalogueoflife.org}.
|
||||
Catalogue of Life: Annual Checklist (public online taxonomic database), \url{www.catalogueoflife.org} (check included annual version with \code{\link{catalogue_of_life_version}()}).
|
||||
}
|
||||
\usage{
|
||||
microorganisms.old
|
||||
|
@ -119,14 +119,14 @@ septic_patients \%>\%
|
||||
|
||||
# Calculate co-resistance between amoxicillin/clav acid and gentamicin,
|
||||
# so we can see that combination therapy does a lot more than mono therapy:
|
||||
septic_patients \%>\% portion_S(amcl) # S = 67.1\%
|
||||
septic_patients \%>\% count_all(amcl) # n = 1576
|
||||
septic_patients \%>\% portion_S(amcl) # S = 71.4\%
|
||||
septic_patients \%>\% count_all(amcl) # n = 1879
|
||||
|
||||
septic_patients \%>\% portion_S(gent) # S = 74.0\%
|
||||
septic_patients \%>\% count_all(gent) # n = 1855
|
||||
|
||||
septic_patients \%>\% portion_S(amcl, gent) # S = 92.0\%
|
||||
septic_patients \%>\% count_all(amcl, gent) # n = 1517
|
||||
septic_patients \%>\% portion_S(amcl, gent) # S = 92.3\%
|
||||
septic_patients \%>\% count_all(amcl, gent) # n = 1798
|
||||
|
||||
|
||||
septic_patients \%>\%
|
||||
|
@ -94,8 +94,8 @@ rm(ref_taxonomy)
|
||||
MOs <- data_total %>%
|
||||
filter(
|
||||
(
|
||||
# we only want all microorganisms and viruses
|
||||
!kingdom %in% c("Animalia", "Plantae")
|
||||
# we only want all MICROorganisms and no viruses
|
||||
!kingdom %in% c("Animalia", "Plantae", "Viruses")
|
||||
# and no entries above genus level - all species already have a taxonomic tree
|
||||
& !rank %in% c("kingdom", "phylum", "superfamily", "class", "order", "family")
|
||||
# and not all fungi: Aspergillus, Candida, Trichphyton and Pneumocystis are the most important,
|
||||
@ -115,7 +115,15 @@ MOs <- data_total %>%
|
||||
"Salinococcus", "Sanguibacteroides", "Schistosoma", "Scopulariopsis", "Scytalidium", "Sporobolomyces", "Stomatococcus",
|
||||
"Strongyloides", "Syncephalastraceae", "Taenia", "Torulopsis", "Trichinella", "Trichobilharzia", "Trichomonas",
|
||||
"Trichosporon", "Trichuris", "Trypanosoma", "Wuchereria")
|
||||
) %>%
|
||||
# or the taxonomic entry is old - the species was renamed
|
||||
| !is.na(col_id_new)
|
||||
)
|
||||
|
||||
# filter old taxonomic names so only the ones with an existing reference will be kept
|
||||
MOs <- MOs %>%
|
||||
filter(is.na(col_id_new) | (!is.na(col_id_new) & col_id_new %in% MOs$col_id))
|
||||
|
||||
MOs <- MOs %>%
|
||||
# remove text if it contains 'Not assigned' like phylum in viruses
|
||||
mutate_all(~gsub("Not assigned", "", .))
|
||||
|
||||
@ -176,7 +184,8 @@ MOs.old <- MOs %>%
|
||||
stringr::str_replace(
|
||||
string = fullname,
|
||||
pattern = stringr::fixed(authors2),
|
||||
replacement = ""))),
|
||||
replacement = "")) %>%
|
||||
gsub(" (var|f|subsp)[.]", "", .)),
|
||||
ref) %>%
|
||||
filter(!is.na(fullname)) %>%
|
||||
distinct(fullname, .keep_all = TRUE) %>%
|
||||
@ -185,9 +194,7 @@ MOs.old <- MOs %>%
|
||||
MOs <- MOs %>%
|
||||
filter(is.na(col_id_new) | source == "DSMZ") %>%
|
||||
transmute(col_id,
|
||||
fullname = trimws(ifelse(kingdom == "Viruses",
|
||||
gsub(":", "", ifelse(trimws(paste(species, subspecies)) == "", genus, paste(species, subspecies))),
|
||||
paste(genus, species, subspecies))),
|
||||
fullname = trimws(paste(genus, species, subspecies)),
|
||||
kingdom,
|
||||
phylum,
|
||||
class,
|
||||
@ -203,9 +210,6 @@ MOs <- MOs %>%
|
||||
#distinct(fullname, .keep_all = TRUE) %>%
|
||||
filter(!grepl("unassigned", fullname, ignore.case = TRUE))
|
||||
|
||||
# Keep only old names of species that are in MOs:
|
||||
MOs.old <- MOs.old %>% filter(col_id_new %in% MOs$col_id)
|
||||
|
||||
# Filter out the DSMZ records that were renamed and are now in MOs.old
|
||||
MOs <- MOs %>%
|
||||
filter(!(source == "DSMZ" & fullname %in% MOs.old$fullname),
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
library(testthat)
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
context("abname.R")
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
context("age.R")
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
context("atc.R")
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
context("atc_property.R")
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
context("availability.R")
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
context("count.R")
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
context("data.R")
|
||||
@ -27,36 +27,13 @@ test_that("data sets are valid", {
|
||||
expect_identical(nrow(microorganisms), length(unique(microorganisms$mo)))
|
||||
|
||||
# there should be no diacritics (i.e. non ASCII) characters in the datasets
|
||||
library(dplyr)
|
||||
# check only character variables:
|
||||
test_microorganisms <- microorganisms %>% select_if(is.character) %>% as.data.frame(stringsAsFactors = FALSE)
|
||||
test_microorganisms.old <- microorganisms.old %>% select_if(is.character) %>% as.data.frame(stringsAsFactors = FALSE)
|
||||
test_antibiotics <- antibiotics %>% select_if(is.character) %>% as.data.frame(stringsAsFactors = FALSE)
|
||||
test_septic_patients <- septic_patients %>% select_if(is.character) %>% as.data.frame(stringsAsFactors = FALSE)
|
||||
# and compare them with their transformed version:
|
||||
expect_identical(test_microorganisms,
|
||||
test_microorganisms %>%
|
||||
lapply(iconv, from = "UTF-8", to = "ASCII//TRANSLIT") %>%
|
||||
as.data.frame(stringsAsFactors = FALSE))
|
||||
|
||||
expect_identical(test_microorganisms.old,
|
||||
test_microorganisms.old %>%
|
||||
lapply(iconv, from = "UTF-8", to = "ASCII//TRANSLIT") %>%
|
||||
as.data.frame(stringsAsFactors = FALSE))
|
||||
|
||||
expect_identical(test_antibiotics,
|
||||
test_antibiotics %>%
|
||||
lapply(iconv, from = "UTF-8", to = "ASCII//TRANSLIT") %>%
|
||||
as.data.frame(stringsAsFactors = FALSE))
|
||||
|
||||
expect_identical(test_septic_patients,
|
||||
test_septic_patients %>%
|
||||
lapply(iconv, from = "UTF-8", to = "ASCII//TRANSLIT") %>%
|
||||
as.data.frame(stringsAsFactors = FALSE))
|
||||
|
||||
datasets <- data(package = "AMR", envir = asNamespace("AMR"))$results[, "Item"]
|
||||
for (i in 1:length(datasets)) {
|
||||
dataset <- get(datasets[i], envir = asNamespace("AMR"))
|
||||
expect_identical(dataset_UTF8_to_ASCII(dataset), dataset)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
test_that("creation of data sets is valid", {
|
||||
df <- make()
|
||||
expect_lt(nrow(df[which(df$prevalence == 1), ]), nrow(df[which(df$prevalence == 2), ]))
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
context("deprecated.R")
|
||||
@ -30,8 +30,6 @@ test_that("deprecated functions work", {
|
||||
expect_identical(suppressWarnings(ratio(c(772, 1611, 737), ratio = "1:2:1")), c(780, 1560, 780))
|
||||
expect_identical(suppressWarnings(ratio(c(1752, 1895), ratio = c(1, 1))), c(1823.5, 1823.5))
|
||||
|
||||
expect_warning(guess_mo("esco"))
|
||||
expect_warning(guess_atc("amox"))
|
||||
expect_warning(ab_property("amox"))
|
||||
expect_warning(ab_atc("amox"))
|
||||
expect_warning(ab_official("amox"))
|
||||
|
@ -16,13 +16,22 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
context("eucast_rules.R")
|
||||
|
||||
test_that("EUCAST rules work", {
|
||||
|
||||
# thoroughly check input table
|
||||
expect_true(file.exists(EUCAST_RULES_FILE_LOCATION))
|
||||
eucast_input_file <- eucast_rules_file()
|
||||
expect_equal(colnames(eucast_input_file),
|
||||
c("if_mo_property", "like_is_one_of", "this_value",
|
||||
"and_these_antibiotics", "have_these_values",
|
||||
"then_change_these_antibiotics", "to_value",
|
||||
"reference.rule", "reference.rule_group"))
|
||||
|
||||
expect_error(suppressWarnings(eucast_rules(septic_patients, col_mo = "Non-existing")))
|
||||
|
||||
expect_identical(colnames(septic_patients),
|
||||
@ -40,7 +49,6 @@ test_that("EUCAST rules work", {
|
||||
stringsAsFactors = FALSE)
|
||||
expect_identical(suppressWarnings(eucast_rules(a, "mo", info = FALSE)), b)
|
||||
expect_identical(suppressWarnings(eucast_rules(a, "mo", info = TRUE)), b)
|
||||
expect_identical(suppressWarnings(interpretive_reading(a, "mo", info = TRUE)), b)
|
||||
|
||||
a <- data.frame(mo = c("Staphylococcus aureus",
|
||||
"Streptococcus group A"),
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
context("filter_ab_class.R")
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
context("first_isolate.R")
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
context("freq.R")
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
context("g.test.R")
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
context("get_locale.R")
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
context("ggplot_rsi.R")
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
context("guess_ab_col.R")
|
||||
|
@ -16,7 +16,7 @@
|
||||
# This R package was created for academic research and was publicly #
|
||||
# released in the hope that it will be useful, but it comes WITHOUT #
|
||||
# ANY WARRANTY OR LIABILITY. #
|
||||
# Visit our website for more info: https://msberends.gitab.io/AMR. #
|
||||
# Visit our website for more info: https://msberends.gitlab.io/AMR. #
|
||||
# ==================================================================== #
|
||||
|
||||
context("join_microorganisms.R")
|
||||
|