mirror of
https://github.com/msberends/AMR.git
synced 2025-07-17 14:33:20 +02:00
(v1.7.1.9062) website update
This commit is contained in:
@ -44,7 +44,7 @@
|
||||
</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="Latest development version">1.7.1.9040</span>
|
||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.7.1.9062</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -185,13 +185,13 @@
|
||||
|
||||
|
||||
|
||||
</header><script src="MDR_files/header-attrs-2.11/header-attrs.js"></script><div class="row">
|
||||
</header><div class="row">
|
||||
<div class="col-md-9 contents">
|
||||
<div class="page-header toc-ignore">
|
||||
<h1 data-toc-skip>How to determine multi-drug resistance (MDR)</h1>
|
||||
|
||||
|
||||
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/main/vignettes/MDR.Rmd" class="external-link"><code>vignettes/MDR.Rmd</code></a></small>
|
||||
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/HEAD/vignettes/MDR.Rmd" class="external-link"><code>vignettes/MDR.Rmd</code></a></small>
|
||||
<div class="hidden name"><code>MDR.Rmd</code></div>
|
||||
|
||||
</div>
|
||||
@ -199,15 +199,15 @@
|
||||
|
||||
|
||||
<p>With the function <code><a href="../reference/mdro.html">mdro()</a></code>, you can determine which micro-organisms are multi-drug resistant organisms (MDRO).</p>
|
||||
<div id="type-of-input" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#type-of-input" class="anchor" aria-hidden="true"></a>Type of input</h3>
|
||||
<div class="section level3">
|
||||
<h3 id="type-of-input">Type of input<a class="anchor" aria-label="anchor" href="#type-of-input"></a>
|
||||
</h3>
|
||||
<p>The <code><a href="../reference/mdro.html">mdro()</a></code> function takes a data set as input, such as a regular <code>data.frame</code>. It tries to automatically determine the right columns for info about your isolates, such as the name of the species and all columns with results of antimicrobial agents. See the help page for more info about how to set the right settings for your data with the command <code><a href="../reference/mdro.html">?mdro</a></code>.</p>
|
||||
<p>For WHONET data (and most other data), all settings are automatically set correctly.</p>
|
||||
</div>
|
||||
<div id="guidelines" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#guidelines" class="anchor" aria-hidden="true"></a>Guidelines</h3>
|
||||
<div class="section level3">
|
||||
<h3 id="guidelines">Guidelines<a class="anchor" aria-label="anchor" href="#guidelines"></a>
|
||||
</h3>
|
||||
<p>The <code><a href="../reference/mdro.html">mdro()</a></code> function support multiple guidelines. You can select a guideline with the <code>guideline</code> parameter. Currently supported guidelines are (case-insensitive):</p>
|
||||
<ul>
|
||||
<li>
|
||||
@ -236,15 +236,15 @@
|
||||
</li>
|
||||
</ul>
|
||||
<p>Please suggest your own (country-specific) guidelines by letting us know: <a href="https://github.com/msberends/AMR/issues/new" class="external-link uri">https://github.com/msberends/AMR/issues/new</a>.</p>
|
||||
<div id="custom-guidelines" class="section level4">
|
||||
<h4 class="hasAnchor">
|
||||
<a href="#custom-guidelines" class="anchor" aria-hidden="true"></a>Custom Guidelines</h4>
|
||||
<div class="section level4">
|
||||
<h4 id="custom-guidelines">Custom Guidelines<a class="anchor" aria-label="anchor" href="#custom-guidelines"></a>
|
||||
</h4>
|
||||
<p>You can also use your own custom guideline. Custom guidelines can be set with the <code><a href="../reference/mdro.html">custom_mdro_guideline()</a></code> function. This is of great importance if you have custom rules to determine MDROs in your hospital, e.g., rules that are dependent on ward, state of contact isolation or other variables in your data.</p>
|
||||
<p>If you are familiar with <code><a href="https://dplyr.tidyverse.org/reference/case_when.html" class="external-link">case_when()</a></code> of the <code>dplyr</code> package, you will recognise the input method to set your own rules. Rules must be set using what R considers to be the ‘formula notation’:</p>
|
||||
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R"><span class="va">custom</span> <span class="op"><-</span> <span class="fu"><a href="../reference/mdro.html">custom_mdro_guideline</a></span><span class="op">(</span><span class="va">CIP</span> <span class="op">==</span> <span class="st">"R"</span> <span class="op">&</span> <span class="va">age</span> <span class="op">></span> <span class="fl">60</span> <span class="op">~</span> <span class="st">"Elderly Type A"</span>,
|
||||
<span class="va">ERY</span> <span class="op">==</span> <span class="st">"R"</span> <span class="op">&</span> <span class="va">age</span> <span class="op">></span> <span class="fl">60</span> <span class="op">~</span> <span class="st">"Elderly Type B"</span><span class="op">)</span></code></pre></div>
|
||||
<p>If a row/an isolate matches the first rule, the value after the first <code><a href="https://rdrr.io/r/base/tilde.html" class="external-link">~</a></code> (in this case <em>‘Elderly Type A’</em>) will be set as MDRO value. Otherwise, the second rule will be tried and so on. The maximum number of rules is unlimited.</p>
|
||||
<p>If a row/an isolate matches the first rule, the value after the first <code>~</code> (in this case <em>‘Elderly Type A’</em>) will be set as MDRO value. Otherwise, the second rule will be tried and so on. The maximum number of rules is unlimited.</p>
|
||||
<p>You can print the rules set in the console for an overview. Colours will help reading it if your console supports colours.</p>
|
||||
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R"><span class="va">custom</span>
|
||||
@ -269,17 +269,17 @@
|
||||
<p>The rules set (the <code>custom</code> object in this case) could be exported to a shared file location using <code><a href="https://rdrr.io/r/base/readRDS.html" class="external-link">saveRDS()</a></code> if you collaborate with multiple users. The custom rules set could then be imported using <code><a href="https://rdrr.io/r/base/readRDS.html" class="external-link">readRDS()</a></code>.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="examples" class="section level3">
|
||||
<h3 class="hasAnchor">
|
||||
<a href="#examples" class="anchor" aria-hidden="true"></a>Examples</h3>
|
||||
<div class="section level3">
|
||||
<h3 id="examples">Examples<a class="anchor" aria-label="anchor" href="#examples"></a>
|
||||
</h3>
|
||||
<p>The <code><a href="../reference/mdro.html">mdro()</a></code> function always returns an ordered <code>factor</code> for predefined guidelines. For example, the output of the default guideline by Magiorakos <em>et al.</em> returns a <code>factor</code> with levels ‘Negative’, ‘MDR’, ‘XDR’ or ‘PDR’ in that order.</p>
|
||||
<p>The next example uses the <code>example_isolates</code> data set. This is a data set included with this package and contains full antibiograms of 2,000 microbial isolates. It reflects reality and can be used to practise AMR data analysis. If we test the MDR/XDR/PDR guideline on this data set, we get:</p>
|
||||
<div class="sourceCode" id="cb4"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R"><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://dplyr.tidyverse.org" class="external-link">dplyr</a></span><span class="op">)</span> <span class="co"># to support pipes: %>%</span>
|
||||
<span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://github.com/msberends/cleaner" class="external-link">cleaner</a></span><span class="op">)</span> <span class="co"># to create frequency tables</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb5"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R"><span class="va">example_isolates</span> <span class="op">%>%</span>
|
||||
<span class="fu"><a href="../reference/mdro.html">mdro</a></span><span class="op">(</span><span class="op">)</span> <span class="op">%>%</span>
|
||||
<code class="sourceCode R"><span class="va">example_isolates</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<span class="fu"><a href="../reference/mdro.html">mdro</a></span><span class="op">(</span><span class="op">)</span> <span class="op"><a href="https://magrittr.tidyverse.org/reference/pipe.html" class="external-link">%>%</a></span>
|
||||
<span class="fu"><a href="https://rdrr.io/pkg/cleaner/man/freq.html" class="external-link">freq</a></span><span class="op">(</span><span class="op">)</span> <span class="co"># show frequency table of the result</span>
|
||||
<span class="co"># ℹ Using column 'mo' as input for `col_mo`.</span>
|
||||
<span class="co"># Auto-guessing columns suitable for analysis... OK.</span>
|
||||
@ -299,11 +299,12 @@
|
||||
<span class="co"># classes was below 50% (set with `pct_required_classes`)</span></code></pre></div>
|
||||
<p>Only results with ‘R’ are considered as resistance. Use <code>combine_SI = FALSE</code> to also consider ‘I’ as resistance.</p>
|
||||
<p>Determining multidrug-resistant organisms (MDRO), according to: Guideline: Multidrug-resistant, extensively drug-resistant and pandrug-resistant bacteria: an international expert proposal for interim standard definitions for acquired resistance. Author(s): Magiorakos AP, Srinivasan A, Carey RB, …, Vatopoulos A, Weber JT, Monnet DL Source: Clinical Microbiology and Infection 18:3, 2012; doi: 10.1111/j.1469-0691.2011.03570.x</p>
|
||||
<p>(16 isolates had no test results)</p>
|
||||
<p><strong>Frequency table</strong></p>
|
||||
<p>Class: factor > ordered (numeric)<br>
|
||||
Length: 2,000<br>
|
||||
Levels: 4: Negative < Multi-drug-resistant (MDR) < Extensively drug-resistant …<br>
|
||||
Available: 1,745 (87.25%, NA: 255 = 12.75%)<br>
|
||||
Available: 1,729 (86.45%, NA: 271 = 13.55%)<br>
|
||||
Unique: 2</p>
|
||||
<table class="table">
|
||||
<thead><tr class="header">
|
||||
@ -318,17 +319,17 @@ Unique: 2</p>
|
||||
<tr class="odd">
|
||||
<td align="left">1</td>
|
||||
<td align="left">Negative</td>
|
||||
<td align="right">1617</td>
|
||||
<td align="right">92.66%</td>
|
||||
<td align="right">1617</td>
|
||||
<td align="right">92.66%</td>
|
||||
<td align="right">1601</td>
|
||||
<td align="right">92.60%</td>
|
||||
<td align="right">1601</td>
|
||||
<td align="right">92.60%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">2</td>
|
||||
<td align="left">Multi-drug-resistant (MDR)</td>
|
||||
<td align="right">128</td>
|
||||
<td align="right">7.34%</td>
|
||||
<td align="right">1745</td>
|
||||
<td align="right">7.40%</td>
|
||||
<td align="right">1729</td>
|
||||
<td align="right">100.00%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -357,19 +358,19 @@ Unique: 2</p>
|
||||
<div class="sourceCode" id="cb8"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R"><span class="fu"><a href="https://rdrr.io/r/utils/head.html" class="external-link">head</a></span><span class="op">(</span><span class="va">my_TB_data</span><span class="op">)</span>
|
||||
<span class="co"># rifampicin isoniazid gatifloxacin ethambutol pyrazinamide moxifloxacin</span>
|
||||
<span class="co"># 1 S S R R I I</span>
|
||||
<span class="co"># 2 S R R S I S</span>
|
||||
<span class="co"># 3 S I I S R I</span>
|
||||
<span class="co"># 4 I I R I S I</span>
|
||||
<span class="co"># 5 R I R R S S</span>
|
||||
<span class="co"># 6 I R S I I R</span>
|
||||
<span class="co"># 1 R I I R I I</span>
|
||||
<span class="co"># 2 S S S S I S</span>
|
||||
<span class="co"># 3 S I I S S I</span>
|
||||
<span class="co"># 4 R I S R R R</span>
|
||||
<span class="co"># 5 R S R R I I</span>
|
||||
<span class="co"># 6 I S R S I S</span>
|
||||
<span class="co"># kanamycin</span>
|
||||
<span class="co"># 1 I</span>
|
||||
<span class="co"># 2 S</span>
|
||||
<span class="co"># 3 S</span>
|
||||
<span class="co"># 4 I</span>
|
||||
<span class="co"># 2 I</span>
|
||||
<span class="co"># 3 R</span>
|
||||
<span class="co"># 4 R</span>
|
||||
<span class="co"># 5 R</span>
|
||||
<span class="co"># 6 S</span></code></pre></div>
|
||||
<span class="co"># 6 R</span></code></pre></div>
|
||||
<p>We can now add the interpretation of MDR-TB to our data set. You can use:</p>
|
||||
<div class="sourceCode" id="cb9"><pre class="downlit sourceCode r">
|
||||
<code class="sourceCode R"><span class="fu"><a href="../reference/mdro.html">mdro</a></span><span class="op">(</span><span class="va">my_TB_data</span>, guideline <span class="op">=</span> <span class="st">"TB"</span><span class="op">)</span></code></pre></div>
|
||||
@ -412,40 +413,40 @@ Unique: 5</p>
|
||||
<tr class="odd">
|
||||
<td align="left">1</td>
|
||||
<td align="left">Mono-resistant</td>
|
||||
<td align="right">3194</td>
|
||||
<td align="right">63.88%</td>
|
||||
<td align="right">3194</td>
|
||||
<td align="right">63.88%</td>
|
||||
<td align="right">3230</td>
|
||||
<td align="right">64.60%</td>
|
||||
<td align="right">3230</td>
|
||||
<td align="right">64.60%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">2</td>
|
||||
<td align="left">Negative</td>
|
||||
<td align="right">964</td>
|
||||
<td align="right">19.28%</td>
|
||||
<td align="right">4158</td>
|
||||
<td align="right">83.16%</td>
|
||||
<td align="right">984</td>
|
||||
<td align="right">19.68%</td>
|
||||
<td align="right">4214</td>
|
||||
<td align="right">84.28%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">3</td>
|
||||
<td align="left">Multi-drug-resistant</td>
|
||||
<td align="right">451</td>
|
||||
<td align="right">9.02%</td>
|
||||
<td align="right">4609</td>
|
||||
<td align="right">92.18%</td>
|
||||
<td align="right">445</td>
|
||||
<td align="right">8.90%</td>
|
||||
<td align="right">4659</td>
|
||||
<td align="right">93.18%</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td align="left">4</td>
|
||||
<td align="left">Poly-resistant</td>
|
||||
<td align="right">253</td>
|
||||
<td align="right">5.06%</td>
|
||||
<td align="right">4862</td>
|
||||
<td align="right">97.24%</td>
|
||||
<td align="right">241</td>
|
||||
<td align="right">4.82%</td>
|
||||
<td align="right">4900</td>
|
||||
<td align="right">98.00%</td>
|
||||
</tr>
|
||||
<tr class="odd">
|
||||
<td align="left">5</td>
|
||||
<td align="left">Extensively drug-resistant</td>
|
||||
<td align="right">138</td>
|
||||
<td align="right">2.76%</td>
|
||||
<td align="right">100</td>
|
||||
<td align="right">2.00%</td>
|
||||
<td align="right">5000</td>
|
||||
<td align="right">100.00%</td>
|
||||
</tr>
|
||||
@ -464,12 +465,12 @@ Unique: 5</p>
|
||||
|
||||
<footer><div class="copyright">
|
||||
<p></p>
|
||||
<p>Developed by <a href="https://www.rug.nl/staff/m.s.berends/" class="external-link external-link">Matthijs S. Berends</a>, Christian F. Luz.</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 external-link">pkgdown</a> 1.6.1.9001.</p>
|
||||
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.0.</p>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
Reference in New Issue
Block a user