<scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8="crossorigin="anonymous"></script><!-- Font Awesome icons --><linkrel="stylesheet"href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0="crossorigin="anonymous">
<p><em>(<helptitle="Too Long, Didn't Read">TLDR</help> - to find out how to conduct AMR analysis, please <ahref="./articles/AMR.html">continue reading here to get started</a>.</em></p>
<ahref="#what-is-amr-for-r"class="anchor"></a>What is <code>AMR</code> (for R)?</h3>
<p><code>AMR</code> is a free and open-source <ahref="https://www.r-project.org">R package</a> to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial properties by using evidence-based methods. Since its first public release in early 2018, this package has been downloaded over 20,000 times from more than 40 countries <small>(source: <ahref="https://cran-logs.rstudio.com">CRAN logs, 2019</a>)</small>.</p>
<p>After installing this package, R knows <ahref="./reference/microorganisms.html"><strong>~70,000 microorganisms</strong></a> (distinct microbial species) and <ahref="./reference/antibiotics.html"><strong>~450 antibiotics</strong></a> by name and code, and knows all about valid RSI and MIC values. It supports any data format, including WHONET/EARS-Net data.</p>
<p>We created this package for both routine analysis and academic research (as part of our PhD theses) at the Faculty of Medical Sciences of the University of Groningen, the Netherlands, and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). This R package is <ahref="./news">actively maintained</a> and is free software (see <ahref="#copyright">Copyright</a>).</p>
<li>Reference for the taxonomy of microorganisms, since the package contains all microbial (sub)species from the <ahref="http://www.catalogueoflife.org">Catalogue of Life</a> (<ahref="./reference/mo_property.html">manual</a>)</li>
<li>Getting properties for any antibiotic (like name, EARS-Net code, ATC code, PubChem code, defined daily dose or trade name) (<ahref="./reference/ab_property.html">manual</a>)</li>
<ahref="#latest-released-version"class="anchor"></a>Latest released version</h4>
<p>This package is available <ahref="https://cran.r-project.org/package=AMR">on the official R network (CRAN)</a>, which has a peer-reviewed submission process. Install this package in R with:</p>
<p>It will be downloaded and installed automatically. For RStudio, click on the menu <em>Tools</em>><em>Install Packages…</em> and then type in “AMR” and press <kbd>Install</kbd>.</p>
<p><strong>Note:</strong> Not all functions on this website may be available in this latest release. To use all functions and data sets mentioned on this website, install the latest development version.</p>
<p>To find out how to conduct AMR analysis, please <ahref="./articles/AMR.html">continue reading here to get started</a> or click the links in the ‘How to’ menu.</p>
<p>This package contains the complete taxonomic tree of almost all 70,000 microorganisms from the authoritative and comprehensive Catalogue of Life (CoL, <ahref="http://www.catalogueoflife.org">www.catalogueoflife.org</a>). With <code>catalogue_of_life_version()</code> can be checked which version of the CoL is included in this package.</p>
<p>This package contains <strong>all ~450 antimicrobial drugs</strong> and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD, oral and IV) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, <ahref="https://www.whocc.no"class="uri">https://www.whocc.no</a>) and the <ahref="http://ec.europa.eu/health/documents/community-register/html/atc.htm">Pharmaceuticals Community Register of the European Commission</a>.</p>
<p><strong>NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package. See <ahref="https://www.whocc.no/copyright_disclaimer/"class="uri">https://www.whocc.no/copyright_disclaimer/</a>.</strong></p>
<p>We support WHONET and EARS-Net data. Exported files from WHONET can be imported into R and can be analysed easily using this package. For education purposes, we created an <ahref="./reference/WHONET.html">example data set <code>WHONET</code></a> with the exact same structure as a WHONET export file. Furthermore, this package also contains a <ahref="./reference/antibiotics.html">data set <code>antibiotics</code></a> with all EARS-Net antibiotic abbreviations, and knows almost all WHONET abbreviations for microorganisms. When using WHONET data as input for analysis, all input parameters will be set automatically.</p>
<p>Read our tutorial about <ahref="./articles/WHONET.html">how to work with WHONET data here</a>.</p>
<p>It <strong>cleanses existing data</strong> by providing new <em>classes</em> for microoganisms, antibiotics and antimicrobial results (both S/I/R and MIC). By installing this package, you teach R everything about microbiology that is needed for analysis. These functions all use intelligent rules to guess results that you would expect:</p>
<li>Use <code>as.mo()</code> to get a microbial ID. The IDs are human readable for the trained eye - the ID of <em>Klebsiella pneumoniae</em> is “B_KLBSL_PNMN” (B stands for Bacteria) and the ID of <em>S. aureus</em> is “B_STPHY_AURS”. The function takes almost any text as input that looks like the name or code of a microorganism like “E. coli”, “esco” or “esccol” and tries to find expected results using intelligent rules combined with the included Catalogue of Life data set. It only takes milliseconds to find results, please see our <ahref="./articles/benchmarks.html">benchmarks</a>. Moreover, it can group <em>Staphylococci</em> into coagulase negative and positive (CoNS and CoPS, see <ahref="./reference/as.mo.html#source">source</a>) and can categorise <em>Streptococci</em> into Lancefield groups (like beta-haemolytic <em>Streptococcus</em> Group B, <ahref="./reference/as.mo.html#source">source</a>).</li>
<li>Use <code>as.ab()</code> to get an antibiotic ID. Like microbial IDs, these IDs are also human readable based on those used by EARS-Net. For example, the ID of amoxicillin is <code>AMX</code> and the ID of gentamicin is <code>GEN</code>. The <code>as.ab()</code> function also uses intelligent rules to find results like accepting misspelling, trade names and abbrevations used in many laboratory systems. For instance, the values “Furabid”, “Furadantin”, “nitro” all return the ID of Nitrofurantoine. To accomplish this, the package contains a database with most LIS codes, official names, trade names, ATC codes, defined daily doses (DDD) and drug categories of antibiotics.</li>
<li>Use <code>as.rsi()</code> to get antibiotic interpretations based on raw MIC values (in mg/L) or disk diffusion values (in mm), or transform existing values to valid antimicrobial results. It produces just S, I or R based on your input and warns about invalid values. Even values like “<=0.002; S” (combined MIC/RSI) will result in “S”.</li>
<li>Use <code>as.mic()</code> to cleanse your MIC values. It produces a so-called factor (called <em>ordinal</em> in SPSS) with valid MIC values as levels. A value like “<=0.002; S” (combined MIC/RSI) will result in “<=0.002”.</li>
<li>Use <code>eucast_rules()</code> to apply <ahref="http://www.eucast.org/expert_rules_and_intrinsic_resistance/">EUCAST expert rules to isolates</a> (not the translation from MIC to RSI values, use <code>as.rsi()</code> for that).</li>
<li>Use <code>first_isolate()</code> to identify the first isolates of every patient <ahref="https://clsi.org/standards/products/microbiology/documents/m39/">using guidelines from the CLSI</a> (Clinical and Laboratory Standards Institute).
<li>You can also identify first <em>weighted</em> isolates of every patient, an adjusted version of the CLSI guideline. This takes into account key antibiotics of every strain and compares them.</li>
<li>Use <code>mdro()</code> (abbreviation of Multi Drug Resistant Organisms) to check your isolates for exceptional resistance with country-specific guidelines or EUCAST rules. Currently, national guidelines for Germany and the Netherlands are supported.</li>
<li>The <ahref="./reference/microorganisms.html">data set <code>microorganisms</code></a> contains the complete taxonomic tree of ~70,000 microorganisms. Furthermore, some colloquial names and all Gram stains are available, which enables resistance analysis of e.g.different antibiotics per Gram stain. The package also contains functions to look up values in this data set like <code>mo_genus()</code>, <code>mo_family()</code>, <code>mo_gramstain()</code> or even <code>mo_phylum()</code>. As they use <code>as.mo()</code> internally, they also use the same intelligent rules for determination. For example, <code>mo_genus("MRSA")</code> and <code>mo_genus("S. aureus")</code> will both return <code>"Staphylococcus"</code>. They also come with support for German, Dutch, Spanish, Italian, French and Portuguese. These functions can be used to add new variables to your data.</li>
<li>The <ahref="./reference/antibiotics.html">data set <code>antibiotics</code></a> contains ~450 antimicrobial drugs with their EARS-Net code, ATC code, PubChem compound ID, official name, common LIS codes and DDDs of both oral and parenteral administration. It also contains all (thousands of) trade names found in PubChem. The function <code>ab_atc()</code> will return the ATC code of an antibiotic as defined by the WHO. Use functions like <code>ab_name()</code>, <code>ab_group()</code> and <code>ab_tradenames()</code> to look up values. The <code>ab_*</code> functions use <code>as.ab()</code> internally so they support the same intelligent rules to guess the most probable result. For example, <code>ab_name("Fluclox")</code>, <code>ab_name("Floxapen")</code> and <code>ab_name("J01CF05")</code> will all return <code>"Flucloxacillin"</code>. These functions can again be used to add new variables to your data.</li>
<li>Calculate the resistance (and even co-resistance) of microbial isolates with the <code>portion_R()</code>, <code>portion_IR()</code>, <code>portion_I()</code>, <code>portion_SI()</code> and <code>portion_S()</code> functions. Similarly, the <em>number</em> of isolates can be determined with the <code>count_R()</code>, <code>count_IR()</code>, <code>count_I()</code>, <code>count_SI()</code> and <code>count_S()</code> functions. All these functions can be used with the <code>dplyr</code> package (e.g.in conjunction with <code>summarise()</code>)</li>
<li>Plot AMR results with <code>geom_rsi()</code>, a function made for the <code>ggplot2</code> package</li>
<li>Predict antimicrobial resistance for the nextcoming years using logistic regression models with the <code>resistance_predict()</code> function</li>
<li>The <ahref="./reference/WHONET.html"><code>WHONET</code> data set</a>. This data set only contains fake data, but with the exact same structure as files exported by WHONET. Read more about WHONET <ahref="./articles/WHONET.html">on its tutorial page</a>.</li>
<p>This R package is free, open-source software and licensed under the <ahref="./LICENSE-text.html">GNU General Public License v2.0 (GPL-2)</a>. In a nutshell, this means that this package:</p>
<ul>
<li><p>May be used for commercial purposes</p></li>
<li><p>May be used for private purposes</p></li>
<li><p>May <strong>not</strong> be used for patent purposes</p></li>
<li>
<p>May be modified, although:</p>
<ul>
<li>Modifications <strong>must</strong> be released under the same license when distributing the package</li>
<li>Changes made to the code <strong>must</strong> be documented</li>
</ul>
</li>
<li>
<p>May be distributed, although:</p>
<ul>
<li>Source code <strong>must</strong> be made available when the package is distributed</li>
<li>A copy of the license and copyright notice <strong>must</strong> be included with the package.</li>
</ul>
</li>
<li><p>Comes with a LIMITATION of liability</p></li>
<ahref="https://www.rug.nl/staff/a.w.friedrich/">Alex W. Friedrich</a><br><smallclass="roles"> Author, thesis advisor </small><ahref="https://orcid.org/0000-0003-4881-038X"target="orcid.widget"><imgsrc="https://members.orcid.org/sites/default/files/vector_iD_icon.svg"class="orcid"alt="ORCID"height="16"></a></li>
<li>
<ahref="https://www.rug.nl/staff/b.sinha/">Bhanu N. M. Sinha</a><br><smallclass="roles"> Author, thesis advisor </small><ahref="https://orcid.org/0000-0003-1634-0010"target="orcid.widget"><imgsrc="https://members.orcid.org/sites/default/files/vector_iD_icon.svg"class="orcid"alt="ORCID"height="16"></a></li>
<p>Developed by <ahref="https://www.rug.nl/staff/m.s.berends/">Matthijs S. Berends</a>, <ahref="https://www.rug.nl/staff/c.f.luz/">Christian F. Luz</a>, <ahref="https://www.rug.nl/staff/a.w.friedrich/">Alex W. Friedrich</a>, <ahref="https://www.rug.nl/staff/b.sinha/">Bhanu N. M. Sinha</a>, <ahref="https://www.rug.nl/staff/c.j.albers/">Casper J. Albers</a>, <ahref="https://www.rug.nl/staff/c.glasner/">Corinna Glasner</a>.</p>