AMR/docs/reference/as.mo.html

384 lines
34 KiB
HTML

<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Transform Input to a Microorganism Code — as.mo • AMR (for R)</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><script src="../extra.js"></script><meta property="og:title" content="Transform Input to a Microorganism Code — as.mo"><meta property="og:description" content='Use this function to determine a valid microorganism code (mo). Determination is done using intelligent rules and the complete taxonomic kingdoms Bacteria, Chromista, Protozoa, Archaea and most microbial species from the kingdom Fungi (see Source). The input can be almost anything: a full name (like "Staphylococcus aureus"), an abbreviated name (such as "S. aureus"), an abbreviation known in the field (such as "MRSA"), or just a genus. See Examples.'><meta property="og:image" content="https://msberends.github.io/AMR/logo.svg"><meta name="twitter:card" content="summary_large_image"><meta name="twitter:creator" content="@msberends"><meta name="twitter:site" content="@univgroningen"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="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]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]--></head><body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.8.1.9011</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav"><li>
<a href="../index.html">
<span class="fa fa-home"></span>
Home
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
<span class="fa fa-question-circle"></span>
How to
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu"><li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
<a href="../articles/resistance_predict.html">
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
<li>
<a href="../articles/datasets.html">
<span class="fa fa-database"></span>
Data sets for download / own use
</a>
</li>
<li>
<a href="../articles/PCA.html">
<span class="fa fa-compress"></span>
Conduct principal component analysis for AMR
</a>
</li>
<li>
<a href="../articles/MDR.html">
<span class="fa fa-skull-crossbones"></span>
Determine multi-drug resistance (MDR)
</a>
</li>
<li>
<a href="../articles/WHONET.html">
<span class="fa fa-globe-americas"></span>
Work with WHONET data
</a>
</li>
<li>
<a href="../articles/SPSS.html">
<span class="fa fa-file-upload"></span>
Import data from SPSS/SAS/Stata
</a>
</li>
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
<a href="../reference/mo_property.html">
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
<a href="../reference/ab_property.html">
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
<li>
<a href="../articles/benchmarks.html">
<span class="fa fa-shipping-fast"></span>
Other: benchmarks
</a>
</li>
</ul></li>
<li>
<a href="../reference/index.html">
<span class="fa fa-book-open"></span>
Manual
</a>
</li>
<li>
<a href="../authors.html">
<span class="fa fa-users"></span>
Authors
</a>
</li>
<li>
<a href="../news/index.html">
<span class="far fa-newspaper"></span>
Changelog
</a>
</li>
</ul><ul class="nav navbar-nav navbar-right"><li>
<a href="https://github.com/msberends/AMR" class="external-link">
<span class="fab fa-github"></span>
Source Code
</a>
</li>
</ul></div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Transform Input to a Microorganism Code</h1>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/HEAD/R/mo.R" class="external-link"><code>R/mo.R</code></a></small>
<div class="hidden name"><code>as.mo.Rd</code></div>
</div>
<div class="ref-description">
<p>Use this function to determine a valid microorganism code (<code>mo</code>). Determination is done using intelligent rules and the complete taxonomic kingdoms Bacteria, Chromista, Protozoa, Archaea and most microbial species from the kingdom Fungi (see <em>Source</em>). The input can be almost anything: a full name (like <code>"Staphylococcus aureus"</code>), an abbreviated name (such as <code>"S. aureus"</code>), an abbreviation known in the field (such as <code>"MRSA"</code>), or just a genus. See <em>Examples</em>.</p>
</div>
<div id="ref-usage">
<div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">as.mo</span><span class="op">(</span>
<span class="va">x</span>,
Becker <span class="op">=</span> <span class="cn">FALSE</span>,
Lancefield <span class="op">=</span> <span class="cn">FALSE</span>,
allow_uncertain <span class="op">=</span> <span class="cn">TRUE</span>,
reference_df <span class="op">=</span> <span class="fu"><a href="mo_source.html">get_mo_source</a></span><span class="op">(</span><span class="op">)</span>,
ignore_pattern <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">getOption</a></span><span class="op">(</span><span class="st">"AMR_ignore_pattern"</span><span class="op">)</span>,
language <span class="op">=</span> <span class="fu"><a href="translate.html">get_AMR_locale</a></span><span class="op">(</span><span class="op">)</span>,
info <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/interactive.html" class="external-link">interactive</a></span><span class="op">(</span><span class="op">)</span>,
<span class="va">...</span>
<span class="op">)</span>
<span class="fu">is.mo</span><span class="op">(</span><span class="va">x</span><span class="op">)</span>
<span class="fu">mo_failures</span><span class="op">(</span><span class="op">)</span>
<span class="fu">mo_uncertainties</span><span class="op">(</span><span class="op">)</span>
<span class="fu">mo_renamed</span><span class="op">(</span><span class="op">)</span></code></pre></div>
</div>
<div id="arguments">
<h2>Arguments</h2>
<dl><dt>x</dt>
<dd><p>a <a href="https://rdrr.io/r/base/character.html" class="external-link">character</a> vector or a <a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a> with one or two columns</p></dd>
<dt>Becker</dt>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether staphylococci should be categorised into coagulase-negative staphylococci ("CoNS") and coagulase-positive staphylococci ("CoPS") instead of their own species, according to Karsten Becker <em>et al.</em> (1,2,3).</p>
<p>This excludes <em>Staphylococcus aureus</em> at default, use <code>Becker = "all"</code> to also categorise <em>S. aureus</em> as "CoPS".</p></dd>
<dt>Lancefield</dt>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate whether a beta-haemolytic <em>Streptococcus</em> should be categorised into Lancefield groups instead of their own species, according to Rebecca C. Lancefield (4). These streptococci will be categorised in their first group, e.g. <em>Streptococcus dysgalactiae</em> will be group C, although officially it was also categorised into groups G and L.</p>
<p>This excludes enterococci at default (who are in group D), use <code>Lancefield = "all"</code> to also categorise all enterococci as group D.</p></dd>
<dt>allow_uncertain</dt>
<dd><p>a number between <code>0</code> (or <code>"none"</code>) and <code>3</code> (or <code>"all"</code>), or <code>TRUE</code> (= <code>2</code>) or <code>FALSE</code> (= <code>0</code>) to indicate whether the input should be checked for less probable results, see <em>Details</em></p></dd>
<dt>reference_df</dt>
<dd><p>a <a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a> to be used for extra reference when translating <code>x</code> to a valid <code>mo</code>. See <code><a href="mo_source.html">set_mo_source()</a></code> and <code><a href="mo_source.html">get_mo_source()</a></code> to automate the usage of your own codes (e.g. used in your analysis or organisation).</p></dd>
<dt>ignore_pattern</dt>
<dd><p>a regular expression (case-insensitive) of which all matches in <code>x</code> must return <code>NA</code>. This can be convenient to exclude known non-relevant input and can also be set with the option <code>AMR_ignore_pattern</code>, e.g. <code>options(AMR_ignore_pattern = "(not reported|contaminated flora)")</code>.</p></dd>
<dt>language</dt>
<dd><p>language to translate text like "no growth", which defaults to the system language (see <code><a href="translate.html">get_AMR_locale()</a></code>)</p></dd>
<dt>info</dt>
<dd><p>a <a href="https://rdrr.io/r/base/logical.html" class="external-link">logical</a> to indicate if a progress bar should be printed if more than 25 items are to be coerced, defaults to <code>TRUE</code> only in interactive mode</p></dd>
<dt>...</dt>
<dd><p>other arguments passed on to functions</p></dd>
</dl></div>
<div id="value">
<h2>Value</h2>
<p>A <a href="https://rdrr.io/r/base/character.html" class="external-link">character</a><a href="https://rdrr.io/r/base/vector.html" class="external-link">vector</a> with additional class <code>mo</code></p>
</div>
<div id="details">
<h2>Details</h2>
<div class="section">
<h3 id="general-info">General Info<a class="anchor" aria-label="anchor" href="#general-info"></a></h3>
<p>A microorganism (MO) code from this package (class: <code>mo</code>) is human readable and typically looks like these examples:</p>
<p></p><div class="sourceCode"><pre><code></code></pre><p></p></div>
<p>Values that cannot be coerced will be considered 'unknown' and will get the MO code <code>UNKNOWN</code>.</p>
<p>Use the <code><a href="mo_property.html">mo_*</a></code> functions to get properties based on the returned code, see <em>Examples</em>.</p>
<p>The algorithm uses data from the Catalogue of Life (see below) and from one other source (see <a href="microorganisms.html">microorganisms</a>).</p>
<p>The <code>as.mo()</code> function uses several coercion rules for fast and logical results. It assesses the input matching criteria in the following order:</p><ol><li><p>Human pathogenic prevalence: the function starts with more prevalent microorganisms, followed by less prevalent ones;</p></li>
<li><p>Taxonomic kingdom: the function starts with determining Bacteria, then Fungi, then Protozoa, then others;</p></li>
<li><p>Breakdown of input values to identify possible matches.</p></li>
</ol><p>This will lead to the effect that e.g. <code>"E. coli"</code> (a microorganism highly prevalent in humans) will return the microbial ID of <em>Escherichia coli</em> and not <em>Entamoeba coli</em> (a microorganism less prevalent in humans), although the latter would alphabetically come first.</p>
</div>
<div class="section">
<h3 id="coping-with-uncertain-results">Coping with Uncertain Results<a class="anchor" aria-label="anchor" href="#coping-with-uncertain-results"></a></h3>
<p>In addition, the <code>as.mo()</code> function can differentiate four levels of uncertainty to guess valid results:</p><ul><li><p>Uncertainty level 0: no additional rules are applied;</p></li>
<li><p>Uncertainty level 1: allow previously accepted (but now invalid) taxonomic names and minor spelling errors;</p></li>
<li><p>Uncertainty level 2: allow all of level 1, strip values between brackets, inverse the words of the input, strip off text elements from the end keeping at least two elements;</p></li>
<li><p>Uncertainty level 3: allow all of level 1 and 2, strip off text elements from the end, allow any part of a taxonomic name.</p></li>
</ul><p>The level of uncertainty can be set using the argument <code>allow_uncertain</code>. The default is <code>allow_uncertain = TRUE</code>, which is equal to uncertainty level 2. Using <code>allow_uncertain = FALSE</code> is equal to uncertainty level 0 and will skip all rules. You can also use e.g. <code>as.mo(..., allow_uncertain = 1)</code> to only allow up to level 1 uncertainty.</p>
<p>With the default setting (<code>allow_uncertain = TRUE</code>, level 2), below examples will lead to valid results:</p><ul><li><p><code>"Streptococcus group B (known as S. agalactiae)"</code>. The text between brackets will be removed and a warning will be thrown that the result <em>Streptococcus group B</em> (<code>B_STRPT_GRPB</code>) needs review.</p></li>
<li><p><code>"S. aureus - please mind: MRSA"</code>. The last word will be stripped, after which the function will try to find a match. If it does not, the second last word will be stripped, etc. Again, a warning will be thrown that the result <em>Staphylococcus aureus</em> (<code>B_STPHY_AURS</code>) needs review.</p></li>
<li><p><code>"Fluoroquinolone-resistant Neisseria gonorrhoeae"</code>. The first word will be stripped, after which the function will try to find a match. A warning will be thrown that the result <em>Neisseria gonorrhoeae</em> (<code>B_NESSR_GNRR</code>) needs review.</p></li>
</ul><p>There are three helper functions that can be run after using the <code>as.mo()</code> function:</p><ul><li><p>Use <code>mo_uncertainties()</code> to get a <a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a> that prints in a pretty format with all taxonomic names that were guessed. The output contains the matching score for all matches (see <em>Matching Score for Microorganisms</em> below).</p></li>
<li><p>Use <code>mo_failures()</code> to get a <a href="https://rdrr.io/r/base/character.html" class="external-link">character</a> <a href="https://rdrr.io/r/base/vector.html" class="external-link">vector</a> with all values that could not be coerced to a valid value.</p></li>
<li><p>Use <code>mo_renamed()</code> to get a <a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a> with all values that could be coerced based on old, previously accepted taxonomic names.</p></li>
</ul></div>
<div class="section">
<h3 id="microbial-prevalence-of-pathogens-in-humans">Microbial Prevalence of Pathogens in Humans<a class="anchor" aria-label="anchor" href="#microbial-prevalence-of-pathogens-in-humans"></a></h3>
<p>The intelligent rules consider the prevalence of microorganisms in humans grouped into three groups, which is available as the <code>prevalence</code> columns in the <a href="microorganisms.html">microorganisms</a> and <a href="microorganisms.old.html">microorganisms.old</a> data sets. The grouping into human pathogenic prevalence is explained in the section <em>Matching Score for Microorganisms</em> below.</p>
</div>
</div>
<div id="source">
<h2>Source</h2>
<ol><li><p>Becker K <em>et al.</em> <strong>Coagulase-Negative Staphylococci</strong>. 2014. Clin Microbiol Rev. 27(4): 870-926; <a href="https://doi.org/10.1128/CMR.00109-13" class="external-link">doi:10.1128/CMR.00109-13</a></p></li>
<li><p>Becker K <em>et al.</em> <strong>Implications of identifying the recently defined members of the <em>S. aureus</em> complex, <em>S. argenteus</em> and <em>S. schweitzeri</em>: A position paper of members of the ESCMID Study Group for staphylococci and Staphylococcal Diseases (ESGS).</strong> 2019. Clin Microbiol Infect; <a href="https://doi.org/10.1016/j.cmi.2019.02.028" class="external-link">doi:10.1016/j.cmi.2019.02.028</a></p></li>
<li><p>Becker K <em>et al.</em> <strong>Emergence of coagulase-negative staphylococci</strong> 2020. Expert Rev Anti Infect Ther. 18(4):349-366; <a href="https://doi.org/10.1080/14787210.2020.1730813" class="external-link">doi:10.1080/14787210.2020.1730813</a></p></li>
<li><p>Lancefield RC <strong>A serological differentiation of human and other groups of hemolytic streptococci</strong>. 1933. J Exp Med. 57(4): 571-95; <a href="https://doi.org/10.1084/jem.57.4.571" class="external-link">doi:10.1084/jem.57.4.571</a></p></li>
<li><p>Catalogue of Life: 2019 Annual Checklist, <a href="http://www.catalogueoflife.org" class="external-link">http://www.catalogueoflife.org</a></p></li>
<li><p>List of Prokaryotic names with Standing in Nomenclature (5 October 2021), <a href="https://doi.org/10.1099/ijsem.0.004332" class="external-link">doi:10.1099/ijsem.0.004332</a></p></li>
<li><p>US Edition of SNOMED CT from 1 September 2020, retrieved from the Public Health Information Network Vocabulary Access and Distribution System (PHIN VADS), OID 2.16.840.1.114222.4.11.1009, version 12; url: <a href="https://phinvads.cdc.gov/vads/ViewValueSet.action?oid=2.16.840.1.114222.4.11.1009" class="external-link">https://phinvads.cdc.gov/vads/ViewValueSet.action?oid=2.16.840.1.114222.4.11.1009</a></p></li>
</ol></div>
<div id="stable-lifecycle">
<h2>Stable Lifecycle</h2>
<p><img src="figures/lifecycle_stable.svg" style='margin-bottom:"5"'><br>
The <a href="lifecycle.html">lifecycle</a> of this function is <strong>stable</strong>. 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.</p>
<p>If the unlying code needs breaking changes, they will occur gradually. For example, an argument will be deprecated and first continue to work, but will emit a 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.</p>
</div>
<div id="matching-score-for-microorganisms">
<h2>Matching Score for Microorganisms</h2>
<p>With ambiguous user input in <code>as.mo()</code> and all the <code><a href="mo_property.html">mo_*</a></code> functions, the returned results are chosen based on their matching score using <code><a href="mo_matching_score.html">mo_matching_score()</a></code>. This matching score \(m\), is calculated as:</p>
<p><img src="figures/mo_matching_score.png" width="300" alt="mo matching score"></p>
<p>where:</p><ul><li><p><i>x</i> is the user input;</p></li>
<li><p><i>n</i> is a taxonomic name (genus, species, and subspecies);</p></li>
<li><p><i>l<sub>n</sub></i> is the length of <i>n</i>;</p></li>
<li><p><i>lev</i> is the <a href="https://en.wikipedia.org/wiki/Levenshtein_distance" class="external-link">Levenshtein distance function</a>, which counts any insertion, deletion and substitution as 1 that is needed to change <i>x</i> into <i>n</i>;</p></li>
<li><p><i>p<sub>n</sub></i> is the human pathogenic prevalence group of <i>n</i>, as described below;</p></li>
<li><p><i>k<sub>n</sub></i> is the taxonomic kingdom of <i>n</i>, set as Bacteria = 1, Fungi = 2, Protozoa = 3, Archaea = 4, others = 5.</p></li>
</ul><p>The grouping into human pathogenic prevalence (\(p\)) is based on experience from several microbiological laboratories in the Netherlands in conjunction with international reports on pathogen prevalence. <strong>Group 1</strong> (most prevalent microorganisms) consists of all microorganisms where the taxonomic class is Gammaproteobacteria or where the taxonomic genus is <em>Enterococcus</em>, <em>Staphylococcus</em> or <em>Streptococcus</em>. This group consequently contains all common Gram-negative bacteria, such as <em>Pseudomonas</em> and <em>Legionella</em> and all species within the order Enterobacterales. <strong>Group 2</strong> consists of all microorganisms where the taxonomic phylum is Proteobacteria, Firmicutes, Actinobacteria or Sarcomastigophora, or where the taxonomic genus is <em>Absidia</em>, <em>Acremonium</em>, <em>Actinotignum</em>, <em>Alternaria</em>, <em>Anaerosalibacter</em>, <em>Apophysomyces</em>, <em>Arachnia</em>, <em>Aspergillus</em>, <em>Aureobacterium</em>, <em>Aureobasidium</em>, <em>Bacteroides</em>, <em>Basidiobolus</em>, <em>Beauveria</em>, <em>Blastocystis</em>, <em>Branhamella</em>, <em>Calymmatobacterium</em>, <em>Candida</em>, <em>Capnocytophaga</em>, <em>Catabacter</em>, <em>Chaetomium</em>, <em>Chryseobacterium</em>, <em>Chryseomonas</em>, <em>Chrysonilia</em>, <em>Cladophialophora</em>, <em>Cladosporium</em>, <em>Conidiobolus</em>, <em>Cryptococcus</em>, <em>Curvularia</em>, <em>Exophiala</em>, <em>Exserohilum</em>, <em>Flavobacterium</em>, <em>Fonsecaea</em>, <em>Fusarium</em>, <em>Fusobacterium</em>, <em>Hendersonula</em>, <em>Hypomyces</em>, <em>Koserella</em>, <em>Lelliottia</em>, <em>Leptosphaeria</em>, <em>Leptotrichia</em>, <em>Malassezia</em>, <em>Malbranchea</em>, <em>Mortierella</em>, <em>Mucor</em>, <em>Mycocentrospora</em>, <em>Mycoplasma</em>, <em>Nectria</em>, <em>Ochroconis</em>, <em>Oidiodendron</em>, <em>Phoma</em>, <em>Piedraia</em>, <em>Pithomyces</em>, <em>Pityrosporum</em>, <em>Prevotella</em>, <em>Pseudallescheria</em>, <em>Rhizomucor</em>, <em>Rhizopus</em>, <em>Rhodotorula</em>, <em>Scolecobasidium</em>, <em>Scopulariopsis</em>, <em>Scytalidium</em>, <em>Sporobolomyces</em>, <em>Stachybotrys</em>, <em>Stomatococcus</em>, <em>Treponema</em>, <em>Trichoderma</em>, <em>Trichophyton</em>, <em>Trichosporon</em>, <em>Tritirachium</em> or <em>Ureaplasma</em>. <strong>Group 3</strong> consists of all other microorganisms.</p>
<p>All characters in \(x\) and \(n\) are ignored that are other than A-Z, a-z, 0-9, spaces and parentheses.</p>
<p>All matches are sorted descending on their matching score and for all user input values, the top match will be returned. This will lead to the effect that e.g., <code>"E. coli"</code> will return the microbial ID of <em>Escherichia coli</em> (\(m = 0.688\), a highly prevalent microorganism found in humans) and not <em>Entamoeba coli</em> (\(m = 0.079\), a less prevalent microorganism in humans), although the latter would alphabetically come first.</p>
<p>Since <code>AMR</code> version 1.8.1, common microorganism abbreviations are ignored in determining the matching score. These abbreviations are currently: AIEC, ATEC, BORSA, CRSM, DAEC, EAEC, EHEC, EIEC, EPEC, ETEC, GISA, MRPA, MRSA, MRSE, MSSA, MSSE, NMEC, PISP, PRSP, STEC, UPEC, VISA, VISP, VRE, VRSA and VRSP.</p>
</div>
<div id="catalogue-of-life">
<h2>Catalogue of Life</h2>
<p><img src="figures/logo_col.png" height="40" style='margin-bottom:"5"'><br>
This package contains the complete taxonomic tree of almost all microorganisms (~71,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, <a href="http://www.catalogueoflife.org" class="external-link">http://www.catalogueoflife.org</a>). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, <a href="https://lpsn.dsmz.de" class="external-link">lpsn.dsmz.de</a>). This supplementation is needed until the <a href="https://github.com/CatalogueOfLife/general" class="external-link">CoL+ project</a> is finished, which we await.</p>
<p><a href="catalogue_of_life.html">Click here</a> for more information about the included taxa. Check which versions of the CoL and LPSN were included in this package with <code><a href="catalogue_of_life_version.html">catalogue_of_life_version()</a></code>.</p>
</div>
<div id="reference-data-publicly-available">
<h2>Reference Data Publicly Available</h2>
<p>All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this <code>AMR</code> 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 <a href="https://msberends.github.io/AMR/articles/datasets.html">all download links on our website</a>, which is automatically updated with every code change.</p>
</div>
<div id="read-more-on-our-website-">
<h2>Read more on Our Website!</h2>
<p>On our website <a href="https://msberends.github.io/AMR/">https://msberends.github.io/AMR/</a> you can find <a href="https://msberends.github.io/AMR/articles/AMR.html">a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href="https://msberends.github.io/AMR/reference/">complete documentation of all functions</a> and <a href="https://msberends.github.io/AMR/articles/WHONET.html">an example analysis using WHONET data</a>.</p>
</div>
<div id="see-also">
<h2>See also</h2>
<div class="dont-index"><p><a href="microorganisms.html">microorganisms</a> for the <a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a> that is being used to determine ID's.</p>
<p>The <code><a href="mo_property.html">mo_*</a></code> functions (such as <code><a href="mo_property.html">mo_genus()</a></code>, <code><a href="mo_property.html">mo_gramstain()</a></code>) to get properties based on the returned code.</p></div>
</div>
<div id="ref-examples">
<h2>Examples</h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="co"># \donttest{</span>
<span class="co"># These examples all return "B_STPHY_AURS", the ID of S. aureus:</span>
<span class="fu">as.mo</span><span class="op">(</span><span class="st">"sau"</span><span class="op">)</span> <span class="co"># WHONET code</span>
<span class="fu">as.mo</span><span class="op">(</span><span class="st">"stau"</span><span class="op">)</span>
<span class="fu">as.mo</span><span class="op">(</span><span class="st">"STAU"</span><span class="op">)</span>
<span class="fu">as.mo</span><span class="op">(</span><span class="st">"staaur"</span><span class="op">)</span>
<span class="fu">as.mo</span><span class="op">(</span><span class="st">"S. aureus"</span><span class="op">)</span>
<span class="fu">as.mo</span><span class="op">(</span><span class="st">"S aureus"</span><span class="op">)</span>
<span class="fu">as.mo</span><span class="op">(</span><span class="st">"Staphylococcus aureus"</span><span class="op">)</span>
<span class="fu">as.mo</span><span class="op">(</span><span class="st">"Staphylococcus aureus (MRSA)"</span><span class="op">)</span>
<span class="fu">as.mo</span><span class="op">(</span><span class="st">"Zthafilokkoockus oureuz"</span><span class="op">)</span> <span class="co"># handles incorrect spelling</span>
<span class="fu">as.mo</span><span class="op">(</span><span class="st">"MRSA"</span><span class="op">)</span> <span class="co"># Methicillin Resistant S. aureus</span>
<span class="fu">as.mo</span><span class="op">(</span><span class="st">"VISA"</span><span class="op">)</span> <span class="co"># Vancomycin Intermediate S. aureus</span>
<span class="fu">as.mo</span><span class="op">(</span><span class="st">"VRSA"</span><span class="op">)</span> <span class="co"># Vancomycin Resistant S. aureus</span>
<span class="fu">as.mo</span><span class="op">(</span><span class="fl">115329001</span><span class="op">)</span> <span class="co"># SNOMED CT code</span>
<span class="co"># Dyslexia is no problem - these all work:</span>
<span class="fu">as.mo</span><span class="op">(</span><span class="st">"Ureaplasma urealyticum"</span><span class="op">)</span>
<span class="fu">as.mo</span><span class="op">(</span><span class="st">"Ureaplasma urealyticus"</span><span class="op">)</span>
<span class="fu">as.mo</span><span class="op">(</span><span class="st">"Ureaplasmium urealytica"</span><span class="op">)</span>
<span class="fu">as.mo</span><span class="op">(</span><span class="st">"Ureaplazma urealitycium"</span><span class="op">)</span>
<span class="fu">as.mo</span><span class="op">(</span><span class="st">"Streptococcus group A"</span><span class="op">)</span>
<span class="fu">as.mo</span><span class="op">(</span><span class="st">"GAS"</span><span class="op">)</span> <span class="co"># Group A Streptococci</span>
<span class="fu">as.mo</span><span class="op">(</span><span class="st">"GBS"</span><span class="op">)</span> <span class="co"># Group B Streptococci</span>
<span class="fu">as.mo</span><span class="op">(</span><span class="st">"S. epidermidis"</span><span class="op">)</span> <span class="co"># will remain species: B_STPHY_EPDR</span>
<span class="fu">as.mo</span><span class="op">(</span><span class="st">"S. epidermidis"</span>, Becker <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span> <span class="co"># will not remain species: B_STPHY_CONS</span>
<span class="fu">as.mo</span><span class="op">(</span><span class="st">"S. pyogenes"</span><span class="op">)</span> <span class="co"># will remain species: B_STRPT_PYGN</span>
<span class="fu">as.mo</span><span class="op">(</span><span class="st">"S. pyogenes"</span>, Lancefield <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span> <span class="co"># will not remain species: B_STRPT_GRPA</span>
<span class="co"># All mo_* functions use as.mo() internally too (see ?mo_property):</span>
<span class="fu"><a href="mo_property.html">mo_genus</a></span><span class="op">(</span><span class="st">"E. coli"</span><span class="op">)</span> <span class="co"># returns "Escherichia"</span>
<span class="fu"><a href="mo_property.html">mo_gramstain</a></span><span class="op">(</span><span class="st">"E. coli"</span><span class="op">)</span> <span class="co"># returns "Gram negative"</span>
<span class="fu"><a href="mo_property.html">mo_is_intrinsic_resistant</a></span><span class="op">(</span><span class="st">"E. coli"</span>, <span class="st">"vanco"</span><span class="op">)</span> <span class="co"># returns TRUE</span>
<span class="co"># }</span>
</code></pre></div>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
</nav></div>
</div>
<footer><div class="copyright">
<p></p><p>Developed by Matthijs S. Berends, Christian F. Luz, Dennis Souverein, Erwin E. A. Hassing.</p>
</div>
<div class="pkgdown">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.3.</p>
</div>
</footer></div>
</body></html>