Apply rules for clinical breakpoints and intrinsic resistance as defined by the European Committee on Antimicrobial Susceptibility Testing (EUCAST, https://eucast.org), see Source. Use eucast_dosage()
to get a data.frame with advised dosages of a certain bug-drug combination, which is based on the dosage data set.
To improve the interpretation of the antibiogram before EUCAST rules are applied, some non-EUCAST rules can applied at default, see Details.
eucast_rules(
x,
col_mo = NULL,
info = interactive(),
rules = getOption("AMR_eucastrules", default = c("breakpoints", "expert")),
verbose = FALSE,
version_breakpoints = 11,
version_expertrules = 3.2,
ampc_cephalosporin_resistance = NA,
only_rsi_columns = FALSE,
custom_rules = NULL,
...
)
eucast_dosage(ab, administration = "iv", version_breakpoints = 11)
x | data with antibiotic columns, such as |
---|---|
col_mo | column name of the IDs of the microorganisms (see |
info | a logical to indicate whether progress should be printed to the console, defaults to only print while in interactive sessions |
rules | a character vector that specifies which rules should be applied. Must be one or more of |
verbose | a 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. |
version_breakpoints | the version number to use for the EUCAST Clinical Breakpoints guideline. Can be either "11.0" or "10.0". |
version_expertrules | the version number to use for the EUCAST Expert Rules and Intrinsic Resistance guideline. Can be either "3.2" or "3.1". |
ampc_cephalosporin_resistance | a character value that should be applied to cefotaxime, ceftriaxone and ceftazidime for AmpC de-repressed cephalosporin-resistant mutants, defaults to |
only_rsi_columns | a logical to indicate whether only antibiotic columns must be detected that were transformed to class |
custom_rules | custom rules to apply, created with |
... | column name of an antibiotic, see section Antibiotics below |
ab | any (vector of) text that can be coerced to a valid antibiotic code with |
administration | route of administration, either "im", "iv" or "oral" |
EUCAST Expert Rules. Version 2.0, 2012.
Leclercq et al. EUCAST expert rules in antimicrobial susceptibility testing. Clin Microbiol Infect. 2013;19(2):141-60; doi: 10.1111/j.1469-0691.2011.03703.x
EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes Tables. Version 3.1, 2016. (link)
EUCAST Intrinsic Resistance and Unusual Phenotypes. Version 3.2, 2020. (link)
EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 9.0, 2019. (link)
EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 10.0, 2020. (link)
EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 11.0, 2021. (link)
The input of x
, possibly with edited values of antibiotics. Or, if verbose = TRUE
, a data.frame with all original and new values of the affected bug-drug combinations.
Note: This function does not translate MIC values to RSI values. Use as.rsi()
for that.
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.
The file containing all EUCAST rules is located here: https://github.com/msberends/AMR/blob/master/data-raw/eucast_rules.tsv. Note: Old taxonomic names are replaced with the current taxonomy where applicable. For example, Ochrobactrum anthropi was renamed to Brucella anthropi in 2020; the original EUCAST rules v3.1 and v3.2 did not yet contain this new taxonomic name. The file used as input for this AMR
package contains the taxonomy updated until March 2021.
Custom rules can be created using custom_eucast_rules()
, e.g.:
x <- custom_eucast_rules(AMC == "R" & genus == "Klebsiella" ~ aminopenicillins == "R",
AMC == "I" & genus == "Klebsiella" ~ aminopenicillins == "I")
eucast_rules(example_isolates, rules = "custom", custom_rules = x)
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:
A drug with enzyme inhibitor will be set to S if the same drug without enzyme inhibitor is S
A drug without enzyme inhibitor will be set to R if the same drug with enzyme inhibitor is R
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.
Since these rules are not officially approved by EUCAST, they are not applied at default. To use these rules, include "other"
to the rules
argument, or use eucast_rules(..., rules = "all")
. You can also set the option AMR_eucastrules
, i.e. run options(AMR_eucastrules = "all")
.
To define antibiotics column names, leave as it is to determine it automatically with guess_ab_col()
or input a text (case-insensitive), or use NULL
to skip a column (e.g. TIC = NULL
to skip ticarcillin). Manually defined but non-existing columns will be skipped with a warning.
The following antibiotics are eligible for the functions eucast_rules()
and mdro()
. These are shown below in the format 'name (antimicrobial ID
, ATC code)', sorted alphabetically:
Amikacin (AMK
, NULL(https://www.whocc.no/atc_ddd_index/?code=c("D06AX12", "J01GB06", "S01AA21")&showdescription=no)), amoxicillin (AMX
, c("J01MA12", "S01AE05")), amoxicillin/clavulanic acid (AMC
, c("J01CA01", "S01AA19")), ampicillin (AMP
, J01CA04&showdescription=no)), ampicillin/sulbactam (SAM
, J01CA12), azithromycin (AZM
, J01CR05&showdescription=no)), azlocillin (AZL
, J01CA13), aztreonam (ATM
, c("A01AB22", "J01AA02")), bacampicillin (BAM
, c("J01FA10", "S01AA26")), benzylpenicillin (PEN
, J01FA09&showdescription=no)), carbenicillin (CRB
, J01CR02), carindacillin (CRN
, c("J01MA02", "S01AE03", "S02AA15", "S03AA07")), cefadroxil (CFR
, c("J01MA14", "S01AE07")), cefazolin (CZO
, c("J01MA01", "S01AE01", "S02AA16")), cefepime (FEP
, c("A01AB23", "D10AF07", "J01AA08")), cefotaxime (CTX
, J01FA06), cefoxitin (FOX
, J01CF04), ceftazidime (CAZ
, J01CF05), ceftriaxone (CRO
, c("J01CE01", "S01AA14")), cefuroxime (CXM
, c("D06AX01", "D09AA02", "J01XC01", "S01AA13")&showdescription=no)), cephalexin (LEX
, J01FF02), cephalothin (CEP
, J04AB02), chloramphenicol (CHL
, J01XX09(https://www.whocc.no/atc_ddd_index/?code=c("D06AX02", "D10AF03", "G01AA05", "J01BA01", "S01AA01", "S02AA01", "S03AA08")&showdescription=no)), ciprofloxacin (CIP
, J01XX08(https://www.whocc.no/atc_ddd_index/?code=c("J01MA02", "S01AE03", "S02AA15", "S03AA07")&showdescription=no)), clarithromycin (CLR
, J01DB04), clindamycin (CLI
, J01DC01(https://www.whocc.no/atc_ddd_index/?code=c("D10AF01", "G01AA10", "J01FF01")&showdescription=no)), colistin (COL
, c("A01AB13", "D06AA04", "J01AA07", "S01AA09", "S02AA08", "S03AA02")&showdescription=no)), daptomycin (DAP
, J01XE01), doxycycline (DOX
, J01AA12&showdescription=no)), epicillin (EPC
, c("J01DC02", "S01AA27")), ertapenem (ETP
, c("A07AA05", "J01XB02", "S01AA18", "S02AA11", "S03AA03")), flucloxacillin (FLC
, c("A07AA10", "J01XB01")), fosfomycin (FOS
, J01DD01), fusidic acid (FUS
, J01DD04(https://www.whocc.no/atc_ddd_index/?code=c("D06AX01", "D09AA02", "J01XC01", "S01AA13")&showdescription=no)), gentamicin (GEN
, J01DF01(https://www.whocc.no/atc_ddd_index/?code=c("D06AX07", "J01GB03", "S01AA11", "S02AA14", "S03AA06")&showdescription=no)), hetacillin (HET
, J01DH03), imipenem (IPM
, J01EA01), kanamycin (KAN
, J01XX01(https://www.whocc.no/atc_ddd_index/?code=c("A07AA08", "J01GB04", "S01AA24")&showdescription=no)), levofloxacin (LVX
, c("D06AX02", "D10AF03", "G01AA05", "J01BA01", "S01AA01", "S02AA01", "S03AA08")&showdescription=no)), lincomycin (LIN
, J01DD02), linezolid (LNZ
, J01DE01), mecillinam (Amdinocillin) (MEC
, J01DH51), meropenem (MEM
, J01DH02), metampicillin (MTM
, c("A07AA08", "J01GB04", "S01AA24")), mezlocillin (MEZ
, c("A01AB08", "A07AA01", "B05CA09", "D06AX04", "J01GB05", "R02AB01", "S01AA03", "S02AA07", "S03AA01")), minocycline (MNO
, J01EE01(https://www.whocc.no/atc_ddd_index/?code=c("A01AB23", "D10AF07", "J01AA08")&showdescription=no)), moxifloxacin (MFX
, J01MB02&showdescription=no)), nalidixic acid (NAL
, c("D10AF01", "G01AA10", "J01FF01")), neomycin (NEO
, J01FG02(https://www.whocc.no/atc_ddd_index/?code=c("A01AB08", "A07AA01", "B05CA09", "D06AX04", "J01GB05", "R02AB01", "S01AA03", "S02AA07", "S03AA01")&showdescription=no)), nitrofurantoin (NIT
, c("A07AA09", "J01XA01", "S01AA28")), ofloxacin (OFX
, c("D06AX12", "J01GB06", "S01AA21")(https://www.whocc.no/atc_ddd_index/?code=c("J01MA01", "S01AE01", "S02AA16")&showdescription=no)), oxacillin (OXA
, c("D06AX07", "J01GB03", "S01AA11", "S02AA14", "S03AA06")), phenoxymethylpenicillin (PHN
, c("J01GB01", "S01AA12")), piperacillin (PIP
, J01CR01), piperacillin/tazobactam (TZP
, J01DB03), pivampicillin (PVM
, J01DB01), pivmecillinam (PME
, J01DB05), polymyxin B (PLB
, J01CR03(https://www.whocc.no/atc_ddd_index/?code=c("A07AA05", "J01XB02", "S01AA18", "S02AA11", "S03AA03")&showdescription=no)), quinupristin/dalfopristin (QDA
, J01CA17), rifampicin (RIF
, J01EC02), roxithromycin (RXT
, J01ED01), sulbenicillin (SBC
, J01EB03), sulfadiazine (SDI
, c("J01EB05", "S01AB02")), sulfadiazine/trimethoprim (SLT1
, J01EB01), sulfadimethoxine (SUD
, J01ED02), sulfadimidine (SDM
, J01ED09), sulfadimidine/trimethoprim (SLT2
, c("D06BA06", "J01ED07")), sulfafurazole (SLF
, c("B05CA04", "D06BA04", "J01EB02", "S01AB01")&showdescription=no)), sulfaisodimidine (SLF1
, J01EC01), sulfalene (SLF2
, J01ED05), sulfamazone (SZO
, J01ED03), sulfamerazine (SLF3
, J01ED04&showdescription=no)), sulfamerazine/trimethoprim (SLT3
, J01EC03), sulfamethizole (SLF4
, c("D06BA05", "J01EB06")(https://www.whocc.no/atc_ddd_index/?code=c("B05CA04", "D06BA04", "J01EB02", "S01AB01")&showdescription=no)), sulfamethoxazole (SMX
, J01ED06), sulfamethoxypyridazine (SLF5
, J01ED08), sulfametomidine (SLF6
, J01EB04), sulfametoxydiazine (SLF7
, c("D06BA02", "J01EB07")), sulfametrole/trimethoprim (SLT4
, J01EB08), sulfamoxole (SLF8
, J01EE02), sulfamoxole/trimethoprim (SLT5
, J01EE05), sulfanilamide (SLF9
, J01EE07&showdescription=no)), sulfaperin (SLF10
, J01EE03), sulfaphenazole (SLF11
, J01EE04), sulfapyridine (SLF12
, J01XA02), sulfathiazole (SUT
, J01CA09&showdescription=no)), sulfathiourea (SLF13
, J01CA06), talampicillin (TAL
, J01CA03), tedizolid (TZD
, J01CA05), teicoplanin (TEC
, J01CA07), temocillin (TEM
, J01CA18), tetracycline (TCY
, J01CA11(https://www.whocc.no/atc_ddd_index/?code=c("A01AB13", "D06AA04", "J01AA07", "S01AA09", "S02AA08", "S03AA02")&showdescription=no)), ticarcillin (TIC
, J01CA10), ticarcillin/clavulanic acid (TCC
, J01CA14), tigecycline (TGC
, J01CA08), tobramycin (TOB
, J01CA02&showdescription=no)), trimethoprim (TMP
, J01CA16), trimethoprim/sulfamethoxazole (SXT
, J01CA15), vancomycin (VAN
, J01XX11(https://www.whocc.no/atc_ddd_index/?code=c("A07AA09", "J01XA01", "S01AA28")&showdescription=no)), NA (NA
, J01CE02)
The lifecycle of this function is 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.
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.
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this 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 all download links on our website, which is automatically updated with every code change.
On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR data analysis, the complete documentation of all functions and an example analysis using WHONET data.
# \donttest{
a <- data.frame(mo = c("Staphylococcus aureus",
"Enterococcus faecalis",
"Escherichia coli",
"Klebsiella pneumoniae",
"Pseudomonas aeruginosa"),
VAN = "-", # Vancomycin
AMX = "-", # Amoxicillin
COL = "-", # Colistin
CAZ = "-", # Ceftazidime
CXM = "-", # Cefuroxime
PEN = "S", # Benzylpenicillin
FOX = "S", # Cefoxitin
stringsAsFactors = FALSE)
a
# mo VAN AMX COL CAZ CXM PEN FOX
# 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
# apply EUCAST rules: some results wil be changed
b <- eucast_rules(a)
b
# mo VAN AMX COL CAZ CXM PEN FOX
# 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
# do not apply EUCAST rules, but rather get a data.frame
# containing all details about the transformations:
c <- eucast_rules(a, verbose = TRUE)
# }
eucast_dosage(c("tobra", "genta", "cipro"), "iv")