1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-10 17:42:03 +02:00

new EUCAST rules algorithm

This commit is contained in:
2019-04-05 18:47:39 +02:00
parent 56d4b4719f
commit fbc9191b13
115 changed files with 1340 additions and 2174 deletions

View File

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

View File

@ -21,7 +21,7 @@ Included are:
\item{All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria and Protozoa}
\item{All ~3,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of \emph{Aspergillus}, \emph{Candida}, \emph{Cryptococcus}, \emph{Histplasma}, \emph{Pneumocystis}, \emph{Saccharomyces} and \emph{Trichophyton}).}
\item{All ~2,000 (sub)species from ~100 other relevant genera, from the kingdoms of Animalia and Plantae (like \emph{Strongyloides} and \emph{Taenia})}
\item{All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed}
\item{All ~21,000 previously accepted names of included (sub)species that have been taxonomically renamed}
\item{The complete taxonomic tree of all included (sub)species: from kingdom to subspecies}
\item{The responsible author(s) and year of scientific publication}
}

View File

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

View File

@ -2,8 +2,7 @@
% Please edit documentation in R/eucast_rules.R
\name{eucast_rules}
\alias{eucast_rules}
\alias{EUCAST_rules}
\alias{interpretive_reading}
\alias{eucast_rules_file}
\title{EUCAST rules}
\source{
\itemize{
@ -21,49 +20,48 @@
\url{http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_9.0_Breakpoint_Tables.xlsx}
}
}
For editing the reference file (which is available with \code{\link{eucast_rules_file}}), these values can all be used for target antibiotics: aminoglycosides, tetracyclines, polymyxins, macrolides, glycopeptides, streptogramins, cephalosporins, cephalosporins_without_cfta, carbapenems, aminopenicillins, ureidopenicillins, fluoroquinolones, all_betalactams, and all separate four letter codes like amcl. They can be separated by comma: \code{"amcl, fluoroquinolones"}. The mo_property can be any column name from the \code{\link{microorganisms}} data set, or \code{genus_species} or \code{gramstain}. This file contains references to the 'Burkholderia cepacia complex'. The species in this group can be found in: LiPuma JJ, 2015 (PMID 16217180).
}
\usage{
eucast_rules(tbl, col_mo = NULL, info = TRUE,
rules = c("breakpoints", "expert", "other", "all"), verbose = FALSE,
amcl = guess_ab_col(), amik = guess_ab_col(),
amox = guess_ab_col(), ampi = guess_ab_col(),
azit = guess_ab_col(), azlo = guess_ab_col(),
aztr = guess_ab_col(), cefa = guess_ab_col(),
cfep = guess_ab_col(), cfot = guess_ab_col(),
cfox = guess_ab_col(), cfra = guess_ab_col(),
cfta = guess_ab_col(), cftr = guess_ab_col(),
cfur = guess_ab_col(), chlo = guess_ab_col(),
cipr = guess_ab_col(), clar = guess_ab_col(),
clin = guess_ab_col(), clox = guess_ab_col(),
coli = guess_ab_col(), czol = guess_ab_col(),
dapt = guess_ab_col(), doxy = guess_ab_col(),
erta = guess_ab_col(), eryt = guess_ab_col(),
fosf = guess_ab_col(), fusi = guess_ab_col(),
gent = guess_ab_col(), imip = guess_ab_col(),
kana = guess_ab_col(), levo = guess_ab_col(),
linc = guess_ab_col(), line = guess_ab_col(),
mero = guess_ab_col(), mezl = guess_ab_col(),
mino = guess_ab_col(), moxi = guess_ab_col(),
nali = guess_ab_col(), neom = guess_ab_col(),
neti = guess_ab_col(), nitr = guess_ab_col(),
norf = guess_ab_col(), novo = guess_ab_col(),
oflo = guess_ab_col(), oxac = guess_ab_col(),
peni = guess_ab_col(), pipe = guess_ab_col(),
pita = guess_ab_col(), poly = guess_ab_col(),
pris = guess_ab_col(), qida = guess_ab_col(),
rifa = guess_ab_col(), roxi = guess_ab_col(),
siso = guess_ab_col(), teic = guess_ab_col(),
tetr = guess_ab_col(), tica = guess_ab_col(),
tige = guess_ab_col(), tobr = guess_ab_col(),
trim = guess_ab_col(), trsu = guess_ab_col(),
vanc = guess_ab_col())
eucast_rules(x, col_mo = NULL, info = TRUE, rules = c("breakpoints",
"expert", "other", "all"), verbose = FALSE, amcl = guess_ab_col(),
amik = guess_ab_col(), amox = guess_ab_col(),
ampi = guess_ab_col(), azit = guess_ab_col(),
azlo = guess_ab_col(), aztr = guess_ab_col(),
cefa = guess_ab_col(), cfep = guess_ab_col(),
cfot = guess_ab_col(), cfox = guess_ab_col(),
cfra = guess_ab_col(), cfta = guess_ab_col(),
cftr = guess_ab_col(), cfur = guess_ab_col(),
chlo = guess_ab_col(), cipr = guess_ab_col(),
clar = guess_ab_col(), clin = guess_ab_col(),
clox = guess_ab_col(), coli = guess_ab_col(),
czol = guess_ab_col(), dapt = guess_ab_col(),
doxy = guess_ab_col(), erta = guess_ab_col(),
eryt = guess_ab_col(), fosf = guess_ab_col(),
fusi = guess_ab_col(), gent = guess_ab_col(),
imip = guess_ab_col(), kana = guess_ab_col(),
levo = guess_ab_col(), linc = guess_ab_col(),
line = guess_ab_col(), mero = guess_ab_col(),
mezl = guess_ab_col(), mino = guess_ab_col(),
moxi = guess_ab_col(), nali = guess_ab_col(),
neom = guess_ab_col(), neti = guess_ab_col(),
nitr = guess_ab_col(), norf = guess_ab_col(),
novo = guess_ab_col(), oflo = guess_ab_col(),
oxac = guess_ab_col(), peni = guess_ab_col(),
pipe = guess_ab_col(), pita = guess_ab_col(),
poly = guess_ab_col(), pris = guess_ab_col(),
qida = guess_ab_col(), rifa = guess_ab_col(),
roxi = guess_ab_col(), siso = guess_ab_col(),
teic = guess_ab_col(), tetr = guess_ab_col(),
tica = guess_ab_col(), tige = guess_ab_col(),
tobr = guess_ab_col(), trim = guess_ab_col(),
trsu = guess_ab_col(), vanc = guess_ab_col(), ...)
EUCAST_rules(...)
interpretive_reading(...)
eucast_rules_file()
}
\arguments{
\item{tbl}{table with antibiotic columns, like e.g. \code{amox} and \code{amcl}}
\item{x}{data with antibiotic columns, like e.g. \code{amox} and \code{amcl}}
\item{col_mo}{column name of the unique IDs of the microorganisms (see \code{\link{mo}}), defaults to the first column of class \code{mo}. Values will be coerced using \code{\link{as.mo}}.}
@ -78,11 +76,19 @@ interpretive_reading(...)
\item{...}{parameters that are passed on to \code{eucast_rules}}
}
\value{
The input of \code{tbl}, possibly with edited values of antibiotics. Or, if \code{verbose = TRUE}, a \code{data.frame} with all original and new values of the affected bug-drug combinations.
The input of \code{tbl_}, possibly with edited values of antibiotics. Or, if \code{verbose = TRUE}, a \code{data.frame} with all original and new values of the affected bug-drug combinations.
}
\description{
Apply susceptibility rules as defined by the European Committee on Antimicrobial Susceptibility Testing (EUCAST, \url{http://eucast.org}), see \emph{Source}. This includes (1) expert rules, (2) intrinsic resistance and (3) inferred resistance as defined in their breakpoint tables.
}
\details{
The file used for applying all EUCAST rules can be retrieved with \code{\link{eucast_rules_file}()}. It returns an easily readable data set containing all rules. The original TSV file (tab separated file) that is being read by this function can be found when running this command: \cr
\code{AMR::EUCAST_RULES_FILE_LOCATION} (without brackets).
In the source code it is located under \href{https://gitlab.com/msberends/AMR/blob/master/inst/eucast/eucast_rules.tsv}{\code{./inst/eucast/eucast_rules.tsv}}.
\strong{Note:} When ampicillin (J01CA01) is not available but amoxicillin (J01CA04) is, the latter will be used for all rules where there is a dependency on ampicillin. These drugs are interchangeable when it comes to expression of antimicrobial resistance.
}
\section{Antibiotics}{
To define antibiotics column names, leave as it is to determine it automatically with \code{\link{guess_ab_col}} or input a text (case-insensitive) or use \code{NULL} to skip a column (e.g. \code{tica = NULL}). Non-existing columns will anyway be skipped with a warning.

View File

@ -4,15 +4,15 @@
\name{microorganisms.old}
\alias{microorganisms.old}
\title{Data set with previously accepted taxonomic names}
\format{A \code{\link{data.frame}} with 16,911 observations and 4 variables:
\format{A \code{\link{data.frame}} with 21,342 observations and 4 variables:
\describe{
\item{\code{col_id}}{Catalogue of Life ID}
\item{\code{tsn_new}}{New Catalogue of Life ID}
\item{\code{fullname}}{Old taxonomic name of the microorganism}
\item{\code{col_id}}{Catalogue of Life ID that was originally given}
\item{\code{col_id_new}}{New Catalogue of Life ID that responds to an entry in the \code{\link{microorganisms}} data set}
\item{\code{fullname}}{Old full taxonomic name of the microorganism}
\item{\code{ref}}{Author(s) and year of concerning scientific publication}
}}
\source{
[3] Catalogue of Life: Annual Checklist (public online database), \url{www.catalogueoflife.org}.
Catalogue of Life: Annual Checklist (public online taxonomic database), \url{www.catalogueoflife.org} (check included annual version with \code{\link{catalogue_of_life_version}()}).
}
\usage{
microorganisms.old

View File

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