1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-24 19:26:12 +01:00

new EUCAST rules algorithm

This commit is contained in:
dr. M.S. (Matthijs) Berends 2019-04-05 18:47:39 +02:00
parent 56d4b4719f
commit fbc9191b13
115 changed files with 1340 additions and 2174 deletions

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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) { install_if_needed <- function(pkg, repos, quiet) {

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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: stages:

View File

@ -1,6 +1,6 @@
Package: AMR Package: AMR
Version: 0.6.1.9001 Version: 0.6.1.9002
Date: 2019-03-29 Date: 2019-04-05
Title: Antimicrobial Resistance Analysis Title: Antimicrobial Resistance Analysis
Authors@R: c( Authors@R: c(
person( person(

View File

@ -40,7 +40,6 @@ S3method(summary,mic)
S3method(summary,mo) S3method(summary,mo)
S3method(summary,rsi) S3method(summary,rsi)
export("%like%") export("%like%")
export(EUCAST_rules)
export(ab_atc) export(ab_atc)
export(ab_certe) export(ab_certe)
export(ab_name) export(ab_name)
@ -82,6 +81,7 @@ export(count_all)
export(count_df) export(count_df)
export(eucast_exceptional_phenotypes) export(eucast_exceptional_phenotypes)
export(eucast_rules) export(eucast_rules)
export(eucast_rules_file)
export(facet_rsi) export(facet_rsi)
export(filter_1st_cephalosporins) export(filter_1st_cephalosporins)
export(filter_2nd_cephalosporins) export(filter_2nd_cephalosporins)
@ -108,11 +108,8 @@ export(get_mo_source)
export(ggplot_rsi) export(ggplot_rsi)
export(ggplot_rsi_predict) export(ggplot_rsi_predict)
export(guess_ab_col) export(guess_ab_col)
export(guess_atc)
export(guess_mo)
export(header) export(header)
export(inner_join_microorganisms) export(inner_join_microorganisms)
export(interpretive_reading)
export(is.atc) export(is.atc)
export(is.mic) export(is.mic)
export(is.mo) export(is.mo)
@ -281,6 +278,7 @@ importFrom(graphics,points)
importFrom(graphics,text) importFrom(graphics,text)
importFrom(hms,is.hms) importFrom(hms,is.hms)
importFrom(knitr,kable) importFrom(knitr,kable)
importFrom(microbenchmark,microbenchmark)
importFrom(rlang,as_label) importFrom(rlang,as_label)
importFrom(rlang,enquos) importFrom(rlang,enquos)
importFrom(rlang,eval_tidy) importFrom(rlang,eval_tidy)

View File

@ -1,6 +1,11 @@
# AMR 0.6.1.9001 # AMR 0.6.1.9001
**Note: latest development version** **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 # AMR 0.6.1

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' Name of an antibiotic

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' Age in years of individuals

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' The \code{AMR} Package
@ -64,4 +64,6 @@
#' \url{https://gitlab.com/msberends/AMR/issues} #' \url{https://gitlab.com/msberends/AMR/issues}
#' @name AMR #' @name AMR
#' @rdname AMR #' @rdname AMR
# # prevent NOTE on R >= 3.6
#' @importFrom microbenchmark microbenchmark
NULL NULL

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' Transform to ATC code

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' Get ATC properties from WHOCC website

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' Property of an antibiotic

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' Check availability of columns

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' The Catalogue of Life
@ -33,7 +33,7 @@
#' \item{All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria and Protozoa} #' \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 ~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 ~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 complete taxonomic tree of all included (sub)species: from kingdom to subspecies}
#' \item{The responsible author(s) and year of scientific publication} #' \item{The responsible author(s) and year of scientific publication}
#' } #' }

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' Count isolates
@ -74,15 +74,15 @@
#' # Count co-resistance between amoxicillin/clav acid and gentamicin, #' # Count co-resistance between amoxicillin/clav acid and gentamicin,
#' # so we can see that combination therapy does a lot more than mono therapy. #' # so we can see that combination therapy does a lot more than mono therapy.
#' # Please mind that `portion_S` calculates percentages right away instead. #' # Please mind that `portion_S` calculates percentages right away instead.
#' count_S(septic_patients$amcl) # S = 1057 (67.1%) #' count_S(septic_patients$amcl) # S = 1342 (71.4%)
#' count_all(septic_patients$amcl) # n = 1576 #' count_all(septic_patients$amcl) # n = 1879
#' #'
#' count_S(septic_patients$gent) # S = 1372 (74.0%) #' count_S(septic_patients$gent) # S = 1372 (74.0%)
#' count_all(septic_patients$gent) # n = 1855 #' count_all(septic_patients$gent) # n = 1855
#' #'
#' with(septic_patients, #' with(septic_patients,
#' count_S(amcl, gent)) # S = 1396 (92.0%) #' count_S(amcl, gent)) # S = 1660 (92.3%)
#' with(septic_patients, # n = 1517 #' with(septic_patients, # n = 1798
#' n_rsi(amcl, gent)) #' n_rsi(amcl, gent))
#' #'
#' # Get portions S/I/R immediately of all rsi columns #' # Get portions S/I/R immediately of all rsi columns

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' 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}}. #' 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 #' @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{ #' \describe{
#' \item{\code{col_id}}{Catalogue of Life ID} #' \item{\code{col_id}}{Catalogue of Life ID that was originally given}
#' \item{\code{tsn_new}}{New Catalogue of Life ID} #' \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 taxonomic name of the microorganism} #' \item{\code{fullname}}{Old full taxonomic name of the microorganism}
#' \item{\code{ref}}{Author(s) and year of concerning scientific publication} #' \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! #' @inheritSection AMR Read more on our website!
#' @seealso \code{\link{as.mo}} \code{\link{mo_property}} \code{\link{microorganisms}} #' @seealso \code{\link{as.mo}} \code{\link{mo_property}} \code{\link{microorganisms}}
"microorganisms.old" "microorganisms.old"
@ -261,3 +261,23 @@ catalogue_of_life <- list(
#' } #' }
#' @inheritSection AMR Read more on our website! #' @inheritSection AMR Read more on our website!
"WHONET" "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
}

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' Deprecated functions
@ -47,20 +47,6 @@ ratio <- function(x, ratio) {
sum(x, na.rm = TRUE) * (ratio / sum(ratio, na.rm = TRUE)) 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 #' @rdname AMR-deprecated
#' @export #' @export
ab_property <- function(...) { ab_property <- function(...) {

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' Filter isolates on result in antibiotic class

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' Determine first (weighted) isolates

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' Frequency table

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' \emph{G}-test for Count Data

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' Get language for AMR

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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} #' AMR plots with \code{ggplot2}

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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(".", globalVariables(c(".",
@ -28,6 +28,7 @@ globalVariables(c(".",
"authors", "authors",
"Becker", "Becker",
"certe", "certe",
"CNS_CPS",
"cnt", "cnt",
"col_id", "col_id",
"count", "count",
@ -46,8 +47,8 @@ globalVariables(c(".",
"genus", "genus",
"gramstain", "gramstain",
"index", "index",
"Interpretation",
"input", "input",
"Interpretation",
"item", "item",
"key_ab", "key_ab",
"key_ab_lag", "key_ab_lag",
@ -81,6 +82,7 @@ globalVariables(c(".",
"Pasted", "Pasted",
"patient_id", "patient_id",
"phylum", "phylum",
"plural",
"prevalence", "prevalence",
"prevalent", "prevalent",
"property", "property",
@ -88,6 +90,10 @@ globalVariables(c(".",
"R", "R",
"real_first_isolate", "real_first_isolate",
"ref", "ref",
"reference.rule",
"reference.rule_group",
"rule_group",
"rule_name",
"S", "S",
"se_max", "se_max",
"se_min", "se_min",
@ -101,6 +107,7 @@ globalVariables(c(".",
"transmute", "transmute",
"tsn", "tsn",
"tsn_new", "tsn_new",
"txt",
"umcg", "umcg",
"value", "value",
"Value", "Value",

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' Guess antibiotic column

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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} #' Join a table with \code{microorganisms}

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' Key antibiotics for first \emph{weighted} isolates

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' Kurtosis of the sample

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' Pattern Matching

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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) #' Determine multidrug-resistant organisms (MDRO)

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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' #' Class 'mic'

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 # 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? # are they available as upper case or lower case then?
for (i in 1:length(col.list)) { for (i in 1:length(col.list)) {
if (is.null(col.list[i]) | isTRUE(is.na(col.list[i]))) { 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)) { } else if (toupper(col.list[i]) %in% colnames(tbl)) {
col.list[i] <- toupper(col.list[i]) col.list[i] <- toupper(col.list[i])
} else if (tolower(col.list[i]) %in% colnames(tbl)) { } else if (tolower(col.list[i]) %in% colnames(tbl)) {
col.list[i] <- tolower(col.list[i]) col.list[i] <- tolower(col.list[i])
} else if (!col.list[i] %in% colnames(tbl)) { } else if (!col.list[i] %in% colnames(tbl)) {
col.list[i] <- NULL col.list[i] <- NA
} }
} }
if (!all(col.list %in% colnames(tbl))) { if (!all(col.list %in% colnames(tbl))) {
if (info == TRUE) { 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(), col.list.bak[!(col.list %in% colnames(tbl))] %>% toString(),
'.\nTHIS MAY STRONGLY INFLUENCE THE OUTCOME.', '.\nTHIS MAY STRONGLY INFLUENCE THE OUTCOME.',
immediate. = TRUE, immediate. = TRUE,

3
R/mo.R
View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' Transform to microorganism ID
@ -229,7 +229,6 @@ as.mo <- function(x, Becker = FALSE, Lancefield = FALSE, allow_uncertain = TRUE,
& isFALSE(Lancefield)) { & isFALSE(Lancefield)) {
y <- x y <- x
} else if (!any(is.na(mo_hist)) } else if (!any(is.na(mo_hist))
& isFALSE(Becker) & isFALSE(Becker)
& isFALSE(Lancefield)) { & isFALSE(Lancefield)) {

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 # print successful as.mo coercions to AMR environment

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' Property of a microorganism
@ -136,7 +136,7 @@ mo_fullname <- function(x, language = get_locale(), ...) {
} }
#' @rdname mo_property #' @rdname mo_property
#' @importFrom dplyr %>% left_join mutate pull #' @importFrom dplyr %>% mutate pull
#' @export #' @export
mo_shortname <- function(x, language = get_locale(), ...) { mo_shortname <- function(x, language = get_locale(), ...) {
dots <- list(...) dots <- list(...)
@ -247,7 +247,12 @@ mo_phylum <- function(x, language = get_locale(), ...) {
#' @rdname mo_property #' @rdname mo_property
#' @export #' @export
mo_kingdom <- function(x, language = get_locale(), ...) { 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 #' @rdname mo_property
@ -260,14 +265,14 @@ mo_type <- function(x, language = get_locale(), ...) {
#' @export #' @export
mo_gramstain <- function(x, language = get_locale(), ...) { mo_gramstain <- function(x, language = get_locale(), ...) {
x.bak <- x x.bak <- x
x.mo <- as.mo(x, ...) x.mo <- as.mo(x, language = "en", ...)
x.phylum <- mo_phylum(x.mo) x.phylum <- mo_phylum(x.mo, language = "en")
x[x.phylum %in% c("Actinobacteria", x[x.phylum %in% c("Actinobacteria",
"Chloroflexi", "Chloroflexi",
"Firmicutes", "Firmicutes",
"Tenericutes")] <- "Gram positive" "Tenericutes")] <- "Gram positive"
x[x != "Gram positive"] <- "Gram negative" 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_GRAMP"] <- "Gram positive"
x[x.mo == "B_GRAMN"] <- "Gram negative" x[x.mo == "B_GRAMN"] <- "Gram negative"

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' Use predefined reference data set

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' Symbol of a p value

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' Calculate resistance of isolates
@ -100,14 +100,14 @@
#' #'
#' # Calculate co-resistance between amoxicillin/clav acid and gentamicin, #' # Calculate co-resistance between amoxicillin/clav acid and gentamicin,
#' # so we can see that combination therapy does a lot more than mono therapy: #' # so we can see that combination therapy does a lot more than mono therapy:
#' septic_patients %>% portion_S(amcl) # S = 67.1% #' septic_patients %>% portion_S(amcl) # S = 71.4%
#' septic_patients %>% count_all(amcl) # n = 1576 #' septic_patients %>% count_all(amcl) # n = 1879
#' #'
#' septic_patients %>% portion_S(gent) # S = 74.0% #' septic_patients %>% portion_S(gent) # S = 74.0%
#' septic_patients %>% count_all(gent) # n = 1855 #' septic_patients %>% count_all(gent) # n = 1855
#' #'
#' septic_patients %>% portion_S(amcl, gent) # S = 92.0% #' septic_patients %>% portion_S(amcl, gent) # S = 92.3%
#' septic_patients %>% count_all(amcl, gent) # n = 1517 #' septic_patients %>% count_all(amcl, gent) # n = 1798
#' #'
#' #'
#' septic_patients %>% #' septic_patients %>%

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' Read data from 4D database

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' Predict antimicrobial resistance

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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' #' Class 'rsi'
@ -114,7 +114,12 @@ mic_like <- function(x) {
gsub("[^0-9.,]+", "", .) %>% gsub("[^0-9.,]+", "", .) %>%
unique() unique()
mic_valid <- suppressWarnings(as.mic(mic)) 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 #' @rdname as.rsi

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' @importFrom dplyr %>% pull all_vars any_vars filter_all funs mutate_all

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' Skewness of the sample

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' WHOCC: WHO Collaborating Centre for Drug Statistics Methodology

11
R/zzz.R
View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 #' @importFrom data.table as.data.table setkey
@ -44,6 +44,15 @@
assign(x = "mo_codes_v0.5.0", assign(x = "mo_codes_v0.5.0",
value = make_trans_tbl(), value = make_trans_tbl(),
envir = asNamespace("AMR")) 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 #' @importFrom dplyr mutate case_when

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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' url: 'https://msberends.gitlab.io/AMR'

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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 # Download script file from GitHub

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -78,7 +78,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a> <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> </span>
</div> </div>

View File

@ -40,7 +40,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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> </span>
</div> </div>
@ -192,7 +192,7 @@
<h1>How to conduct AMR analysis</h1> <h1>How to conduct AMR analysis</h1>
<h4 class="author">Matthijs S. Berends</h4> <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> <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"> <div id="introduction" class="section level1">
<h1 class="hasAnchor"> <h1 class="hasAnchor">
<a href="#introduction" class="anchor"></a>Introduction</h1> <a href="#introduction" class="anchor"></a>Introduction</h1>
@ -217,21 +217,21 @@
</tr></thead> </tr></thead>
<tbody> <tbody>
<tr class="odd"> <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">abcd</td>
<td align="center">Escherichia coli</td> <td align="center">Escherichia coli</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
</tr> </tr>
<tr class="even"> <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">abcd</td>
<td align="center">Escherichia coli</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">R</td>
</tr> </tr>
<tr class="odd"> <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">efgh</td>
<td align="center">Escherichia coli</td> <td align="center">Escherichia coli</td>
<td align="center">R</td> <td align="center">R</td>
@ -327,30 +327,19 @@
</tr></thead> </tr></thead>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">2015-10-28</td> <td align="center">2015-03-05</td>
<td align="center">A4</td> <td align="center">Z5</td>
<td align="center">Hospital B</td> <td align="center">Hospital B</td>
<td align="center">Escherichia coli</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">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">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> <td align="center">F</td>
</tr> </tr>
<tr class="odd"> <tr class="even">
<td align="center">2014-09-30</td> <td align="center">2017-08-05</td>
<td align="center">N3</td> <td align="center">K5</td>
<td align="center">Hospital B</td> <td align="center">Hospital B</td>
<td align="center">Streptococcus pneumoniae</td> <td align="center">Streptococcus pneumoniae</td>
<td align="center">S</td> <td align="center">S</td>
@ -359,38 +348,49 @@
<td align="center">S</td> <td align="center">S</td>
<td align="center">M</td> <td align="center">M</td>
</tr> </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"> <tr class="even">
<td align="center">2013-02-14</td> <td align="center">2013-07-07</td>
<td align="center">Z6</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">Hospital A</td>
<td align="center">Escherichia coli</td> <td align="center">Escherichia coli</td>
<td align="center">S</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">S</td> <td align="center">S</td>
<td align="center">F</td> <td align="center">F</td>
</tr> </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"> <tr class="even">
<td align="center">2013-12-28</td> <td align="center">2014-03-20</td>
<td align="center">V6</td> <td align="center">K9</td>
<td align="center">Hospital B</td> <td align="center">Hospital D</td>
<td align="center">Staphylococcus aureus</td> <td align="center">Escherichia coli</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">R</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">F</td> <td align="center">M</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -411,8 +411,8 @@
#&gt; #&gt;
#&gt; Item Count Percent Cum. Count Cum. Percent #&gt; Item Count Percent Cum. Count Cum. Percent
#&gt; --- ----- ------- -------- ----------- ------------- #&gt; --- ----- ------- -------- ----------- -------------
#&gt; 1 M 10,344 51.7% 10,344 51.7% #&gt; 1 M 10,405 52.0% 10,405 52.0%
#&gt; 2 F 9,656 48.3% 20,000 100.0%</code></pre> #&gt; 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 didnt already know.</p> <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 didnt 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> <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 &lt;-<span class="st"> </span>data <span class="op">%&gt;%</span></a> <div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb12-1" title="1">data &lt;-<span class="st"> </span>data <span class="op">%&gt;%</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 &lt;-<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> <div class="sourceCode" id="cb14"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb14-1" title="1">data &lt;-<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">#&gt; </span></a> <a class="sourceLine" id="cb14-2" title="2"><span class="co">#&gt; </span></a>
<a class="sourceLine" id="cb14-3" title="3"><span class="co">#&gt; Rules by the European Committee on Antimicrobial Susceptibility Testing (EUCAST)</span></a> <a class="sourceLine" id="cb14-3" title="3"><span class="co">#&gt; Rules by the European Committee on Antimicrobial Susceptibility Testing (EUCAST)</span></a>
<a class="sourceLine" id="cb14-4" title="4"><span class="co">#&gt; </span></a> <a class="sourceLine" id="cb14-4" title="4"><span class="co">#&gt; http://eucast.org/</span></a>
<a class="sourceLine" id="cb14-5" title="5"><span class="co">#&gt; EUCAST Clinical Breakpoints (v9.0, 2019)</span></a> <a class="sourceLine" id="cb14-5" title="5"><span class="co">#&gt; </span></a>
<a class="sourceLine" id="cb14-6" title="6"><span class="co">#&gt; Enterobacteriales (Order) (no changes)</span></a> <a class="sourceLine" id="cb14-6" title="6"><span class="co">#&gt; EUCAST Clinical Breakpoints (v9.0, 2019)</span></a>
<a class="sourceLine" id="cb14-7" title="7"><span class="co">#&gt; Staphylococcus (no changes)</span></a> <a class="sourceLine" id="cb14-7" title="7"><span class="co">#&gt; Aerococcus sanguinicola (no new changes)</span></a>
<a class="sourceLine" id="cb14-8" title="8"><span class="co">#&gt; Enterococcus (no changes)</span></a> <a class="sourceLine" id="cb14-8" title="8"><span class="co">#&gt; Aerococcus urinae (no new changes)</span></a>
<a class="sourceLine" id="cb14-9" title="9"><span class="co">#&gt; Streptococcus groups A, B, C, G (no changes)</span></a> <a class="sourceLine" id="cb14-9" title="9"><span class="co">#&gt; Anaerobic Gram negatives (no new changes)</span></a>
<a class="sourceLine" id="cb14-10" title="10"><span class="co">#&gt; Streptococcus pneumoniae (no changes)</span></a> <a class="sourceLine" id="cb14-10" title="10"><span class="co">#&gt; Anaerobic Gram positives (no new changes)</span></a>
<a class="sourceLine" id="cb14-11" title="11"><span class="co">#&gt; Viridans group streptococci (no changes)</span></a> <a class="sourceLine" id="cb14-11" title="11"><span class="co">#&gt; Campylobacter coli (no new changes)</span></a>
<a class="sourceLine" id="cb14-12" title="12"><span class="co">#&gt; Haemophilus influenzae (no changes)</span></a> <a class="sourceLine" id="cb14-12" title="12"><span class="co">#&gt; Campylobacter jejuni (no new changes)</span></a>
<a class="sourceLine" id="cb14-13" title="13"><span class="co">#&gt; Moraxella catarrhalis (no changes)</span></a> <a class="sourceLine" id="cb14-13" title="13"><span class="co">#&gt; Enterobacteriales (Order) (no new changes)</span></a>
<a class="sourceLine" id="cb14-14" title="14"><span class="co">#&gt; Anaerobic Gram positives (no changes)</span></a> <a class="sourceLine" id="cb14-14" title="14"><span class="co">#&gt; Enterococcus (no new changes)</span></a>
<a class="sourceLine" id="cb14-15" title="15"><span class="co">#&gt; Anaerobic Gram negatives (no changes)</span></a> <a class="sourceLine" id="cb14-15" title="15"><span class="co">#&gt; Haemophilus influenzae (no new changes)</span></a>
<a class="sourceLine" id="cb14-16" title="16"><span class="co">#&gt; Pasteurella multocida (no changes)</span></a> <a class="sourceLine" id="cb14-16" title="16"><span class="co">#&gt; Kingella kingae (no new changes)</span></a>
<a class="sourceLine" id="cb14-17" title="17"><span class="co">#&gt; Campylobacter jejuni and C. coli (no changes)</span></a> <a class="sourceLine" id="cb14-17" title="17"><span class="co">#&gt; Moraxella catarrhalis (no new changes)</span></a>
<a class="sourceLine" id="cb14-18" title="18"><span class="co">#&gt; Aerococcus sanguinicola and A. urinae (no changes)</span></a> <a class="sourceLine" id="cb14-18" title="18"><span class="co">#&gt; Pasteurella multocida (no new changes)</span></a>
<a class="sourceLine" id="cb14-19" title="19"><span class="co">#&gt; Kingella kingae (no changes)</span></a> <a class="sourceLine" id="cb14-19" title="19"><span class="co">#&gt; Staphylococcus (no new changes)</span></a>
<a class="sourceLine" id="cb14-20" title="20"><span class="co">#&gt; </span></a> <a class="sourceLine" id="cb14-20" title="20"><span class="co">#&gt; Streptococcus groups A, B, C, G (no new changes)</span></a>
<a class="sourceLine" id="cb14-21" title="21"><span class="co">#&gt; EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes (v3.1, 2016)</span></a> <a class="sourceLine" id="cb14-21" title="21"><span class="co">#&gt; Streptococcus pneumoniae (1476 new changes)</span></a>
<a class="sourceLine" id="cb14-22" title="22"><span class="co">#&gt; Table 1: Intrinsic resistance in Enterobacteriaceae (1342 changes)</span></a> <a class="sourceLine" id="cb14-22" title="22"><span class="co">#&gt; Viridans group streptococci (no new changes)</span></a>
<a class="sourceLine" id="cb14-23" title="23"><span class="co">#&gt; Table 2: Intrinsic resistance in non-fermentative Gram-negative bacteria (no changes)</span></a> <a class="sourceLine" id="cb14-23" title="23"><span class="co">#&gt; </span></a>
<a class="sourceLine" id="cb14-24" title="24"><span class="co">#&gt; Table 3: Intrinsic resistance in other Gram-negative bacteria (no changes)</span></a> <a class="sourceLine" id="cb14-24" title="24"><span class="co">#&gt; EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes (v3.1, 2016)</span></a>
<a class="sourceLine" id="cb14-25" title="25"><span class="co">#&gt; Table 4: Intrinsic resistance in Gram-positive bacteria (2726 changes)</span></a> <a class="sourceLine" id="cb14-25" title="25"><span class="co">#&gt; Table 01: Intrinsic resistance in Enterobacteriaceae (1290 new changes)</span></a>
<a class="sourceLine" id="cb14-26" title="26"><span class="co">#&gt; Table 8: Interpretive rules for B-lactam agents and Gram-positive cocci (no changes)</span></a> <a class="sourceLine" id="cb14-26" title="26"><span class="co">#&gt; 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">#&gt; Table 9: Interpretive rules for B-lactam agents and Gram-negative rods (no changes)</span></a> <a class="sourceLine" id="cb14-27" title="27"><span class="co">#&gt; 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">#&gt; Table 10: Interpretive rules for B-lactam agents and other Gram-negative bacteria (no changes)</span></a> <a class="sourceLine" id="cb14-28" title="28"><span class="co">#&gt; Table 04: Intrinsic resistance in Gram-positive bacteria (2758 new changes)</span></a>
<a class="sourceLine" id="cb14-29" title="29"><span class="co">#&gt; Table 11: Interpretive rules for macrolides, lincosamides, and streptogramins (no changes)</span></a> <a class="sourceLine" id="cb14-29" title="29"><span class="co">#&gt; 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">#&gt; Table 12: Interpretive rules for aminoglycosides (no changes)</span></a> <a class="sourceLine" id="cb14-30" title="30"><span class="co">#&gt; 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">#&gt; Table 13: Interpretive rules for quinolones (no changes)</span></a> <a class="sourceLine" id="cb14-31" title="31"><span class="co">#&gt; 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">#&gt; </span></a> <a class="sourceLine" id="cb14-32" title="32"><span class="co">#&gt; Table 12: Interpretive rules for aminoglycosides (no new changes)</span></a>
<a class="sourceLine" id="cb14-33" title="33"><span class="co">#&gt; Other rules</span></a> <a class="sourceLine" id="cb14-33" title="33"><span class="co">#&gt; Table 13: Interpretive rules for quinolones (no new changes)</span></a>
<a class="sourceLine" id="cb14-34" title="34"><span class="co">#&gt; Non-EUCAST: ampicillin = R where amoxicillin/clav acid = R (no changes)</span></a> <a class="sourceLine" id="cb14-34" title="34"><span class="co">#&gt; </span></a>
<a class="sourceLine" id="cb14-35" title="35"><span class="co">#&gt; Non-EUCAST: piperacillin = R where piperacillin/tazobactam = R (no changes)</span></a> <a class="sourceLine" id="cb14-35" title="35"><span class="co">#&gt; Other rules</span></a>
<a class="sourceLine" id="cb14-36" title="36"><span class="co">#&gt; Non-EUCAST: trimethoprim = R where trimethoprim/sulfa = R (no changes)</span></a> <a class="sourceLine" id="cb14-36" title="36"><span class="co">#&gt; 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">#&gt; Non-EUCAST: amoxicillin/clav acid = S where ampicillin = S (no changes)</span></a> <a class="sourceLine" id="cb14-37" title="37"><span class="co">#&gt; 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">#&gt; Non-EUCAST: piperacillin/tazobactam = S where piperacillin = S (no changes)</span></a> <a class="sourceLine" id="cb14-38" title="38"><span class="co">#&gt; Non-EUCAST: piperacillin = R where piperacillin/tazobactam = R (no new changes)</span></a>
<a class="sourceLine" id="cb14-39" title="39"><span class="co">#&gt; Non-EUCAST: trimethoprim/sulfa = S where trimethoprim = S (no changes)</span></a> <a class="sourceLine" id="cb14-39" title="39"><span class="co">#&gt; Non-EUCAST: piperacillin/tazobactam = S where piperacillin = S (no new changes)</span></a>
<a class="sourceLine" id="cb14-40" title="40"><span class="co">#&gt; </span></a> <a class="sourceLine" id="cb14-40" title="40"><span class="co">#&gt; Non-EUCAST: trimethoprim = R where trimethoprim/sulfa = R (no new changes)</span></a>
<a class="sourceLine" id="cb14-41" title="41"><span class="co">#&gt; =&gt; EUCAST rules affected 7,400 out of 20,000 rows</span></a> <a class="sourceLine" id="cb14-41" title="41"><span class="co">#&gt; Non-EUCAST: trimethoprim/sulfa = S where trimethoprim = S (no new changes)</span></a>
<a class="sourceLine" id="cb14-42" title="42"><span class="co">#&gt; -&gt; added 0 test results</span></a> <a class="sourceLine" id="cb14-42" title="42"><span class="co">#&gt; </span></a>
<a class="sourceLine" id="cb14-43" title="43"><span class="co">#&gt; -&gt; 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-43" title="43"><span class="co">#&gt; --------------------------------------------------------------------------</span></a>
<a class="sourceLine" id="cb14-44" title="44"><span class="co">#&gt; 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">#&gt; =&gt; added 0 test results</span></a>
<a class="sourceLine" id="cb14-46" title="46"><span class="co">#&gt; </span></a>
<a class="sourceLine" id="cb14-47" title="47"><span class="co">#&gt; =&gt; changed 7,942 test results</span></a>
<a class="sourceLine" id="cb14-48" title="48"><span class="co">#&gt; - 125 test results changed from S to I</span></a>
<a class="sourceLine" id="cb14-49" title="49"><span class="co">#&gt; - 4,719 test results changed from S to R</span></a>
<a class="sourceLine" id="cb14-50" title="50"><span class="co">#&gt; - 1,093 test results changed from I to S</span></a>
<a class="sourceLine" id="cb14-51" title="51"><span class="co">#&gt; - 299 test results changed from I to R</span></a>
<a class="sourceLine" id="cb14-52" title="52"><span class="co">#&gt; - 1,682 test results changed from R to S</span></a>
<a class="sourceLine" id="cb14-53" title="53"><span class="co">#&gt; - 24 test results changed from R to I</span></a>
<a class="sourceLine" id="cb14-54" title="54"><span class="co">#&gt; --------------------------------------------------------------------------</span></a>
<a class="sourceLine" id="cb14-55" title="55"><span class="co">#&gt; </span></a>
<a class="sourceLine" id="cb14-56" title="56"><span class="co">#&gt; Use verbose = TRUE to get a data.frame with all specified edits instead.</span></a></code></pre></div>
</div> </div>
<div id="adding-new-variables" class="section level1"> <div id="adding-new-variables" class="section level1">
<h1 class="hasAnchor"> <h1 class="hasAnchor">
@ -489,8 +502,8 @@
<a class="sourceLine" id="cb16-3" title="3"><span class="co">#&gt; </span><span class="al">NOTE</span><span class="co">: Using column `bacteria` as input for `col_mo`.</span></a> <a class="sourceLine" id="cb16-3" title="3"><span class="co">#&gt; </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">#&gt; </span><span class="al">NOTE</span><span class="co">: Using column `date` as input for `col_date`.</span></a> <a class="sourceLine" id="cb16-4" title="4"><span class="co">#&gt; </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">#&gt; </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-5" title="5"><span class="co">#&gt; </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">#&gt; =&gt; Found 5,665 first isolates (28.3% of total)</span></a></code></pre></div> <a class="sourceLine" id="cb16-6" title="6"><span class="co">#&gt; =&gt; Found 5,681 first isolates (28.4% 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> <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 &lt;-<span class="st"> </span>data <span class="op">%&gt;%</span><span class="st"> </span></a> <div class="sourceCode" id="cb17"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb17-1" title="1">data_1st &lt;-<span class="st"> </span>data <span class="op">%&gt;%</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> <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> <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> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">1</td> <td align="center">1</td>
<td align="center">2010-09-11</td> <td align="center">2010-01-24</td>
<td align="center">L7</td> <td align="center">N5</td>
<td align="center">B_ESCHR_COL</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">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">2</td> <td align="center">2</td>
<td align="center">2010-11-07</td> <td align="center">2010-07-22</td>
<td align="center">L7</td> <td align="center">N5</td>
<td align="center">B_ESCHR_COL</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">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>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">3</td> <td align="center">3</td>
<td align="center">2011-01-16</td> <td align="center">2010-07-29</td>
<td align="center">L7</td> <td align="center">N5</td>
<td align="center">B_ESCHR_COL</td> <td align="center">B_ESCHR_COL</td>
<td align="center">S</td>
<td align="center">R</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">S</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">4</td> <td align="center">4</td>
<td align="center">2011-02-25</td> <td align="center">2010-09-17</td>
<td align="center">L7</td> <td align="center">N5</td>
<td align="center">B_ESCHR_COL</td> <td align="center">B_ESCHR_COL</td>
<td align="center">R</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">S</td> <td align="center">S</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">5</td> <td align="center">5</td>
<td align="center">2011-08-07</td> <td align="center">2011-02-27</td>
<td align="center">L7</td> <td align="center">N5</td>
<td align="center">B_ESCHR_COL</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">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> <td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">8</td> <td align="center">6</td>
<td align="center">2011-10-26</td> <td align="center">2011-04-25</td>
<td align="center">L7</td> <td align="center">N5</td>
<td align="center">B_ESCHR_COL</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> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
@ -604,23 +617,23 @@
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">9</td> <td align="center">9</td>
<td align="center">2012-01-15</td> <td align="center">2011-06-24</td>
<td align="center">L7</td> <td align="center">N5</td>
<td align="center">B_ESCHR_COL</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">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> <td align="center">FALSE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">10</td> <td align="center">10</td>
<td align="center">2012-02-08</td> <td align="center">2011-10-29</td>
<td align="center">L7</td> <td align="center">N5</td>
<td align="center">B_ESCHR_COL</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">S</td> <td align="center">S</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
</tr> </tr>
@ -637,7 +650,7 @@
<a class="sourceLine" id="cb19-7" title="7"><span class="co">#&gt; </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-7" title="7"><span class="co">#&gt; </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">#&gt; </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-8" title="8"><span class="co">#&gt; </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">#&gt; [Criterion] Inclusion based on key antibiotics, ignoring I.</span></a> <a class="sourceLine" id="cb19-9" title="9"><span class="co">#&gt; [Criterion] Inclusion based on key antibiotics, ignoring I.</span></a>
<a class="sourceLine" id="cb19-10" title="10"><span class="co">#&gt; =&gt; 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">#&gt; =&gt; Found 15,059 first weighted isolates (75.3% of total)</span></a></code></pre></div>
<table class="table"> <table class="table">
<thead><tr class="header"> <thead><tr class="header">
<th align="center">isolate</th> <th align="center">isolate</th>
@ -654,11 +667,11 @@
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">1</td> <td align="center">1</td>
<td align="center">2010-09-11</td> <td align="center">2010-01-24</td>
<td align="center">L7</td> <td align="center">N5</td>
<td align="center">B_ESCHR_COL</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">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
@ -666,119 +679,119 @@
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">2</td> <td align="center">2</td>
<td align="center">2010-11-07</td> <td align="center">2010-07-22</td>
<td align="center">L7</td> <td align="center">N5</td>
<td align="center">B_ESCHR_COL</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">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">FALSE</td>
<td align="center">TRUE</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">3</td> <td align="center">3</td>
<td align="center">2011-01-16</td> <td align="center">2010-07-29</td>
<td align="center">L7</td> <td align="center">N5</td>
<td align="center">B_ESCHR_COL</td> <td align="center">B_ESCHR_COL</td>
<td align="center">S</td>
<td align="center">R</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">S</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">4</td> <td align="center">4</td>
<td align="center">2011-02-25</td> <td align="center">2010-09-17</td>
<td align="center">L7</td> <td align="center">N5</td>
<td align="center">B_ESCHR_COL</td> <td align="center">B_ESCHR_COL</td>
<td align="center">R</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">S</td> <td align="center">S</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
<td align="center">TRUE</td> <td align="center">FALSE</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">5</td> <td align="center">5</td>
<td align="center">2011-08-07</td> <td align="center">2011-02-27</td>
<td align="center">L7</td> <td align="center">N5</td>
<td align="center">B_ESCHR_COL</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">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> <td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">6</td> <td align="center">6</td>
<td align="center">2011-08-16</td> <td align="center">2011-04-25</td>
<td align="center">L7</td> <td align="center">N5</td>
<td align="center">B_ESCHR_COL</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">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">FALSE</td>
<td align="center">TRUE</td> <td align="center">FALSE</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">7</td> <td align="center">7</td>
<td align="center">2011-10-08</td> <td align="center">2011-04-30</td>
<td align="center">L7</td> <td align="center">N5</td>
<td align="center">B_ESCHR_COL</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">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">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">FALSE</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>
<tr class="odd"> <tr class="odd">
<td align="center">9</td> <td align="center">9</td>
<td align="center">2012-01-15</td> <td align="center">2011-06-24</td>
<td align="center">L7</td> <td align="center">N5</td>
<td align="center">B_ESCHR_COL</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">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> <td align="center">FALSE</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">10</td> <td align="center">10</td>
<td align="center">2012-02-08</td> <td align="center">2011-10-29</td>
<td align="center">L7</td> <td align="center">N5</td>
<td align="center">B_ESCHR_COL</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">S</td> <td align="center">S</td>
<td align="center">FALSE</td> <td align="center">FALSE</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
</tbody> </tbody>
</table> </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>, theres a shortcut for this new algorithm too:</p> <p>As with <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code>, theres 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 &lt;-<span class="st"> </span>data <span class="op">%&gt;%</span><span class="st"> </span></a> <div class="sourceCode" id="cb20"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb20-1" title="1">data_1st &lt;-<span class="st"> </span>data <span class="op">%&gt;%</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> <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> <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 &lt;-<span class="st"> </span>data_1st <span class="op">%&gt;%</span><span class="st"> </span></a> <div class="sourceCode" id="cb21"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb21-1" title="1">data_1st &lt;-<span class="st"> </span>data_1st <span class="op">%&gt;%</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> <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> </tr></thead>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">2015-10-28</td> <td align="center">2015-03-05</td>
<td align="center">A4</td> <td align="center">Z5</td>
<td align="center">Hospital B</td> <td align="center">Hospital B</td>
<td align="center">B_ESCHR_COL</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">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">R</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 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">S</td>
<td align="center">M</td> <td align="center">M</td>
<td align="center">Gram negative</td> <td align="center">Gram negative</td>
@ -816,44 +874,14 @@
<td align="center">coli</td> <td align="center">coli</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </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"> <tr class="odd">
<td align="center">2014-09-30</td> <td align="center">2015-09-03</td>
<td align="center">N3</td> <td align="center">O2</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">Hospital A</td> <td align="center">Hospital A</td>
<td align="center">B_ESCHR_COL</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">R</td> <td align="center">S</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">F</td> <td align="center">F</td>
<td align="center">Gram negative</td> <td align="center">Gram negative</td>
@ -861,34 +889,19 @@
<td align="center">coli</td> <td align="center">coli</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </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"> <tr class="even">
<td align="center">2013-12-28</td> <td align="center">2014-03-20</td>
<td align="center">V6</td> <td align="center">K9</td>
<td align="center">Hospital B</td> <td align="center">Hospital D</td>
<td align="center">B_STPHY_AUR</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">R</td>
<td align="center">S</td> <td align="center">S</td>
<td align="center">F</td> <td align="center">M</td>
<td align="center">Gram positive</td> <td align="center">Gram negative</td>
<td align="center">Staphylococcus</td> <td align="center">Escherichia</td>
<td align="center">aureus</td> <td align="center">coli</td>
<td align="center">TRUE</td> <td align="center">TRUE</td>
</tr> </tr>
</tbody> </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> <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> <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">%&gt;%</span><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(genus, species)</a></code></pre></div> <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">%&gt;%</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> <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> Unique: 4</p>
<p>Shortest: 16<br> <p>Shortest: 16<br>
Longest: 24</p> Longest: 24</p>
@ -927,33 +940,33 @@ Longest: 24</p>
<tr class="odd"> <tr class="odd">
<td align="left">1</td> <td align="left">1</td>
<td align="left">Escherichia coli</td> <td align="left">Escherichia coli</td>
<td align="right">7,807</td> <td align="right">7,494</td>
<td align="right">49.6%</td> <td align="right">49.8%</td>
<td align="right">7,807</td> <td align="right">7,494</td>
<td align="right">49.6%</td> <td align="right">49.8%</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="left">2</td> <td align="left">2</td>
<td align="left">Staphylococcus aureus</td> <td align="left">Staphylococcus aureus</td>
<td align="right">3,919</td> <td align="right">3,673</td>
<td align="right">24.9%</td> <td align="right">24.4%</td>
<td align="right">11,726</td> <td align="right">11,167</td>
<td align="right">74.6%</td> <td align="right">74.2%</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="left">3</td> <td align="left">3</td>
<td align="left">Streptococcus pneumoniae</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">15.4%</td>
<td align="right">14,152</td> <td align="right">13,492</td>
<td align="right">90.0%</td> <td align="right">89.6%</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="left">4</td> <td align="left">4</td>
<td align="left">Klebsiella pneumoniae</td> <td align="left">Klebsiella pneumoniae</td>
<td align="right">1,577</td> <td align="right">1,567</td>
<td align="right">10.0%</td> <td align="right">10.4%</td>
<td align="right">15,729</td> <td align="right">15,059</td>
<td align="right">100.0%</td> <td align="right">100.0%</td>
</tr> </tr>
</tbody> </tbody>
@ -964,7 +977,7 @@ Longest: 24</p>
<a href="#resistance-percentages" class="anchor"></a>Resistance percentages</h2> <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> <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">%&gt;%</span><span class="st"> </span><span class="kw"><a href="../reference/portion.html">portion_IR</a></span>(amox)</a> <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">%&gt;%</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">#&gt; [1] 0.4796236</span></a></code></pre></div> <a class="sourceLine" id="cb25-2" title="2"><span class="co">#&gt; [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> <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">%&gt;%</span><span class="st"> </span></a> <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">%&gt;%</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">%&gt;%</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">%&gt;%</span><span class="st"> </span></a>
@ -977,19 +990,19 @@ Longest: 24</p>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">Hospital A</td> <td align="center">Hospital A</td>
<td align="center">0.4841779</td> <td align="center">0.5037963</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Hospital B</td> <td align="center">Hospital B</td>
<td align="center">0.4800215</td> <td align="center">0.5007457</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">Hospital C</td> <td align="center">Hospital C</td>
<td align="center">0.4663419</td> <td align="center">0.5111524</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Hospital D</td> <td align="center">Hospital D</td>
<td align="center">0.4815057</td> <td align="center">0.4851550</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -1007,23 +1020,23 @@ Longest: 24</p>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">Hospital A</td> <td align="center">Hospital A</td>
<td align="center">0.4841779</td> <td align="center">0.5037963</td>
<td align="center">4835</td> <td align="center">4478</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Hospital B</td> <td align="center">Hospital B</td>
<td align="center">0.4800215</td> <td align="center">0.5007457</td>
<td align="center">5581</td> <td align="center">5364</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">Hospital C</td> <td align="center">Hospital C</td>
<td align="center">0.4663419</td> <td align="center">0.5111524</td>
<td align="center">2258</td> <td align="center">2152</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Hospital D</td> <td align="center">Hospital D</td>
<td align="center">0.4815057</td> <td align="center">0.4851550</td>
<td align="center">3055</td> <td align="center">3065</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -1043,27 +1056,27 @@ Longest: 24</p>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td align="center">Escherichia</td> <td align="center">Escherichia</td>
<td align="center">0.7376713</td> <td align="center">0.8796370</td>
<td align="center">0.8986807</td> <td align="center">0.8973846</td>
<td align="center">0.9754067</td> <td align="center">0.9902589</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Klebsiella</td> <td align="center">Klebsiella</td>
<td align="center">0.7305010</td> <td align="center">0.7172942</td>
<td align="center">0.8953710</td> <td align="center">0.9081047</td>
<td align="center">0.9727330</td> <td align="center">0.9821315</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td align="center">Staphylococcus</td> <td align="center">Staphylococcus</td>
<td align="center">0.7305435</td> <td align="center">0.8829295</td>
<td align="center">0.9275325</td> <td align="center">0.9221345</td>
<td align="center">0.9793315</td> <td align="center">0.9918323</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td align="center">Streptococcus</td> <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.0000000</td>
<td align="center">0.7320692</td> <td align="center">0.5767742</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

View File

@ -40,7 +40,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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> </span>
</div> </div>
@ -192,7 +192,7 @@
<h1>How to import data from SPSS / SAS / Stata</h1> <h1>How to import data from SPSS / SAS / Stata</h1>
<h4 class="author">Matthijs S. Berends</h4> <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> <div class="hidden name"><code>SPSS.Rmd</code></div>

View File

@ -40,7 +40,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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> </span>
</div> </div>
@ -192,7 +192,7 @@
<h1>Benchmarks</h1> <h1>Benchmarks</h1>
<h4 class="author">Matthijs S. Berends</h4> <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> <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-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">#&gt; Unit: milliseconds</span></a> <a class="sourceLine" id="cb2-10" title="10"><span class="co">#&gt; Unit: milliseconds</span></a>
<a class="sourceLine" id="cb2-11" title="11"><span class="co">#&gt; expr min lq mean median uq max neval</span></a> <a class="sourceLine" id="cb2-11" title="11"><span class="co">#&gt; expr min lq mean median uq max neval</span></a>
<a class="sourceLine" id="cb2-12" title="12"><span class="co">#&gt; as.mo("sau") 18.0 18.0 22 18.0 20.0 48 10</span></a> <a class="sourceLine" id="cb2-12" title="12"><span class="co">#&gt; 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">#&gt; as.mo("stau") 48.0 48.0 76 67.0 92.0 150 10</span></a> <a class="sourceLine" id="cb2-13" title="13"><span class="co">#&gt; 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">#&gt; as.mo("staaur") 18.0 18.0 24 19.0 22.0 62 10</span></a> <a class="sourceLine" id="cb2-14" title="14"><span class="co">#&gt; 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">#&gt; as.mo("STAAUR") 18.0 18.0 23 18.0 20.0 61 10</span></a> <a class="sourceLine" id="cb2-15" title="15"><span class="co">#&gt; 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">#&gt; as.mo("S. aureus") 29.0 29.0 35 29.0 30.0 76 10</span></a> <a class="sourceLine" id="cb2-16" title="16"><span class="co">#&gt; 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">#&gt; as.mo("S. aureus") 29.0 29.0 37 29.0 30.0 79 10</span></a> <a class="sourceLine" id="cb2-17" title="17"><span class="co">#&gt; 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">#&gt; 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-18" title="18"><span class="co">#&gt; 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>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> <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 &lt;-<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> <div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1">T.islandicus &lt;-<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-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">#&gt; Unit: milliseconds</span></a> <a class="sourceLine" id="cb3-8" title="8"><span class="co">#&gt; Unit: milliseconds</span></a>
<a class="sourceLine" id="cb3-9" title="9"><span class="co">#&gt; expr min lq mean median uq max neval</span></a> <a class="sourceLine" id="cb3-9" title="9"><span class="co">#&gt; expr min lq mean median uq max neval</span></a>
<a class="sourceLine" id="cb3-10" title="10"><span class="co">#&gt; as.mo("theisl") 460 460 500 510 510 560 10</span></a> <a class="sourceLine" id="cb3-10" title="10"><span class="co">#&gt; as.mo("theisl") 460 460 480 470 510 510 10</span></a>
<a class="sourceLine" id="cb3-11" title="11"><span class="co">#&gt; as.mo("THEISL") 460 470 490 490 510 530 10</span></a> <a class="sourceLine" id="cb3-11" title="11"><span class="co">#&gt; as.mo("THEISL") 460 470 490 490 510 540 10</span></a>
<a class="sourceLine" id="cb3-12" title="12"><span class="co">#&gt; as.mo("T. islandicus") 74 74 84 75 78 120 10</span></a> <a class="sourceLine" id="cb3-12" title="12"><span class="co">#&gt; as.mo("T. islandicus") 73 73 84 73 77 130 10</span></a>
<a class="sourceLine" id="cb3-13" title="13"><span class="co">#&gt; as.mo("T. islandicus") 74 75 88 75 120 120 10</span></a> <a class="sourceLine" id="cb3-13" title="13"><span class="co">#&gt; as.mo("T. islandicus") 73 73 88 75 120 120 10</span></a>
<a class="sourceLine" id="cb3-14" title="14"><span class="co">#&gt; as.mo("Thermus islandicus") 73 73 84 74 75 130 10</span></a></code></pre></div> <a class="sourceLine" id="cb3-14" title="14"><span class="co">#&gt; as.mo("Thermus islandicus") 73 73 80 73 74 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> <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> <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> <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> <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> <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><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> <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>#&gt; File /home/uscloud/.Rhistory_mo removed.</code></pre>
<p><img src="benchmarks_files/figure-html/unnamed-chunk-6-1.png" width="720"></p> <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> <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"> <div id="repetitive-results" class="section level3">
<h3 class="hasAnchor"> <h3 class="hasAnchor">
<a href="#repetitive-results" class="anchor"></a>Repetitive results</h3> <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> <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> <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="cb6-2" title="2"><span class="co"># take all MO codes from the septic_patients data set</span></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="cb6-3" title="3">x &lt;-<span class="st"> </span>septic_patients<span class="op">$</span>mo <span class="op">%&gt;%</span></a> <a class="sourceLine" id="cb5-3" title="3">x &lt;-<span class="st"> </span>septic_patients<span class="op">$</span>mo <span class="op">%&gt;%</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="cb5-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">%&gt;%</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">%&gt;%</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="cb5-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">%&gt;%</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">%&gt;%</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="cb5-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">%&gt;%</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">%&gt;%</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="cb5-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="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="cb6-12" title="12"> </a> <a class="sourceLine" id="cb5-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="cb5-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="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="cb6-15" title="15"><span class="co">#&gt; [1] 500000</span></a> <a class="sourceLine" id="cb5-15" title="15"><span class="co">#&gt; [1] 500000</span></a>
<a class="sourceLine" id="cb6-16" title="16"></a> <a class="sourceLine" id="cb5-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="cb5-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="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="cb6-19" title="19"><span class="co">#&gt; [1] 50</span></a> <a class="sourceLine" id="cb5-19" title="19"><span class="co">#&gt; [1] 50</span></a>
<a class="sourceLine" id="cb6-20" title="20"></a> <a class="sourceLine" id="cb5-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="cb5-21" title="21"><span class="co"># now let's see:</span></a>
<a class="sourceLine" id="cb6-22" title="22">run_it &lt;-<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-22" title="22">run_it &lt;-<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="cb5-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="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="cb6-25" title="25"><span class="co">#&gt; Unit: milliseconds</span></a> <a class="sourceLine" id="cb5-25" title="25"><span class="co">#&gt; Unit: milliseconds</span></a>
<a class="sourceLine" id="cb6-26" title="26"><span class="co">#&gt; expr min lq mean median uq max neval</span></a> <a class="sourceLine" id="cb5-26" title="26"><span class="co">#&gt; expr min lq mean median uq max neval</span></a>
<a class="sourceLine" id="cb6-27" title="27"><span class="co">#&gt; mo_fullname(x) 825 845 887 867 903 1080 10</span></a></code></pre></div> <a class="sourceLine" id="cb5-27" title="27"><span class="co">#&gt; 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.87 seconds (867 ms). You only lose time on your unique input values.</p> <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>
<div id="precalculated-results" class="section level3"> <div id="precalculated-results" class="section level3">
<h3 class="hasAnchor"> <h3 class="hasAnchor">
<a href="#precalculated-results" class="anchor"></a>Precalculated results</h3> <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 doesnt take any time at all (see C below):</p> <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 doesnt 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 &lt;-<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> <div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" title="1">run_it &lt;-<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="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="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="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="cb7-4" title="4"> <span class="dt">times =</span> <span class="dv">10</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="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="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="cb7-6" title="6"><span class="co">#&gt; Unit: milliseconds</span></a> <a class="sourceLine" id="cb6-6" title="6"><span class="co">#&gt; Unit: milliseconds</span></a>
<a class="sourceLine" id="cb7-7" title="7"><span class="co">#&gt; expr min lq mean median uq max neval</span></a> <a class="sourceLine" id="cb6-7" title="7"><span class="co">#&gt; expr min lq mean median uq max neval</span></a>
<a class="sourceLine" id="cb7-8" title="8"><span class="co">#&gt; A 12.400 12.700 13.100 13.000 13.400 13.700 10</span></a> <a class="sourceLine" id="cb6-8" title="8"><span class="co">#&gt; A 12.200 12.300 12.500 12.400 12.600 13.40 10</span></a>
<a class="sourceLine" id="cb7-9" title="9"><span class="co">#&gt; B 26.300 26.600 27.900 28.400 28.700 29.000 10</span></a> <a class="sourceLine" id="cb6-9" title="9"><span class="co">#&gt; B 25.800 26.300 26.800 26.600 26.900 28.50 10</span></a>
<a class="sourceLine" id="cb7-10" title="10"><span class="co">#&gt; C 0.486 0.502 0.727 0.821 0.849 0.982 10</span></a></code></pre></div> <a class="sourceLine" id="cb6-10" title="10"><span class="co">#&gt; 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 doesnt even start calculating <em>if the result would be the same as the expected resulting value</em>. That goes for all helper functions:</p> <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 doesnt 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 &lt;-<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> <div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" title="1">run_it &lt;-<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="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="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="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="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="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="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="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="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="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="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="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="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="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="cb8-9" title="9"> <span class="dt">times =</span> <span class="dv">10</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="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="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="cb8-11" title="11"><span class="co">#&gt; Unit: milliseconds</span></a> <a class="sourceLine" id="cb7-11" title="11"><span class="co">#&gt; Unit: milliseconds</span></a>
<a class="sourceLine" id="cb8-12" title="12"><span class="co">#&gt; expr min lq mean median uq max neval</span></a> <a class="sourceLine" id="cb7-12" title="12"><span class="co">#&gt; expr min lq mean median uq max neval</span></a>
<a class="sourceLine" id="cb8-13" title="13"><span class="co">#&gt; A 0.371 0.432 0.463 0.471 0.500 0.525 10</span></a> <a class="sourceLine" id="cb7-13" title="13"><span class="co">#&gt; A 0.376 0.386 0.436 0.436 0.479 0.516 10</span></a>
<a class="sourceLine" id="cb8-14" title="14"><span class="co">#&gt; B 0.479 0.531 0.557 0.553 0.566 0.631 10</span></a> <a class="sourceLine" id="cb7-14" title="14"><span class="co">#&gt; B 0.467 0.501 0.561 0.567 0.599 0.700 10</span></a>
<a class="sourceLine" id="cb8-15" title="15"><span class="co">#&gt; C 0.511 0.676 0.834 0.904 0.959 1.090 10</span></a> <a class="sourceLine" id="cb7-15" title="15"><span class="co">#&gt; C 0.503 0.782 0.850 0.918 0.971 1.040 10</span></a>
<a class="sourceLine" id="cb8-16" title="16"><span class="co">#&gt; D 0.422 0.444 0.483 0.494 0.501 0.559 10</span></a> <a class="sourceLine" id="cb7-16" title="16"><span class="co">#&gt; D 0.403 0.471 0.488 0.491 0.525 0.588 10</span></a>
<a class="sourceLine" id="cb8-17" title="17"><span class="co">#&gt; E 0.383 0.458 0.502 0.477 0.507 0.778 10</span></a> <a class="sourceLine" id="cb7-17" title="17"><span class="co">#&gt; E 0.343 0.429 0.456 0.445 0.485 0.638 10</span></a>
<a class="sourceLine" id="cb8-18" title="18"><span class="co">#&gt; F 0.362 0.376 0.476 0.426 0.473 0.947 10</span></a> <a class="sourceLine" id="cb7-18" title="18"><span class="co">#&gt; F 0.380 0.403 0.447 0.453 0.491 0.520 10</span></a>
<a class="sourceLine" id="cb8-19" title="19"><span class="co">#&gt; G 0.361 0.368 0.451 0.452 0.500 0.610 10</span></a> <a class="sourceLine" id="cb7-19" title="19"><span class="co">#&gt; G 0.385 0.421 0.458 0.447 0.487 0.575 10</span></a>
<a class="sourceLine" id="cb8-20" title="20"><span class="co">#&gt; H 0.359 0.383 0.431 0.437 0.458 0.505 10</span></a></code></pre></div> <a class="sourceLine" id="cb7-20" title="20"><span class="co">#&gt; 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> <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>
<div id="results-in-other-languages" class="section level3"> <div id="results-in-other-languages" class="section level3">
<h3 class="hasAnchor"> <h3 class="hasAnchor">
<a href="#results-in-other-languages" class="anchor"></a>Results in other languages</h3> <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 doest take extra time:</p> <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 doest 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> <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="cb9-2" title="2"><span class="co">#&gt; [1] "Coagulase-negative Staphylococcus (CoNS)"</span></a> <a class="sourceLine" id="cb8-2" title="2"><span class="co">#&gt; [1] "Coagulase-negative Staphylococcus (CoNS)"</span></a>
<a class="sourceLine" id="cb9-3" title="3"></a> <a class="sourceLine" id="cb8-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="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="cb9-5" title="5"><span class="co">#&gt; [1] "Staphylococcus coagulasa negativo (SCN)"</span></a> <a class="sourceLine" id="cb8-5" title="5"><span class="co">#&gt; [1] "Staphylococcus coagulasa negativo (SCN)"</span></a>
<a class="sourceLine" id="cb9-6" title="6"></a> <a class="sourceLine" id="cb8-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="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="cb9-8" title="8"><span class="co">#&gt; [1] "Coagulase-negatieve Staphylococcus (CNS)"</span></a> <a class="sourceLine" id="cb8-8" title="8"><span class="co">#&gt; [1] "Coagulase-negatieve Staphylococcus (CNS)"</span></a>
<a class="sourceLine" id="cb9-9" title="9"></a> <a class="sourceLine" id="cb8-9" title="9"></a>
<a class="sourceLine" id="cb9-10" title="10">run_it &lt;-<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-10" title="10">run_it &lt;-<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="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="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="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="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="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="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="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="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="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="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="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="cb9-17" title="17"> <span class="dt">times =</span> <span class="dv">10</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="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="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="cb9-19" title="19"><span class="co">#&gt; Unit: milliseconds</span></a> <a class="sourceLine" id="cb8-19" title="19"><span class="co">#&gt; Unit: milliseconds</span></a>
<a class="sourceLine" id="cb9-20" title="20"><span class="co">#&gt; expr min lq mean median uq max neval</span></a> <a class="sourceLine" id="cb8-20" title="20"><span class="co">#&gt; expr min lq mean median uq max neval</span></a>
<a class="sourceLine" id="cb9-21" title="21"><span class="co">#&gt; en 18.83 19.19 24.20 19.53 20.67 63.66 10</span></a> <a class="sourceLine" id="cb8-21" title="21"><span class="co">#&gt; en 18.96 19.05 19.17 19.10 19.28 19.50 10</span></a>
<a class="sourceLine" id="cb9-22" title="22"><span class="co">#&gt; de 31.53 32.10 36.79 32.22 33.81 75.80 10</span></a> <a class="sourceLine" id="cb8-22" title="22"><span class="co">#&gt; de 31.11 31.58 40.75 32.11 33.36 75.57 10</span></a>
<a class="sourceLine" id="cb9-23" title="23"><span class="co">#&gt; nl 31.24 31.78 32.22 32.10 32.24 33.43 10</span></a> <a class="sourceLine" id="cb8-23" title="23"><span class="co">#&gt; nl 31.18 31.55 39.10 31.77 32.52 75.92 10</span></a>
<a class="sourceLine" id="cb9-24" title="24"><span class="co">#&gt; es 31.40 32.07 45.82 33.08 75.31 76.95 10</span></a> <a class="sourceLine" id="cb8-24" title="24"><span class="co">#&gt; es 30.76 31.46 40.46 31.62 33.07 75.85 10</span></a>
<a class="sourceLine" id="cb9-25" title="25"><span class="co">#&gt; it 31.17 31.95 36.82 32.09 32.19 79.48 10</span></a> <a class="sourceLine" id="cb8-25" title="25"><span class="co">#&gt; it 31.02 31.41 36.06 31.67 31.95 76.19 10</span></a>
<a class="sourceLine" id="cb9-26" title="26"><span class="co">#&gt; fr 31.48 31.64 31.89 31.96 32.07 32.33 10</span></a> <a class="sourceLine" id="cb8-26" title="26"><span class="co">#&gt; fr 31.02 31.66 36.36 31.84 32.46 76.22 10</span></a>
<a class="sourceLine" id="cb9-27" title="27"><span class="co">#&gt; pt 31.27 31.66 36.80 32.06 32.34 80.53 10</span></a></code></pre></div> <a class="sourceLine" id="cb8-27" title="27"><span class="co">#&gt; 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> <p>Currently supported are German, Dutch, Spanish, Italian, French and Portuguese.</p>
</div> </div>
</div> </div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -78,7 +78,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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> </span>
</div> </div>

View File

@ -78,7 +78,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a> <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> </span>
</div> </div>

View File

@ -42,7 +42,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="index.html">AMR (for R)</a> <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> </span>
</div> </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> <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>
<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 ~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> <li><p>The responsible author(s) and year of scientific publication</p></li>
</ul> </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> <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>

View File

@ -78,7 +78,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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> </span>
</div> </div>
@ -232,9 +232,40 @@
</div> </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 users home folder, to comply with the CRAN policy</li>
</ul>
</div>
</div>
<div id="amr-060" class="section level1"> <div id="amr-060" class="section level1">
<h1 class="page-header"> <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> </h1>
<p><strong>New website!</strong></p> <p><strong>New website!</strong></p>
<p>Weve 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> <p>Weve 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> <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> </ul>
</div> </div>
<div id="changed" class="section level4"> <div id="changed-2" class="section level4">
<h4 class="hasAnchor"> <h4 class="hasAnchor">
<a href="#changed" class="anchor"></a>Changed</h4> <a href="#changed-2" class="anchor"></a>Changed</h4>
<ul> <ul>
<li>Function <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code>: <li>Function <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code>:
<ul> <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>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>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>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>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><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_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>: <li>Improvements for <code><a href="../reference/as.mo.html">as.mo()</a></code>:
<ul> <ul>
<li> <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> <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> </ul>
</div> </div>
<div id="changed-1" class="section level4"> <div id="changed-3" class="section level4">
<h4 class="hasAnchor"> <h4 class="hasAnchor">
<a href="#changed-1" class="anchor"></a>Changed</h4> <a href="#changed-3" class="anchor"></a>Changed</h4>
<ul> <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>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> </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> <li><p>Renamed <code>septic_patients$sex</code> to <code>septic_patients$gender</code></p></li>
</ul> </ul>
</div> </div>
<div id="changed-2" class="section level4"> <div id="changed-4" class="section level4">
<h4 class="hasAnchor"> <h4 class="hasAnchor">
<a href="#changed-2" class="anchor"></a>Changed</h4> <a href="#changed-4" class="anchor"></a>Changed</h4>
<ul> <ul>
<li>Added three antimicrobial agents to the <code>antibiotics</code> data set: Terbinafine (D01BA02), Rifaximin (A07AA11) and Isoconazole (D01AC05)</li> <li>Added three antimicrobial agents to the <code>antibiotics</code> data set: Terbinafine (D01BA02), Rifaximin (A07AA11) and Isoconazole (D01AC05)</li>
<li> <li>
@ -804,9 +835,9 @@ Using <code><a href="../reference/as.mo.html">as.mo(..., allow_uncertain = 3)</a
</li> </li>
</ul> </ul>
</div> </div>
<div id="changed-3" class="section level4"> <div id="changed-5" class="section level4">
<h4 class="hasAnchor"> <h4 class="hasAnchor">
<a href="#changed-3" class="anchor"></a>Changed</h4> <a href="#changed-5" class="anchor"></a>Changed</h4>
<ul> <ul>
<li>Improvements for forecasting with <code>resistance_predict</code> and added more examples</li> <li>Improvements for forecasting with <code>resistance_predict</code> and added more examples</li>
<li>More antibiotics added as parameters for EUCAST rules</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> <li>New print format for <code>tibble</code>s and <code>data.table</code>s</li>
</ul> </ul>
</div> </div>
<div id="changed-4" class="section level4"> <div id="changed-6" class="section level4">
<h4 class="hasAnchor"> <h4 class="hasAnchor">
<a href="#changed-4" class="anchor"></a>Changed</h4> <a href="#changed-6" class="anchor"></a>Changed</h4>
<ul> <ul>
<li>Fixed <code>rsi</code> class for vectors that contain only invalid antimicrobial interpretations</li> <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> <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"> <div id="tocnav">
<h2>Contents</h2> <h2>Contents</h2>
<ul class="nav nav-pills nav-stacked"> <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-060">0.6.0</a></li>
<li><a href="#amr-050">0.5.0</a></li> <li><a href="#amr-050">0.5.0</a></li>
<li><a href="#amr-040">0.4.0</a></li> <li><a href="#amr-040">0.4.0</a></li>

View File

@ -80,7 +80,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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> </span>
</div> </div>
@ -243,10 +243,6 @@
<pre class="usage"><span class='fu'>ratio</span>(<span class='no'>x</span>, <span class='no'>ratio</span>) <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_property</span>(<span class='no'>...</span>)
<span class='fu'>ab_atc</span>(<span class='no'>...</span>) <span class='fu'>ab_atc</span>(<span class='no'>...</span>)

View File

@ -80,7 +80,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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> </span>
</div> </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>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>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 /> <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 /> <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> 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> <li><p>Valid MO codes and full names: it first searches in already valid MO code and known genus/species combinations</p></li>

View File

@ -80,7 +80,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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> </span>
</div> </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 ~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 ~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 ~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 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> <li><p>The responsible author(s) and year of scientific publication</p></li>
</ul> </ul>

View File

@ -81,7 +81,7 @@ count_R and count_IR can be used to count resistant isolates, count_S and count_
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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> </span>
</div> </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'># 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'># 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='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_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 = 1576</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_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'>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'><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'>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 = 1517</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='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> <span class='co'># Get portions S/I/R immediately of all rsi columns</span>

View File

@ -80,7 +80,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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> </span>
</div> </div>
@ -241,51 +241,48 @@
</div> </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>, <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='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='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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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'>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='kw'>vanc</span> <span class='kw'>=</span> <span class='fu'><a href='guess_ab_col.html'>guess_ab_col</a></span>())
<span class='fu'>EUCAST_rules</span>(<span class='no'>...</span>) <span class='fu'>eucast_rules_file</span>()</pre>
<span class='fu'>interpretive_reading</span>(<span class='no'>...</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments"> <table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup> <colgroup><col class="name" /><col class="desc" /></colgroup>
<tr> <tr>
<th>tbl</th> <th>x</th>
<td><p>table with antibiotic columns, like e.g. <code>amox</code> and <code>amcl</code></p></td> <td><p>data with antibiotic columns, like e.g. <code>amox</code> and <code>amcl</code></p></td>
</tr> </tr>
<tr> <tr>
<th>col_mo</th> <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 /> <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> <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> </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> <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> <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="#value">Value</a></li>
<li><a href="#details">Details</a></li>
<li><a href="#antibiotics">Antibiotics</a></li> <li><a href="#antibiotics">Antibiotics</a></li>
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li> <li><a href="#read-more-on-our-website-">Read more on our website!</a></li>

View File

@ -78,7 +78,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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> </span>
</div> </div>
@ -311,7 +311,7 @@
</tr><tr> </tr><tr>
<td> <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>
<td><p>EUCAST rules</p></td> <td><p>EUCAST rules</p></td>
</tr><tr> </tr><tr>
@ -549,7 +549,7 @@
<tr> <tr>
<td> <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>
<td><p>Deprecated functions</p></td> <td><p>Deprecated functions</p></td>
</tr> </tr>

View File

@ -80,7 +80,7 @@
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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> </span>
</div> </div>
@ -245,16 +245,16 @@
<h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2> <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'> <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</p></dd> <dt><code>col_id</code></dt><dd><p>Catalogue of Life ID that was originally given</p></dd>
<dt><code>tsn_new</code></dt><dd><p>New Catalogue of Life ID</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 taxonomic name of the microorganism</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> <dt><code>ref</code></dt><dd><p>Author(s) and year of concerning scientific publication</p></dd>
</dl> </dl>
<h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2> <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> <h2 class="hasAnchor" id="catalogue-of-life"><a class="anchor" href="#catalogue-of-life"></a>Catalogue of Life</h2>

View File

@ -81,7 +81,7 @@ portion_R and portion_IR can be used to calculate resistance, portion_S and port
</button> </button>
<span class="navbar-brand"> <span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a> <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> </span>
</div> </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'># 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='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'>%&gt;%</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'>%&gt;%</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'>%&gt;%</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'>%&gt;%</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'>%&gt;%</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'>%&gt;%</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'>%&gt;%</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'>%&gt;%</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'>%&gt;%</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'>%&gt;%</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'>%&gt;%</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'>%&gt;%</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'>%&gt;%</span> <span class='no'>septic_patients</span> <span class='kw'>%&gt;%</span>

View File

@ -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 ~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 * The responsible author(s) and year of scientific publication

View 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
1 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
2 order is Enterobacteriales ampi S amox S Enterobacteriales (Order) Breakpoints
3 order is Enterobacteriales ampi I amox I Enterobacteriales (Order) Breakpoints
4 order is Enterobacteriales ampi R amox R Enterobacteriales (Order) Breakpoints
5 genus is Staphylococcus peni, cfox S ampi, amox, pipe, tica S Staphylococcus Breakpoints
6 genus is Staphylococcus peni, cfox R, S oxac, clox S Staphylococcus Breakpoints
7 genus is Staphylococcus cfox R all_betalactams R Staphylococcus Breakpoints
8 genus_species is Staphylococcus saprophyticus ampi S amox, amcl, pipe, pita S Staphylococcus Breakpoints
9 genus is Staphylococcus cfox S carbapenems, cephalosporins_without_cfta S Staphylococcus Breakpoints
10 genus is Staphylococcus cfox I carbapenems, cephalosporins_without_cfta I Staphylococcus Breakpoints
11 genus is Staphylococcus cfox R carbapenems, cephalosporins_without_cfta R Staphylococcus Breakpoints
12 genus is Staphylococcus norf S cipr, levo, moxi, oflo S Staphylococcus Breakpoints
13 genus is Staphylococcus eryt S azit, clar, roxi S Staphylococcus Breakpoints
14 genus is Staphylococcus eryt I azit, clar, roxi I Staphylococcus Breakpoints
15 genus is Staphylococcus eryt R azit, clar, roxi R Staphylococcus Breakpoints
16 genus is Staphylococcus tetr S doxy, mino S Staphylococcus Breakpoints
17 genus_species is Enterococcus faecium ampi R all_betalactams R Enterococcus Breakpoints
18 genus is Enterococcus ampi S amox, amcl, pipe, pita S Enterococcus Breakpoints
19 genus is Enterococcus ampi I amox, amcl, pipe, pita I Enterococcus Breakpoints
20 genus is Enterococcus ampi R amox, amcl, pipe, pita R Enterococcus Breakpoints
21 genus is Enterococcus norf S cipr, levo S Enterococcus Breakpoints
22 genus is Enterococcus norf I cipr, levo I Enterococcus Breakpoints
23 genus is Enterococcus norf R cipr, levo R Enterococcus Breakpoints
24 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
25 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
26 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
27 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
28 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
29 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
30 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
31 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
32 genus_species is Streptococcus pneumoniae peni S ampi, amox, amcl, pipe, pita S Streptococcus pneumoniae Breakpoints
33 genus_species is Streptococcus pneumoniae ampi S amox, amcl, pipe, pita S Streptococcus pneumoniae Breakpoints
34 genus_species is Streptococcus pneumoniae ampi I amox, amcl, pipe, pita I Streptococcus pneumoniae Breakpoints
35 genus_species is Streptococcus pneumoniae ampi R amox, amcl, pipe, pita R Streptococcus pneumoniae Breakpoints
36 genus_species is Streptococcus pneumoniae norf S levo, moxi S Streptococcus pneumoniae Breakpoints
37 genus_species is Streptococcus pneumoniae eryt S azit, clar, roxi S Streptococcus pneumoniae Breakpoints
38 genus_species is Streptococcus pneumoniae eryt I azit, clar, roxi I Streptococcus pneumoniae Breakpoints
39 genus_species is Streptococcus pneumoniae eryt R azit, clar, roxi R Streptococcus pneumoniae Breakpoints
40 genus_species is Streptococcus pneumoniae tetr S doxy, mino S Streptococcus pneumoniae Breakpoints
41 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
42 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
43 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
44 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
45 genus_species is Haemophilus influenzae ampi S amox, pipe S Haemophilus influenzae Breakpoints
46 genus_species is ^Haemophilus influenzae ampi I amox, pipe I Haemophilus influenzae Breakpoints
47 genus_species is Haemophilus influenzae ampi R amox, pipe R Haemophilus influenzae Breakpoints
48 genus_species is Haemophilus influenzae peni S ampi, amox, amcl, pipe, pita S Haemophilus influenzae Breakpoints
49 genus_species is Haemophilus influenzae amcl S pita S Haemophilus influenzae Breakpoints
50 genus_species is Haemophilus influenzae amcl I pita I Haemophilus influenzae Breakpoints
51 genus_species is Haemophilus influenzae amcl R pita R Haemophilus influenzae Breakpoints
52 genus_species is Haemophilus influenzae nali S cipr, levo, moxi, oflo S Haemophilus influenzae Breakpoints
53 genus_species is Haemophilus influenzae tetr S doxy, mino S Haemophilus influenzae Breakpoints
54 genus_species is Moraxella catarrhalis amcl S pita S Moraxella catarrhalis Breakpoints
55 genus_species is Moraxella catarrhalis amcl I pita I Moraxella catarrhalis Breakpoints
56 genus_species is Moraxella catarrhalis amcl R pita R Moraxella catarrhalis Breakpoints
57 genus_species is Moraxella catarrhalis nali S cipr, levo, moxi, oflo S Moraxella catarrhalis Breakpoints
58 genus_species is Moraxella catarrhalis eryt S azit, clar, roxi S Moraxella catarrhalis Breakpoints
59 genus_species is Moraxella catarrhalis eryt I azit, clar, roxi I Moraxella catarrhalis Breakpoints
60 genus_species is Moraxella catarrhalis eryt R azit, clar, roxi R Moraxella catarrhalis Breakpoints
61 genus_species is Moraxella catarrhalis tetr S doxy, mino S Moraxella catarrhalis Breakpoints
62 genus one_of Actinomyces, Bifidobacterium, Clostridium, Cutibacterium, Eggerthella, Eubacterium, Lactobacillus , Propionibacterium peni S ampi, amox, pipe, pita, tica S Anaerobic Gram positives Breakpoints
63 genus one_of Actinomyces, Bifidobacterium, Clostridium, Cutibacterium, Eggerthella, Eubacterium, Lactobacillus , Propionibacterium peni I ampi, amox, pipe, pita, tica I Anaerobic Gram positives Breakpoints
64 genus one_of Actinomyces, Bifidobacterium, Clostridium, Cutibacterium, Eggerthella, Eubacterium, Lactobacillus , Propionibacterium peni R ampi, amox, pipe, pita, tica R Anaerobic Gram positives Breakpoints
65 genus one_of Bacteroides, Bilophila , Fusobacterium, Mobiluncus, Porphyromonas, Prevotella peni S ampi, amox, pipe, pita, tica S Anaerobic Gram negatives Breakpoints
66 genus one_of Bacteroides, Bilophila , Fusobacterium, Mobiluncus, Porphyromonas, Prevotella peni I ampi, amox, pipe, pita, tica I Anaerobic Gram negatives Breakpoints
67 genus one_of Bacteroides, Bilophila , Fusobacterium, Mobiluncus, Porphyromonas, Prevotella peni R ampi, amox, pipe, pita, tica R Anaerobic Gram negatives Breakpoints
68 genus_species is Pasteurella multocida peni S ampi, amox S Pasteurella multocida Breakpoints
69 genus_species is Pasteurella multocida peni I ampi, amox I Pasteurella multocida Breakpoints
70 genus_species is Pasteurella multocida peni R ampi, amox R Pasteurella multocida Breakpoints
71 genus_species is Campylobacter coli eryt S azit, clar S Campylobacter coli Breakpoints
72 genus_species is Campylobacter coli eryt I azit, clar I Campylobacter coli Breakpoints
73 genus_species is Campylobacter coli eryt R azit, clar R Campylobacter coli Breakpoints
74 genus_species is Campylobacter coli tetr S doxy S Campylobacter coli Breakpoints
75 genus_species is Campylobacter coli tetr I doxy I Campylobacter coli Breakpoints
76 genus_species is Campylobacter coli tetr R doxy R Campylobacter coli Breakpoints
77 genus_species is Campylobacter jejuni eryt S azit, clar S Campylobacter jejuni Breakpoints
78 genus_species is Campylobacter jejuni eryt I azit, clar I Campylobacter jejuni Breakpoints
79 genus_species is Campylobacter jejuni eryt R azit, clar R Campylobacter jejuni Breakpoints
80 genus_species is Campylobacter jejuni tetr S doxy S Campylobacter jejuni Breakpoints
81 genus_species is Campylobacter jejuni tetr I doxy I Campylobacter jejuni Breakpoints
82 genus_species is Campylobacter jejuni tetr R doxy R Campylobacter jejuni Breakpoints
83 genus_species is Aerococcus sanguinicola norf S fluoroquinolones S Aerococcus sanguinicola Breakpoints
84 genus_species is Aerococcus sanguinicola norf I fluoroquinolones I Aerococcus sanguinicola Breakpoints
85 genus_species is Aerococcus sanguinicola norf R fluoroquinolones R Aerococcus sanguinicola Breakpoints
86 genus_species is Aerococcus sanguinicola cipr S levo S Aerococcus sanguinicola Breakpoints
87 genus_species is Aerococcus sanguinicola cipr I levo I Aerococcus sanguinicola Breakpoints
88 genus_species is Aerococcus sanguinicola cipr R levo R Aerococcus urinae Breakpoints
89 genus_species is Aerococcus urinae norf S fluoroquinolones S Aerococcus urinae Breakpoints
90 genus_species is Aerococcus urinae norf I fluoroquinolones I Aerococcus urinae Breakpoints
91 genus_species is Aerococcus urinae norf R fluoroquinolones R Aerococcus urinae Breakpoints
92 genus_species is Aerococcus urinae cipr S levo S Aerococcus urinae Breakpoints
93 genus_species is Aerococcus urinae cipr I levo I Aerococcus urinae Breakpoints
94 genus_species is Aerococcus urinae cipr R levo R Aerococcus urinae Breakpoints
95 genus_species is Kingella kingae peni S ampi, amox S Kingella kingae Breakpoints
96 genus_species is Kingella kingae peni I ampi, amox I Kingella kingae Breakpoints
97 genus_species is Kingella kingae peni R ampi, amox R Kingella kingae Breakpoints
98 genus_species is Kingella kingae eryt S azit, clar S Kingella kingae Breakpoints
99 genus_species is Kingella kingae eryt I azit, clar I Kingella kingae Breakpoints
100 genus_species is Kingella kingae eryt R azit, clar R Kingella kingae Breakpoints
101 genus_species is Kingella kingae tetr S doxy S Kingella kingae Breakpoints
102 family is Enterobacteriaceae peni, glycopeptides, fusi, macrolides, linc, streptogramins, rifa, dapt, line R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
103 fullname like ^Citrobacter (koseri|amalonaticus|sedlakii|farmeri|rodentium) aminopenicillins, tica R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
104 fullname like ^Citrobacter (freundii|braakii|murliniae|werkmanii|youngae) aminopenicillins, amcl, czol, cfox R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
105 genus_species is Enterobacter cloacae aminopenicillins, amcl, czol, cfox R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
106 genus_species is Enterobacter aerogenes aminopenicillins, amcl, czol, cfox R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
107 genus_species is Escherichia hermanni aminopenicillins, tica R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
108 genus_species is Hafnia alvei aminopenicillins, amcl, czol, cfox R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
109 genus is Klebsiella aminopenicillins, tica R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
110 genus_species is Morganella morganii aminopenicillins, amcl, czol, tetracyclines, polymyxins, nitr R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
111 genus_species is Proteus mirabilis tetracyclines, tige, polymyxins, nitr R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
112 genus_species is Proteus penneri aminopenicillins, czol, cfur, tetracyclines, tige, polymyxins, nitr R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
113 genus_species is Proteus vulgaris aminopenicillins, czol, cfur, tetracyclines, tige, polymyxins, nitr R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
114 genus_species is Providencia rettgeri aminopenicillins, amcl, czol, cfur, tetracyclines, tige, polymyxins, nitr R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
115 genus_species is Providencia stuartii aminopenicillins, amcl, czol, cfur, tetracyclines, tige, polymyxins, nitr R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
116 genus is Raoultella aminopenicillins, tica R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
117 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
118 genus_species is Yersinia enterocolitica aminopenicillins, amcl, tica, czol, cfox R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
119 genus_species is Yersinia pseudotuberculosis poly, coli R Table 01: Intrinsic resistance in Enterobacteriaceae Expert Rules
120 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
121 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
122 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
123 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
124 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
125 genus_species is Achromobacter xylosoxidans aminopenicillins, czol, cfot, cftr, erta R Table 02: Intrinsic resistance in non-fermentative Gram-negative bacteria Expert Rules
126 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
127 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
128 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
129 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
130 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
131 genus one_of Haemophilus, Moraxella, Neisseria, Campylobacter glycopeptides, linc, dapt, line R Table 03: Intrinsic resistance in other Gram-negative bacteria Expert Rules
132 genus_species is Haemophilus influenzae fusi, streptogramins R Table 03: Intrinsic resistance in other Gram-negative bacteria Expert Rules
133 genus_species is Moraxella catarrhalis trim R Table 03: Intrinsic resistance in other Gram-negative bacteria Expert Rules
134 genus is Neisseria trim R Table 03: Intrinsic resistance in other Gram-negative bacteria Expert Rules
135 genus_species is Campylobacter fetus fusi, streptogramins, trim, nali R Table 03: Intrinsic resistance in other Gram-negative bacteria Expert Rules
136 genus_species is Campylobacter jejuni fusi, streptogramins, trim R Table 03: Intrinsic resistance in other Gram-negative bacteria Expert Rules
137 genus_species is Campylobacter coli fusi, streptogramins, trim R Table 03: Intrinsic resistance in other Gram-negative bacteria Expert Rules
138 gramstain is Gram positive aztr, polymyxins, nali R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
139 genus_species is Staphylococcus saprophyticus fusi, cfta, fosf, novo R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
140 genus_species is Staphylococcus cohnii cfta, novo R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
141 genus_species is Staphylococcus xylosus cfta, novo R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
142 genus_species is Staphylococcus capitis cfta, fosf R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
143 genus_species is Staphylococcus aureus cfta R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
144 genus_species is Staphylococcus epidermidis cfta R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
145 genus_species is Staphylococcus coagulase-negative cfta R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
146 genus_species is Staphylococcus hominis cfta R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
147 genus_species is Staphylococcus haemolyticus cfta R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
148 genus_species is Staphylococcus intermedius cfta R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
149 genus_species is Staphylococcus pseudintermedius cfta R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
150 genus is Streptococcus fusi, aminoglycosides R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
151 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
152 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
153 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
154 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
155 genus is Corynebacterium fosf R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
156 genus_species is Listeria monocytogenes cephalosporins R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
157 genus is Leuconostoc, Pediococcus glycopeptides R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
158 genus is Lactobacillus glycopeptides R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
159 genus_species is Clostridium ramosum vanc R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
160 genus_species is Clostridium innocuum vanc R Table 04: Intrinsic resistance in Gram-positive bacteria Expert Rules
161 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
162 genus is Enterococcus ampi R ureidopenicillins, carbapenems R Table 08: Interpretive rules for B-lactam agents and Gram-positive cocci Expert Rules
163 genus is Enterococcus amox R ureidopenicillins, carbapenems R Table 08: Interpretive rules for B-lactam agents and Gram-positive cocci Expert Rules
164 family is Enterobacteriaceae tica, pipe R, S pipe R Table 09: Interpretive rules for B-lactam agents and Gram-negative rods Expert Rules
165 genus is .* eryt S azit, clar S Table 11: Interpretive rules for macrolides, lincosamides, and streptogramins Expert Rules
166 genus is .* eryt I azit, clar I Table 11: Interpretive rules for macrolides, lincosamides, and streptogramins Expert Rules
167 genus is .* eryt R azit, clar R Table 11: Interpretive rules for macrolides, lincosamides, and streptogramins Expert Rules
168 genus is Staphylococcus tobr R kana, amik R Table 12: Interpretive rules for aminoglycosides Expert Rules
169 genus is Staphylococcus gent R aminoglycosides R Table 12: Interpretive rules for aminoglycosides Expert Rules
170 family is Enterobacteriaceae gent, tobr I, S gent R Table 12: Interpretive rules for aminoglycosides Expert Rules
171 family is Enterobacteriaceae gent, tobr R, I tobr R Table 12: Interpretive rules for aminoglycosides Expert Rules
172 genus is Staphylococcus moxi R fluoroquinolones R Table 13: Interpretive rules for quinolones Expert Rules
173 genus_species is Streptococcus pneumoniae moxi R fluoroquinolones R Table 13: Interpretive rules for quinolones Expert Rules
174 family is Enterobacteriaceae cipr R fluoroquinolones R Table 13: Interpretive rules for quinolones Expert Rules
175 genus_species is Neisseria gonorrhoeae cipr R fluoroquinolones R Table 13: Interpretive rules for quinolones Expert Rules
176 genus is .* amcl R ampi, amox R Non-EUCAST: ampicillin = R where amoxicillin/clav acid = R Other rules
177 genus is .* pita R pipe R Non-EUCAST: piperacillin = R where piperacillin/tazobactam = R Other rules
178 genus is .* trsu R trim R Non-EUCAST: trimethoprim = R where trimethoprim/sulfa = R Other rules
179 genus is .* ampi S amcl S Non-EUCAST: amoxicillin/clav acid = S where ampicillin = S Other rules
180 genus is .* amox S amcl S Non-EUCAST: amoxicillin/clav acid = S where ampicillin = S Other rules
181 genus is .* pipe S pita S Non-EUCAST: piperacillin/tazobactam = S where piperacillin = S Other rules
182 genus is .* trim S trsu S Non-EUCAST: trimethoprim/sulfa = S where trimethoprim = S Other rules

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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% Name: Insert %in%

View File

@ -3,8 +3,6 @@
\name{AMR-deprecated} \name{AMR-deprecated}
\alias{AMR-deprecated} \alias{AMR-deprecated}
\alias{ratio} \alias{ratio}
\alias{guess_mo}
\alias{guess_atc}
\alias{ab_property} \alias{ab_property}
\alias{ab_atc} \alias{ab_atc}
\alias{ab_official} \alias{ab_official}
@ -19,10 +17,6 @@
\usage{ \usage{
ratio(x, ratio) ratio(x, ratio)
guess_mo(...)
guess_atc(...)
ab_property(...) ab_property(...)
ab_atc(...) ab_atc(...)

View File

@ -21,7 +21,7 @@ Included are:
\item{All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria and Protozoa} \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 ~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 ~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 complete taxonomic tree of all included (sub)species: from kingdom to subspecies}
\item{The responsible author(s) and year of scientific publication} \item{The responsible author(s) and year of scientific publication}
} }

View File

@ -98,15 +98,15 @@ septic_patients \%>\%
# Count co-resistance between amoxicillin/clav acid and gentamicin, # Count co-resistance between amoxicillin/clav acid and gentamicin,
# so we can see that combination therapy does a lot more than mono therapy. # so we can see that combination therapy does a lot more than mono therapy.
# Please mind that `portion_S` calculates percentages right away instead. # Please mind that `portion_S` calculates percentages right away instead.
count_S(septic_patients$amcl) # S = 1057 (67.1\%) count_S(septic_patients$amcl) # S = 1342 (71.4\%)
count_all(septic_patients$amcl) # n = 1576 count_all(septic_patients$amcl) # n = 1879
count_S(septic_patients$gent) # S = 1372 (74.0\%) count_S(septic_patients$gent) # S = 1372 (74.0\%)
count_all(septic_patients$gent) # n = 1855 count_all(septic_patients$gent) # n = 1855
with(septic_patients, with(septic_patients,
count_S(amcl, gent)) # S = 1396 (92.0\%) count_S(amcl, gent)) # S = 1660 (92.3\%)
with(septic_patients, # n = 1517 with(septic_patients, # n = 1798
n_rsi(amcl, gent)) n_rsi(amcl, gent))
# Get portions S/I/R immediately of all rsi columns # Get portions S/I/R immediately of all rsi columns

View File

@ -2,8 +2,7 @@
% Please edit documentation in R/eucast_rules.R % Please edit documentation in R/eucast_rules.R
\name{eucast_rules} \name{eucast_rules}
\alias{eucast_rules} \alias{eucast_rules}
\alias{EUCAST_rules} \alias{eucast_rules_file}
\alias{interpretive_reading}
\title{EUCAST rules} \title{EUCAST rules}
\source{ \source{
\itemize{ \itemize{
@ -21,49 +20,48 @@
\url{http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_9.0_Breakpoint_Tables.xlsx} \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{ \usage{
eucast_rules(tbl, col_mo = NULL, info = TRUE, eucast_rules(x, col_mo = NULL, info = TRUE, rules = c("breakpoints",
rules = c("breakpoints", "expert", "other", "all"), verbose = FALSE, "expert", "other", "all"), verbose = FALSE, amcl = guess_ab_col(),
amcl = guess_ab_col(), amik = guess_ab_col(), amik = guess_ab_col(), amox = guess_ab_col(),
amox = guess_ab_col(), ampi = guess_ab_col(), ampi = guess_ab_col(), azit = guess_ab_col(),
azit = guess_ab_col(), azlo = guess_ab_col(), azlo = guess_ab_col(), aztr = guess_ab_col(),
aztr = guess_ab_col(), cefa = guess_ab_col(), cefa = guess_ab_col(), cfep = guess_ab_col(),
cfep = guess_ab_col(), cfot = guess_ab_col(), cfot = guess_ab_col(), cfox = guess_ab_col(),
cfox = guess_ab_col(), cfra = guess_ab_col(), cfra = guess_ab_col(), cfta = guess_ab_col(),
cfta = guess_ab_col(), cftr = guess_ab_col(), cftr = guess_ab_col(), cfur = guess_ab_col(),
cfur = guess_ab_col(), chlo = guess_ab_col(), chlo = guess_ab_col(), cipr = guess_ab_col(),
cipr = guess_ab_col(), clar = guess_ab_col(), clar = guess_ab_col(), clin = guess_ab_col(),
clin = guess_ab_col(), clox = guess_ab_col(), clox = guess_ab_col(), coli = guess_ab_col(),
coli = guess_ab_col(), czol = guess_ab_col(), czol = guess_ab_col(), dapt = guess_ab_col(),
dapt = guess_ab_col(), doxy = guess_ab_col(), doxy = guess_ab_col(), erta = guess_ab_col(),
erta = guess_ab_col(), eryt = guess_ab_col(), eryt = guess_ab_col(), fosf = guess_ab_col(),
fosf = guess_ab_col(), fusi = guess_ab_col(), fusi = guess_ab_col(), gent = guess_ab_col(),
gent = guess_ab_col(), imip = guess_ab_col(), imip = guess_ab_col(), kana = guess_ab_col(),
kana = guess_ab_col(), levo = guess_ab_col(), levo = guess_ab_col(), linc = guess_ab_col(),
linc = guess_ab_col(), line = guess_ab_col(), line = guess_ab_col(), mero = guess_ab_col(),
mero = guess_ab_col(), mezl = guess_ab_col(), mezl = guess_ab_col(), mino = guess_ab_col(),
mino = guess_ab_col(), moxi = guess_ab_col(), moxi = guess_ab_col(), nali = guess_ab_col(),
nali = guess_ab_col(), neom = guess_ab_col(), neom = guess_ab_col(), neti = guess_ab_col(),
neti = guess_ab_col(), nitr = guess_ab_col(), nitr = guess_ab_col(), norf = guess_ab_col(),
norf = guess_ab_col(), novo = guess_ab_col(), novo = guess_ab_col(), oflo = guess_ab_col(),
oflo = guess_ab_col(), oxac = guess_ab_col(), oxac = guess_ab_col(), peni = guess_ab_col(),
peni = guess_ab_col(), pipe = guess_ab_col(), pipe = guess_ab_col(), pita = guess_ab_col(),
pita = guess_ab_col(), poly = guess_ab_col(), poly = guess_ab_col(), pris = guess_ab_col(),
pris = guess_ab_col(), qida = guess_ab_col(), qida = guess_ab_col(), rifa = guess_ab_col(),
rifa = guess_ab_col(), roxi = guess_ab_col(), roxi = guess_ab_col(), siso = guess_ab_col(),
siso = guess_ab_col(), teic = guess_ab_col(), teic = guess_ab_col(), tetr = guess_ab_col(),
tetr = guess_ab_col(), tica = guess_ab_col(), tica = guess_ab_col(), tige = guess_ab_col(),
tige = guess_ab_col(), tobr = guess_ab_col(), tobr = guess_ab_col(), trim = guess_ab_col(),
trim = guess_ab_col(), trsu = guess_ab_col(), trsu = guess_ab_col(), vanc = guess_ab_col(), ...)
vanc = guess_ab_col())
EUCAST_rules(...) eucast_rules_file()
interpretive_reading(...)
} }
\arguments{ \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}}.} \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}} \item{...}{parameters that are passed on to \code{eucast_rules}}
} }
\value{ \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{ \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. 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}{ \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. 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.

View File

@ -4,15 +4,15 @@
\name{microorganisms.old} \name{microorganisms.old}
\alias{microorganisms.old} \alias{microorganisms.old}
\title{Data set with previously accepted taxonomic names} \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{ \describe{
\item{\code{col_id}}{Catalogue of Life ID} \item{\code{col_id}}{Catalogue of Life ID that was originally given}
\item{\code{tsn_new}}{New Catalogue of Life ID} \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 taxonomic name of the microorganism} \item{\code{fullname}}{Old full taxonomic name of the microorganism}
\item{\code{ref}}{Author(s) and year of concerning scientific publication} \item{\code{ref}}{Author(s) and year of concerning scientific publication}
}} }}
\source{ \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{ \usage{
microorganisms.old microorganisms.old

View File

@ -119,14 +119,14 @@ septic_patients \%>\%
# Calculate co-resistance between amoxicillin/clav acid and gentamicin, # Calculate co-resistance between amoxicillin/clav acid and gentamicin,
# so we can see that combination therapy does a lot more than mono therapy: # so we can see that combination therapy does a lot more than mono therapy:
septic_patients \%>\% portion_S(amcl) # S = 67.1\% septic_patients \%>\% portion_S(amcl) # S = 71.4\%
septic_patients \%>\% count_all(amcl) # n = 1576 septic_patients \%>\% count_all(amcl) # n = 1879
septic_patients \%>\% portion_S(gent) # S = 74.0\% septic_patients \%>\% portion_S(gent) # S = 74.0\%
septic_patients \%>\% count_all(gent) # n = 1855 septic_patients \%>\% count_all(gent) # n = 1855
septic_patients \%>\% portion_S(amcl, gent) # S = 92.0\% septic_patients \%>\% portion_S(amcl, gent) # S = 92.3\%
septic_patients \%>\% count_all(amcl, gent) # n = 1517 septic_patients \%>\% count_all(amcl, gent) # n = 1798
septic_patients \%>\% septic_patients \%>\%

View File

@ -94,8 +94,8 @@ rm(ref_taxonomy)
MOs <- data_total %>% MOs <- data_total %>%
filter( filter(
( (
# we only want all microorganisms and viruses # we only want all MICROorganisms and no viruses
!kingdom %in% c("Animalia", "Plantae") !kingdom %in% c("Animalia", "Plantae", "Viruses")
# and no entries above genus level - all species already have a taxonomic tree # and no entries above genus level - all species already have a taxonomic tree
& !rank %in% c("kingdom", "phylum", "superfamily", "class", "order", "family") & !rank %in% c("kingdom", "phylum", "superfamily", "class", "order", "family")
# and not all fungi: Aspergillus, Candida, Trichphyton and Pneumocystis are the most important, # 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", "Salinococcus", "Sanguibacteroides", "Schistosoma", "Scopulariopsis", "Scytalidium", "Sporobolomyces", "Stomatococcus",
"Strongyloides", "Syncephalastraceae", "Taenia", "Torulopsis", "Trichinella", "Trichobilharzia", "Trichomonas", "Strongyloides", "Syncephalastraceae", "Taenia", "Torulopsis", "Trichinella", "Trichobilharzia", "Trichomonas",
"Trichosporon", "Trichuris", "Trypanosoma", "Wuchereria") "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 # remove text if it contains 'Not assigned' like phylum in viruses
mutate_all(~gsub("Not assigned", "", .)) mutate_all(~gsub("Not assigned", "", .))
@ -176,7 +184,8 @@ MOs.old <- MOs %>%
stringr::str_replace( stringr::str_replace(
string = fullname, string = fullname,
pattern = stringr::fixed(authors2), pattern = stringr::fixed(authors2),
replacement = ""))), replacement = "")) %>%
gsub(" (var|f|subsp)[.]", "", .)),
ref) %>% ref) %>%
filter(!is.na(fullname)) %>% filter(!is.na(fullname)) %>%
distinct(fullname, .keep_all = TRUE) %>% distinct(fullname, .keep_all = TRUE) %>%
@ -185,9 +194,7 @@ MOs.old <- MOs %>%
MOs <- MOs %>% MOs <- MOs %>%
filter(is.na(col_id_new) | source == "DSMZ") %>% filter(is.na(col_id_new) | source == "DSMZ") %>%
transmute(col_id, transmute(col_id,
fullname = trimws(ifelse(kingdom == "Viruses", fullname = trimws(paste(genus, species, subspecies)),
gsub(":", "", ifelse(trimws(paste(species, subspecies)) == "", genus, paste(species, subspecies))),
paste(genus, species, subspecies))),
kingdom, kingdom,
phylum, phylum,
class, class,
@ -203,9 +210,6 @@ MOs <- MOs %>%
#distinct(fullname, .keep_all = TRUE) %>% #distinct(fullname, .keep_all = TRUE) %>%
filter(!grepl("unassigned", fullname, ignore.case = 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 # Filter out the DSMZ records that were renamed and are now in MOs.old
MOs <- MOs %>% MOs <- MOs %>%
filter(!(source == "DSMZ" & fullname %in% MOs.old$fullname), filter(!(source == "DSMZ" & fullname %in% MOs.old$fullname),

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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) library(testthat)

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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") context("abname.R")

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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") context("age.R")

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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") context("atc.R")

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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") context("atc_property.R")

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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") context("availability.R")

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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") context("count.R")

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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") context("data.R")
@ -27,36 +27,13 @@ test_that("data sets are valid", {
expect_identical(nrow(microorganisms), length(unique(microorganisms$mo))) expect_identical(nrow(microorganisms), length(unique(microorganisms$mo)))
# there should be no diacritics (i.e. non ASCII) characters in the datasets # there should be no diacritics (i.e. non ASCII) characters in the datasets
library(dplyr) datasets <- data(package = "AMR", envir = asNamespace("AMR"))$results[, "Item"]
# check only character variables: for (i in 1:length(datasets)) {
test_microorganisms <- microorganisms %>% select_if(is.character) %>% as.data.frame(stringsAsFactors = FALSE) dataset <- get(datasets[i], envir = asNamespace("AMR"))
test_microorganisms.old <- microorganisms.old %>% select_if(is.character) %>% as.data.frame(stringsAsFactors = FALSE) expect_identical(dataset_UTF8_to_ASCII(dataset), dataset)
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))
}) })
test_that("creation of data sets is valid", { test_that("creation of data sets is valid", {
df <- make() df <- make()
expect_lt(nrow(df[which(df$prevalence == 1), ]), nrow(df[which(df$prevalence == 2), ])) expect_lt(nrow(df[which(df$prevalence == 1), ]), nrow(df[which(df$prevalence == 2), ]))

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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") 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(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_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_property("amox"))
expect_warning(ab_atc("amox")) expect_warning(ab_atc("amox"))
expect_warning(ab_official("amox")) expect_warning(ab_official("amox"))

View File

@ -16,13 +16,22 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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") context("eucast_rules.R")
test_that("EUCAST rules work", { 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_error(suppressWarnings(eucast_rules(septic_patients, col_mo = "Non-existing")))
expect_identical(colnames(septic_patients), expect_identical(colnames(septic_patients),
@ -40,7 +49,6 @@ test_that("EUCAST rules work", {
stringsAsFactors = FALSE) stringsAsFactors = FALSE)
expect_identical(suppressWarnings(eucast_rules(a, "mo", info = FALSE)), b) expect_identical(suppressWarnings(eucast_rules(a, "mo", info = FALSE)), b)
expect_identical(suppressWarnings(eucast_rules(a, "mo", info = TRUE)), 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", a <- data.frame(mo = c("Staphylococcus aureus",
"Streptococcus group A"), "Streptococcus group A"),

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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") context("filter_ab_class.R")

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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") context("first_isolate.R")

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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") context("freq.R")

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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") context("g.test.R")

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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") context("get_locale.R")

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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") context("ggplot_rsi.R")

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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") context("guess_ab_col.R")

View File

@ -16,7 +16,7 @@
# This R package was created for academic research and was publicly # # This R package was created for academic research and was publicly #
# released in the hope that it will be useful, but it comes WITHOUT # # released in the hope that it will be useful, but it comes WITHOUT #
# ANY WARRANTY OR LIABILITY. # # 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") context("join_microorganisms.R")

Some files were not shown because too many files have changed in this diff Show More