AMR/man/eucast_rules.Rd

144 lines
30 KiB
Plaintext
Raw Normal View History

2018-02-21 11:52:31 +01:00
% Generated by roxygen2: do not edit by hand
2018-11-16 20:50:50 +01:00
% Please edit documentation in R/eucast_rules.R
\name{eucast_rules}
\alias{eucast_rules}
2019-11-06 14:43:23 +01:00
\alias{EUCAST}
2020-01-26 20:20:00 +01:00
\title{Apply EUCAST rules}
2018-02-21 11:52:31 +01:00
\source{
2018-10-17 17:32:34 +02:00
\itemize{
\item EUCAST Expert Rules. Version 2.0, 2012.\cr
Leclercq et al. \strong{EUCAST expert rules in antimicrobial susceptibility testing.} \emph{Clin Microbiol Infect.} 2013;19(2):141-60. \href{https://doi.org/10.1111/j.1469-0691.2011.03703.x}{(link)}
\item EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes Tables. Version 3.1, 2016. \href{https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/Expert_rules_intrinsic_exceptional_V3.1.pdf}{(link)}
\item EUCAST Intrinsic Resistance and Unusual Phenotypes. Version 3.2, 2020. \href{https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/2020/Intrinsic_Resistance_and_Unusual_Phenotypes_Tables_v3.2_20200225.pdf}{(link)}
\item EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 9.0, 2019. \href{https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_9.0_Breakpoint_Tables.xlsx}{(link)}
\item EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 10.0, 2020. \href{https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_10.0_Breakpoint_Tables.xlsx}{(link)}
}
2018-02-21 11:52:31 +01:00
}
\usage{
eucast_rules(
x,
col_mo = NULL,
info = interactive(),
2020-09-24 00:30:11 +02:00
rules = getOption("AMR_eucastrules", default = c("breakpoints", "expert")),
verbose = FALSE,
2020-09-24 00:30:11 +02:00
version_breakpoints = 10,
version_expertrules = 3.2,
ampc_cephalosporin_resistance = NA,
...
)
2018-02-21 11:52:31 +01:00
}
\arguments{
2020-09-24 00:30:11 +02:00
\item{x}{data with antibiotic columns, such as \code{amox}, \code{AMX} and \code{AMC}}
2018-02-21 11:52:31 +01:00
\item{col_mo}{column name of the IDs of the microorganisms (see \code{\link[=as.mo]{as.mo()}}), defaults to the first column of class \code{\link{mo}}. Values will be coerced using \code{\link[=as.mo]{as.mo()}}.}
2018-02-21 11:52:31 +01:00
2020-10-04 19:26:43 +02:00
\item{info}{a logical to indicate whether progress should be printed to the console, defaults to only print while in interactive sessions}
2018-02-21 11:52:31 +01:00
2020-09-24 00:30:11 +02:00
\item{rules}{a character vector that specifies which rules should be applied. Must be one or more of \code{"breakpoints"}, \code{"expert"}, \code{"other"}, \code{"all"}, and defaults to \code{c("breakpoints", "expert")}. The default value can be set to another value, e.g. using \code{options(AMR_eucastrules = "all")}.}
2018-10-18 12:10:10 +02:00
2020-09-24 00:30:11 +02:00
\item{verbose}{a \link{logical} to turn Verbose mode on and off (default is off). In Verbose mode, the function does not apply rules to the data, but instead returns a data set in logbook form with extensive info about which rows and columns would be effected and in which way. Using Verbose mode takes a lot more time.}
2020-09-28 11:00:59 +02:00
\item{version_breakpoints}{the version number to use for the EUCAST Clinical Breakpoints guideline. Currently supported: 10.0.}
2020-09-24 00:30:11 +02:00
2020-09-28 11:00:59 +02:00
\item{version_expertrules}{the version number to use for the EUCAST Expert Rules and Intrinsic Resistance guideline. Currently supported: 3.1, 3.2.}
2018-11-01 20:23:33 +01:00
2020-12-29 21:23:01 +01:00
\item{ampc_cephalosporin_resistance}{a character value that should be applied for AmpC de-repressed cephalosporin-resistant mutants, defaults to \code{NA}. Currently only works when \code{version_expertrules} is \code{3.2}; '\emph{EUCAST Expert Rules v3.2 on Enterobacterales}' states that susceptible (S) results of cefotaxime, ceftriaxone and ceftazidime should be reported with a note, or results should be suppressed (emptied) for these agents. A value of \code{NA} for this argument will remove results for these agents, while e.g. a value of \code{"R"} will make the results for these agents resistant. Use \code{NULL} to not alter the results for AmpC de-repressed cephalosporin-resistant mutants. \cr For \emph{EUCAST Expert Rules} v3.2, this rule applies to: \emph{Enterobacter, Klebsiella aerogenes, Citrobacter braakii, freundii, gillenii, murliniae, rodenticum, sedlakii, werkmanii, youngae, Hafnia alvei, Serratia, Morganella morganii, Providencia}.}
\item{...}{column name of an antibiotic, please see section \emph{Antibiotics} below}
2018-02-21 11:52:31 +01:00
}
2018-02-22 20:48:48 +01:00
\value{
The input of \code{x}, possibly with edited values of antibiotics. Or, if \code{verbose = TRUE}, a \link{data.frame} with all original and new values of the affected bug-drug combinations.
2018-02-22 20:48:48 +01:00
}
2018-02-21 11:52:31 +01:00
\description{
2020-09-24 00:30:11 +02:00
Apply rules for clinical breakpoints and intrinsic resistance as defined by the European Committee on Antimicrobial Susceptibility Testing (EUCAST, \url{https://eucast.org}), see \emph{Source}.
2019-11-15 15:25:03 +01:00
2020-09-24 00:30:11 +02:00
To improve the interpretation of the antibiogram before EUCAST rules are applied, some non-EUCAST rules can applied at default, see Details.
2018-02-21 11:52:31 +01:00
}
2019-04-05 18:47:39 +02:00
\details{
\strong{Note:} This function does not translate MIC values to RSI values. Use \code{\link[=as.rsi]{as.rsi()}} for that. \cr
2019-05-10 16:44:59 +02:00
\strong{Note:} When ampicillin (AMP, J01CA01) is not available but amoxicillin (AMX, 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.
2019-04-09 14:59:17 +02:00
2020-09-24 00:30:11 +02:00
The file containing all EUCAST rules is located here: \url{https://github.com/msberends/AMR/blob/master/data-raw/eucast_rules.tsv}.
\subsection{'Other' rules}{
Before further processing, two non-EUCAST rules about drug combinations can be applied to improve the efficacy of the EUCAST rules, and the reliability of your data (analysis). These rules are:
\enumerate{
2020-09-24 00:30:11 +02:00
\item A drug \strong{with} enzyme inhibitor will be set to S if the same drug \strong{without} enzyme inhibitor is S
\item A drug \strong{without} enzyme inhibitor will be set to R if the same drug \strong{with} enzyme inhibitor is R
}
2019-11-15 15:25:03 +01:00
2020-09-24 00:30:11 +02:00
Important examples include amoxicillin and amoxicillin/clavulanic acid, and trimethoprim and trimethoprim/sulfamethoxazole. Needless to say, for these rules to work, both drugs must be available in the data set.
2020-01-26 20:20:00 +01:00
2020-12-22 00:51:17 +01:00
Since these rules are not officially approved by EUCAST, they are not applied at default. To use these rules, include \code{"other"} to the \code{rules} argument, or use \code{eucast_rules(..., rules = "all")}.
2020-09-24 00:30:11 +02:00
}
2019-04-05 18:47:39 +02:00
}
2018-08-31 13:36:19 +02:00
\section{Antibiotics}{
2018-07-26 16:30:42 +02:00
To define antibiotics column names, leave as it is to determine it automatically with \code{\link[=guess_ab_col]{guess_ab_col()}} or input a text (case-insensitive), or use \code{NULL} to skip a column (e.g. \code{TIC = NULL} to skip ticarcillin). Manually defined but non-existing columns will be skipped with a warning.
2019-05-10 16:44:59 +02:00
2020-09-24 00:30:11 +02:00
The following antibiotics are used for the functions \code{\link[=eucast_rules]{eucast_rules()}} and \code{\link[=mdro]{mdro()}}. These are shown below in the format 'name (\verb{antimicrobial ID}, \href{https://www.whocc.no/atc/structure_and_principles/}{ATC code})', sorted alphabetically:
Amikacin (\code{AMK}, \href{https://www.whocc.no/atc_ddd_index/?code=J01GB06&showdescription=no}{J01GB06}), amoxicillin (\code{AMX}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CA04&showdescription=no}{J01CA04}), amoxicillin/clavulanic acid (\code{AMC}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CR02&showdescription=no}{J01CR02}), ampicillin (\code{AMP}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CA01&showdescription=no}{J01CA01}), ampicillin/sulbactam (\code{SAM}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CR01&showdescription=no}{J01CR01}), avoparcin (\code{AVO}, no ATC code), azithromycin (\code{AZM}, \href{https://www.whocc.no/atc_ddd_index/?code=J01FA10&showdescription=no}{J01FA10}), azlocillin (\code{AZL}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CA09&showdescription=no}{J01CA09}), aztreonam (\code{ATM}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DF01&showdescription=no}{J01DF01}), bacampicillin (\code{BAM}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CA06&showdescription=no}{J01CA06}), benzylpenicillin (\code{PEN}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CE01&showdescription=no}{J01CE01}), cadazolid (\code{CDZ}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD09&showdescription=no}{J01DD09}), carbenicillin (\code{CRB}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CA03&showdescription=no}{J01CA03}), carindacillin (\code{CRN}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CA05&showdescription=no}{J01CA05}), cefacetrile (\code{CAC}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DB10&showdescription=no}{J01DB10}), cefaclor (\code{CEC}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DC04&showdescription=no}{J01DC04}), cefadroxil (\code{CFR}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DB05&showdescription=no}{J01DB05}), cefaloridine (\code{RID}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DB02&showdescription=no}{J01DB02}), cefamandole (\code{MAN}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DC03&showdescription=no}{J01DC03}), cefatrizine (\code{CTZ}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DB07&showdescription=no}{J01DB07}), cefazedone (\code{CZD}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DB06&showdescription=no}{J01DB06}), cefazolin (\code{CZO}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DB04&showdescription=no}{J01DB04}), cefcapene (\code{CCP}, no ATC code), cefcapene pivoxil (\code{CCX}, no ATC code), cefdinir (\code{CDR}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD15&showdescription=no}{J01DD15}), cefditoren (\code{DIT}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD16&showdescription=no}{J01DD16}), cefditoren pivoxil (\code{DIX}, no ATC code), cefepime (\code{FEP}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DE01&showdescription=no}{J01DE01}), cefetamet (\code{CAT}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD10&showdescription=no}{J01DD10}), cefetamet pivoxil (\code{CPI}, no ATC code), cefixime (\code{CFM}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD08&showdescription=no}{J01DD08}), cefmenoxime (\code{CMX}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD05&showdescription=no}{J01DD05}), cefmetazole (\code{CMZ}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DC09&showdescription=no}{J01DC09}), cefodizime (\code{DIZ}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD09&showdescription=no}{J01DD09}), cefonicid (\code{CID}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DC06&showdescription=no}{J01DC06}), cefoperazone (\code{CFP}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD12&showdescription=no}{J01DD12}), cefoperazone/sulbactam (\code{CSL}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD62&showdescription=no}{J01DD62}), ceforanide (\code{CND}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DC11&showdescription=no}{J01DC11}), cefotaxime (\code{CTX}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD01&showdescription=no}{J01DD01}), cefotaxime/clavulanic acid (\code{CTC}, no ATC code), cefotaxime/sulbactam (\code{CTS}, no ATC
2018-07-26 16:30:42 +02:00
}
2020-09-24 00:30:11 +02:00
\section{Stable lifecycle}{
\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr}
The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
2020-12-22 00:51:17 +01:00
If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
}
2020-08-21 11:40:13 +02:00
\section{Reference data publicly available}{
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{AMR} package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change.
}
2019-01-02 23:24:07 +01:00
\section{Read more on our website!}{
2020-10-08 11:16:03 +02:00
On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}!
2019-01-02 23:24:07 +01:00
}
2018-02-21 11:52:31 +01:00
\examples{
\donttest{
a <- data.frame(mo = c("Staphylococcus aureus",
"Enterococcus faecalis",
"Escherichia coli",
"Klebsiella pneumoniae",
"Pseudomonas aeruginosa"),
2019-05-10 16:44:59 +02:00
VAN = "-", # Vancomycin
AMX = "-", # Amoxicillin
COL = "-", # Colistin
CAZ = "-", # Ceftazidime
CXM = "-", # Cefuroxime
2020-09-24 00:30:11 +02:00
PEN = "S", # Benzylpenicillin
2019-05-10 16:44:59 +02:00
FOX = "S", # Cefoxitin
2018-02-22 21:37:10 +01:00
stringsAsFactors = FALSE)
2018-10-18 12:10:10 +02:00
2018-02-22 21:37:10 +01:00
a
2019-05-10 16:44:59 +02:00
# mo VAN AMX COL CAZ CXM PEN FOX
2018-10-18 12:10:10 +02:00
# 1 Staphylococcus aureus - - - - - S S
# 2 Enterococcus faecalis - - - - - S S
# 3 Escherichia coli - - - - - S S
# 4 Klebsiella pneumoniae - - - - - S S
# 5 Pseudomonas aeruginosa - - - - - S S
2019-02-08 16:06:54 +01:00
2020-09-24 00:30:11 +02:00
# apply EUCAST rules: some results wil be changed
2019-02-08 16:06:54 +01:00
b <- eucast_rules(a)
2018-02-22 21:37:10 +01:00
b
2019-05-10 16:44:59 +02:00
# mo VAN AMX COL CAZ CXM PEN FOX
2018-10-18 12:10:10 +02:00
# 1 Staphylococcus aureus - S R R S S S
# 2 Enterococcus faecalis - - R R R S R
# 3 Escherichia coli R - - - - R S
# 4 Klebsiella pneumoniae R R - - - R S
# 5 Pseudomonas aeruginosa R R - - R R R
2019-02-08 16:06:54 +01:00
2019-07-30 13:12:40 +02:00
# do not apply EUCAST rules, but rather get a data.frame
2020-09-24 00:30:11 +02:00
# containing all details about the transformations:
2019-02-08 16:06:54 +01:00
c <- eucast_rules(a, verbose = TRUE)
2018-02-21 11:52:31 +01:00
}
}