mirror of
https://github.com/msberends/AMR.git
synced 2024-12-26 05:26:13 +01:00
eucast update
This commit is contained in:
parent
f7687557c9
commit
5476fecc73
@ -1,6 +1,6 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 0.4.0.9008
|
Version: 0.4.0.9008
|
||||||
Date: 2018-10-31
|
Date: 2018-11-01
|
||||||
Title: Antimicrobial Resistance Analysis
|
Title: Antimicrobial Resistance Analysis
|
||||||
Authors@R: c(
|
Authors@R: c(
|
||||||
person(
|
person(
|
||||||
|
@ -168,6 +168,7 @@ importFrom(crayon,black)
|
|||||||
importFrom(crayon,blue)
|
importFrom(crayon,blue)
|
||||||
importFrom(crayon,bold)
|
importFrom(crayon,bold)
|
||||||
importFrom(crayon,green)
|
importFrom(crayon,green)
|
||||||
|
importFrom(crayon,italic)
|
||||||
importFrom(crayon,red)
|
importFrom(crayon,red)
|
||||||
importFrom(crayon,silver)
|
importFrom(crayon,silver)
|
||||||
importFrom(curl,nslookup)
|
importFrom(curl,nslookup)
|
||||||
|
5
NEWS.md
5
NEWS.md
@ -13,6 +13,7 @@
|
|||||||
* Better error handling when rules cannot be applied (i.e. new values could not be inserted)
|
* Better error handling when rules cannot be applied (i.e. new values could not be inserted)
|
||||||
* The number of affected values will now only be measured once per row/column combination
|
* The number of affected values will now only be measured once per row/column combination
|
||||||
* Data set `septic_patients` now reflects these changes
|
* Data set `septic_patients` now reflects these changes
|
||||||
|
* Added parameter `pipe` for piperacillin (J01CA12), also to the `MDRO` function
|
||||||
* Small fixes to EUCAST clinical breakpoint rules
|
* Small fixes to EUCAST clinical breakpoint rules
|
||||||
* Tremendous speed improvement for `as.mo` (and subsequently all `mo_*` functions), as empty values wil be ignored *a priori*
|
* Tremendous speed improvement for `as.mo` (and subsequently all `mo_*` functions), as empty values wil be ignored *a priori*
|
||||||
* Fewer than 3 characters as input for `as.mo` will return NA
|
* Fewer than 3 characters as input for `as.mo` will return NA
|
||||||
@ -22,11 +23,11 @@
|
|||||||
* Using `portion_*` functions now throws a warning when total available isolate is below parameter `minimum`
|
* Using `portion_*` functions now throws a warning when total available isolate is below parameter `minimum`
|
||||||
* Functions `as.mo`, `as.rsi`, `as.mic`, `as.atc` and `freq` will not set package name as attribute anymore
|
* Functions `as.mo`, `as.rsi`, `as.mic`, `as.atc` and `freq` will not set package name as attribute anymore
|
||||||
* Frequency tables - `freq()`:
|
* Frequency tables - `freq()`:
|
||||||
* Check for `hms::is.hms` in frequency tables (`freq()`)
|
* Check for `hms::is.hms`
|
||||||
* Now prints in markdown at default in non-interactive sessions
|
* Now prints in markdown at default in non-interactive sessions
|
||||||
* No longer adds the factor level column and sorts factors on count again
|
* No longer adds the factor level column and sorts factors on count again
|
||||||
* Gained `na` parameter, to choose with character to print for empty values
|
|
||||||
* Support for class `difftime`
|
* Support for class `difftime`
|
||||||
|
* New parameter `na`, to choose with character to print for empty values
|
||||||
* New parameter `header` to turn it off (default when `markdown = TRUE`)
|
* New parameter `header` to turn it off (default when `markdown = TRUE`)
|
||||||
* New parameter `title` to replace the automatically set title
|
* New parameter `title` to replace the automatically set title
|
||||||
* `first_isolate` now tries to find columns to use as input when parameters are left blank
|
* `first_isolate` now tries to find columns to use as input when parameters are left blank
|
||||||
|
52
R/eucast.R
52
R/eucast.R
@ -23,9 +23,9 @@
|
|||||||
#' @param col_mo column name of the microbial ID in \code{tbl} - values in this column should be present in \code{microorganisms$mo}, see \code{\link{microorganisms}}
|
#' @param col_mo column name of the microbial ID in \code{tbl} - values in this column should be present in \code{microorganisms$mo}, see \code{\link{microorganisms}}
|
||||||
#' @param info print progress
|
#' @param info print progress
|
||||||
#' @param rules a character vector that specifies which rules should be applied - one or more of \code{c("breakpoints", "expert", "other", "all")}
|
#' @param rules a character vector that specifies which rules should be applied - one or more of \code{c("breakpoints", "expert", "other", "all")}
|
||||||
|
#' @param verbose a logical to indicate whether extensive info should be returned as a \code{data.frame} with info about which rows and columns are effected
|
||||||
#' @param amcl,amik,amox,ampi,azit,azlo,aztr,cefa,cfep,cfot,cfox,cfra,cfta,cftr,cfur,chlo,cipr,clar,clin,clox,coli,czol,dapt,doxy,erta,eryt,fosf,fusi,gent,imip,kana,levo,linc,line,mero,mezl,mino,moxi,nali,neom,neti,nitr,norf,novo,oflo,oxac,peni,pipe,pita,poly,pris,qida,rifa,roxi,siso,teic,tetr,tica,tige,tobr,trim,trsu,vanc column name of an antibiotic, see Details
|
#' @param amcl,amik,amox,ampi,azit,azlo,aztr,cefa,cfep,cfot,cfox,cfra,cfta,cftr,cfur,chlo,cipr,clar,clin,clox,coli,czol,dapt,doxy,erta,eryt,fosf,fusi,gent,imip,kana,levo,linc,line,mero,mezl,mino,moxi,nali,neom,neti,nitr,norf,novo,oflo,oxac,peni,pipe,pita,poly,pris,qida,rifa,roxi,siso,teic,tetr,tica,tige,tobr,trim,trsu,vanc column name of an antibiotic, see Details
|
||||||
#' @param col_bactid Deprecated. Use \code{col_mo} instead.
|
#' @param col_bactid Deprecated. Use \code{col_mo} instead.
|
||||||
#' @param verbose a logical to indicate whether extensive info should be returned as a \code{data.frame} with info about which rows and columns are effected
|
|
||||||
#' @param ... parameters that are passed on to \code{EUCAST_rules}
|
#' @param ... parameters that are passed on to \code{EUCAST_rules}
|
||||||
#' @details To define antibiotics column names, input a text or use \code{NA} to skip a column (e.g. \code{tica = NA}). Non-existing columns will anyway be skipped with a warning. See the Antibiotics section for an explanation of the abbreviations.
|
#' @details To define antibiotics column names, input a text or use \code{NA} to skip a column (e.g. \code{tica = NA}). Non-existing columns will anyway be skipped with a warning. See the Antibiotics section for an explanation of the abbreviations.
|
||||||
#' @section Antibiotics:
|
#' @section Antibiotics:
|
||||||
@ -97,7 +97,7 @@
|
|||||||
#' @rdname EUCAST
|
#' @rdname EUCAST
|
||||||
#' @export
|
#' @export
|
||||||
#' @importFrom dplyr %>% select pull mutate_at vars
|
#' @importFrom dplyr %>% select pull mutate_at vars
|
||||||
#' @importFrom crayon bold bgGreen bgYellow bgRed black green blue
|
#' @importFrom crayon bold bgGreen bgYellow bgRed black green blue italic
|
||||||
#' @return The input of \code{tbl}, possibly with edited values of antibiotics. Or, if \code{verbose = TRUE}, a \code{data.frame} with verbose info.
|
#' @return The input of \code{tbl}, possibly with edited values of antibiotics. Or, if \code{verbose = TRUE}, a \code{data.frame} with verbose info.
|
||||||
#' @source
|
#' @source
|
||||||
#' \itemize{
|
#' \itemize{
|
||||||
@ -150,9 +150,10 @@
|
|||||||
#' # 4 Klebsiella pneumoniae R R - - - R S
|
#' # 4 Klebsiella pneumoniae R R - - - R S
|
||||||
#' # 5 Pseudomonas aeruginosa R R - - R R R
|
#' # 5 Pseudomonas aeruginosa R R - - R R R
|
||||||
EUCAST_rules <- function(tbl,
|
EUCAST_rules <- function(tbl,
|
||||||
col_mo = 'mo',
|
col_mo = NULL,
|
||||||
info = TRUE,
|
info = TRUE,
|
||||||
rules = c("breakpoints", "expert", "other", "all"),
|
rules = c("breakpoints", "expert", "other", "all"),
|
||||||
|
verbose = FALSE,
|
||||||
amcl = 'amcl',
|
amcl = 'amcl',
|
||||||
amik = 'amik',
|
amik = 'amik',
|
||||||
amox = 'amox',
|
amox = 'amox',
|
||||||
@ -216,24 +217,33 @@ EUCAST_rules <- function(tbl,
|
|||||||
trim = 'trim',
|
trim = 'trim',
|
||||||
trsu = 'trsu',
|
trsu = 'trsu',
|
||||||
vanc = 'vanc',
|
vanc = 'vanc',
|
||||||
col_bactid = 'bactid',
|
col_bactid = NULL) {
|
||||||
verbose = FALSE) {
|
|
||||||
|
|
||||||
EUCAST_VERSION_BREAKPOINTS <- "8.1, 2018"
|
EUCAST_VERSION_BREAKPOINTS <- "8.1, 2018"
|
||||||
EUCAST_VERSION_EXPERT_RULES <- "3.1, 2016"
|
EUCAST_VERSION_EXPERT_RULES <- "3.1, 2016"
|
||||||
|
|
||||||
if (col_bactid %in% colnames(tbl)) {
|
if (!is.data.frame(tbl)) {
|
||||||
|
stop("`tbl` must be a data frame.", call. = FALSE)
|
||||||
|
}
|
||||||
|
|
||||||
|
# try to find columns based on type
|
||||||
|
# -- mo
|
||||||
|
if (!is.null(col_bactid)) {
|
||||||
col_mo <- col_bactid
|
col_mo <- col_bactid
|
||||||
warning("Use of `col_bactid` is deprecated. Use `col_mo` instead.")
|
warning("Use of `col_bactid` is deprecated. Use `col_mo` instead.")
|
||||||
}
|
} else if (is.null(col_mo) & "mo" %in% lapply(tbl, class)) {
|
||||||
if (!col_mo %in% colnames(tbl)) {
|
col_mo <- colnames(tbl)[lapply(tbl, class) == "mo"]
|
||||||
stop('Column ', col_mo, ' not found.', call. = FALSE)
|
message("NOTE: Using column `", col_mo, "` as input for `col_mo`.")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!all(rules %in% c("breakpoints", "expert", "other", "all"))) {
|
if (!all(rules %in% c("breakpoints", "expert", "other", "all"))) {
|
||||||
stop("Parameter `rules` must be one or more of: 'breakpoints', 'expert', 'other', 'all'.")
|
stop("Parameter `rules` must be one or more of: 'breakpoints', 'expert', 'other', 'all'.")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is.null(col_mo)) {
|
||||||
|
stop("Parameter `col_mo` must be set")
|
||||||
|
}
|
||||||
|
|
||||||
warned <- FALSE
|
warned <- FALSE
|
||||||
changed_results <- 0
|
changed_results <- 0
|
||||||
|
|
||||||
@ -474,7 +484,7 @@ EUCAST_rules <- function(tbl,
|
|||||||
txt_ok()
|
txt_ok()
|
||||||
}
|
}
|
||||||
# Staphylococcus ----
|
# Staphylococcus ----
|
||||||
rule <- 'Staphylococcus'
|
rule <- italic('Staphylococcus')
|
||||||
if (info == TRUE) {
|
if (info == TRUE) {
|
||||||
warned <- FALSE
|
warned <- FALSE
|
||||||
changed_results <- 0
|
changed_results <- 0
|
||||||
@ -561,7 +571,7 @@ EUCAST_rules <- function(tbl,
|
|||||||
txt_ok()
|
txt_ok()
|
||||||
}
|
}
|
||||||
# Enterococcus ----
|
# Enterococcus ----
|
||||||
rule <- 'Enterococcus'
|
rule <- italic('Enterococcus')
|
||||||
if (info == TRUE) {
|
if (info == TRUE) {
|
||||||
warned <- FALSE
|
warned <- FALSE
|
||||||
changed_results <- 0
|
changed_results <- 0
|
||||||
@ -611,8 +621,8 @@ EUCAST_rules <- function(tbl,
|
|||||||
if (info == TRUE) {
|
if (info == TRUE) {
|
||||||
txt_ok()
|
txt_ok()
|
||||||
}
|
}
|
||||||
# Streptococcus A, B, C, G----
|
# Streptococcus groups A, B, C, G----
|
||||||
rule <- 'Streptococcus A, B, C, G'
|
rule <- paste(italic('Streptococcus'), 'groups A, B, C, G')
|
||||||
if (info == TRUE) {
|
if (info == TRUE) {
|
||||||
warned <- FALSE
|
warned <- FALSE
|
||||||
changed_results <- 0
|
changed_results <- 0
|
||||||
@ -670,7 +680,7 @@ EUCAST_rules <- function(tbl,
|
|||||||
txt_ok()
|
txt_ok()
|
||||||
}
|
}
|
||||||
# Streptococcus pneumoniae ----
|
# Streptococcus pneumoniae ----
|
||||||
rule <- 'Streptococcus pneumoniae'
|
rule <- italic('Streptococcus pneumoniae')
|
||||||
if (info == TRUE) {
|
if (info == TRUE) {
|
||||||
warned <- FALSE
|
warned <- FALSE
|
||||||
changed_results <- 0
|
changed_results <- 0
|
||||||
@ -774,7 +784,7 @@ EUCAST_rules <- function(tbl,
|
|||||||
txt_ok()
|
txt_ok()
|
||||||
}
|
}
|
||||||
# Haemophilus influenzae ----
|
# Haemophilus influenzae ----
|
||||||
rule <- 'Haemophilus influenzae'
|
rule <- italic('Haemophilus influenzae')
|
||||||
if (info == TRUE) {
|
if (info == TRUE) {
|
||||||
warned <- FALSE
|
warned <- FALSE
|
||||||
changed_results <- 0
|
changed_results <- 0
|
||||||
@ -839,7 +849,7 @@ EUCAST_rules <- function(tbl,
|
|||||||
txt_ok()
|
txt_ok()
|
||||||
}
|
}
|
||||||
# Moraxella catarrhalis ----
|
# Moraxella catarrhalis ----
|
||||||
rule <- 'Moraxella catarrhalis'
|
rule <- italic('Moraxella catarrhalis')
|
||||||
if (info == TRUE) {
|
if (info == TRUE) {
|
||||||
warned <- FALSE
|
warned <- FALSE
|
||||||
changed_results <- 0
|
changed_results <- 0
|
||||||
@ -963,7 +973,7 @@ EUCAST_rules <- function(tbl,
|
|||||||
txt_ok()
|
txt_ok()
|
||||||
}
|
}
|
||||||
# Pasteurella multocida ----
|
# Pasteurella multocida ----
|
||||||
rule <- 'Pasteurella multocida'
|
rule <- italic('Pasteurella multocida')
|
||||||
if (info == TRUE) {
|
if (info == TRUE) {
|
||||||
warned <- FALSE
|
warned <- FALSE
|
||||||
changed_results <- 0
|
changed_results <- 0
|
||||||
@ -990,7 +1000,7 @@ EUCAST_rules <- function(tbl,
|
|||||||
txt_ok()
|
txt_ok()
|
||||||
}
|
}
|
||||||
# Campylobacter jejuni and coli ----
|
# Campylobacter jejuni and coli ----
|
||||||
rule <- 'Campylobacter jejuni and coli'
|
rule <- paste(italic('Campylobacter jejuni'), 'and', italic('C. coli'))
|
||||||
if (info == TRUE) {
|
if (info == TRUE) {
|
||||||
warned <- FALSE
|
warned <- FALSE
|
||||||
changed_results <- 0
|
changed_results <- 0
|
||||||
@ -1034,7 +1044,7 @@ EUCAST_rules <- function(tbl,
|
|||||||
txt_ok()
|
txt_ok()
|
||||||
}
|
}
|
||||||
# Aerococcus sanguinicola/urinae ----
|
# Aerococcus sanguinicola/urinae ----
|
||||||
rule <- 'Aerococcus sanguinicola/urinae'
|
rule <- paste(italic('Aerococcus sanguinicola'), 'and', italic('A. urinae'))
|
||||||
if (info == TRUE) {
|
if (info == TRUE) {
|
||||||
warned <- FALSE
|
warned <- FALSE
|
||||||
changed_results <- 0
|
changed_results <- 0
|
||||||
@ -1078,7 +1088,7 @@ EUCAST_rules <- function(tbl,
|
|||||||
txt_ok()
|
txt_ok()
|
||||||
}
|
}
|
||||||
# Kingella kingae ----
|
# Kingella kingae ----
|
||||||
rule <- 'Kingella kingae'
|
rule <- italic('Kingella kingae')
|
||||||
if (info == TRUE) {
|
if (info == TRUE) {
|
||||||
warned <- FALSE
|
warned <- FALSE
|
||||||
changed_results <- 0
|
changed_results <- 0
|
||||||
@ -1140,7 +1150,7 @@ EUCAST_rules <- function(tbl,
|
|||||||
rule_group <- "Expert Rules"
|
rule_group <- "Expert Rules"
|
||||||
|
|
||||||
# Table 1: Intrinsic resistance in Enterobacteriaceae ----
|
# Table 1: Intrinsic resistance in Enterobacteriaceae ----
|
||||||
rule <- 'Table 1: Intrinsic resistance in Enterobacteriaceae'
|
rule <- paste('Table 1: Intrinsic resistance in', italic('Enterobacteriaceae'))
|
||||||
if (info == TRUE) {
|
if (info == TRUE) {
|
||||||
warned <- FALSE
|
warned <- FALSE
|
||||||
changed_results <- 0
|
changed_results <- 0
|
||||||
|
@ -198,11 +198,10 @@ first_isolate <- function(tbl,
|
|||||||
check_columns_existance(col_keyantibiotics)
|
check_columns_existance(col_keyantibiotics)
|
||||||
|
|
||||||
if (!is.null(col_mo)) {
|
if (!is.null(col_mo)) {
|
||||||
if (!tbl %>% pull(col_mo) %>% is.mo()) {
|
|
||||||
tbl[, col_mo] <- as.mo(tbl[, col_mo])
|
|
||||||
}
|
|
||||||
# join to microorganisms data set
|
# join to microorganisms data set
|
||||||
tbl <- tbl %>% left_join_microorganisms(by = col_mo)
|
tbl <- tbl %>%
|
||||||
|
mutate_at(vars(col_mo), as.mo) %>%
|
||||||
|
left_join_microorganisms(by = col_mo)
|
||||||
col_genus <- "genus"
|
col_genus <- "genus"
|
||||||
col_species <- "species"
|
col_species <- "species"
|
||||||
}
|
}
|
||||||
|
1
R/mdro.R
1
R/mdro.R
@ -87,6 +87,7 @@ MDRO <- function(tbl,
|
|||||||
norf = 'norf',
|
norf = 'norf',
|
||||||
oflo = 'oflo',
|
oflo = 'oflo',
|
||||||
peni = 'peni',
|
peni = 'peni',
|
||||||
|
pipe = 'pipe',
|
||||||
pita = 'pita',
|
pita = 'pita',
|
||||||
poly = 'poly',
|
poly = 'poly',
|
||||||
qida = 'qida',
|
qida = 'qida',
|
||||||
|
2
R/mo.R
2
R/mo.R
@ -71,7 +71,7 @@
|
|||||||
#' \if{html}{\figure{itis_logo.jpg}{options: height=60px style=margin-bottom:5px} \cr}
|
#' \if{html}{\figure{itis_logo.jpg}{options: height=60px style=margin-bottom:5px} \cr}
|
||||||
#' This package contains the \strong{complete microbial taxonomic data} (with all seven taxonomic ranks - from subkingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, \url{https://www.itis.gov}).
|
#' This package contains the \strong{complete microbial taxonomic data} (with all seven taxonomic ranks - from subkingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, \url{https://www.itis.gov}).
|
||||||
#'
|
#'
|
||||||
#' All (sub)species from the \strong{taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package}, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This \strong{allows users to use authoritative taxonomic information} for their data analysis on any microorganism, not only human pathogens. It also helps to \strong{quickly determine the Gram stain of bacteria}, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.
|
#' All (sub)species from the \strong{taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package}, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This allows users to use authoritative taxonomic information for their data analysis on any microorganism, not only human pathogens. It also helps to quickly determine the Gram stain of bacteria, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.
|
||||||
#'
|
#'
|
||||||
#' ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].
|
#' ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].
|
||||||
#'
|
#'
|
||||||
|
@ -83,7 +83,7 @@ The `AMR` package basically does four important things:
|
|||||||
|
|
||||||
This package contains the **complete microbial taxonomic data** (with all seven taxonomic ranks - from subkingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, https://www.itis.gov).
|
This package contains the **complete microbial taxonomic data** (with all seven taxonomic ranks - from subkingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, https://www.itis.gov).
|
||||||
|
|
||||||
All (sub)species from the **taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package**, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This **allows users to use authoritative taxonomic information** for their data analysis on any microorganism, not only human pathogens. It also helps to **quickly determine the Gram stain of bacteria**, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.
|
All (sub)species from the **taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package**, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This allows users to use authoritative taxonomic information for their data analysis on any microorganism, not only human pathogens. It also helps to quickly determine the Gram stain of bacteria, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.
|
||||||
|
|
||||||
ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists.
|
ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists.
|
||||||
|
|
||||||
|
@ -35,8 +35,8 @@ on_failure:
|
|||||||
- 7z a failure.zip *.Rcheck\*
|
- 7z a failure.zip *.Rcheck\*
|
||||||
- appveyor PushArtifact failure.zip
|
- appveyor PushArtifact failure.zip
|
||||||
|
|
||||||
on_success:
|
#on_success:
|
||||||
- Rscript -e "covr::codecov(token = '50ffa0aa-fee0-4f8b-a11d-8c7edc6d32ca')"
|
# - Rscript -e "covr::codecov(token = '50ffa0aa-fee0-4f8b-a11d-8c7edc6d32ca')"
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
- path: '*.Rcheck\**\*.log'
|
- path: '*.Rcheck\**\*.log'
|
||||||
|
@ -22,25 +22,24 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
\usage{
|
\usage{
|
||||||
EUCAST_rules(tbl, col_mo = "mo", info = TRUE,
|
EUCAST_rules(tbl, col_mo = NULL, info = TRUE,
|
||||||
rules = c("breakpoints", "expert", "other", "all"), amcl = "amcl",
|
rules = c("breakpoints", "expert", "other", "all"), verbose = FALSE,
|
||||||
amik = "amik", amox = "amox", ampi = "ampi", azit = "azit",
|
amcl = "amcl", amik = "amik", amox = "amox", ampi = "ampi",
|
||||||
azlo = "azlo", aztr = "aztr", cefa = "cefa", cfep = "cfep",
|
azit = "azit", azlo = "azlo", aztr = "aztr", cefa = "cefa",
|
||||||
cfot = "cfot", cfox = "cfox", cfra = "cfra", cfta = "cfta",
|
cfep = "cfep", cfot = "cfot", cfox = "cfox", cfra = "cfra",
|
||||||
cftr = "cftr", cfur = "cfur", chlo = "chlo", cipr = "cipr",
|
cfta = "cfta", cftr = "cftr", cfur = "cfur", chlo = "chlo",
|
||||||
clar = "clar", clin = "clin", clox = "clox", coli = "coli",
|
cipr = "cipr", clar = "clar", clin = "clin", clox = "clox",
|
||||||
czol = "czol", dapt = "dapt", doxy = "doxy", erta = "erta",
|
coli = "coli", czol = "czol", dapt = "dapt", doxy = "doxy",
|
||||||
eryt = "eryt", fosf = "fosf", fusi = "fusi", gent = "gent",
|
erta = "erta", eryt = "eryt", fosf = "fosf", fusi = "fusi",
|
||||||
imip = "imip", kana = "kana", levo = "levo", linc = "linc",
|
gent = "gent", imip = "imip", kana = "kana", levo = "levo",
|
||||||
line = "line", mero = "mero", mezl = "mezl", mino = "mino",
|
linc = "linc", line = "line", mero = "mero", mezl = "mezl",
|
||||||
moxi = "moxi", nali = "nali", neom = "neom", neti = "neti",
|
mino = "mino", moxi = "moxi", nali = "nali", neom = "neom",
|
||||||
nitr = "nitr", norf = "norf", novo = "novo", oflo = "oflo",
|
neti = "neti", nitr = "nitr", norf = "norf", novo = "novo",
|
||||||
oxac = "oxac", peni = "peni", pipe = "pipe", pita = "pita",
|
oflo = "oflo", oxac = "oxac", peni = "peni", pipe = "pipe",
|
||||||
poly = "poly", pris = "pris", qida = "qida", rifa = "rifa",
|
pita = "pita", poly = "poly", pris = "pris", qida = "qida",
|
||||||
roxi = "roxi", siso = "siso", teic = "teic", tetr = "tetr",
|
rifa = "rifa", roxi = "roxi", siso = "siso", teic = "teic",
|
||||||
tica = "tica", tige = "tige", tobr = "tobr", trim = "trim",
|
tetr = "tetr", tica = "tica", tige = "tige", tobr = "tobr",
|
||||||
trsu = "trsu", vanc = "vanc", col_bactid = "bactid",
|
trim = "trim", trsu = "trsu", vanc = "vanc", col_bactid = NULL)
|
||||||
verbose = FALSE)
|
|
||||||
|
|
||||||
interpretive_reading(...)
|
interpretive_reading(...)
|
||||||
}
|
}
|
||||||
@ -53,12 +52,12 @@ interpretive_reading(...)
|
|||||||
|
|
||||||
\item{rules}{a character vector that specifies which rules should be applied - one or more of \code{c("breakpoints", "expert", "other", "all")}}
|
\item{rules}{a character vector that specifies which rules should be applied - one or more of \code{c("breakpoints", "expert", "other", "all")}}
|
||||||
|
|
||||||
|
\item{verbose}{a logical to indicate whether extensive info should be returned as a \code{data.frame} with info about which rows and columns are effected}
|
||||||
|
|
||||||
\item{amcl, amik, amox, ampi, azit, azlo, aztr, cefa, cfep, cfot, cfox, cfra, cfta, cftr, cfur, chlo, cipr, clar, clin, clox, coli, czol, dapt, doxy, erta, eryt, fosf, fusi, gent, imip, kana, levo, linc, line, mero, mezl, mino, moxi, nali, neom, neti, nitr, norf, novo, oflo, oxac, peni, pipe, pita, poly, pris, qida, rifa, roxi, siso, teic, tetr, tica, tige, tobr, trim, trsu, vanc}{column name of an antibiotic, see Details}
|
\item{amcl, amik, amox, ampi, azit, azlo, aztr, cefa, cfep, cfot, cfox, cfra, cfta, cftr, cfur, chlo, cipr, clar, clin, clox, coli, czol, dapt, doxy, erta, eryt, fosf, fusi, gent, imip, kana, levo, linc, line, mero, mezl, mino, moxi, nali, neom, neti, nitr, norf, novo, oflo, oxac, peni, pipe, pita, poly, pris, qida, rifa, roxi, siso, teic, tetr, tica, tige, tobr, trim, trsu, vanc}{column name of an antibiotic, see Details}
|
||||||
|
|
||||||
\item{col_bactid}{Deprecated. Use \code{col_mo} instead.}
|
\item{col_bactid}{Deprecated. Use \code{col_mo} instead.}
|
||||||
|
|
||||||
\item{verbose}{a logical to indicate whether extensive info should be returned as a \code{data.frame} with info about which rows and columns are effected}
|
|
||||||
|
|
||||||
\item{...}{parameters that are passed on to \code{EUCAST_rules}}
|
\item{...}{parameters that are passed on to \code{EUCAST_rules}}
|
||||||
}
|
}
|
||||||
\value{
|
\value{
|
||||||
|
11
man/MDRO.Rd
11
man/MDRO.Rd
@ -19,10 +19,11 @@ MDRO(tbl, country = NULL, col_mo = NULL, info = TRUE,
|
|||||||
line = "line", mero = "mero", metr = "metr", mino = "mino",
|
line = "line", mero = "mero", metr = "metr", mino = "mino",
|
||||||
moxi = "moxi", nali = "nali", neom = "neom", neti = "neti",
|
moxi = "moxi", nali = "nali", neom = "neom", neti = "neti",
|
||||||
nitr = "nitr", novo = "novo", norf = "norf", oflo = "oflo",
|
nitr = "nitr", novo = "novo", norf = "norf", oflo = "oflo",
|
||||||
peni = "peni", pita = "pita", poly = "poly", qida = "qida",
|
peni = "peni", pipe = "pipe", pita = "pita", poly = "poly",
|
||||||
rifa = "rifa", roxi = "roxi", siso = "siso", teic = "teic",
|
qida = "qida", rifa = "rifa", roxi = "roxi", siso = "siso",
|
||||||
tetr = "tetr", tica = "tica", tige = "tige", tobr = "tobr",
|
teic = "teic", tetr = "tetr", tica = "tica", tige = "tige",
|
||||||
trim = "trim", trsu = "trsu", vanc = "vanc", col_bactid = NULL)
|
tobr = "tobr", trim = "trim", trsu = "trsu", vanc = "vanc",
|
||||||
|
col_bactid = NULL)
|
||||||
|
|
||||||
BRMO(tbl, country = "nl", ...)
|
BRMO(tbl, country = "nl", ...)
|
||||||
|
|
||||||
@ -129,6 +130,8 @@ EUCAST_exceptional_phenotypes(tbl, country = "EUCAST", ...)
|
|||||||
|
|
||||||
\item{peni}{column name of an antibiotic, see Details}
|
\item{peni}{column name of an antibiotic, see Details}
|
||||||
|
|
||||||
|
\item{pipe}{column name of an antibiotic, see Details}
|
||||||
|
|
||||||
\item{pita}{column name of an antibiotic, see Details}
|
\item{pita}{column name of an antibiotic, see Details}
|
||||||
|
|
||||||
\item{poly}{column name of an antibiotic, see Details}
|
\item{poly}{column name of an antibiotic, see Details}
|
||||||
|
@ -78,7 +78,7 @@ This means that looking up human pathogenic microorganisms takes less time than
|
|||||||
\if{html}{\figure{itis_logo.jpg}{options: height=60px style=margin-bottom:5px} \cr}
|
\if{html}{\figure{itis_logo.jpg}{options: height=60px style=margin-bottom:5px} \cr}
|
||||||
This package contains the \strong{complete microbial taxonomic data} (with all seven taxonomic ranks - from subkingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, \url{https://www.itis.gov}).
|
This package contains the \strong{complete microbial taxonomic data} (with all seven taxonomic ranks - from subkingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, \url{https://www.itis.gov}).
|
||||||
|
|
||||||
All (sub)species from the \strong{taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package}, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This \strong{allows users to use authoritative taxonomic information} for their data analysis on any microorganism, not only human pathogens. It also helps to \strong{quickly determine the Gram stain of bacteria}, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.
|
All (sub)species from the \strong{taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package}, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This allows users to use authoritative taxonomic information for their data analysis on any microorganism, not only human pathogens. It also helps to quickly determine the Gram stain of bacteria, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.
|
||||||
|
|
||||||
ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].
|
ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ A data set containing the complete microbial taxonomy of the kingdoms Bacteria,
|
|||||||
\if{html}{\figure{itis_logo.jpg}{options: height=60px style=margin-bottom:5px} \cr}
|
\if{html}{\figure{itis_logo.jpg}{options: height=60px style=margin-bottom:5px} \cr}
|
||||||
This package contains the \strong{complete microbial taxonomic data} (with all seven taxonomic ranks - from subkingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, \url{https://www.itis.gov}).
|
This package contains the \strong{complete microbial taxonomic data} (with all seven taxonomic ranks - from subkingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, \url{https://www.itis.gov}).
|
||||||
|
|
||||||
All (sub)species from the \strong{taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package}, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This \strong{allows users to use authoritative taxonomic information} for their data analysis on any microorganism, not only human pathogens. It also helps to \strong{quickly determine the Gram stain of bacteria}, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.
|
All (sub)species from the \strong{taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package}, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This allows users to use authoritative taxonomic information for their data analysis on any microorganism, not only human pathogens. It also helps to quickly determine the Gram stain of bacteria, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.
|
||||||
|
|
||||||
ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].
|
ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ A data set containing old (previously valid or accepted) taxonomic names accordi
|
|||||||
\if{html}{\figure{itis_logo.jpg}{options: height=60px style=margin-bottom:5px} \cr}
|
\if{html}{\figure{itis_logo.jpg}{options: height=60px style=margin-bottom:5px} \cr}
|
||||||
This package contains the \strong{complete microbial taxonomic data} (with all seven taxonomic ranks - from subkingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, \url{https://www.itis.gov}).
|
This package contains the \strong{complete microbial taxonomic data} (with all seven taxonomic ranks - from subkingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, \url{https://www.itis.gov}).
|
||||||
|
|
||||||
All (sub)species from the \strong{taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package}, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This \strong{allows users to use authoritative taxonomic information} for their data analysis on any microorganism, not only human pathogens. It also helps to \strong{quickly determine the Gram stain of bacteria}, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.
|
All (sub)species from the \strong{taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package}, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This allows users to use authoritative taxonomic information for their data analysis on any microorganism, not only human pathogens. It also helps to quickly determine the Gram stain of bacteria, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.
|
||||||
|
|
||||||
ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].
|
ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ Use these functions to return a specific property of a microorganism from the \c
|
|||||||
\if{html}{\figure{itis_logo.jpg}{options: height=60px style=margin-bottom:5px} \cr}
|
\if{html}{\figure{itis_logo.jpg}{options: height=60px style=margin-bottom:5px} \cr}
|
||||||
This package contains the \strong{complete microbial taxonomic data} (with all seven taxonomic ranks - from subkingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, \url{https://www.itis.gov}).
|
This package contains the \strong{complete microbial taxonomic data} (with all seven taxonomic ranks - from subkingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, \url{https://www.itis.gov}).
|
||||||
|
|
||||||
All (sub)species from the \strong{taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package}, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This \strong{allows users to use authoritative taxonomic information} for their data analysis on any microorganism, not only human pathogens. It also helps to \strong{quickly determine the Gram stain of bacteria}, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.
|
All (sub)species from the \strong{taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package}, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available. This allows users to use authoritative taxonomic information for their data analysis on any microorganism, not only human pathogens. It also helps to quickly determine the Gram stain of bacteria, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.
|
||||||
|
|
||||||
ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].
|
ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,7 @@ context("eucast.R")
|
|||||||
|
|
||||||
test_that("EUCAST rules work", {
|
test_that("EUCAST rules work", {
|
||||||
|
|
||||||
expect_error(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),
|
||||||
colnames(suppressWarnings(EUCAST_rules(septic_patients))))
|
colnames(suppressWarnings(EUCAST_rules(septic_patients))))
|
||||||
@ -18,8 +17,8 @@ test_that("EUCAST rules work", {
|
|||||||
"ENTAER"), # Enterobacter aerogenes
|
"ENTAER"), # Enterobacter aerogenes
|
||||||
amox = "R", # Amoxicillin
|
amox = "R", # Amoxicillin
|
||||||
stringsAsFactors = FALSE)
|
stringsAsFactors = FALSE)
|
||||||
expect_identical(suppressWarnings(EUCAST_rules(a, info = FALSE)), b)
|
expect_identical(suppressWarnings(EUCAST_rules(a, "mo", info = FALSE)), b)
|
||||||
expect_identical(suppressWarnings(interpretive_reading(a, info = TRUE)), b)
|
expect_identical(suppressWarnings(interpretive_reading(a, "mo", info = TRUE)), b)
|
||||||
|
|
||||||
a <- data.frame(mo = c("STAAUR", # Staphylococcus aureus
|
a <- data.frame(mo = c("STAAUR", # Staphylococcus aureus
|
||||||
"STCGRA"), # Streptococcus pyognenes (Lancefield Group A)
|
"STCGRA"), # Streptococcus pyognenes (Lancefield Group A)
|
||||||
@ -29,18 +28,18 @@ test_that("EUCAST rules work", {
|
|||||||
"STCGRA"), # Streptococcus pyognenes (Lancefield Group A)
|
"STCGRA"), # Streptococcus pyognenes (Lancefield Group A)
|
||||||
coli = "R", # Colistin
|
coli = "R", # Colistin
|
||||||
stringsAsFactors = FALSE)
|
stringsAsFactors = FALSE)
|
||||||
expect_equal(suppressWarnings(EUCAST_rules(a, info = FALSE)), b)
|
expect_equal(suppressWarnings(EUCAST_rules(a, "mo", info = FALSE)), b)
|
||||||
|
|
||||||
# pita must be R in Enterobacteriaceae when tica is R
|
# piperacillin must be R in Enterobacteriaceae when tica is R
|
||||||
library(dplyr)
|
library(dplyr)
|
||||||
expect_equal(suppressWarnings(
|
expect_equal(suppressWarnings(
|
||||||
septic_patients %>%
|
septic_patients %>%
|
||||||
mutate(tica = as.rsi("R"),
|
mutate(tica = as.rsi("R"),
|
||||||
pita = as.rsi("S")) %>%
|
pipe = as.rsi("S")) %>%
|
||||||
EUCAST_rules(col_mo = "mo") %>%
|
EUCAST_rules(col_mo = "mo") %>%
|
||||||
left_join_microorganisms() %>%
|
left_join_microorganisms() %>%
|
||||||
filter(family == "Enterobacteriaceae") %>%
|
filter(family == "Enterobacteriaceae") %>%
|
||||||
pull(pita) %>%
|
pull(pipe) %>%
|
||||||
unique() %>%
|
unique() %>%
|
||||||
as.character()),
|
as.character()),
|
||||||
"R")
|
"R")
|
||||||
|
Loading…
Reference in New Issue
Block a user