diff --git a/DESCRIPTION b/DESCRIPTION index a0092870..18a7ad0f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: AMR Version: 0.5.0.9012 -Date: 2019-01-25 +Date: 2019-01-26 Title: Antimicrobial Resistance Analysis Authors@R: c( person( diff --git a/NAMESPACE b/NAMESPACE index 4ef60676..aaf878ca 100755 --- a/NAMESPACE +++ b/NAMESPACE @@ -54,9 +54,16 @@ export(as.atc) export(as.mic) export(as.mo) export(as.rsi) -export(atc_ddd) -export(atc_groups) +export(atc_certe) +export(atc_name) +export(atc_official) +export(atc_online_ddd) +export(atc_online_groups) +export(atc_online_property) export(atc_property) +export(atc_tradenames) +export(atc_trivial_nl) +export(atc_umcg) export(brmo) export(count_I) export(count_IR) diff --git a/NEWS.md b/NEWS.md index 50dcadd1..0ddafb84 100755 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,17 @@ #### New * **BREAKING**: removed deprecated functions, parameters and references to 'bactid'. Use `as.mo()` to identify an MO code. +* All `ab_*` functions are deprecated and replaced by `atc_*` functions: + ```r + ab_property -> atc_property() + ab_name -> atc_name() + ab_official -> atc_official() + ab_trivial_nl -> atc_trivial_nl() + ab_certe -> atc_certe() + ab_umcg -> atc_umcg() + ab_tradenames -> atc_tradenames() + ``` + These functions use `as.atc()` internally. The old `atc_property` has been renamed `atc_online_property()`. This is done for two reasons: firstly, not all ATC codes are of antibiotics (ab) but can also be of antivirals or antifungals. Secondly, the input must have class `atc` or must be coerable to this class. Properties of these classes should start with the same class name, analogous to `as.mo()` and e.g. `mo_genus`. * New website: https://msberends.gitlab.io/AMR (built with the great [`pkgdown`](https://pkgdown.r-lib.org/)) * Contains the complete manual of this package and all of its functions with an explanation of their parameters * Contains a comprehensive tutorial about how to conduct antimicrobial resistance analysis @@ -37,6 +48,8 @@ #### Changed * Added 65 antibiotics to the `antibiotics` data set, from the [Pharmaceuticals Community Register](http://ec.europa.eu/health/documents/community-register/html/atc.htm) of the European Commission * Removed columns `atc_group1_nl` and `atc_group2_nl` from the `antibiotics` data set +* Function `atc_ddd` has been renamed `atc_online_ddd()` +* Function `atc_groups` has been renamed `atc_online_groups()` * Function `eucast_rules()`: * Updated EUCAST Clinical breakpoints to [version 9.0 of 1 January 2019](http://www.eucast.org/clinical_breakpoints/) * Fixed a critical bug where some rules that depend on previous applied rules would not be applied adequately diff --git a/R/atc.R b/R/atc.R index 23cd1d1d..b68461d7 100755 --- a/R/atc.R +++ b/R/atc.R @@ -186,191 +186,3 @@ as.data.frame.atc <- function (x, ...) { pull.atc <- function(.data, ...) { pull(as.data.frame(.data), ...) } - -#' Properties of an ATC code -#' -#' Gets data from the WHO to determine properties of an ATC (e.g. an antibiotic) like name, defined daily dose (DDD) or standard unit. \cr \strong{This function requires an internet connection.} -#' @param atc_code a character or character vector with ATC code(s) of antibiotic(s) -#' @param property property of an ATC code. Valid values are \code{"ATC"}, \code{"Name"}, \code{"DDD"}, \code{"U"} (\code{"unit"}), \code{"Adm.R"}, \code{"Note"} and \code{groups}. For this last option, all hierarchical groups of an ATC code will be returned, see Examples. -#' @param administration type of administration when using \code{property = "Adm.R"}, see Details -#' @param url url of website of the WHO. The sign \code{\%s} can be used as a placeholder for ATC codes. -#' @param ... parameters to pass on to \code{atc_property} -#' @details -#' Options for parameter \code{administration}: -#' \itemize{ -#' \item{\code{"Implant"}}{ = Implant} -#' \item{\code{"Inhal"}}{ = Inhalation} -#' \item{\code{"Instill"}}{ = Instillation} -#' \item{\code{"N"}}{ = nasal} -#' \item{\code{"O"}}{ = oral} -#' \item{\code{"P"}}{ = parenteral} -#' \item{\code{"R"}}{ = rectal} -#' \item{\code{"SL"}}{ = sublingual/buccal} -#' \item{\code{"TD"}}{ = transdermal} -#' \item{\code{"V"}}{ = vaginal} -#' } -#' -#' Abbreviations of return values when using \code{property = "U"} (unit): -#' \itemize{ -#' \item{\code{"g"}}{ = gram} -#' \item{\code{"mg"}}{ = milligram} -#' \item{\code{"mcg"}}{ = microgram} -#' \item{\code{"U"}}{ = unit} -#' \item{\code{"TU"}}{ = thousand units} -#' \item{\code{"MU"}}{ = million units} -#' \item{\code{"mmol"}}{ = millimole} -#' \item{\code{"ml"}}{ = milliliter (e.g. eyedrops)} -#' } -#' @export -#' @rdname atc_property -#' @importFrom dplyr %>% progress_estimated -#' @importFrom xml2 read_html -#' @importFrom rvest html_children html_node html_nodes html_table -#' @importFrom curl nslookup -#' @source \url{https://www.whocc.no/atc_ddd_alterations__cumulative/ddd_alterations/abbrevations/} -#' @examples -#' \donttest{ -#' # What's the ATC of amoxicillin? -#' guess_atc("Amoxicillin") -#' # [1] "J01CA04" -#' -#' # oral DDD (Defined Daily Dose) of amoxicillin -#' atc_property("J01CA04", "DDD", "O") -#' # parenteral DDD (Defined Daily Dose) of amoxicillin -#' atc_property("J01CA04", "DDD", "P") -#' -#' atc_property("J01CA04", property = "groups") # search hierarchical groups of amoxicillin -#' # [1] "ANTIINFECTIVES FOR SYSTEMIC USE" -#' # [2] "ANTIBACTERIALS FOR SYSTEMIC USE" -#' # [3] "BETA-LACTAM ANTIBACTERIALS, PENICILLINS" -#' # [4] "Penicillins with extended spectrum" -#' } -atc_property <- function(atc_code, - property, - administration = 'O', - url = 'https://www.whocc.no/atc_ddd_index/?code=%s&showdescription=no') { - - # check active network interface, from https://stackoverflow.com/a/5078002/4575331 - has_internet <- function(url) { - # extract host from given url - # https://www.whocc.no/atc_ddd_index/ -> www.whocc.no - url <- url %>% - gsub("^(http://|https://)", "", .) %>% - strsplit('/', fixed = TRUE) %>% - unlist() %>% - .[1] - !is.null(curl::nslookup(url, error = FALSE)) - } - # check for connection using the ATC of amoxicillin - if (!has_internet(url = url)) { - message("The URL could not be reached.") - return(rep(NA, length(atc_code))) - } - - if (length(property) != 1L) { - stop('`property` must be of length 1', call. = FALSE) - } - if (length(administration) != 1L) { - stop('`administration` must be of length 1', call. = FALSE) - } - - # also allow unit as property - if (property %like% 'unit') { - property <- 'U' - } - - # validation of properties - valid_properties <- c("ATC", "Name", "DDD", "U", "Adm.R", "Note", "groups") - valid_properties.bak <- valid_properties - - property <- tolower(property) - valid_properties <- tolower(valid_properties) - - if (!property %in% valid_properties) { - stop('Invalid `property`, use one of ', paste(valid_properties.bak, collapse = ", "), '.') - } - - if (property == 'ddd') { - returnvalue <- rep(NA_real_, length(atc_code)) - } else if (property == 'groups') { - returnvalue <- list() - } else { - returnvalue <- rep(NA_character_, length(atc_code)) - } - - progress <- progress_estimated(n = length(atc_code)) - - for (i in 1:length(atc_code)) { - - progress$tick()$print() - - atc_url <- sub('%s', atc_code[i], url, fixed = TRUE) - - if (property == "groups") { - tbl <- xml2::read_html(atc_url) %>% - rvest::html_node("#content") %>% - rvest::html_children() %>% - rvest::html_node("a") - - # get URLS of items - hrefs <- tbl %>% rvest::html_attr("href") - # get text of items - texts <- tbl %>% rvest::html_text() - # select only text items where URL like "code=" - texts <- texts[grepl("?code=", tolower(hrefs), fixed = TRUE)] - # last one is antibiotics, skip it - texts <- texts[1:length(texts) - 1] - returnvalue <- c(list(texts), returnvalue) - - } else { - tbl <- xml2::read_html(atc_url) %>% - rvest::html_nodes('table') %>% - rvest::html_table(header = TRUE) %>% - as.data.frame(stringsAsFactors = FALSE) - - # case insensitive column names - colnames(tbl) <- tolower(colnames(tbl)) %>% gsub('^atc.*', 'atc', .) - - if (length(tbl) == 0) { - warning('ATC not found: ', atc_code[i], '. Please check ', atc_url, '.', call. = FALSE) - returnvalue[i] <- NA - next - } - - if (property %in% c('atc', 'name')) { - # ATC and name are only in first row - returnvalue[i] <- tbl[1, property] - } else { - if (!'adm.r' %in% colnames(tbl) | is.na(tbl[1, 'adm.r'])) { - returnvalue[i] <- NA - next - } else { - for (j in 1:nrow(tbl)) { - if (tbl[j, 'adm.r'] == administration) { - returnvalue[i] <- tbl[j, property] - } - } - } - } - } - } - - if (property == "groups" & length(returnvalue) == 1) { - returnvalue <- returnvalue[[1]] - } - - returnvalue -} - -#' @rdname atc_property -#' @export -atc_groups <- function(atc_code, ...) { - atc_property(atc_code = atc_code, property = "groups", ...) -} - -#' @rdname atc_property -#' @export -atc_ddd <- function(atc_code, ...) { - atc_property(atc_code = atc_code, property = "ddd", ...) -} - diff --git a/R/atc_online.R b/R/atc_online.R new file mode 100644 index 00000000..6461cc02 --- /dev/null +++ b/R/atc_online.R @@ -0,0 +1,204 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# SOURCE # +# https://gitlab.com/msberends/AMR # +# # +# LICENCE # +# (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # +# # +# This R package is free software; you can freely use and distribute # +# it for both personal and commercial purposes under the terms of the # +# GNU General Public License version 2.0 (GNU GPL-2), as published by # +# the Free Software Foundation. # +# # +# This R package was created for academic research and was publicly # +# released in the hope that it will be useful, but it comes WITHOUT # +# ANY WARRANTY OR LIABILITY. # +# Visit our website for more info: https://msberends.gitab.io/AMR. # +# ==================================================================== # + +#' Properties of an ATC code +#' +#' Gets data from the WHO to determine properties of an ATC (e.g. an antibiotic) like name, defined daily dose (DDD) or standard unit. \cr \strong{This function requires an internet connection.} +#' @param atc_code a character or character vector with ATC code(s) of antibiotic(s) +#' @param property property of an ATC code. Valid values are \code{"ATC"}, \code{"Name"}, \code{"DDD"}, \code{"U"} (\code{"unit"}), \code{"Adm.R"}, \code{"Note"} and \code{groups}. For this last option, all hierarchical groups of an ATC code will be returned, see Examples. +#' @param administration type of administration when using \code{property = "Adm.R"}, see Details +#' @param url url of website of the WHO. The sign \code{\%s} can be used as a placeholder for ATC codes. +#' @param ... parameters to pass on to \code{atc_property} +#' @details +#' Options for parameter \code{administration}: +#' \itemize{ +#' \item{\code{"Implant"}}{ = Implant} +#' \item{\code{"Inhal"}}{ = Inhalation} +#' \item{\code{"Instill"}}{ = Instillation} +#' \item{\code{"N"}}{ = nasal} +#' \item{\code{"O"}}{ = oral} +#' \item{\code{"P"}}{ = parenteral} +#' \item{\code{"R"}}{ = rectal} +#' \item{\code{"SL"}}{ = sublingual/buccal} +#' \item{\code{"TD"}}{ = transdermal} +#' \item{\code{"V"}}{ = vaginal} +#' } +#' +#' Abbreviations of return values when using \code{property = "U"} (unit): +#' \itemize{ +#' \item{\code{"g"}}{ = gram} +#' \item{\code{"mg"}}{ = milligram} +#' \item{\code{"mcg"}}{ = microgram} +#' \item{\code{"U"}}{ = unit} +#' \item{\code{"TU"}}{ = thousand units} +#' \item{\code{"MU"}}{ = million units} +#' \item{\code{"mmol"}}{ = millimole} +#' \item{\code{"ml"}}{ = milliliter (e.g. eyedrops)} +#' } +#' @export +#' @rdname atc_online +#' @importFrom dplyr %>% progress_estimated +#' @importFrom xml2 read_html +#' @importFrom rvest html_children html_node html_nodes html_table +#' @importFrom curl nslookup +#' @source \url{https://www.whocc.no/atc_ddd_alterations__cumulative/ddd_alterations/abbrevations/} +#' @examples +#' \donttest{ +#' # oral DDD (Defined Daily Dose) of amoxicillin +#' atc_online_property("J01CA04", "DDD", "O") +#' # parenteral DDD (Defined Daily Dose) of amoxicillin +#' atc_online_property("J01CA04", "DDD", "P") +#' +#' atc_online_property("J01CA04", property = "groups") # search hierarchical groups of amoxicillin +#' # [1] "ANTIINFECTIVES FOR SYSTEMIC USE" +#' # [2] "ANTIBACTERIALS FOR SYSTEMIC USE" +#' # [3] "BETA-LACTAM ANTIBACTERIALS, PENICILLINS" +#' # [4] "Penicillins with extended spectrum" +#' } +atc_online_property <- function(atc_code, + property, + administration = 'O', + url = 'https://www.whocc.no/atc_ddd_index/?code=%s&showdescription=no') { + + # check active network interface, from https://stackoverflow.com/a/5078002/4575331 + has_internet <- function(url) { + # extract host from given url + # https://www.whocc.no/atc_ddd_index/ -> www.whocc.no + url <- url %>% + gsub("^(http://|https://)", "", .) %>% + strsplit('/', fixed = TRUE) %>% + unlist() %>% + .[1] + !is.null(curl::nslookup(url, error = FALSE)) + } + # check for connection using the ATC of amoxicillin + if (!has_internet(url = url)) { + message("The URL could not be reached.") + return(rep(NA, length(atc_code))) + } + + if (length(property) != 1L) { + stop('`property` must be of length 1', call. = FALSE) + } + if (length(administration) != 1L) { + stop('`administration` must be of length 1', call. = FALSE) + } + + # also allow unit as property + if (property %like% 'unit') { + property <- 'U' + } + + # validation of properties + valid_properties <- c("ATC", "Name", "DDD", "U", "Adm.R", "Note", "groups") + valid_properties.bak <- valid_properties + + property <- tolower(property) + valid_properties <- tolower(valid_properties) + + if (!property %in% valid_properties) { + stop('Invalid `property`, use one of ', paste(valid_properties.bak, collapse = ", "), '.') + } + + if (property == 'ddd') { + returnvalue <- rep(NA_real_, length(atc_code)) + } else if (property == 'groups') { + returnvalue <- list() + } else { + returnvalue <- rep(NA_character_, length(atc_code)) + } + + progress <- progress_estimated(n = length(atc_code)) + + for (i in 1:length(atc_code)) { + + progress$tick()$print() + + atc_url <- sub('%s', atc_code[i], url, fixed = TRUE) + + if (property == "groups") { + tbl <- xml2::read_html(atc_url) %>% + rvest::html_node("#content") %>% + rvest::html_children() %>% + rvest::html_node("a") + + # get URLS of items + hrefs <- tbl %>% rvest::html_attr("href") + # get text of items + texts <- tbl %>% rvest::html_text() + # select only text items where URL like "code=" + texts <- texts[grepl("?code=", tolower(hrefs), fixed = TRUE)] + # last one is antibiotics, skip it + texts <- texts[1:length(texts) - 1] + returnvalue <- c(list(texts), returnvalue) + + } else { + tbl <- xml2::read_html(atc_url) %>% + rvest::html_nodes('table') %>% + rvest::html_table(header = TRUE) %>% + as.data.frame(stringsAsFactors = FALSE) + + # case insensitive column names + colnames(tbl) <- tolower(colnames(tbl)) %>% gsub('^atc.*', 'atc', .) + + if (length(tbl) == 0) { + warning('ATC not found: ', atc_code[i], '. Please check ', atc_url, '.', call. = FALSE) + returnvalue[i] <- NA + next + } + + if (property %in% c('atc', 'name')) { + # ATC and name are only in first row + returnvalue[i] <- tbl[1, property] + } else { + if (!'adm.r' %in% colnames(tbl) | is.na(tbl[1, 'adm.r'])) { + returnvalue[i] <- NA + next + } else { + for (j in 1:nrow(tbl)) { + if (tbl[j, 'adm.r'] == administration) { + returnvalue[i] <- tbl[j, property] + } + } + } + } + } + } + + if (property == "groups" & length(returnvalue) == 1) { + returnvalue <- returnvalue[[1]] + } + + returnvalue +} + +#' @rdname atc_online +#' @export +atc_online_groups <- function(atc_code, ...) { + atc_online_property(atc_code = atc_code, property = "groups", ...) +} + +#' @rdname atc_online +#' @export +atc_online_ddd <- function(atc_code, ...) { + atc_online_property(atc_code = atc_code, property = "ddd", ...) +} + diff --git a/R/ab_property.R b/R/atc_property.R similarity index 74% rename from R/ab_property.R rename to R/atc_property.R index 97412f17..36a98486 100755 --- a/R/ab_property.R +++ b/R/atc_property.R @@ -25,20 +25,20 @@ #' @param x a (vector of a) valid \code{\link{atc}} code or any text that can be coerced to a valid atc with \code{\link{as.atc}} #' @param property one of the column names of one of the \code{\link{antibiotics}} data set, like \code{"atc"} and \code{"official"} #' @param language language of the returned text, defaults to English (\code{"en"}) and can be set with \code{\link{getOption}("AMR_locale")}. Either one of \code{"en"} (English) or \code{"nl"} (Dutch). -#' @rdname ab_property -#' @return A vector of values. In case of \code{ab_tradenames}, if \code{x} is of length one, a vector will be returned. Otherwise a \code{\link{list}}, with \code{x} as names. +#' @rdname atc_property +#' @return A vector of values. In case of \code{atc_tradenames}, if \code{x} is of length one, a vector will be returned. Otherwise a \code{\link{list}}, with \code{x} as names. #' @export #' @importFrom dplyr %>% left_join pull #' @seealso \code{\link{antibiotics}} #' @inheritSection AMR Read more on our website! #' @examples -#' ab_atc("amcl") # J01CR02 -#' ab_name("amcl") # Amoxicillin and beta-lactamase inhibitor -#' ab_name("amcl", "nl") # Amoxicilline met enzymremmer -#' ab_trivial_nl("amcl") # Amoxicilline/clavulaanzuur -#' ab_certe("amcl") # amcl -#' ab_umcg("amcl") # AMCL -ab_property <- function(x, property = 'official') { +#' as.atc("amcl") # J01CR02 +#' atc_name("amcl") # Amoxicillin and beta-lactamase inhibitor +#' atc_name("amcl", "nl") # Amoxicilline met enzymremmer +#' atc_trivial_nl("amcl") # Amoxicilline/clavulaanzuur +#' atc_certe("amcl") # amcl +#' atc_umcg("amcl") # AMCL +atc_property <- function(x, property = 'official') { property <- property[1] if (!property %in% colnames(AMR::antibiotics)) { stop("invalid property: ", property, " - use a column name of the `antibiotics` data set") @@ -53,15 +53,9 @@ ab_property <- function(x, property = 'official') { ) } -#' @rdname ab_property +#' @rdname atc_property #' @export -ab_atc <- function(x) { - as.character(as.atc(x)) -} - -#' @rdname ab_property -#' @export -ab_official <- function(x, language = NULL) { +atc_official <- function(x, language = NULL) { if (is.null(language)) { language <- getOption("AMR_locale", default = "en")[1L] @@ -69,40 +63,40 @@ ab_official <- function(x, language = NULL) { language <- tolower(language[1]) } if (language %in% c("en", "")) { - ab_property(x, "official") + atc_property(x, "official") } else if (language == "nl") { - ab_property(x, "official_nl") + atc_property(x, "official_nl") } else { stop("Unsupported language: '", language, "' - use one of: 'en', 'nl'", call. = FALSE) } } -#' @rdname ab_property +#' @rdname atc_property #' @export -ab_name <- ab_official +atc_name <- atc_official -#' @rdname ab_property +#' @rdname atc_property #' @export -ab_trivial_nl <- function(x) { - ab_property(x, "trivial_nl") +atc_trivial_nl <- function(x) { + atc_property(x, "trivial_nl") } -#' @rdname ab_property +#' @rdname atc_property #' @export -ab_certe <- function(x) { - ab_property(x, "certe") +atc_certe <- function(x) { + atc_property(x, "certe") } -#' @rdname ab_property +#' @rdname atc_property #' @export -ab_umcg <- function(x) { - ab_property(x, "umcg") +atc_umcg <- function(x) { + atc_property(x, "umcg") } -#' @rdname ab_property +#' @rdname atc_property #' @export -ab_tradenames <- function(x) { - res <- ab_property(x, "trade_name") +atc_tradenames <- function(x) { + res <- atc_property(x, "trade_name") res <- strsplit(res, "|", fixed = TRUE) if (length(x) == 1) { res <- unlist(res) diff --git a/R/deprecated.R b/R/deprecated.R index a5559954..8c13028f 100755 --- a/R/deprecated.R +++ b/R/deprecated.R @@ -21,7 +21,7 @@ #' Deprecated functions #' -#' These functions are \link{Deprecated}. They will be removed in a future release. Using the functions will give a warning with the name of the function it has been replaced by. +#' These functions are so-called '\link{Deprecated}'. They will be removed in a future release. Using the functions will give a warning with the name of the function it has been replaced by (if there is one). #' @inheritSection AMR Read more on our website! #' @export #' @keywords internal @@ -53,3 +53,59 @@ guess_mo <- function(...) { .Deprecated(new = "as.mo", package = "AMR") as.mo(...) } + +#' @rdname AMR-deprecated +#' @export +ab_property <- function(...) { + .Deprecated(new = "atc_property", package = "AMR") + atc_property(...) +} + +#' @rdname AMR-deprecated +#' @export +ab_atc <- function(...) { + .Deprecated(new = "as.atc", package = "AMR") + as.atc(...) +} + +#' @rdname AMR-deprecated +#' @export +ab_official <- function(...) { + .Deprecated(new = "atc_official", package = "AMR") + atc_official(...) +} + +#' @rdname AMR-deprecated +#' @export +ab_name <- function(...) { + .Deprecated(new = "atc_name", package = "AMR") + atc_name(...) +} + +#' @rdname AMR-deprecated +#' @export +ab_trivial_nl <- function(...) { + .Deprecated(new = "atc_trivial_nl", package = "AMR") + atc_trivial_nl(...) +} + +#' @rdname AMR-deprecated +#' @export +ab_certe <- function(...) { + .Deprecated(new = "atc_certe", package = "AMR") + atc_certe(...) +} + +#' @rdname AMR-deprecated +#' @export +ab_umcg <- function(...) { + .Deprecated(new = "atc_umcg", package = "AMR") + atc_umcg(...) +} + +#' @rdname AMR-deprecated +#' @export +ab_tradenames <- function(...) { + .Deprecated(new = "atc_tradenames", package = "AMR") + atc_tradenames(...) +} diff --git a/R/zzz.R b/R/zzz.R index 585052ac..592756bc 100755 --- a/R/zzz.R +++ b/R/zzz.R @@ -25,7 +25,7 @@ #' @details #' This package was intended to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial properties by using evidence-based methods. #' -#' This package was created for academic research by PhD students of the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). +#' This package was created for both academic research and routine analysis by PhD students of the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). #' @section Read more on our website!: #' \if{html}{\figure{logo.png}{options: height=40px style=margin-bottom:5px} \cr} #' On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a omprehensive tutorial} about how to conduct AMR analysis and find \href{https://msberends.gitlab.io/AMR/reference}{the complete documentation of all functions}, which reads a lot easier than in R. diff --git a/_pkgdown.yml b/_pkgdown.yml index 8c169cd7..29f376b6 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -104,8 +104,8 @@ reference: - '`mdro`' - '`key_antibiotics`' - '`mo_property`' - - '`ab_property`' - '`atc_property`' + - '`atc_online_property`' - '`abname`' - '`age`' - '`age_groups`' @@ -146,6 +146,8 @@ reference: - '`like`' - '`mo_failures`' - '`mo_renamed`' + - '`ab_property`' + authors: Matthijs S. Berends: diff --git a/docs/articles/AMR.html b/docs/articles/AMR.html index 2929e674..34234277 100644 --- a/docs/articles/AMR.html +++ b/docs/articles/AMR.html @@ -178,7 +178,7 @@
AMR.Rmd
Note: values on this page will change with every website update since they are based on randomly created values and the page was written in RMarkdown. However, the methodology remains unchanged. This page was generated on 25 January 2019.
+Note: values on this page will change with every website update since they are based on randomly created values and the page was written in RMarkdown. However, the methodology remains unchanged. This page was generated on 26 January 2019.
As with many uses in R, we need some additional packages for AMR analysis. The most important one is dplyr
, which tremendously improves the way we work with data - it allows for a very natural way of writing syntaxes in R. Another important dependency is ggplot2
. This package can be used to create beautiful plots in R.
As with many uses in R, we need some additional packages for AMR analysis. Our package works closely together with the tidyverse packages dplyr
and ggplot2
by Dr Hadley Wickham. The tidyverse tremendously improves the way we conduct data science - it allows for a very natural way of writing syntaxes and creating beautiful plots in R.
Our AMR
package depends on these packages and even extends their use and functions.
Using the sample()
function, we can randomly select items from all objects we defined earlier. To let our fake data reflect reality a bit, we will also approximately define the probabilities of bacteria and the antibiotic results with the prob
parameter.
data <- data.frame(date = sample(dates, 5000, replace = TRUE),
- patient_id = sample(patients, 5000, replace = TRUE),
- hospital = sample(hospitals, 5000, replace = TRUE, prob = c(0.30, 0.35, 0.15, 0.20)),
- bacteria = sample(bacteria, 5000, replace = TRUE, prob = c(0.50, 0.25, 0.15, 0.10)),
- amox = sample(ab_interpretations, 5000, replace = TRUE, prob = c(0.60, 0.05, 0.35)),
- amcl = sample(ab_interpretations, 5000, replace = TRUE, prob = c(0.75, 0.10, 0.15)),
- cipr = sample(ab_interpretations, 5000, replace = TRUE, prob = c(0.80, 0.00, 0.20)),
- gent = sample(ab_interpretations, 5000, replace = TRUE, prob = c(0.92, 0.00, 0.08))
+Using the sample()
function, we can randomly select items from all objects we defined earlier. To let our fake data reflect reality a bit, we will also approximately define the probabilities of bacteria and the antibiotic results with the prob
parameter.
+data <- data.frame(date = sample(dates, 5000, replace = TRUE),
+ patient_id = sample(patients, 5000, replace = TRUE),
+ hospital = sample(hospitals, 5000, replace = TRUE, prob = c(0.30, 0.35, 0.15, 0.20)),
+ bacteria = sample(bacteria, 5000, replace = TRUE, prob = c(0.50, 0.25, 0.15, 0.10)),
+ amox = sample(ab_interpretations, 5000, replace = TRUE, prob = c(0.60, 0.05, 0.35)),
+ amcl = sample(ab_interpretations, 5000, replace = TRUE, prob = c(0.75, 0.10, 0.15)),
+ cipr = sample(ab_interpretations, 5000, replace = TRUE, prob = c(0.80, 0.00, 0.20)),
+ gent = sample(ab_interpretations, 5000, replace = TRUE, prob = c(0.92, 0.00, 0.08))
)
-Using the left_join()
function from the dplyr
package, we can ‘map’ the gender to the patient ID using the patients_table
object we created earlier:
-
+Using the left_join()
function from the dplyr
package, we can ‘map’ the gender to the patient ID using the patients_table
object we created earlier:
+
The resulting data set contains 5,000 blood culture isolates. With the head()
function we can preview the first 6 values of this data set:
@@ -303,32 +306,32 @@
-2013-03-25
-O5
+2012-01-02
+K9
+Hospital A
+Escherichia coli
+I
+S
+S
+S
+M
+
+
+2011-05-22
+Y3
Hospital B
Streptococcus pneumoniae
S
S
-R
-S
-F
-
-
-2014-05-07
-W10
-Hospital A
-Klebsiella pneumoniae
-R
-S
S
S
F
-2014-08-13
-L5
-Hospital D
-Escherichia coli
+2015-11-10
+F1
+Hospital C
+Staphylococcus aureus
S
S
S
@@ -336,10 +339,10 @@
M
-2014-07-10
-Z2
+2011-10-10
+X7
Hospital D
-Escherichia coli
+Staphylococcus aureus
R
S
S
@@ -347,24 +350,24 @@
F
-2014-09-18
-Z9
+2017-11-10
+B3
Hospital D
Staphylococcus aureus
+R
S
+R
S
-S
-S
-F
+M
-2015-04-27
-Q3
-Hospital C
-Escherichia coli
-S
+2014-11-09
+O5
+Hospital B
+Klebsiella pneumoniae
S
S
+R
S
F
@@ -386,15 +389,15 @@
#
# Item Count Percent Cum. Count Cum. Percent
# --- ----- ------ -------- ----------- -------------
-# 1 M 2,653 53.1% 2,653 53.1%
-# 2 F 2,347 46.9% 5,000 100.0%
+# 1 M 2,593 51.9% 2,593 51.9%
+# 2 F 2,407 48.1% 5,000 100.0%
So, we can draw at least two conclusions immediately. From a data scientist perspective, the data looks clean: only values M
and F
. From a researcher perspective: there are slightly more men. Nothing we didn’t already know.
-The data is already quite clean, but we still need to transform some variables. The bacteria
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 mutate()
function of the dplyr
package makes this really easy:
+The data is already quite clean, but we still need to transform some variables. The bacteria
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 mutate()
function of the dplyr
package makes this really easy:
-We also want to transform the antibiotics, because in real life data we don’t know if they are really clean. The as.rsi()
function ensures reliability and reproducibility in these kind of variables. The mutate_at()
will run the as.rsi()
function on defined variables:
+ mutate(bacteria = as.mo(bacteria))
+We also want to transform the antibiotics, because in real life data we don’t know if they are really clean. The as.rsi()
function ensures reliability and reproducibility in these kind of variables. The mutate_at()
will run the as.rsi()
function on defined variables:
+ mutate_at(vars(amox:gent), as.rsi)
Finally, we will apply EUCAST rules on our antimicrobial results. In Europe, most medical microbiological laboratories already apply these rules. Our package features their latest insights on intrinsic resistance and exceptional phenotypes. Moreover, the eucast_rules()
function can also apply additional rules, like forcing ampicillin = R when amoxicillin/clavulanic acid = R.
Because the amoxicillin (column amox
) and amoxicillin/clavulanic acid (column amcl
) in our data were generated randomly, some rows will undoubtedly contain amox = S and amcl = R, which is technically impossible. The eucast_rules()
fixes this:
data <- eucast_rules(data, col_mo = "bacteria")
@@ -418,10 +421,10 @@
# Kingella kingae (no changes)
#
# EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes (v3.1, 2016)
-# Table 1: Intrinsic resistance in Enterobacteriaceae (324 changes)
+# Table 1: Intrinsic resistance in Enterobacteriaceae (345 changes)
# Table 2: Intrinsic resistance in non-fermentative Gram-negative bacteria (no changes)
# Table 3: Intrinsic resistance in other Gram-negative bacteria (no changes)
-# Table 4: Intrinsic resistance in Gram-positive bacteria (672 changes)
+# Table 4: Intrinsic resistance in Gram-positive bacteria (673 changes)
# Table 8: Interpretive rules for B-lactam agents and Gram-positive cocci (no changes)
# Table 9: Interpretive rules for B-lactam agents and Gram-negative rods (no changes)
# Table 10: Interpretive rules for B-lactam agents and other Gram-negative bacteria (no changes)
@@ -437,14 +440,14 @@
# Non-EUCAST: piperacillin/tazobactam = S where piperacillin = S (no changes)
# Non-EUCAST: trimethoprim/sulfa = S where trimethoprim = S (no changes)
#
-# => EUCAST rules affected 1,808 out of 5,000 rows -> changed 996 test results.
+# => EUCAST rules affected 1,860 out of 5,000 rows -> changed 1,018 test results.
Adding new variables
Now that we have the microbial ID, we can add some taxonomic properties:
data <- data %>%
- mutate(gramstain = mo_gramstain(bacteria),
+ mutate(gramstain = mo_gramstain(bacteria),
genus = mo_genus(bacteria),
species = mo_species(bacteria))
@@ -458,14 +461,14 @@
This AMR
package includes this methodology with the first_isolate()
function. It adopts the episode of a year (can be changed by user) and it starts counting days after every selected isolate. This new variable can easily be added to our data:
data <- data %>%
- mutate(first = first_isolate(.))
+ mutate(first = first_isolate(.))
# NOTE: Using column `bacteria` as input for `col_mo`.
# NOTE: Using column `date` as input for `col_date`.
# NOTE: Using column `patient_id` as input for `col_patient_id`.
-# => Found 2,928 first isolates (58.6% of total)
-So only 58.6% is suitable for resistance analysis! We can now filter on is with the filter()
function, also from the dplyr
package:
+# => Found 2,924 first isolates (58.5% of total)
+So only 58.5% is suitable for resistance analysis! We can now filter on is with the filter()
function, also from the dplyr
package:
+ filter(first == TRUE)
For future use, the above two syntaxes can be shortened with the filter_first_isolate()
function:
@@ -489,41 +492,30 @@
1
-2010-03-08
-V6
+2010-08-27
+Q10
B_ESCHR_COL
+R
S
-S
-S
+R
S
TRUE
2
-2011-02-03
-V6
+2010-10-24
+Q10
B_ESCHR_COL
-R
S
S
-R
+S
+S
FALSE
3
-2011-12-31
-V6
-B_ESCHR_COL
-S
-I
-S
-S
-TRUE
-
-
-4
-2012-10-20
-V6
+2010-10-26
+Q10
B_ESCHR_COL
S
S
@@ -531,86 +523,97 @@
S
FALSE
+
+4
+2011-12-25
+Q10
+B_ESCHR_COL
+R
+S
+S
+S
+TRUE
+
5
-2012-12-17
-V6
+2012-05-04
+Q10
B_ESCHR_COL
+I
+I
S
-S
-S
-S
+R
FALSE
6
-2013-08-27
-V6
+2012-05-18
+Q10
+B_ESCHR_COL
+S
+I
+S
+S
+FALSE
+
+
+7
+2012-05-23
+Q10
B_ESCHR_COL
-R
S
-S
-S
-TRUE
-
-
-7
-2013-09-21
-V6
-B_ESCHR_COL
I
S
S
-R
FALSE
8
-2014-07-19
-V6
+2012-06-18
+Q10
B_ESCHR_COL
+R
+R
S
-S
-S
-S
+R
FALSE
9
-2014-07-24
-V6
+2013-10-02
+Q10
B_ESCHR_COL
+S
+S
R
S
+TRUE
+
+
+10
+2013-10-22
+Q10
+B_ESCHR_COL
+S
+S
S
S
FALSE
-
-10
-2014-11-23
-V6
-B_ESCHR_COL
-S
-S
-S
-S
-TRUE
-
-Only 4 isolates are marked as ‘first’ according to CLSI guideline. But when reviewing the antibiogram, it is obvious that some isolates are absolutely different strains and show be included too. This is why we weigh isolates, based on their antibiogram. The key_antibiotics()
function adds a vector with 18 key antibiotics: 6 broad spectrum ones, 6 small spectrum for Gram negatives and 6 small spectrum for Gram positives. These can be defined by the user.
+Only 3 isolates are marked as ‘first’ according to CLSI guideline. But when reviewing the antibiogram, it is obvious that some isolates are absolutely different strains and show be included too. This is why we weigh isolates, based on their antibiogram. The key_antibiotics()
function adds a vector with 18 key antibiotics: 6 broad spectrum ones, 6 small spectrum for Gram negatives and 6 small spectrum for Gram positives. These can be defined by the user.
If a column exists with a name like ‘key(…)ab’ the first_isolate()
function will automatically use it and determine the first weighted isolates. Mind the NOTEs in below output:
data <- data %>%
- mutate(keyab = key_antibiotics(.)) %>%
- mutate(first_weighted = first_isolate(.))
+ mutate(keyab = key_antibiotics(.)) %>%
+ mutate(first_weighted = first_isolate(.))
# NOTE: Using column `bacteria` as input for `col_mo`.
# NOTE: Using column `bacteria` as input for `col_mo`.
# NOTE: Using column `date` as input for `col_date`.
# NOTE: Using column `patient_id` as input for `col_patient_id`.
# NOTE: Using column `keyab` as input for `col_keyantibiotics`. Use col_keyantibiotics = FALSE to prevent this.
# [Criterion] Inclusion based on key antibiotics, ignoring I.
-# => Found 4,422 first weighted isolates (88.4% of total)
+# => Found 4,414 first weighted isolates (88.3% of total)
isolate | @@ -627,68 +630,44 @@||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | -2010-03-08 | -V6 | +2010-08-27 | +Q10 | B_ESCHR_COL | +R | S | -S | -S | +R | S | TRUE | TRUE | |
2 | -2011-02-03 | -V6 | +2010-10-24 | +Q10 | B_ESCHR_COL | -R | S | S | -R | +S | +S | FALSE | TRUE | |
3 | -2011-12-31 | -V6 | +2010-10-26 | +Q10 | B_ESCHR_COL | S | -I | S | S | -TRUE | -TRUE | +S | +FALSE | +FALSE |
4 | -2012-10-20 | -V6 | -B_ESCHR_COL | -S | -S | -S | -S | -FALSE | -FALSE | -|||||
5 | -2012-12-17 | -V6 | -B_ESCHR_COL | -S | -S | -S | -S | -FALSE | -FALSE | -|||||
6 | -2013-08-27 | -V6 | +2011-12-25 | +Q10 | B_ESCHR_COL | R | S | @@ -698,67 +677,92 @@TRUE | ||||||
5 | +2012-05-04 | +Q10 | +B_ESCHR_COL | +I | +I | +S | +R | +FALSE | +TRUE | +|||||
6 | +2012-05-18 | +Q10 | +B_ESCHR_COL | +S | +I | +S | +S | +FALSE | +TRUE | +|||||
7 | -2013-09-21 | -V6 | +2012-05-23 | +Q10 | B_ESCHR_COL | +S | I | S | S | -R | FALSE | -TRUE | +FALSE | |
8 | -2014-07-19 | -V6 | +2012-06-18 | +Q10 | B_ESCHR_COL | +R | +R | S | -S | -S | -S | +R | FALSE | TRUE |
9 | -2014-07-24 | -V6 | +2013-10-02 | +Q10 | B_ESCHR_COL | +S | +S | R | S | +TRUE | +TRUE | +|||
10 | +2013-10-22 | +Q10 | +B_ESCHR_COL | +S | +S | S | S | FALSE | TRUE | |||||
10 | -2014-11-23 | -V6 | -B_ESCHR_COL | -S | -S | -S | -S | -TRUE | -TRUE | -
Instead of 4, now 8 isolates are flagged. In total, 88.4% of all isolates are marked ‘first weighted’ - 147% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.
+Instead of 3, now 8 isolates are flagged. In total, 88.3% of all isolates are marked ‘first weighted’ - 146.8% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.
As with filter_first_isolate()
, there’s a shortcut for this new algorithm too:
So we end up with 4,422 isolates for analysis.
+So we end up with 4,414 isolates for analysis.
We can remove unneeded columns:
+ select(-c(first, keyab))Now our data looks like:
date | patient_id | hospital | @@ -775,13 +779,14 @@|||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2013-03-25 | -O5 | +2 | +2011-05-22 | +Y3 | Hospital B | B_STRPTC_PNE | S | S | -R | +S | R | F | Gram positive | @@ -790,56 +795,28 @@TRUE | |||
2014-05-07 | -W10 | -Hospital A | -B_KLBSL_PNE | -R | -S | -S | -S | -F | -Gram negative | -Klebsiella | -pneumoniae | -TRUE | -|||||
2014-08-13 | -L5 | -Hospital D | -B_ESCHR_COL | +3 | +2015-11-10 | +F1 | +Hospital C | +B_STPHY_AUR | S | S | S | S | M | -Gram negative | -Escherichia | -coli | -TRUE | -
2014-07-10 | -Z2 | -Hospital D | -B_ESCHR_COL | -R | -S | -S | -S | -F | -Gram negative | -Escherichia | -coli | +Gram positive | +Staphylococcus | +aureus | TRUE | ||
2014-09-18 | -Z9 | +4 | +2011-10-10 | +X7 | Hospital D | B_STPHY_AUR | -S | +R | S | S | S | @@ -850,15 +827,48 @@TRUE | |||||
2015-04-27 | -Q3 | -Hospital C | +5 | +2017-11-10 | +B3 | +Hospital D | +B_STPHY_AUR | +R | +S | +R | +S | +M | +Gram positive | +Staphylococcus | +aureus | +TRUE | +|
6 | +2014-11-09 | +O5 | +Hospital B | +B_KLBSL_PNE | +R | +S | +R | +S | +F | +Gram negative | +Klebsiella | +pneumoniae | +TRUE | +||||
7 | +2013-01-26 | +F4 | +Hospital B | B_ESCHR_COL | S | S | S | S | -F | +M | Gram negative | Escherichia | coli | @@ -879,7 +889,7 @@||||
1 | Escherichia coli | -2,183 | -49.4% | -2,183 | -49.4% | +2,153 | +48.8% | +2,153 | +48.8% | ||||||||
2 | Staphylococcus aureus | -1,120 | -25.3% | -3,303 | -74.7% | +1,107 | +25.1% | +3,260 | +73.9% | ||||||||
3 | Streptococcus pneumoniae | -666 | -15.1% | -3,969 | -89.8% | +677 | +15.3% | +3,937 | +89.2% | ||||||||
4 | Klebsiella pneumoniae | -453 | -10.2% | -4,422 | +477 | +10.8% | +4,414 | 100.0% |
hospital | @@ -945,26 +955,26 @@ Longest: 24||
---|---|---|
Hospital A | -0.4980784 | +0.4615385 |
Hospital B | -0.4516332 | +0.4961089 |
Hospital C | -0.4705882 | +0.4975767 |
Hospital D | -0.4767837 | +0.4942288 |
Of course it would be very convenient to know the number of isolates responsible for the percentages. For that purpose the n_rsi()
can be used, which works exactly like n_distinct()
from the dplyr
package. It counts all isolates available for every group (i.e. values S, I or R):
Of course it would be very convenient to know the number of isolates responsible for the percentages. For that purpose the n_rsi()
can be used, which works exactly like n_distinct()
from the dplyr
package. It counts all isolates available for every group (i.e. values S, I or R):
data_1st %>%
- group_by(hospital) %>%
- summarise(amoxicillin = portion_IR(amox),
+ group_by(hospital) %>%
+ summarise(amoxicillin = portion_IR(amox),
available = n_rsi(amox))
Hospital A | -0.4980784 | -1301 | +0.4615385 | +1300 |
Hospital B | -0.4516332 | -1592 | +0.4961089 | +1542 |
Hospital C | -0.4705882 | -646 | +0.4975767 | +619 |
Hospital D | -0.4767837 | -883 | +0.4942288 | +953 |
These functions can also be used to get the portion of multiple antibiotics, to calculate co-resistance very easily:
data_1st %>%
- group_by(genus) %>%
- summarise(amoxicillin = portion_S(amcl),
+ group_by(genus) %>%
+ summarise(amoxicillin = portion_S(amcl),
gentamicin = portion_S(gent),
"amox + gent" = portion_S(amcl, gent))
Escherichia | -0.7498855 | -0.9079249 | -0.9775538 | +0.7445425 | +0.9173247 | +0.9804923 |
Klebsiella | -0.7505519 | -0.9006623 | -0.9713024 | +0.7169811 | +0.9119497 | +0.9769392 |
Staphylococcus | -0.7437500 | -0.9196429 | -0.9767857 | +0.7705510 | +0.9168925 | +0.9828365 |
Streptococcus | -0.7357357 | +0.7474151 | 0.0000000 | -0.7357357 | +0.7474151 |
To make a transition to the next part, let’s see how this difference could be plotted:
data_1st %>%
- group_by(genus) %>%
- summarise("1. Amoxicillin" = portion_S(amcl),
+ group_by(genus) %>%
+ summarise("1. Amoxicillin" = portion_S(amcl),
"2. Gentamicin" = portion_S(gent),
"3. Amox + gent" = portion_S(amcl, gent)) %>%
tidyr::gather("Antibiotic", "S", -genus) %>%
@@ -1071,7 +1081,7 @@ Longest: 24
Omit the translate_ab = FALSE
to have the antibiotic codes (amox, amcl, cipr, gent) translated to official WHO names (amoxicillin, amoxicillin and betalactamase inhibitor, ciprofloxacin, gentamicin).
If we group on e.g. the genus
column and add some additional functions from our package, we can create this:
# group the data on `genus`
-ggplot(data_1st %>% group_by(genus)) +
+ggplot(data_1st %>% group_by(genus)) +
# create bars with genus on x axis
# it looks for variables with class `rsi`,
# of which we have 4 (earlier created with `as.rsi`)
@@ -1093,7 +1103,7 @@ Longest: 24
To simplify this, we also created the ggplot_rsi()
function, which combines almost all above functions:
We can transform the data and apply the test in only a couple of lines:
septic_patients %>%
- filter(hospital_id %in% c("A", "D")) %>% # filter on only hospitals A and D
- select(hospital_id, fosf) %>% # select the hospitals and fosfomycin
- group_by(hospital_id) %>% # group on the hospitals
+ filter(hospital_id %in% c("A", "D")) %>% # filter on only hospitals A and D
+ select(hospital_id, fosf) %>% # select the hospitals and fosfomycin
+ group_by(hospital_id) %>% # group on the hospitals
count_df(combine_IR = TRUE) %>% # count all isolates per group (hospital_id)
tidyr::spread(hospital_id, Value) %>% # transform output so A and D are columns
- select(A, D) %>% # and select these only
+ select(A, D) %>% # and select these only
as.matrix() %>% # transform to good old matrix for fisher.test()
fisher.test() # do Fisher's Exact Test
#
diff --git a/docs/articles/AMR_files/figure-html/plot 1-1.png b/docs/articles/AMR_files/figure-html/plot 1-1.png
index c668b4fd..cfd432d9 100644
Binary files a/docs/articles/AMR_files/figure-html/plot 1-1.png and b/docs/articles/AMR_files/figure-html/plot 1-1.png differ
diff --git a/docs/articles/AMR_files/figure-html/plot 3-1.png b/docs/articles/AMR_files/figure-html/plot 3-1.png
index 07a7ae2d..99177314 100644
Binary files a/docs/articles/AMR_files/figure-html/plot 3-1.png and b/docs/articles/AMR_files/figure-html/plot 3-1.png differ
diff --git a/docs/articles/AMR_files/figure-html/plot 4-1.png b/docs/articles/AMR_files/figure-html/plot 4-1.png
index ce2ce98d..04478c71 100644
Binary files a/docs/articles/AMR_files/figure-html/plot 4-1.png and b/docs/articles/AMR_files/figure-html/plot 4-1.png differ
diff --git a/docs/articles/AMR_files/figure-html/plot 5-1.png b/docs/articles/AMR_files/figure-html/plot 5-1.png
index 448130d7..aa523929 100644
Binary files a/docs/articles/AMR_files/figure-html/plot 5-1.png and b/docs/articles/AMR_files/figure-html/plot 5-1.png differ
diff --git a/docs/articles/EUCAST.html b/docs/articles/EUCAST.html
index fd36c25f..577986e8 100644
--- a/docs/articles/EUCAST.html
+++ b/docs/articles/EUCAST.html
@@ -178,7 +178,7 @@
How to apply EUCAST rules
Matthijs S. Berends
- 25 January 2019
+ 26 January 2019
EUCAST.Rmd
diff --git a/docs/articles/G_test.html b/docs/articles/G_test.html
index 6cb2e9a2..7994429a 100644
--- a/docs/articles/G_test.html
+++ b/docs/articles/G_test.html
@@ -178,7 +178,7 @@
How to use the G-test
Matthijs S. Berends
- 25 January 2019
+ 26 January 2019
G_test.Rmd
diff --git a/docs/articles/Predict.html b/docs/articles/Predict.html
index 1855e80c..1099d4d7 100644
--- a/docs/articles/Predict.html
+++ b/docs/articles/Predict.html
@@ -178,7 +178,7 @@
How to predict antimicrobial resistance
Matthijs S. Berends
- 25 January 2019
+ 26 January 2019
Predict.Rmd
diff --git a/docs/articles/ab_property.html b/docs/articles/ab_property.html
index 193760fa..646f2b66 100644
--- a/docs/articles/ab_property.html
+++ b/docs/articles/ab_property.html
@@ -178,7 +178,7 @@
How to get properties of an antibiotic
Matthijs S. Berends
- 25 January 2019
+ 26 January 2019
ab_property.Rmd
diff --git a/docs/articles/benchmarks.html b/docs/articles/benchmarks.html
index b58129a7..5336f0bd 100644
--- a/docs/articles/benchmarks.html
+++ b/docs/articles/benchmarks.html
@@ -178,7 +178,7 @@
Benchmarks
Matthijs S. Berends
- 25 January 2019
+ 26 January 2019
benchmarks.Rmd
@@ -240,15 +240,15 @@
library(dplyr)
# take 500,000 random MO codes from the septic_patients data set
x = septic_patients %>%
- sample_n(500000, replace = TRUE) %>%
- pull(mo)
+ sample_n(500000, replace = TRUE) %>%
+ pull(mo)
# got the right length?
length(x)
# [1] 500000
# and how many unique values do we have?
-n_distinct(x)
+n_distinct(x)
# [1] 96
# only 96, but distributed in 500,000 results. now let's see:
diff --git a/docs/articles/freq.html b/docs/articles/freq.html
index 8156c10b..fdba7fd2 100644
--- a/docs/articles/freq.html
+++ b/docs/articles/freq.html
@@ -178,7 +178,7 @@
How to create frequency tables
Matthijs S. Berends
- 25 January 2019
+ 26 January 2019
freq.Rmd
diff --git a/docs/articles/mo_property.html b/docs/articles/mo_property.html
index 1f380407..23456cc7 100644
--- a/docs/articles/mo_property.html
+++ b/docs/articles/mo_property.html
@@ -178,7 +178,7 @@
How to get properties of a microorganism
Matthijs S. Berends
- 25 January 2019
+ 26 January 2019
mo_property.Rmd
diff --git a/docs/extra.css b/docs/extra.css
index 8fd48767..bab9e252 100644
--- a/docs/extra.css
+++ b/docs/extra.css
@@ -71,7 +71,7 @@ pre, code {
font-family: 'Courier New', monospace;
font-size: 100% !important;
font-weight: bold;
- background-color: transparent;
+ background-color: #f4f4f4;
}
pre {
font-size: 90% !important;
@@ -84,7 +84,7 @@ kbd {
font-size: small;
vertical-align: text-bottom;
color: #2c3e50;
- background: #eee;
+ background: #eeeeee;
font-weight: bold;
}
diff --git a/docs/index.html b/docs/index.html
index 84b5d2f6..f4f8b940 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -178,14 +178,26 @@
(TLDR - to find out how to conduct AMR analysis, please continue reading here to get started.
AMR
is a free and open-source R package to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial properties by using evidence-based methods.
-We created this package for academic research at the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). This R package is free software; you can freely use and distribute it for both personal and commercial (but not patent) purposes under the terms of the GNU General Public License version 2.0 (GPL-2), as published by the Free Software Foundation. Read further about our GPL-2 licence here.
+We created this package for both academic research and routine analysis at the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). This R package is actively maintained and free software; you can freely use and distribute it for both personal and commercial (but not patent) purposes under the terms of the GNU General Public Licence version 2.0 (GPL-2), as published by the Free Software Foundation. Read the full licence here.
+This package can be used for:
+
+- Calculating antimicrobial resistance
+- Predicting antimicrobial resistance using regression models
+- Getting properties for any microorganism (like Gram stain, species, genus or family)
+- Getting properties for any antibiotic (like name, ATC code, defined daily dose or trade name)
+- Plotting antimicrobial resistance
+- Determining first isolates to be used for AMR analysis
+- Applying EUCAST rules
+- Determining multi-drug resistance organisms (MDRO)
+- Descriptive statistics: frequency tables, kurtosis and skewness
+
This package is ready-to-use for a professional environment by specialists in the following fields:
-Medical Microbiology:
+Medical Microbiology
- Epidemiologists (both clinical microbiological and research)
- Research Microbiologists
@@ -193,18 +205,18 @@
- Research Pharmacologists
- Data Scientists / Data Analysts
-Veterinary Microbiology:
+Veterinary Microbiology
- Research Veterinarians
- Veterinary Epidemiologists
-Microbial Ecology:
+Microbial Ecology
- Soil Microbiologists
- Extremophile Researchers
- Astrobiologists
-Developers:
+Developers
- Package developers for R
- Software developers
@@ -267,7 +279,7 @@
- Use
mdro()
(abbreviation of Multi Drug Resistant Organisms) to check your isolates for exceptional resistance with country-specific guidelines or EUCAST rules. Currently, national guidelines for Germany and the Netherlands are supported.
- The data set
microorganisms
contains the complete taxonomic tree of more than 18,000 microorganisms (bacteria, fungi/yeasts and protozoa). Furthermore, the colloquial name and Gram stain are available, which enables resistance analysis of e.g. different antibiotics per Gram stain. The package also contains functions to look up values in this data set like mo_genus()
, mo_family()
, mo_gramstain()
or even mo_phylum()
. As they use as.mo()
internally, they also use artificial intelligence. For example, mo_genus("MRSA")
and mo_genus("S. aureus")
will both return "Staphylococcus"
. They also come with support for German, Dutch, Spanish, Italian, French and Portuguese. These functions can be used to add new variables to your data.
-- The data set
antibiotics
contains the ATC code, LIS codes, official name, trivial name and DDD of both oral and parenteral administration. It also contains a total of 298 trade names. Use functions like ab_name()
and ab_tradenames()
to look up values. The ab_*
functions use as.atc()
internally so they support AI to guess your expected result. For example, ab_name("Fluclox")
, ab_name("Floxapen")
and ab_name("J01CF05")
will all return "Flucloxacillin"
. These functions can again be used to add new variables to your data.
+- The data set
antibiotics
contains the ATC code, LIS codes, official name, trivial name and DDD of both oral and parenteral administration. It also contains a total of 298 trade names. Use functions like ab_name()
and ab_tradenames()
to look up values. The ab_*
functions use as.atc()
internally so they support AI to guess your expected result. For example, ab_name("Fluclox")
, ab_name("Floxapen")
and ab_name("J01CF05")
will all return "Flucloxacillin"
. These functions can again be used to add new variables to your data.
diff --git a/docs/logo.png b/docs/logo.png
new file mode 100644
index 00000000..48b92531
Binary files /dev/null and b/docs/logo.png differ
diff --git a/docs/news/index.html b/docs/news/index.html
index c2f8ed50..aa73431e 100644
--- a/docs/news/index.html
+++ b/docs/news/index.html
@@ -229,6 +229,16 @@
-
BREAKING: removed deprecated functions, parameters and references to ‘bactid’. Use
as.mo()
to identify an MO code.
+-
+
All ab_*
functions are deprecated and replaced by atc_*
functions:
+ab_property -> atc_property()
+ab_name -> atc_name()
+ab_official -> atc_official()
+ab_trivial_nl -> atc_trivial_nl()
+ab_certe -> atc_certe()
+ab_umcg -> atc_umcg()
+ab_tradenames -> atc_tradenames()
+These functions use as.atc()
internally. The old atc_property
has been renamed atc_online_property()
. This is done for two reasons: firstly, not all ATC codes are of antibiotics (ab) but can also be of antivirals or antifungals. Secondly, the input must have class atc
or must be coerable to this class. Properties of these classes should start with the same class name, analogous to as.mo()
and e.g. mo_genus
.
- New website: https://msberends.gitlab.io/AMR (built with the great
pkgdown
)
- Contains the complete manual of this package and all of its functions with an explanation of their parameters
@@ -244,20 +254,20 @@
- New function
age_groups()
to split ages into custom or predefined groups (like children or elderly). This allows for easier demographic antimicrobial resistance analysis per age group.
-
New function ggplot_rsi_predict()
as well as the base R plot()
function can now be used for resistance prediction calculated with resistance_predict()
:
-
+
-
Functions filter_first_isolate()
and filter_first_weighted_isolate()
to shorten and fasten filtering on data sets with antimicrobial results, e.g.:
-
+
is equal to:
-
+
New vignettes about how to conduct AMR analysis, predict antimicrobial resistance, use the G-test and more. These are also available (and even easier readable) on our website: https://msberends.gitlab.io/AMR.
@@ -268,6 +278,10 @@
- Added 65 antibiotics to the
antibiotics
data set, from the Pharmaceuticals Community Register of the European Commission
- Removed columns
atc_group1_nl
and atc_group2_nl
from the antibiotics
data set
+- Function
atc_ddd
has been renamed atc_online_ddd()
+
+- Function
atc_groups
has been renamed atc_online_groups()
+
- Function
eucast_rules()
:
- Updated EUCAST Clinical breakpoints to version 9.0 of 1 January 2019
@@ -383,10 +397,10 @@
- Fewer than 3 characters as input for
as.mo
will return NA
-
Function as.mo
(and all mo_*
wrappers) now supports genus abbreviations with “species” attached
-
+
- Added parameter
combine_IR
(TRUE/FALSE) to functions portion_df
and count_df
, to indicate that all values of I and R must be merged into one, so the output only consists of S vs. IR (susceptible vs. non-susceptible)
- Fix for
portion_*(..., as_percent = TRUE)
when minimal number of isolates would not be met
@@ -399,15 +413,15 @@
-
Support for grouping variables, test with:
-
+
-
Support for (un)selecting columns:
-
+
- Check for
hms::is.hms
@@ -487,18 +501,18 @@
They also come with support for German, Dutch, French, Italian, Spanish and Portuguese:
-mo_gramstain("E. coli")
-# [1] "Gram negative"
-mo_gramstain("E. coli", language = "de") # German
-# [1] "Gramnegativ"
-mo_gramstain("E. coli", language = "es") # Spanish
-# [1] "Gram negativo"
-mo_fullname("S. group A", language = "pt") # Portuguese
-# [1] "Streptococcus grupo A"
+mo_gramstain("E. coli")
+# [1] "Gram negative"
+mo_gramstain("E. coli", language = "de") # German
+# [1] "Gramnegativ"
+mo_gramstain("E. coli", language = "es") # Spanish
+# [1] "Gram negativo"
+mo_fullname("S. group A", language = "pt") # Portuguese
+# [1] "Streptococcus grupo A"
Furthermore, former taxonomic names will give a note about the current taxonomic name:
-
+
- Functions
count_R
, count_IR
, count_I
, count_SI
and count_S
to selectively count resistant or susceptible isolates
@@ -509,18 +523,18 @@
-
Functions as.mo
and is.mo
as replacements for as.bactid
and is.bactid
(since the microoganisms
data set not only contains bacteria). These last two functions are deprecated and will be removed in a future release. The as.mo
function determines microbial IDs using Artificial Intelligence (AI):
-as.mo("E. coli")
-# [1] B_ESCHR_COL
-as.mo("MRSA")
-# [1] B_STPHY_AUR
-as.mo("S group A")
-# [1] B_STRPTC_GRA
+as.mo("E. coli")
+# [1] B_ESCHR_COL
+as.mo("MRSA")
+# [1] B_STPHY_AUR
+as.mo("S group A")
+# [1] B_STRPTC_GRA
And with great speed too - on a quite regular Linux server from 2007 it takes us less than 0.02 seconds to transform 25,000 items:
-
+
- Added parameter
reference_df
for as.mo
, so users can supply their own microbial IDs, name or codes as a reference table
- Renamed all previous references to
bactid
to mo
, like:
@@ -548,12 +562,12 @@
- Added three antimicrobial agents to the
antibiotics
data set: Terbinafine (D01BA02), Rifaximin (A07AA11) and Isoconazole (D01AC05)
-
Added 163 trade names to the antibiotics
data set, it now contains 298 different trade names in total, e.g.:
-
+
- For
first_isolate
, rows will be ignored when there’s no species available
- Function
ratio
is now deprecated and will be removed in a future release, as it is not really the scope of this package
@@ -564,13 +578,13 @@
Support for quasiquotation in the functions series count_*
and portions_*
, and n_rsi
. This allows to check for more than 2 vectors or columns.
-
+
Edited ggplot_rsi
and geom_rsi
so they can cope with count_df
. The new fun
parameter has value portion_df
at default, but can be set to count_df
.
Fix for ggplot_rsi
when the ggplot2
package was not loaded
@@ -584,12 +598,12 @@
Support for types (classes) list and matrix for freq
-
+
For lists, subsetting is possible:
-
+
diff --git a/docs/reference/AMR-deprecated.html b/docs/reference/AMR-deprecated.html
index 7d3c902b..600851b2 100644
--- a/docs/reference/AMR-deprecated.html
+++ b/docs/reference/AMR-deprecated.html
@@ -47,7 +47,7 @@
-
+
@@ -223,13 +223,29 @@
- These functions are Deprecated. They will be removed in a future release. Using the functions will give a warning with the name of the function it has been replaced by.
+ These functions are so-called 'Deprecated'. They will be removed in a future release. Using the functions will give a warning with the name of the function it has been replaced by (if there is one).
ratio(x, ratio)
-guess_mo(...)
+guess_mo(...)
+
+ab_property(...)
+
+ab_atc(...)
+
+ab_official(...)
+
+ab_name(...)
+
+ab_trivial_nl(...)
+
+ab_certe(...)
+
+ab_umcg(...)
+
+ab_tradenames(...)
Read more on our website!
diff --git a/docs/reference/AMR.html b/docs/reference/AMR.html
index 23faa41a..3591c047 100644
--- a/docs/reference/AMR.html
+++ b/docs/reference/AMR.html
@@ -231,7 +231,7 @@
Details
This package was intended to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial properties by using evidence-based methods.
-This package was created for academic research by PhD students of the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG).
+This package was created for both academic research and routine analysis by PhD students of the Faculty of Medical Sciences of the University of Groningen and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG).
Read more on our website!
diff --git a/docs/reference/WHOCC.html b/docs/reference/WHOCC.html
index 1972e1f6..59b4079e 100644
--- a/docs/reference/WHOCC.html
+++ b/docs/reference/WHOCC.html
@@ -246,9 +246,9 @@ On our website https://msberends.gitla
Examples
# NOT RUN {
as.atc("meropenem")
-ab_name("J01DH02")
+ab_name("J01DH02")
-ab_tradenames("flucloxacillin")
+ab_tradenames("flucloxacillin")
# }
diff --git a/docs/reference/atc_online.html b/docs/reference/atc_online.html
new file mode 100644
index 00000000..004b63d7
--- /dev/null
+++ b/docs/reference/atc_online.html
@@ -0,0 +1,353 @@
+
+
+
+
+
+
+
+
+Properties of an ATC code — atc_online_property • AMR (for R)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties of an ATC code
+
+ atc_online.Rd
+
+
+
+
+ Gets data from the WHO to determine properties of an ATC (e.g. an antibiotic) like name, defined daily dose (DDD) or standard unit.
This function requires an internet connection.
+
+
+
+ atc_online_property(atc_code, property, administration = "O",
+ url = "https://www.whocc.no/atc_ddd_index/?code=%s&showdescription=no")
+
+atc_online_groups(atc_code, ...)
+
+atc_online_ddd(atc_code, ...)
+
+ Arguments
+
+
+
+ atc_code
+ a character or character vector with ATC code(s) of antibiotic(s)
+
+
+ property
+ property of an ATC code. Valid values are "ATC"
, "Name"
, "DDD"
, "U"
("unit"
), "Adm.R"
, "Note"
and groups
. For this last option, all hierarchical groups of an ATC code will be returned, see Examples.
+
+
+ administration
+ type of administration when using property = "Adm.R"
, see Details
+
+
+ url
+ url of website of the WHO. The sign %s
can be used as a placeholder for ATC codes.
+
+
+ ...
+ parameters to pass on to atc_property
+
+
+
+ Source
+
+ https://www.whocc.no/atc_ddd_alterations__cumulative/ddd_alterations/abbrevations/
+
+ Details
+
+ Options for parameter administration
:
+"Implant"
= Implant
+"Inhal"
= Inhalation
+"Instill"
= Instillation
+"N"
= nasal
+"O"
= oral
+"P"
= parenteral
+"R"
= rectal
+"SL"
= sublingual/buccal
+"TD"
= transdermal
+"V"
= vaginal
+
+ Abbreviations of return values when using property = "U"
(unit):
+"g"
= gram
+"mg"
= milligram
+"mcg"
= microgram
+"U"
= unit
+"TU"
= thousand units
+"MU"
= million units
+"mmol"
= millimole
+"ml"
= milliliter (e.g. eyedrops)
+
+
+
+ Examples
+ # NOT RUN {
+# oral DDD (Defined Daily Dose) of amoxicillin
+atc_online_property("J01CA04", "DDD", "O")
+# parenteral DDD (Defined Daily Dose) of amoxicillin
+atc_online_property("J01CA04", "DDD", "P")
+
+atc_online_property("J01CA04", property = "groups") # search hierarchical groups of amoxicillin
+# [1] "ANTIINFECTIVES FOR SYSTEMIC USE"
+# [2] "ANTIBACTERIALS FOR SYSTEMIC USE"
+# [3] "BETA-LACTAM ANTIBACTERIALS, PENICILLINS"
+# [4] "Penicillins with extended spectrum"
+# }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/reference/atc_property.html b/docs/reference/atc_property.html
index c6ad52c9..208b4d07 100644
--- a/docs/reference/atc_property.html
+++ b/docs/reference/atc_property.html
@@ -6,7 +6,7 @@
-Properties of an ATC code — atc_property • AMR (for R)
+Property of an antibiotic — atc_property • AMR (for R)
@@ -45,9 +45,9 @@
-
+
-
+
@@ -216,95 +216,71 @@
- Properties of an ATC code
+ Property of an antibiotic
atc_property.Rd
- Gets data from the WHO to determine properties of an ATC (e.g. an antibiotic) like name, defined daily dose (DDD) or standard unit.
This function requires an internet connection.
+ Use these functions to return a specific property of an antibiotic from the antibiotics
data set, based on their ATC code. Get such a code with as.atc
.
- atc_property(atc_code, property, administration = "O",
- url = "https://www.whocc.no/atc_ddd_index/?code=%s&showdescription=no")
+ atc_property(x, property = "official")
-atc_groups(atc_code, ...)
+atc_official(x, language = NULL)
-atc_ddd(atc_code, ...)
+atc_name(x, language = NULL)
+
+atc_trivial_nl(x)
+
+atc_certe(x)
+
+atc_umcg(x)
+
+atc_tradenames(x)
Arguments
- atc_code
- a character or character vector with ATC code(s) of antibiotic(s)
+ x
+ a (vector of a) valid atc
code or any text that can be coerced to a valid atc with as.atc
property
- property of an ATC code. Valid values are "ATC"
, "Name"
, "DDD"
, "U"
("unit"
), "Adm.R"
, "Note"
and groups
. For this last option, all hierarchical groups of an ATC code will be returned, see Examples.
+ one of the column names of one of the antibiotics
data set, like "atc"
and "official"
- administration
- type of administration when using property = "Adm.R"
, see Details
-
-
- url
- url of website of the WHO. The sign %s
can be used as a placeholder for ATC codes.
-
-
- ...
- parameters to pass on to atc_property
+ language
+ language of the returned text, defaults to English ("en"
) and can be set with getOption("AMR_locale")
. Either one of "en"
(English) or "nl"
(Dutch).
- Source
+ Value
- https://www.whocc.no/atc_ddd_alterations__cumulative/ddd_alterations/abbrevations/
+ A vector of values. In case of atc_tradenames
, if x
is of length one, a vector will be returned. Otherwise a list
, with x
as names.
- Details
+ Read more on our website!
- Options for parameter administration
:
-"Implant"
= Implant
-"Inhal"
= Inhalation
-"Instill"
= Instillation
-"N"
= nasal
-"O"
= oral
-"P"
= parenteral
-"R"
= rectal
-"SL"
= sublingual/buccal
-"TD"
= transdermal
-"V"
= vaginal
-
- Abbreviations of return values when using property = "U"
(unit):
-"g"
= gram
-"mg"
= milligram
-"mcg"
= microgram
-"U"
= unit
-"TU"
= thousand units
-"MU"
= million units
-"mmol"
= millimole
-"ml"
= milliliter (e.g. eyedrops)
-
+
+
+On our website https://msberends.gitlab.io/AMR you can find a omprehensive tutorial about how to conduct AMR analysis and find the complete documentation of all functions, which reads a lot easier than in R.
+
+ See also
+
+
Examples
# NOT RUN {
-# What's the ATC of amoxicillin?
-guess_atc("Amoxicillin")
-# [1] "J01CA04"
-
-# oral DDD (Defined Daily Dose) of amoxicillin
-atc_property("J01CA04", "DDD", "O")
-# parenteral DDD (Defined Daily Dose) of amoxicillin
-atc_property("J01CA04", "DDD", "P")
-
-atc_property("J01CA04", property = "groups") # search hierarchical groups of amoxicillin
-# [1] "ANTIINFECTIVES FOR SYSTEMIC USE"
-# [2] "ANTIBACTERIALS FOR SYSTEMIC USE"
-# [3] "BETA-LACTAM ANTIBACTERIALS, PENICILLINS"
-# [4] "Penicillins with extended spectrum"
+as.atc("amcl") # J01CR02
+atc_name("amcl") # Amoxicillin and beta-lactamase inhibitor
+atc_name("amcl", "nl") # Amoxicilline met enzymremmer
+atc_trivial_nl("amcl") # Amoxicilline/clavulaanzuur
+atc_certe("amcl") # amcl
+atc_umcg("amcl") # AMCL
# }
diff --git a/docs/reference/count.html b/docs/reference/count.html
index df8e3222..d6ec6805 100644
--- a/docs/reference/count.html
+++ b/docs/reference/count.html
@@ -282,7 +282,7 @@ count_R and count_IR can be used to count resistant isolates, count_S and count_
ab_property()
ab_atc()
ab_official()
ab_name()
ab_trivial_nl()
ab_certe()
ab_umcg()
ab_tradenames()
atc_property()
atc_official()
atc_name()
atc_trivial_nl()
atc_certe()
atc_umcg()
atc_tradenames()
Property of an antibiotic
Properties of an ATC code
Vector of taxonomic renamed items
ratio()
guess_mo()
ab_property()
ab_atc()
ab_official()
ab_name()
ab_trivial_nl()
ab_certe()
ab_umcg()
ab_tradenames()
Deprecated functions