<!-- Generated by pkgdown: do not edit by hand --><htmllang="en"><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8"><metacharset="utf-8"><metahttp-equiv="X-UA-Compatible"content="IE=edge"><metaname="viewport"content="width=device-width, initial-scale=1, shrink-to-fit=no"><metaname="description"content="ApplyrulesforclinicalbreakpointsandintrinsicresistanceasdefinedbytheEuropeanCommitteeonAntimicrobialSusceptibilityTesting(EUCAST,https://www.eucast.org),seeSource.Useeucast_dosage()togetadata.framewithadviseddosagesofacertainbug-drugcombination,whichisbasedonthedosagedataset.
To improve the interpretation of the antibiogram before EUCAST rules are applied, some non-EUCAST rules can applied at default, see Details."><title>Apply EUCAST Rules — eucast_rules • AMR (for R)</title><!-- favicons --><linkrel="icon"type="image/png"sizes="16x16"href="../favicon-16x16.png"><linkrel="icon"type="image/png"sizes="32x32"href="../favicon-32x32.png"><linkrel="apple-touch-icon"type="image/png"sizes="180x180"href="../apple-touch-icon.png"><linkrel="apple-touch-icon"type="image/png"sizes="120x120"href="../apple-touch-icon-120x120.png"><linkrel="apple-touch-icon"type="image/png"sizes="76x76"href="../apple-touch-icon-76x76.png"><linkrel="apple-touch-icon"type="image/png"sizes="60x60"href="../apple-touch-icon-60x60.png"><scriptsrc="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><metaname="viewport"content="width=device-width, initial-scale=1, shrink-to-fit=no"><linkhref="../deps/bootstrap-5.1.3/bootstrap.min.css"rel="stylesheet"><scriptsrc="../deps/bootstrap-5.1.3/bootstrap.bundle.min.js"></script><linkhref="../deps/Fira_Code-0.4.4/font.css"rel="stylesheet"><!-- Font Awesome icons --><linkrel="stylesheet"href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css"integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk="crossorigin="anonymous"><linkrel="stylesheet"href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css"integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw="crossorigin="anonymous"><!-- bootstrap-toc --><scriptsrc="https://cdn.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></script><!-- headroom.js --><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js"integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0="crossorigin="anonymous"></script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js"integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4="crossorigin="anonymous"></script><!-- clipboard.js --><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js"integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI="crossorigin="anonymous"></script><!-- search --><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js"integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A=="crossorigin="anonymous"></script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js"integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg=="crossorigin="anonymous"></script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js"integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww=="crossorigin="anonymous"></script><!-- pkgdown --><scriptsrc="../pkgdown.js"></script><linkhref="../extra.css"rel="stylesheet"><scriptsrc="../extra.js"></script><metaproperty="og:title"content="Apply EUCAST Rules — eucast_rules"><metaproperty="og:description"content="ApplyrulesforclinicalbreakpointsandintrinsicresistanceasdefinedbytheEuropeanCommitteeonAntimicrobialSusceptibilityTesting(EUCAST,https://www.eucast.org),seeSource.Useeucast_dosage()togetadata.framewithadviseddosagesofacertainbug-drugcombination,whichisbasedonthedosagedataset.
To improve the interpretation of the antibiogram before EUCAST rules are applied, some non-EUCAST rules can applied at default, see Details."><metaproperty="og:image"content="https://msberends.github.io/AMR/logo.svg"><metaname="twitter:card"content="summary_large_image"><metaname="twitter:creator"content="@msberends"><metaname="twitter:site"content="@msberends"><!-- mathjax --><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js"integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k="crossorigin="anonymous"></script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js"integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA="crossorigin="anonymous"></script><!--[if lt IE 9]>
<p>Apply rules for clinical breakpoints and intrinsic resistance as defined by the European Committee on Antimicrobial Susceptibility Testing (EUCAST, <ahref="https://www.eucast.org"class="external-link">https://www.eucast.org</a>), see <em>Source</em>. Use <code>eucast_dosage()</code> to get a <ahref="https://rdrr.io/r/base/data.frame.html"class="external-link">data.frame</a> with advised dosages of a certain bug-drug combination, which is based on the <ahref="dosage.html">dosage</a> data set.</p>
<p>To improve the interpretation of the antibiogram before EUCAST rules are applied, some non-EUCAST rules can applied at default, see <em>Details</em>.</p>
<span> info <spanclass="op">=</span><spanclass="fu"><ahref="https://rdrr.io/r/base/interactive.html"class="external-link">interactive</a></span><spanclass="op">(</span><spanclass="op">)</span>,</span>
<ul><li><p>EUCAST Expert Rules. Version 2.0, 2012.<br>
Leclercq et al. <strong>EUCAST expert rules in antimicrobial susceptibility testing.</strong><em>Clin Microbiol Infect.</em> 2013;19(2):141-60; <ahref="https://doi.org/10.1111/j.1469-0691.2011.03703.x"class="external-link">doi:10.1111/j.1469-0691.2011.03703.x</a></p></li>
<li><p>EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes Tables. Version 3.1, 2016. <ahref="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/Expert_rules_intrinsic_exceptional_V3.1.pdf"class="external-link">(link)</a></p></li>
<li><p>EUCAST Intrinsic Resistance and Unusual Phenotypes. Version 3.2, 2020. <ahref="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/2020/Intrinsic_Resistance_and_Unusual_Phenotypes_Tables_v3.2_20200225.pdf"class="external-link">(link)</a></p></li>
<li><p>EUCAST Intrinsic Resistance and Unusual Phenotypes. Version 3.3, 2021. <ahref="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/2021/Intrinsic_Resistance_and_Unusual_Phenotypes_Tables_v3.3_20211018.pdf"class="external-link">(link)</a></p></li>
<li><p>EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 9.0, 2019. <ahref="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_9.0_Breakpoint_Tables.xlsx"class="external-link">(link)</a></p></li>
<li><p>EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 10.0, 2020. <ahref="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_10.0_Breakpoint_Tables.xlsx"class="external-link">(link)</a></p></li>
<li><p>EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 11.0, 2021. <ahref="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_11.0_Breakpoint_Tables.xlsx"class="external-link">(link)</a></p></li>
<li><p>EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 12.0, 2022. <ahref="https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_12.0_Breakpoint_Tables.xlsx"class="external-link">(link)</a></p></li>
<dd><p>column name of the IDs of the microorganisms (see <code><ahref="as.mo.html">as.mo()</a></code>), defaults to the first column of class <code><ahref="as.mo.html">mo</a></code>. Values will be coerced using <code><ahref="as.mo.html">as.mo()</a></code>.</p></dd>
<dt>info</dt>
<dd><p>a <ahref="https://rdrr.io/r/base/logical.html"class="external-link">logical</a> to indicate whether progress should be printed to the console, defaults to only print while in interactive sessions</p></dd>
<dt>rules</dt>
<dd><p>a <ahref="https://rdrr.io/r/base/character.html"class="external-link">character</a> vector that specifies which rules should be applied. Must be one or more of <code>"breakpoints"</code>, <code>"expert"</code>, <code>"other"</code>, <code>"custom"</code>, <code>"all"</code>, and defaults to <code>c("breakpoints", "expert")</code>. The default value can be set to another value, e.g. using <code>options(AMR_eucastrules = "all")</code>. If using <code>"custom"</code>, be sure to fill in argument <code>custom_rules</code> too. Custom rules can be created with <code><ahref="custom_eucast_rules.html">custom_eucast_rules()</a></code>.</p></dd>
<dt>verbose</dt>
<dd><p>a <ahref="https://rdrr.io/r/base/logical.html"class="external-link">logical</a> 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.</p></dd>
<dd><p>a <ahref="https://rdrr.io/r/base/character.html"class="external-link">character</a> value that should be applied to cefotaxime, ceftriaxone and ceftazidime for AmpC de-repressed cephalosporin-resistant mutants, defaults to <code>NA</code>. Currently only works when <code>version_expertrules</code> is <code>3.2</code> and higher; these version of '<em>EUCAST Expert Rules on Enterobacterales</em>' state that results of cefotaxime, ceftriaxone and ceftazidime should be reported with a note, or results should be suppressed (emptied) for these three drugs. A value of <code>NA</code> (the default) for this argument will remove results for these three drugs, while e.g. a value of <code>"R"</code> will make the results for these drugs resistant. Use <code>NULL</code> or <code>FALSE</code> to not alter results for these three drugs of AmpC de-repressed cephalosporin-resistant mutants. Using <code>TRUE</code> is equal to using <code>"R"</code>. <br> For <em>EUCAST Expert Rules</em> v3.2, this rule applies to: <em>Citrobacter braakii</em>, <em>Citrobacter freundii</em>, <em>Citrobacter gillenii</em>, <em>Citrobacter murliniae</em>, <em>Citrobacter rodenticum</em>, <em>Citrobacter sedlakii</em>, <em>Citrobacter werkmanii</em>, <em>Citrobacter youngae</em>, <em>Enterobacter</em>, <em>Hafnia alvei</em>, <em>Klebsiella aerogenes</em>, <em>Morganella morganii</em>, <em>Providencia</em> and <em>Serratia</em>.</p></dd>
<dd><p>a <ahref="https://rdrr.io/r/base/logical.html"class="external-link">logical</a> to indicate whether only antibiotic columns must be detected that were transformed to class <code>rsi</code> (see <code><ahref="as.rsi.html">as.rsi()</a></code>) on beforehand (defaults to <code>FALSE</code>)</p></dd>
<p>The input of <code>x</code>, possibly with edited values of antibiotics. Or, if <code>verbose = TRUE</code>, a <ahref="https://rdrr.io/r/base/data.frame.html"class="external-link">data.frame</a> with all original and new values of the affected bug-drug combinations.</p>
<p><strong>Note:</strong> This function does not translate MIC values to RSI values. Use <code><ahref="as.rsi.html">as.rsi()</a></code> for that. <br><strong>Note:</strong> 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. <br></p>
<p>The file containing all EUCAST rules is located here: <ahref="https://github.com/msberends/AMR/blob/main/data-raw/eucast_rules.tsv"class="external-link">https://github.com/msberends/AMR/blob/main/data-raw/eucast_rules.tsv</a>. <strong>Note:</strong> Old taxonomic names are replaced with the current taxonomy where applicable. For example, <em>Ochrobactrum anthropi</em> was renamed to <em>Brucella anthropi</em> in 2020; the original EUCAST rules v3.1 and v3.2 did not yet contain this new taxonomic name. The <code>AMR</code> package contains the full microbial taxonomy updated until 12 September, 2022, see <ahref="microorganisms.html">microorganisms</a>.</p><divclass="section">
<p>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:</p><ol><li><p>A drug <strong>with</strong> enzyme inhibitor will be set to S if the same drug <strong>without</strong> enzyme inhibitor is S</p></li>
<li><p>A drug <strong>without</strong> enzyme inhibitor will be set to R if the same drug <strong>with</strong> enzyme inhibitor is R</p></li>
</ol><p>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.</p>
<p>Since these rules are not officially approved by EUCAST, they are not applied at default. To use these rules, include <code>"other"</code> to the <code>rules</code> argument, or use <code>eucast_rules(..., rules = "all")</code>. You can also set the option <code>AMR_eucastrules</code>, i.e. run <code>options(AMR_eucastrules = "all")</code>.</p>
<p>To define antibiotics column names, leave as it is to determine it automatically with <code><ahref="guess_ab_col.html">guess_ab_col()</a></code> or input a text (case-insensitive), or use <code>NULL</code> to skip a column (e.g. <code>TIC = NULL</code> to skip ticarcillin). Manually defined but non-existing columns will be skipped with a warning.</p>
<p>The following antibiotics are eligible for the functions <code>eucast_rules()</code> and <code><ahref="mdro.html">mdro()</a></code>. These are shown below in the format 'name (<code>antimicrobial ID</code>, <ahref="https://www.whocc.no/atc/structure_and_principles/"class="external-link">ATC code</a>)', sorted alphabetically:</p>
<h2id="reference-data-publicly-available">Reference Data Publicly Available<aclass="anchor"aria-label="anchor"href="#reference-data-publicly-available"></a></h2>
<p>All data sets in this <code>AMR</code> package (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) are publicly and freely available for download in the following formats: R, MS Excel, Apache Feather, Apache Parquet, SPSS, SAS, and Stata. We also provide tab-separated plain text files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please visit <ahref="https://msberends.github.io/AMR/articles/datasets.html">our website for the download links</a>. The actual files are of course available on <ahref="https://github.com/msberends/AMR/tree/main/data-raw"class="external-link">our GitHub repository</a>.</p>
<spanclass="r-in"><span> mo <spanclass="op">=</span><spanclass="fu"><ahref="https://rdrr.io/r/base/c.html"class="external-link">c</a></span><spanclass="op">(</span></span></span>
<spanclass="r-wrn co"><spanclass="r-pr">#></span><spanclass="warning">Warning: </span>in eucast_rules(): not all columns with antimicrobial results are of</span>
<spanclass="r-wrn co"><spanclass="r-pr">#></span><spanclass="warning">Warning: </span>in eucast_rules(): not all columns with antimicrobial results are of</span>
<spanclass="r-out co"><spanclass="r-pr">#></span><spanstyle="color: #BCBCBC;">1</span> TOB Tobramycin 6-7 mg/kg x 1 iv <spanstyle="color: #BB0000;">NA</span></span>
<spanclass="r-out co"><spanclass="r-pr">#></span><spanstyle="color: #BCBCBC;">2</span> GEN Gentamicin 6-7 mg/kg x 1 iv <spanstyle="color: #BB0000;">NA</span></span>
<spanclass="r-out co"><spanclass="r-pr">#></span><spanstyle="color: #BCBCBC;">3</span> CIP Ciprofloxacin 0.4 g x 2 iv 0.4 g x 3 iv</span>
<spanclass="r-out co"><spanclass="r-pr">#></span><spanstyle="color: #BCBCBC;">1</span> TOB Tobramycin 6-7 mg/kg x 1 iv <spanstyle="color: #BB0000;">NA</span></span>
<spanclass="r-out co"><spanclass="r-pr">#></span><spanstyle="color: #BCBCBC;">2</span> GEN Gentamicin 6-7 mg/kg x 1 iv <spanstyle="color: #BB0000;">NA</span></span>
<spanclass="r-out co"><spanclass="r-pr">#></span><spanstyle="color: #BCBCBC;">3</span> CIP Ciprofloxacin 0.4 g x 2 iv 0.4 g x 3 iv</span>
<p></p><p><code>AMR</code> (for R). Free and open-source, licenced under the <atarget="_blank"href="https://github.com/msberends/AMR/blob/main/LICENSE"class="external-link">GNU General Public License version 2.0 (GPL-2)</a>.<br>Developed at the <atarget="_blank"href="https://www.rug.nl"class="external-link">University of Groningen</a> and <atarget="_blank"href="https://www.umcg.nl"class="external-link">University Medical Center Groningen</a> in The Netherlands.</p>