diff --git a/DESCRIPTION b/DESCRIPTION index a0a824a1..bf5c408e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR -Version: 1.4.0.9018 -Date: 2020-11-11 +Version: 1.4.0.9019 +Date: 2020-11-12 Title: Antimicrobial Resistance Analysis Authors@R: c( person(role = c("aut", "cre"), diff --git a/NEWS.md b/NEWS.md index 5796406a..6bbad399 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,5 @@ -# AMR 1.4.0.9018 -## Last updated: 11 November 2020 +# AMR 1.4.0.9019 +## Last updated: 12 November 2020 ### New * Functions `is_gram_negative()` and `is_gram_positive()` as wrappers around `mo_gramstain()`. They always return `TRUE` or `FALSE` (except when the input is `NA` or the MO code is `UNKNOWN`), thus always return `FALSE` for species outside the taxonomic kingdom of Bacteria. If you have the `dplyr` package installed, they can even determine the column with microorganisms themselves inside `dplyr` functions: diff --git a/R/data.R b/R/data.R index a18f96c6..f0ca3735 100755 --- a/R/data.R +++ b/R/data.R @@ -258,7 +258,7 @@ catalogue_of_life <- list( #' - `antibiotic`\cr Name of the antibiotic drug #' @details The repository of this `AMR` package contains a file comprising this exact data set: . This file **allows for machine reading EUCAST guidelines about intrinsic resistance**, which is almost impossible with the Excel and PDF files distributed by EUCAST. The file is updated automatically. #' -#' This data set is based on '`r EUCAST_VERSION_EXPERT_RULES[["3.2"]]$title`', `r EUCAST_VERSION_EXPERT_RULES[["3.2"]]$version_txt` from `r EUCAST_VERSION_EXPERT_RULES[["3.2"]]$year`. +#' This data set is based on `r format_eucast_version_nr(3.2)`. #' @inheritSection AMR Reference data publicly available #' @inheritSection AMR Read more on our website! #' @examples diff --git a/R/eucast_rules.R b/R/eucast_rules.R index 2328d2c8..97d9e79e 100755 --- a/R/eucast_rules.R +++ b/R/eucast_rules.R @@ -27,13 +27,24 @@ # (running "data-raw/internals.R" will process that TSV file) EUCAST_VERSION_BREAKPOINTS <- list("10.0" = list(version_txt = "v10.0", year = 2020, - title = "EUCAST Clinical Breakpoints")) + title = "'EUCAST Clinical Breakpoints'", + url = "https://www.eucast.org/clinical_breakpoints/")) EUCAST_VERSION_EXPERT_RULES <- list("3.1" = list(version_txt = "v3.1", year = 2016, - title = "EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes"), + title = "'EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes'", + url = "https://www.eucast.org/expert_rules_and_intrinsic_resistance/"), "3.2" = list(version_txt = "v3.2", year = 2020, - title = "EUCAST Expert Rules / EUCAST Intrinsic Resistance and Unusual Phenotypes")) + title = "'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes'", + url = "https://www.eucast.org/expert_rules_and_intrinsic_resistance/")) + +format_eucast_version_nr <- function(version) { + # for documentation - adds title, version number, year and url in markdown language + lst <- c(EUCAST_VERSION_BREAKPOINTS, EUCAST_VERSION_EXPERT_RULES) + version <- format(version, nsmall = 1) + paste0("[", lst[[version]]$title, " ", lst[[version]]$version_txt, "](", lst[[version]]$url, ")", + " from ", lst[[version]]$year) +} #' Apply EUCAST rules #' diff --git a/R/rsi.R b/R/rsi.R index 6f47999c..4e9ac65e 100755 --- a/R/rsi.R +++ b/R/rsi.R @@ -35,7 +35,7 @@ #' @inheritParams first_isolate #' @param guideline defaults to the latest included EUCAST guideline, see Details for all options #' @param conserve_capped_values a logical to indicate that MIC values starting with `">"` (but not `">="`) must always return "R" , and that MIC values starting with `"<"` (but not `"<="`) must always return "S" -#' @param add_intrinsic_resistance *(only useful when using a EUCAST guideline)* a logical to indicate whether intrinsic antibiotic resistance must also be considered for applicable bug-drug combinations, meaning that e.g. ampicillin will always return "R" in *Klebsiella* species. Determination is based on the [intrinsic_resistant] data set, that itself is based on 'EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes', version `r EUCAST_VERSION_EXPERT_RULES`. +#' @param add_intrinsic_resistance *(only useful when using a EUCAST guideline)* a logical to indicate whether intrinsic antibiotic resistance must also be considered for applicable bug-drug combinations, meaning that e.g. ampicillin will always return "R" in *Klebsiella* species. Determination is based on the [intrinsic_resistant] data set, that itself is based on `r format_eucast_version_nr(3.2)`. #' @param reference_data a [data.frame] to be used for interpretation, which defaults to the [rsi_translation] data set. Changing this parameter allows for using own interpretation guidelines. This parameter must contain a data set that is equal in structure to the [rsi_translation] data set (same column names and column types). Please note that the `guideline` parameter will be ignored when `reference_data` is manually set. #' @param threshold maximum fraction of invalid antimicrobial interpretations of `x`, please see *Examples* #' @param ... for using on a [data.frame]: names of columns to apply [as.rsi()] on (supports tidy selection like `AMX:VAN`). Otherwise: parameters passed on to methods. diff --git a/docs/404.html b/docs/404.html index 084c01ad..556e709d 100644 --- a/docs/404.html +++ b/docs/404.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9018 + 1.4.0.9019 diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index ec497a83..e93165e5 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9018 + 1.4.0.9019 diff --git a/docs/articles/index.html b/docs/articles/index.html index 14b8ebdd..53105e60 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9018 + 1.4.0.9019 diff --git a/docs/authors.html b/docs/authors.html index 06637ef5..5656650c 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9018 + 1.4.0.9019 diff --git a/docs/index.html b/docs/index.html index 12f1ef0e..2b639a4a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -43,7 +43,7 @@ AMR (for R) - 1.4.0.9018 + 1.4.0.9019 diff --git a/docs/news/index.html b/docs/news/index.html index 37818183..b8446250 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9018 + 1.4.0.9019 @@ -236,13 +236,13 @@ Source: NEWS.md -
-

-AMR 1.4.0.9018 Unreleased +
+

+AMR 1.4.0.9019 Unreleased

-
+

-Last updated: 11 November 2020 +Last updated: 12 November 2020

diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index c0e26ecb..d652f1c3 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -12,7 +12,7 @@ articles: datasets: datasets.html resistance_predict: resistance_predict.html welcome_to_AMR: welcome_to_AMR.html -last_built: 2020-11-11T17:53Z +last_built: 2020-11-12T10:02Z urls: reference: https://msberends.github.io/AMR//reference article: https://msberends.github.io/AMR//articles diff --git a/docs/reference/antibiotic_class_selectors.html b/docs/reference/antibiotic_class_selectors.html index d21b93e9..7c996e9b 100644 --- a/docs/reference/antibiotic_class_selectors.html +++ b/docs/reference/antibiotic_class_selectors.html @@ -82,7 +82,7 @@ AMR (for R) - 1.4.0.9013 + 1.4.0.9019

diff --git a/docs/reference/as.mo.html b/docs/reference/as.mo.html index 65a66c23..7fa70916 100644 --- a/docs/reference/as.mo.html +++ b/docs/reference/as.mo.html @@ -82,7 +82,7 @@ AMR (for R) - 1.4.0.9013 + 1.4.0.9019
diff --git a/docs/reference/as.rsi.html b/docs/reference/as.rsi.html index c2ba7f7f..018908d9 100644 --- a/docs/reference/as.rsi.html +++ b/docs/reference/as.rsi.html @@ -82,7 +82,7 @@ AMR (for R) - 1.4.0.9018 + 1.4.0.9019
@@ -322,8 +322,7 @@ add_intrinsic_resistance -

(only useful when using a EUCAST guideline) a logical to indicate whether intrinsic antibiotic resistance must also be considered for applicable bug-drug combinations, meaning that e.g. ampicillin will always return "R" in Klebsiella species. Determination is based on the intrinsic_resistant data set, that itself is based on 'EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes', version list(version_txt = "v3.1", year = 2016, title = "EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes") -list(version_txt = "v3.2", year = 2020, title = "EUCAST Expert Rules / EUCAST Intrinsic Resistance and Unusual Phenotypes").

+

(only useful when using a EUCAST guideline) a logical to indicate whether intrinsic antibiotic resistance must also be considered for applicable bug-drug combinations, meaning that e.g. ampicillin will always return "R" in Klebsiella species. Determination is based on the intrinsic_resistant data set, that itself is based on 'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.2 from 2020.

reference_data diff --git a/docs/reference/index.html b/docs/reference/index.html index 70ff4980..fec5faf1 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9018 + 1.4.0.9019
diff --git a/docs/reference/intrinsic_resistant.html b/docs/reference/intrinsic_resistant.html index cc1062c0..7590519c 100644 --- a/docs/reference/intrinsic_resistant.html +++ b/docs/reference/intrinsic_resistant.html @@ -82,7 +82,7 @@ AMR (for R) - 1.4.0.9000 + 1.4.0.9019

@@ -255,7 +255,7 @@

Details

The repository of this AMR package contains a file comprising this exact data set: https://github.com/msberends/AMR/blob/master/data-raw/intrinsic_resistant.txt. This file allows for machine reading EUCAST guidelines about intrinsic resistance, which is almost impossible with the Excel and PDF files distributed by EUCAST. The file is updated automatically.

-

This data set is based on 'EUCAST Expert Rules / EUCAST Intrinsic Resistance and Unusual Phenotypes', v3.2 from 2020.

+

This data set is based on 'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.2 from 2020.

Reference data publicly available

diff --git a/docs/reference/like.html b/docs/reference/like.html index 3faa6ae6..cd2efa97 100644 --- a/docs/reference/like.html +++ b/docs/reference/like.html @@ -82,7 +82,7 @@ AMR (for R) - 1.4.0.9012 + 1.4.0.9019 diff --git a/docs/reference/mo_matching_score.html b/docs/reference/mo_matching_score.html index 82c0baf8..ec9acd72 100644 --- a/docs/reference/mo_matching_score.html +++ b/docs/reference/mo_matching_score.html @@ -82,7 +82,7 @@ AMR (for R) - 1.4.0.9012 + 1.4.0.9019 diff --git a/docs/reference/mo_property.html b/docs/reference/mo_property.html index 73e65ea8..1609cce0 100644 --- a/docs/reference/mo_property.html +++ b/docs/reference/mo_property.html @@ -82,7 +82,7 @@ AMR (for R) - 1.4.0.9014 + 1.4.0.9019 diff --git a/docs/survey.html b/docs/survey.html index f2c52645..b28e6fdc 100644 --- a/docs/survey.html +++ b/docs/survey.html @@ -81,7 +81,7 @@ AMR (for R) - 1.4.0.9018 + 1.4.0.9019 diff --git a/man/as.rsi.Rd b/man/as.rsi.Rd index f0a94b64..f66ac98b 100755 --- a/man/as.rsi.Rd +++ b/man/as.rsi.Rd @@ -67,8 +67,7 @@ is.rsi.eligible(x, threshold = 0.05) \item{conserve_capped_values}{a logical to indicate that MIC values starting with \code{">"} (but not \code{">="}) must always return "R" , and that MIC values starting with \code{"<"} (but not \code{"<="}) must always return "S"} -\item{add_intrinsic_resistance}{\emph{(only useful when using a EUCAST guideline)} a logical to indicate whether intrinsic antibiotic resistance must also be considered for applicable bug-drug combinations, meaning that e.g. ampicillin will always return "R" in \emph{Klebsiella} species. Determination is based on the \link{intrinsic_resistant} data set, that itself is based on 'EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes', version list(version_txt = "v3.1", year = 2016, title = "EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes") -list(version_txt = "v3.2", year = 2020, title = "EUCAST Expert Rules / EUCAST Intrinsic Resistance and Unusual Phenotypes").} +\item{add_intrinsic_resistance}{\emph{(only useful when using a EUCAST guideline)} a logical to indicate whether intrinsic antibiotic resistance must also be considered for applicable bug-drug combinations, meaning that e.g. ampicillin will always return "R" in \emph{Klebsiella} species. Determination is based on the \link{intrinsic_resistant} data set, that itself is based on \href{https://www.eucast.org/expert_rules_and_intrinsic_resistance/}{'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.2} from 2020.} \item{reference_data}{a \link{data.frame} to be used for interpretation, which defaults to the \link{rsi_translation} data set. Changing this parameter allows for using own interpretation guidelines. This parameter must contain a data set that is equal in structure to the \link{rsi_translation} data set (same column names and column types). Please note that the \code{guideline} parameter will be ignored when \code{reference_data} is manually set.} diff --git a/man/intrinsic_resistant.Rd b/man/intrinsic_resistant.Rd index c2dc7c92..1013a91c 100644 --- a/man/intrinsic_resistant.Rd +++ b/man/intrinsic_resistant.Rd @@ -20,7 +20,7 @@ Data set containing defined intrinsic resistance by EUCAST of all bug-drug combi \details{ The repository of this \code{AMR} package contains a file comprising this exact data set: \url{https://github.com/msberends/AMR/blob/master/data-raw/intrinsic_resistant.txt}. This file \strong{allows for machine reading EUCAST guidelines about intrinsic resistance}, which is almost impossible with the Excel and PDF files distributed by EUCAST. The file is updated automatically. -This data set is based on 'EUCAST Expert Rules / EUCAST Intrinsic Resistance and Unusual Phenotypes', v3.2 from 2020. +This data set is based on \href{https://www.eucast.org/expert_rules_and_intrinsic_resistance/}{'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.2} from 2020. } \section{Reference data publicly available}{