AMR/docs/reference/as.mo.html

508 lines
30 KiB
HTML
Raw Normal View History

2018-12-23 21:26:21 +01:00
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2018-12-29 22:24:19 +01:00
<title>Transform to microorganism ID — 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" />
2019-10-13 09:31:58 +02:00
2018-12-23 21:26:21 +01:00
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
2018-12-29 22:24:19 +01:00
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous" />
2018-12-23 21:26:21 +01:00
2019-10-13 09:31:58 +02:00
2018-12-23 21:26:21 +01:00
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
2019-10-13 09:31:58 +02:00
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
2018-12-23 21:26:21 +01:00
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
2019-10-13 09:31:58 +02:00
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
2018-12-23 21:26:21 +01:00
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
2018-12-29 22:24:19 +01:00
<!-- docsearch -->
<script src="../docsearch.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.6.1/docsearch.min.css" integrity="sha256-QOSRU/ra9ActyXkIBbiIB144aDBdtvXBcNc3OTNuX/Q=" crossorigin="anonymous" />
<link href="../docsearch.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" integrity="sha256-4HLtjeVgH0eIB3aZ9mLYF6E8oU5chNdjU6p6rrXpl9U=" crossorigin="anonymous"></script>
2018-12-23 21:26:21 +01:00
2018-12-29 22:24:19 +01:00
<link href="../extra.css" rel="stylesheet">
<script src="../extra.js"></script>
2018-12-23 21:26:21 +01:00
2019-10-13 09:31:58 +02:00
<meta property="og:title" content="Transform to microorganism ID — as.mo" />
2019-03-18 14:29:41 +01:00
<meta property="og:description" content="Use this function to determine a valid microorganism ID (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 &quot;Staphylococcus aureus&quot;), an abbreviated name (like &quot;S. aureus&quot;), an abbreviation known in the field (like &quot;MRSA&quot;), or just a genus. Please see Examples." />
2019-01-02 23:24:07 +01:00
<meta property="og:image" content="https://msberends.gitlab.io/AMR/logo.png" />
2018-12-23 21:26:21 +01:00
<meta name="twitter:card" content="summary" />
2019-10-13 09:31:58 +02:00
2018-12-23 21:26:21 +01:00
<!-- 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]-->
2019-10-13 09:31:58 +02:00
2018-12-23 21:26:21 +01:00
</head>
<body>
<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">
2018-12-29 22:24:19 +01:00
<a class="navbar-link" href="../index.html">AMR (for R)</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">0.9.0.9009</span>
2018-12-23 21:26:21 +01:00
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
2018-12-29 22:24:19 +01:00
<span class="fa fa-home"></span>
2018-12-23 21:26:21 +01:00
2018-12-29 22:24:19 +01:00
Home
2018-12-23 21:26:21 +01:00
</a>
</li>
2019-01-02 23:24:07 +01:00
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="fa fa-question-circle"></span>
How to
2018-12-29 22:24:19 +01:00
2019-01-02 23:24:07 +01:00
<span class="caret"></span>
2018-12-29 22:24:19 +01:00
</a>
2019-01-02 23:24:07 +01:00
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/AMR.html">
<span class="fa fa-directions"></span>
Conduct AMR analysis
</a>
</li>
<li>
2019-02-14 10:23:51 +01:00
<a href="../articles/resistance_predict.html">
2019-01-02 23:24:07 +01:00
<span class="fa fa-dice"></span>
Predict antimicrobial resistance
</a>
</li>
2019-05-28 16:50:40 +02:00
<li>
<a href="../articles/MDR.html">
<span class="fa fa-skull-crossbones"></span>
Determine multi-drug resistance (MDR)
</a>
</li>
2019-01-29 00:06:50 +01:00
<li>
<a href="../articles/WHONET.html">
<span class="fa fa-globe-americas"></span>
Work with WHONET data
</a>
</li>
2019-02-14 15:18:17 +01:00
<li>
<a href="../articles/SPSS.html">
<span class="fa fa-file-upload"></span>
Import data from SPSS/SAS/Stata
</a>
</li>
2019-01-02 23:24:07 +01:00
<li>
<a href="../articles/EUCAST.html">
<span class="fa fa-exchange-alt"></span>
Apply EUCAST rules
</a>
</li>
<li>
2019-02-14 10:23:51 +01:00
<a href="../reference/mo_property.html">
2019-01-02 23:24:07 +01:00
<span class="fa fa-bug"></span>
Get properties of a microorganism
</a>
</li>
<li>
2019-05-10 16:44:59 +02:00
<a href="../reference/ab_property.html">
2019-01-02 23:24:07 +01:00
<span class="fa fa-capsules"></span>
Get properties of an antibiotic
</a>
</li>
2019-01-11 20:37:23 +01:00
<li>
<a href="../articles/benchmarks.html">
<span class="fa fa-shipping-fast"></span>
Other: benchmarks
</a>
</li>
2019-01-02 23:24:07 +01:00
</ul>
2018-12-23 21:26:21 +01:00
</li>
<li>
2018-12-29 22:24:19 +01:00
<a href="../reference/">
<span class="fa fa-book-open"></span>
Manual
</a>
2018-12-23 21:26:21 +01:00
</li>
2018-12-29 22:24:19 +01:00
<li>
<a href="../authors.html">
<span class="fa fa-users"></span>
Authors
</a>
</li>
<li>
<a href="../news/">
<span class="far fa far fa-newspaper"></span>
2018-12-23 21:26:21 +01:00
2018-12-29 22:24:19 +01:00
Changelog
2018-12-23 21:26:21 +01:00
</a>
</li>
2019-01-02 23:24:07 +01:00
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
2018-12-29 22:24:19 +01:00
<a href="https://gitlab.com/msberends/AMR">
<span class="fab fa fab fa-gitlab"></span>
Source Code
</a>
2018-12-23 21:26:21 +01:00
</li>
2019-01-02 23:24:07 +01:00
<li>
2018-12-29 22:24:19 +01:00
<a href="../LICENSE-text.html">
<span class="fa fa-book"></span>
Licence
</a>
</li>
2018-12-23 21:26:21 +01:00
</ul>
2019-10-13 09:31:58 +02:00
<form class="navbar-form navbar-right hidden-xs hidden-sm" role="search">
2018-12-29 22:24:19 +01:00
<div class="form-group">
<input type="search" class="form-control" name="search-input" id="search-input" placeholder="Search..." aria-label="Search for..." autocomplete="off">
</div>
</form>
2018-12-23 21:26:21 +01:00
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
2019-10-13 09:31:58 +02:00
2018-12-23 21:26:21 +01:00
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Transform to microorganism ID</h1>
<div class="hidden name"><code>as.mo.Rd</code></div>
</div>
<div class="ref-description">
<p>Use this function to determine a valid microorganism ID (<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 Source). The input can be almost anything: a full name (like <code>"Staphylococcus aureus"</code>), an abbreviated name (like <code>"S. aureus"</code>), an abbreviation known in the field (like <code>"MRSA"</code>), or just a genus. Please see <em>Examples</em>.</p>
2018-12-23 21:26:21 +01:00
</div>
<pre class="usage"><span class='fu'>as.mo</span>(
<span class='no'>x</span>,
<span class='kw'>Becker</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>Lancefield</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>allow_uncertain</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>reference_df</span> <span class='kw'>=</span> <span class='fu'><a href='mo_source.html'>get_mo_source</a></span>(),
<span class='no'>...</span>
)
2018-12-23 21:26:21 +01:00
2019-02-08 16:06:54 +01:00
<span class='fu'>is.mo</span>(<span class='no'>x</span>)
<span class='fu'>mo_failures</span>()
<span class='fu'>mo_uncertainties</span>()
<span class='fu'>mo_renamed</span>()
<span class='fu'>clear_mo_history</span>(<span class='no'>...</span>)</pre>
2019-10-13 09:31:58 +02:00
2018-12-23 21:26:21 +01:00
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>x</th>
<td><p>a character vector or a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with one or two columns</p></td>
2018-12-23 21:26:21 +01:00
</tr>
<tr>
<th>Becker</th>
<td><p>a logical to indicate whether <em>Staphylococci</em> should be categorised into coagulase-negative <em>Staphylococci</em> ("CoNS") and coagulase-positive <em>Staphylococci</em> ("CoPS") instead of their own species, according to Karsten Becker <em>et al.</em> (1,2). Note that this does not include species that were newly named after these publications, like <em>S. caeli</em>.</p>
2018-12-23 21:26:21 +01:00
<p>This excludes <em>Staphylococcus aureus</em> at default, use <code>Becker = "all"</code> to also categorise <em>S. aureus</em> as "CoPS".</p></td>
</tr>
<tr>
<th>Lancefield</th>
<td><p>a logical to indicate whether beta-haemolytic <em>Streptococci</em> should be categorised into Lancefield groups instead of their own species, according to Rebecca C. Lancefield (3). These <em>Streptococci</em> 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>
2018-12-23 21:26:21 +01:00
<p>This excludes <em>Enterococci</em> at default (who are in group D), use <code>Lancefield = "all"</code> to also categorise all <em>Enterococci</em> as group D.</p></td>
</tr>
<tr>
<th>allow_uncertain</th>
<td><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, please see <em>Details</em></p></td>
2018-12-23 21:26:21 +01:00
</tr>
<tr>
<th>reference_df</th>
<td><p>a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> to use 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></td>
2018-12-23 21:26:21 +01:00
</tr>
2019-03-15 13:57:25 +01:00
<tr>
<th>...</th>
<td><p>other parameters passed on to functions</p></td>
</tr>
2018-12-23 21:26:21 +01:00
</table>
2019-10-13 09:31:58 +02:00
2018-12-23 21:26:21 +01:00
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>A <code><a href='https://rdrr.io/r/base/character.html'>character</a></code> vector with class <code>mo</code></p>
2018-12-23 21:26:21 +01:00
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
<h3>General info</h3>
<p>A microorganism ID from this package (class: <code>mo</code>) typically looks like these examples:</p><pre> Code Full name
2019-09-18 15:46:09 +02:00
--------------- --------------------------------------
B_KLBSL Klebsiella
B_KLBSL_PNMN Klebsiella pneumoniae
B_KLBSL_PNMN_RHNS Klebsiella pneumoniae rhinoscleromatis
| | | |
| | | |
| | | ---&gt; subspecies, a 4-5 letter acronym
| | ----&gt; species, a 4-5 letter acronym
| ----&gt; genus, a 5-7 letter acronym
2019-03-26 14:24:03 +01:00
----&gt; taxonomic kingdom: A (Archaea), AN (Animalia), B (Bacteria),
2019-08-13 16:15:08 +02:00
C (Chromista), F (Fungi), P (Protozoa)
2018-12-23 21:26:21 +01:00
</pre>
2019-10-13 09:31:58 +02:00
<p>Values that cannot be coered will be considered 'unknown' and will get the MO code <code>UNKNOWN</code>.</p>
<p>Use the <code><a href='mo_property.html'>mo_property_*</a></code> functions to get properties based on the returned code, see Examples.</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>
2019-09-23 13:53:50 +02:00
<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>
2019-10-13 09:31:58 +02:00
2019-11-15 15:25:03 +01:00
<p>This will lead to the effect that e.g. <code>"E. coli"</code> (a highly prevalent microorganism found in humans) will return the microbial ID of <em>Escherichia coli</em> and not <em>Entamoeba coli</em> (a less prevalent microorganism in humans), although the latter would alphabetically come first.</p>
<h3>Coping with uncertain results</h3>
<p>In addition, the <code>as.mo()</code> function can differentiate four levels of uncertainty to guess valid results:</p><ul>
2019-09-23 13:53:50 +02:00
<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>
2019-02-08 16:06:54 +01:00
</ul>
2019-10-13 09:31:58 +02:00
<p>This leads to e.g.:</p><ul>
2019-09-18 15:46:09 +02:00
<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>
2019-09-23 13:53:50 +02:00
<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>
2018-12-23 21:26:21 +01:00
</ul>
2019-10-13 09:31:58 +02:00
<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>
2019-11-15 15:25:03 +01:00
<p>There are three helper functions that can be run after then <code>as.mo()</code> function:</p><ul>
<li><p>Use <code>mo_uncertainties()</code> to get a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with all values that were coerced to a valid value, but with uncertainty. The output contains a score, that is calculated as \((n - 0.5 * L) / n\), where <em>n</em> is the number of characters of the returned full name of the microorganism, and <em>L</em> is the <a href='https://en.wikipedia.org/wiki/Levenshtein_distance'>Levenshtein distance</a> between that full name and the user input.</p></li>
<li><p>Use <code>mo_failures()</code> to get a <code><a href='https://rdrr.io/r/base/vector.html'>vector</a></code> with all values that could not be coerced to a valid value.</p></li>
<li><p>Use <code>mo_renamed()</code> to get a <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> with all values that could be coerced based on an old, previously accepted taxonomic name.</p></li>
</ul>
2019-11-15 15:25:03 +01:00
<h3>Microbial prevalence of pathogens in humans</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 prevalence groups is based on experience from several microbiological laboratories in the Netherlands in conjunction with international reports on pathogen prevalence.</p>
2019-09-23 13:53:50 +02:00
<p>Group 1 (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 Enterobacteriales.</p>
<p>Group 2 consists of all microorganisms where the taxonomic phylum is Proteobacteria, Firmicutes, Actinobacteria or Sarcomastigophora, or where the taxonomic genus is <em>Aspergillus</em>, <em>Bacteroides</em>, <em>Candida</em>, <em>Capnocytophaga</em>, <em>Chryseobacterium</em>, <em>Cryptococcus</em>, <em>Elisabethkingia</em>, <em>Flavobacterium</em>, <em>Fusobacterium</em>, <em>Giardia</em>, <em>Leptotrichia</em>, <em>Mycoplasma</em>, <em>Prevotella</em>, <em>Rhodotorula</em>, <em>Treponema</em>, <em>Trichophyton</em> or <em>Ureaplasma</em>.</p>
<p>Group 3 (least prevalent microorganisms) consists of all other microorganisms.</p>
<h3>Self-learning algorithm</h3>
<p>The <code>as.mo()</code> function gains experience from previously determined microorganism IDs and learns from it. This drastically improves both speed and reliability. Use <code>clear_mo_history()</code> to reset the algorithms. Only experience from your current <code>AMR</code> package version is used. This is done because in the future the taxonomic tree (which is included in this package) may change for any organism and it consequently has to rebuild its knowledge.</p>
2019-11-15 15:25:03 +01:00
<p>Usually, any guess after the first try runs 80-95% faster than the first try.</p>
<p>This resets with every update of this <code>AMR</code> package since results are saved to your local package library folder.</p>
2019-01-02 23:24:07 +01:00
<h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
2019-10-13 09:31:58 +02:00
<ol>
<li><p>Becker K <em>et al.</em> <strong>Coagulase-Negative Staphylococci</strong>. 2014. Clin Microbiol Rev. 27(4): 870926. <a href='https://dx.doi.org/10.1128/CMR.00109-13'>https://dx.doi.org/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'>https://doi.org/10.1016/j.cmi.2019.02.028</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): 57195. <a href='https://dx.doi.org/10.1084/jem.57.4.571'>https://dx.doi.org/10.1084/jem.57.4.571</a></p></li>
<li><p>Catalogue of Life: Annual Checklist (public online taxonomic database), <a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a> (check included annual version with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>).</p></li>
</ol>
<h2 class="hasAnchor" id="stable-lifecycle"><a class="anchor" href="#stable-lifecycle"></a>Stable lifecycle</h2>
<p><img src='figures/lifecycle_stable.svg' style=margin-bottom:5px /> <br />
The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</strong>. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments.</p>
<p>If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will 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.</p>
2019-02-20 00:04:48 +01:00
<h2 class="hasAnchor" id="catalogue-of-life"><a class="anchor" href="#catalogue-of-life"></a>Catalogue of Life</h2>
2018-12-23 21:26:21 +01:00
2019-10-13 09:31:58 +02:00
<p><img src='figures/logo_col.png' height=40px style=margin-bottom:5px /> <br />
2019-08-13 16:15:08 +02:00
This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). The Catalogue of Life is the most comprehensive and authoritative global index of species currently available.</p>
<p><a href='catalogue_of_life.html'>Click here</a> for more information about the included taxa. Check which version of the Catalogue of Life was included in this package with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version()</a></code>.</p>
2019-01-02 23:24:07 +01:00
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on our website!</h2>
2018-12-23 21:26:21 +01:00
2019-10-13 09:31:58 +02:00
<p>On our website <a href='https://msberends.gitlab.io/AMR'>https://msberends.gitlab.io/AMR</a> you can find <a href='https://msberends.gitlab.io/AMR/articles/AMR.html'>a tutorial</a> about how to conduct AMR analysis, the <a href='https://msberends.gitlab.io/AMR/reference'>complete documentation of all functions</a> (which reads a lot easier than here in R) and <a href='https://msberends.gitlab.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
2018-12-23 21:26:21 +01:00
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p><a href='microorganisms.html'>microorganisms</a> for the <code><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></code> that is being used to determine ID's.</p>
<p>The <code><a href='mo_property.html'>mo_property()</a></code> functions (like <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>
2018-12-23 21:26:21 +01:00
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
2019-10-13 09:31:58 +02:00
<pre class="examples"><span class='co'># \donttest{</span>
2019-09-18 15:46:09 +02:00
<span class='co'># These examples all return "B_STPHY_AURS", the ID of S. aureus:</span>
2019-03-09 08:21:00 +01:00
<span class='fu'>as.mo</span>(<span class='st'>"sau"</span>) <span class='co'># WHONET code</span>
2019-01-02 23:24:07 +01:00
<span class='fu'>as.mo</span>(<span class='st'>"stau"</span>)
<span class='fu'>as.mo</span>(<span class='st'>"STAU"</span>)
<span class='fu'>as.mo</span>(<span class='st'>"staaur"</span>)
<span class='fu'>as.mo</span>(<span class='st'>"S. aureus"</span>)
<span class='fu'>as.mo</span>(<span class='st'>"S aureus"</span>)
<span class='fu'>as.mo</span>(<span class='st'>"Staphylococcus aureus"</span>)
<span class='fu'>as.mo</span>(<span class='st'>"Staphylococcus aureus (MRSA)"</span>)
2019-11-15 15:25:03 +01:00
<span class='fu'>as.mo</span>(<span class='st'>"Zthafilokkoockus oureuz"</span>) <span class='co'># handles incorrect spelling</span>
2019-06-22 14:49:12 +02:00
<span class='fu'>as.mo</span>(<span class='st'>"MRSA"</span>) <span class='co'># Methicillin Resistant S. aureus</span>
<span class='fu'>as.mo</span>(<span class='st'>"VISA"</span>) <span class='co'># Vancomycin Intermediate S. aureus</span>
<span class='fu'>as.mo</span>(<span class='st'>"VRSA"</span>) <span class='co'># Vancomycin Resistant S. aureus</span>
<span class='fu'>as.mo</span>(<span class='fl'>22242419</span>) <span class='co'># Catalogue of Life ID</span>
2019-01-02 23:24:07 +01:00
2019-03-18 14:29:41 +01:00
<span class='co'># Dyslexia is no problem - these all work:</span>
<span class='fu'>as.mo</span>(<span class='st'>"Ureaplasma urealyticum"</span>)
<span class='fu'>as.mo</span>(<span class='st'>"Ureaplasma urealyticus"</span>)
<span class='fu'>as.mo</span>(<span class='st'>"Ureaplasmium urealytica"</span>)
<span class='fu'>as.mo</span>(<span class='st'>"Ureaplazma urealitycium"</span>)
2019-01-02 23:24:07 +01:00
<span class='fu'>as.mo</span>(<span class='st'>"Streptococcus group A"</span>)
<span class='fu'>as.mo</span>(<span class='st'>"GAS"</span>) <span class='co'># Group A Streptococci</span>
<span class='fu'>as.mo</span>(<span class='st'>"GBS"</span>) <span class='co'># Group B Streptococci</span>
2019-09-18 15:46:09 +02:00
<span class='fu'>as.mo</span>(<span class='st'>"S. epidermidis"</span>) <span class='co'># will remain species: B_STPHY_EPDR</span>
<span class='fu'>as.mo</span>(<span class='st'>"S. epidermidis"</span>, <span class='kw'>Becker</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># will not remain species: B_STPHY_CONS</span>
2019-01-02 23:24:07 +01:00
2019-09-18 15:46:09 +02:00
<span class='fu'>as.mo</span>(<span class='st'>"S. pyogenes"</span>) <span class='co'># will remain species: B_STRPT_PYGN</span>
<span class='fu'>as.mo</span>(<span class='st'>"S. pyogenes"</span>, <span class='kw'>Lancefield</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># will not remain species: B_STRPT_GRPA</span>
2019-01-02 23:24:07 +01:00
2019-03-18 14:29:41 +01:00
<span class='co'># All mo_* functions use as.mo() internally too (see ?mo_property):</span>
2019-01-02 23:24:07 +01:00
<span class='fu'><a href='mo_property.html'>mo_genus</a></span>(<span class='st'>"E. coli"</span>) <span class='co'># returns "Escherichia"</span>
2019-08-13 16:15:08 +02:00
<span class='fu'><a href='mo_property.html'>mo_gramstain</a></span>(<span class='st'>"E. coli"</span>) <span class='co'># returns "Gram negative"</span>
2019-10-13 09:31:58 +02:00
<span class='co'># }</span>
<span class='kw'>if</span> (<span class='fl'>FALSE</span>) {
2018-12-23 21:26:21 +01:00
<span class='no'>df</span>$<span class='no'>mo</span> <span class='kw'>&lt;-</span> <span class='fu'>as.mo</span>(<span class='no'>df</span>$<span class='no'>microorganism_name</span>)
<span class='co'># the select function of tidyverse is also supported:</span>
2019-10-13 09:31:58 +02:00
<span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>dplyr</span>)
2018-12-23 21:26:21 +01:00
<span class='no'>df</span>$<span class='no'>mo</span> <span class='kw'>&lt;-</span> <span class='no'>df</span> <span class='kw'>%&gt;%</span>
2019-01-29 20:20:09 +01:00
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>microorganism_name</span>) <span class='kw'>%&gt;%</span>
2018-12-23 21:26:21 +01:00
<span class='fu'>as.mo</span>()
<span class='co'># and can even contain 2 columns, which is convenient for genus/species combinations:</span>
<span class='no'>df</span>$<span class='no'>mo</span> <span class='kw'>&lt;-</span> <span class='no'>df</span> <span class='kw'>%&gt;%</span>
2019-01-29 20:20:09 +01:00
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/select.html'>select</a></span>(<span class='no'>genus</span>, <span class='no'>species</span>) <span class='kw'>%&gt;%</span>
2018-12-23 21:26:21 +01:00
<span class='fu'>as.mo</span>()
<span class='co'># although this works easier and does the same:</span>
<span class='no'>df</span> <span class='kw'>&lt;-</span> <span class='no'>df</span> <span class='kw'>%&gt;%</span>
2019-10-13 09:31:58 +02:00
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span>(<span class='kw'>mo</span> <span class='kw'>=</span> <span class='fu'>as.mo</span>(<span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='no'>genus</span>, <span class='no'>species</span>)))
}</pre>
2018-12-23 21:26:21 +01:00
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
<li><a href="#details">Details</a></li>
2019-01-02 23:24:07 +01:00
<li><a href="#source">Source</a></li>
<li><a href="#stable-lifecycle">Stable lifecycle</a></li>
2019-02-20 00:04:48 +01:00
<li><a href="#catalogue-of-life">Catalogue of Life</a></li>
2019-01-02 23:24:07 +01:00
<li><a href="#read-more-on-our-website-">Read more on our website!</a></li>
2018-12-23 21:26:21 +01:00
<li><a href="#see-also">See also</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
2019-10-13 09:31:58 +02:00
2018-12-23 21:26:21 +01:00
<footer>
<div class="copyright">
<p>Developed by <a href='https://www.rug.nl/staff/m.s.berends/'>Matthijs S Berends</a>, <a href='https://www.rug.nl/staff/c.f.luz/'>Christian F Luz</a>, <a href='https://www.rug.nl/staff/a.w.friedrich/'>Alexander W Friedrich</a>, <a href='https://www.rug.nl/staff/b.sinha/'>Bhanu N M Sinha</a>, <a href='https://www.rug.nl/staff/c.j.albers/'>Casper J Albers</a>, <a href='https://www.rug.nl/staff/c.glasner/'>Corinna Glasner</a>.</p>
2018-12-23 21:26:21 +01:00
</div>
<div class="pkgdown">
2019-10-13 09:31:58 +02:00
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
2018-12-23 21:26:21 +01:00
</div>
2019-10-13 09:31:58 +02:00
2018-12-23 21:26:21 +01:00
</footer>
</div>
2018-12-29 22:24:19 +01:00
<script src="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.6.1/docsearch.min.js" integrity="sha256-GKvGqXDznoRYHCwKXGnuchvKSwmx9SRMrZOTh2g4Sb0=" crossorigin="anonymous"></script>
<script>
docsearch({
apiKey: 'f737050abfd4d726c63938e18f8c496e',
indexName: 'amr',
inputSelector: 'input#search-input.form-control',
transformData: function(hits) {
return hits.map(function (hit) {
hit.url = updateHitURL(hit);
return hit;
});
}
});
</script>
2018-12-23 21:26:21 +01:00
2019-10-13 09:31:58 +02:00
2018-12-23 21:26:21 +01:00
</body>
</html>
2019-10-13 09:31:58 +02:00