* Support for translation of disk diffusion and MIC values to RSI values (i.e. antimicrobial interpretations). Supported guidelines are EUCAST (2011 to 2019) and CLSI (2011 to 2019). Use `as.rsi()` on an MIC value (created with `as.mic()`), a disk diffusion value (created with the new `as.disk()`) or on a complete date set containing columns with MIC or disk diffusion values.
#' Matthijs S. Berends[1,2] Christian F. Luz[1], Erwin E.A. Hassing[2], Corinna Glasner[1], Alex W. Friedrich[1], Bhanu N.M. Sinha[1] \cr
#'
#' [1] Department of Medical Microbiology, University of Groningen, University Medical Center Groningen, Groningen, the Netherlands - \url{rug.nl} \url{umcg.nl} \cr
#' [1] Department of Medical Microbiology, University of Groningen, University Medical Center Groningen, Groningen, the Netherlands - \url{https://www.rug.nl} \url{https://www.umcg.nl} \cr
#' [2] Certe Medical Diagnostics & Advice, Groningen, the Netherlands - \url{certe.nl}
#' The Catalogue of Life (\url{http://www.catalogueoflife.org}) is the most comprehensive and authoritative global index of species currently available. It holds essential information on the names, relationships and distributions of over 1.6 million species. The Catalogue of Life is used to support the major biodiversity and conservation information services such as the Global Biodiversity Information Facility (GBIF), Encyclopedia of Life (EoL) and the International Union for Conservation of Nature Red List. It is recognised by the Convention on Biological Diversity as a significant component of the Global Taxonomy Initiative and a contribution to Target 1 of the Global Strategy for Plant Conservation.
#'
#' The syntax used to transform the original data to a cleansed R format, can be found here: \url{https://gitlab.com/msberends/AMR/blob/master/reproduction_of_microorganisms.R}.
#' The syntax used to transform the original data to a cleansed R format, can be found here: \url{https://gitlab.com/msberends/AMR/blob/master/data-raw/reproduction_of_microorganisms.R}.
<p><strong>Note:</strong> values on this page will change with every website update since they are based on randomly created values and the page was written in <ahref="https://rmarkdown.rstudio.com/">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 01 June 2019.</p>
<p><strong>Note:</strong> values on this page will change with every website update since they are based on randomly created values and the page was written in <ahref="https://rmarkdown.rstudio.com/">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 02 June 2019.</p>
<ahref="#needed-r-packages"class="anchor"></a>Needed R packages</h2>
<p>As with many uses in R, we need some additional packages for AMR analysis. Our package works closely together with the <ahref="https://www.tidyverse.org">tidyverse packages</a><ahref="https://dplyr.tidyverse.org/"><code>dplyr</code></a> and <ahref="https://ggplot2.tidyverse.org"><code>ggplot2</code></a> by <ahref="https://www.linkedin.com/in/hadleywickham/">Dr Hadley Wickham</a>. The tidyverse tremendously improves the way we conduct data science - it allows for a very natural way of writing syntaxes and creating beautiful plots in R.</p>
<p>As with many uses in R, we need some additional packages for AMR analysis. Our package works closely together with the <ahref="https://www.tidyverse.org">tidyverse packages</a><ahref="https://dplyr.tidyverse.org/"><code>dplyr</code></a> and <ahref="https://ggplot2.tidyverse.org"><code>ggplot2</code></a> by Dr Hadley Wickham. The tidyverse tremendously improves the way we conduct data science - it allows for a very natural way of writing syntaxes and creating beautiful plots in R.</p>
<p>Our <code>AMR</code> package depends on these packages and even extends their use and functions.</p>
<p>So, we can draw at least two conclusions immediately. From a data scientist perspective, the data looks clean: only values <code>M</code> and <code>F</code>. From a researcher perspective: there are slightly more men. Nothing we didnโt already know.</p>
<p>The data is already quite clean, but we still need to transform some variables. The <code>bacteria</code> column now consists of text, and we want to add more variables based on microbial IDs later on. So, we will transform this column to valid IDs. The <code><ahref="https://dplyr.tidyverse.org/reference/mutate.html">mutate()</a></code> function of the <code>dplyr</code> package makes this really easy:</p>
<aclass="sourceLine"id="cb14-25"title="25"><spanclass="co"># Table 01: Intrinsic resistance in Enterobacteriaceae (1280 new changes)</span></a>
<aclass="sourceLine"id="cb14-25"title="25"><spanclass="co"># Table 01: Intrinsic resistance in Enterobacteriaceae (1276 new changes)</span></a>
<aclass="sourceLine"id="cb14-26"title="26"><spanclass="co"># Table 02: Intrinsic resistance in non-fermentative Gram-negative bacteria (no new changes)</span></a>
<aclass="sourceLine"id="cb14-27"title="27"><spanclass="co"># Table 03: Intrinsic resistance in other Gram-negative bacteria (no new changes)</span></a>
<aclass="sourceLine"id="cb14-28"title="28"><spanclass="co"># Table 04: Intrinsic resistance in Gram-positive bacteria (2810 new changes)</span></a>
<aclass="sourceLine"id="cb14-28"title="28"><spanclass="co"># Table 04: Intrinsic resistance in Gram-positive bacteria (2758 new changes)</span></a>
<aclass="sourceLine"id="cb14-29"title="29"><spanclass="co"># Table 08: Interpretive rules for B-lactam agents and Gram-positive cocci (no new changes)</span></a>
<aclass="sourceLine"id="cb14-30"title="30"><spanclass="co"># Table 09: Interpretive rules for B-lactam agents and Gram-negative rods (no new changes)</span></a>
<aclass="sourceLine"id="cb14-31"title="31"><spanclass="co"># Table 11: Interpretive rules for macrolides, lincosamides, and streptogramins (no new changes)</span></a>
@ -464,24 +464,24 @@
@@ -464,24 +464,24 @@
<aclass="sourceLine"id="cb14-33"title="33"><spanclass="co"># Table 13: Interpretive rules for quinolones (no new changes)</span></a>
<aclass="sourceLine"id="cb14-35"title="35"><spanclass="co"># Other rules</span></a>
<aclass="sourceLine"id="cb14-36"title="36"><spanclass="co"># Non-EUCAST: amoxicillin/clav acid = S where ampicillin = S (2266 new changes)</span></a>
<aclass="sourceLine"id="cb14-37"title="37"><spanclass="co"># Non-EUCAST: ampicillin = R where amoxicillin/clav acid = R (95 new changes)</span></a>
<aclass="sourceLine"id="cb14-36"title="36"><spanclass="co"># Non-EUCAST: amoxicillin/clav acid = S where ampicillin = S (2254 new changes)</span></a>
<aclass="sourceLine"id="cb14-37"title="37"><spanclass="co"># Non-EUCAST: ampicillin = R where amoxicillin/clav acid = R (138 new changes)</span></a>
<aclass="sourceLine"id="cb14-38"title="38"><spanclass="co"># Non-EUCAST: piperacillin = R where piperacillin/tazobactam = R (no new changes)</span></a>
<aclass="sourceLine"id="cb14-39"title="39"><spanclass="co"># Non-EUCAST: piperacillin/tazobactam = S where piperacillin = S (no new changes)</span></a>
<aclass="sourceLine"id="cb14-40"title="40"><spanclass="co"># Non-EUCAST: trimethoprim = R where trimethoprim/sulfa = R (no new changes)</span></a>
<aclass="sourceLine"id="cb14-41"title="41"><spanclass="co"># Non-EUCAST: trimethoprim/sulfa = S where trimethoprim = S (no new changes)</span></a>
<aclass="sourceLine"id="cb14-56"title="56"><spanclass="co"># Use verbose = TRUE to get a data.frame with all specified edits instead.</span></a></code></pre></div>
@ -509,8 +509,8 @@
@@ -509,8 +509,8 @@
<aclass="sourceLine"id="cb16-3"title="3"><spanclass="co"># </span><spanclass="al">NOTE</span><spanclass="co">: Using column `bacteria` as input for `col_mo`.</span></a>
<aclass="sourceLine"id="cb16-4"title="4"><spanclass="co"># </span><spanclass="al">NOTE</span><spanclass="co">: Using column `date` as input for `col_date`.</span></a>
<aclass="sourceLine"id="cb16-5"title="5"><spanclass="co"># </span><spanclass="al">NOTE</span><spanclass="co">: Using column `patient_id` as input for `col_patient_id`.</span></a>
<aclass="sourceLine"id="cb16-6"title="6"><spanclass="co"># => Found 5,704 first isolates (28.5% of total)</span></a></code></pre></div>
<p>So only 28.5% is suitable for resistance analysis! We can now filter on it with the <code><ahref="https://dplyr.tidyverse.org/reference/filter.html">filter()</a></code> function, also from the <code>dplyr</code> package:</p>
<aclass="sourceLine"id="cb16-6"title="6"><spanclass="co"># => Found 5,664 first isolates (28.3% of total)</span></a></code></pre></div>
<p>So only 28.3% is suitable for resistance analysis! We can now filter on it with the <code><ahref="https://dplyr.tidyverse.org/reference/filter.html">filter()</a></code> function, also from the <code>dplyr</code> package:</p>
<p>For future use, the above two syntaxes can be shortened with the <code><ahref="../reference/first_isolate.html">filter_first_isolate()</a></code> function:</p>
@ -536,8 +536,8 @@
@@ -536,8 +536,8 @@
<tbody>
<trclass="odd">
<tdalign="center">1</td>
<tdalign="center">2010-01-23</td>
<tdalign="center">H6</td>
<tdalign="center">2010-01-07</td>
<tdalign="center">K9</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
@ -547,8 +547,8 @@
@@ -547,8 +547,8 @@
</tr>
<trclass="even">
<tdalign="center">2</td>
<tdalign="center">2010-03-03</td>
<tdalign="center">H6</td>
<tdalign="center">2010-02-14</td>
<tdalign="center">K9</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
@ -558,10 +558,10 @@
@@ -558,10 +558,10 @@
</tr>
<trclass="odd">
<tdalign="center">3</td>
<tdalign="center">2010-03-26</td>
<tdalign="center">H6</td>
<tdalign="center">2010-02-18</td>
<tdalign="center">K9</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
@ -569,19 +569,19 @@
@@ -569,19 +569,19 @@
</tr>
<trclass="even">
<tdalign="center">4</td>
<tdalign="center">2010-04-21</td>
<tdalign="center">H6</td>
<tdalign="center">2010-06-01</td>
<tdalign="center">K9</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
</tr>
<trclass="odd">
<tdalign="center">5</td>
<tdalign="center">2010-07-15</td>
<tdalign="center">H6</td>
<tdalign="center">2010-08-14</td>
<tdalign="center">K9</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
@ -591,32 +591,32 @@
@@ -591,32 +591,32 @@
</tr>
<trclass="even">
<tdalign="center">6</td>
<tdalign="center">2010-08-13</td>
<tdalign="center">H6</td>
<tdalign="center">2010-11-08</td>
<tdalign="center">K9</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
</tr>
<trclass="odd">
<tdalign="center">7</td>
<tdalign="center">2010-09-29</td>
<tdalign="center">H6</td>
<tdalign="center">2010-11-16</td>
<tdalign="center">K9</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
</tr>
<trclass="even">
<tdalign="center">8</td>
<tdalign="center">2010-10-10</td>
<tdalign="center">H6</td>
<tdalign="center">2010-12-11</td>
<tdalign="center">K9</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
@ -624,29 +624,29 @@
@@ -624,29 +624,29 @@
</tr>
<trclass="odd">
<tdalign="center">9</td>
<tdalign="center">2010-12-09</td>
<tdalign="center">H6</td>
<tdalign="center">2011-02-27</td>
<tdalign="center">K9</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
<tdalign="center">S</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="even">
<tdalign="center">10</td>
<tdalign="center">2010-12-11</td>
<tdalign="center">H6</td>
<tdalign="center">2011-03-06</td>
<tdalign="center">K9</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
</tr>
</tbody>
</table>
<p>Only 1 isolates are marked as โfirstโ according to CLSI guideline. But when reviewing the antibiogram, it is obvious that some isolates are absolutely different strains and should be included too. This is why we weigh isolates, based on their antibiogram. The <code><ahref="../reference/key_antibiotics.html">key_antibiotics()</a></code> function adds a vector with 18 key antibiotics: 6 broad spectrum ones, 6 small spectrum for Gram negatives and 6 small spectrum for Gram positives. These can be defined by the user.</p>
<p>Only 2 isolates are marked as โfirstโ according to CLSI guideline. But when reviewing the antibiogram, it is obvious that some isolates are absolutely different strains and should be included too. This is why we weigh isolates, based on their antibiogram. The <code><ahref="../reference/key_antibiotics.html">key_antibiotics()</a></code> function adds a vector with 18 key antibiotics: 6 broad spectrum ones, 6 small spectrum for Gram negatives and 6 small spectrum for Gram positives. These can be defined by the user.</p>
<p>If a column exists with a name like โkey(โฆ)abโ the <code><ahref="../reference/first_isolate.html">first_isolate()</a></code> function will automatically use it and determine the first weighted isolates. Mind the NOTEs in below output:</p>
<aclass="sourceLine"id="cb19-7"title="7"><spanclass="co"># </span><spanclass="al">NOTE</span><spanclass="co">: Using column `patient_id` as input for `col_patient_id`.</span></a>
<aclass="sourceLine"id="cb19-8"title="8"><spanclass="co"># </span><spanclass="al">NOTE</span><spanclass="co">: Using column `keyab` as input for `col_keyantibiotics`. Use col_keyantibiotics = FALSE to prevent this.</span></a>
<aclass="sourceLine"id="cb19-9"title="9"><spanclass="co"># [Criterion] Inclusion based on key antibiotics, ignoring I.</span></a>
<aclass="sourceLine"id="cb19-10"title="10"><spanclass="co"># => Found 15,183 first weighted isolates (75.9% of total)</span></a></code></pre></div>
<aclass="sourceLine"id="cb19-10"title="10"><spanclass="co"># => Found 15,014 first weighted isolates (75.1% of total)</span></a></code></pre></div>
<tableclass="table">
<thead><trclass="header">
<thalign="center">isolate</th>
@ -674,8 +674,8 @@
@@ -674,8 +674,8 @@
<tbody>
<trclass="odd">
<tdalign="center">1</td>
<tdalign="center">2010-01-23</td>
<tdalign="center">H6</td>
<tdalign="center">2010-01-07</td>
<tdalign="center">K9</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
@ -686,8 +686,8 @@
@@ -686,8 +686,8 @@
</tr>
<trclass="even">
<tdalign="center">2</td>
<tdalign="center">2010-03-03</td>
<tdalign="center">H6</td>
<tdalign="center">2010-02-14</td>
<tdalign="center">K9</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
@ -698,10 +698,10 @@
@@ -698,10 +698,10 @@
</tr>
<trclass="odd">
<tdalign="center">3</td>
<tdalign="center">2010-03-26</td>
<tdalign="center">H6</td>
<tdalign="center">2010-02-18</td>
<tdalign="center">K9</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
@ -710,20 +710,20 @@
@@ -710,20 +710,20 @@
</tr>
<trclass="even">
<tdalign="center">4</td>
<tdalign="center">2010-04-21</td>
<tdalign="center">H6</td>
<tdalign="center">2010-06-01</td>
<tdalign="center">K9</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="odd">
<tdalign="center">5</td>
<tdalign="center">2010-07-15</td>
<tdalign="center">H6</td>
<tdalign="center">2010-08-14</td>
<tdalign="center">K9</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
@ -734,59 +734,59 @@
@@ -734,59 +734,59 @@
</tr>
<trclass="even">
<tdalign="center">6</td>
<tdalign="center">2010-08-13</td>
<tdalign="center">H6</td>
<tdalign="center">2010-11-08</td>
<tdalign="center">K9</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
<tdalign="center">FALSE</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="odd">
<tdalign="center">7</td>
<tdalign="center">2010-09-29</td>
<tdalign="center">H6</td>
<tdalign="center">2010-11-16</td>
<tdalign="center">K9</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="even">
<tdalign="center">8</td>
<tdalign="center">2010-10-10</td>
<tdalign="center">H6</td>
<tdalign="center">2010-12-11</td>
<tdalign="center">K9</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
<tdalign="center">TRUE</td>
<tdalign="center">FALSE</td>
</tr>
<trclass="odd">
<tdalign="center">9</td>
<tdalign="center">2010-12-09</td>
<tdalign="center">H6</td>
<tdalign="center">2011-02-27</td>
<tdalign="center">K9</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
<tdalign="center">S</td>
<tdalign="center">TRUE</td>
<tdalign="center">TRUE</td>
</tr>
<trclass="even">
<tdalign="center">10</td>
<tdalign="center">2010-12-11</td>
<tdalign="center">H6</td>
<tdalign="center">2011-03-06</td>
<tdalign="center">K9</td>
<tdalign="center">B_ESCHR_COL</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">R</td>
<tdalign="center">S</td>
<tdalign="center">S</td>
<tdalign="center">FALSE</td>
@ -794,11 +794,11 @@
@@ -794,11 +794,11 @@
</tr>
</tbody>
</table>
<p>Instead of 1, now 9 isolates are flagged. In total, 75.9% of all isolates are marked โfirst weightedโ - 47.4% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.</p>
<p>Instead of 2, now 9 isolates are flagged. In total, 75.1% of all isolates are marked โfirst weightedโ - 46.8% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.</p>
<p>As with <code><ahref="../reference/first_isolate.html">filter_first_isolate()</a></code>, thereโs a shortcut for this new algorithm too:</p>
<p>The functions <code><ahref="../reference/portion.html">portion_S()</a></code>, <code><ahref="../reference/portion.html">portion_SI()</a></code>, <code><ahref="../reference/portion.html">portion_I()</a></code>, <code><ahref="../reference/portion.html">portion_IR()</a></code> and <code><ahref="../reference/portion.html">portion_R()</a></code> can be used to determine the portion of a specific antimicrobial outcome. As per the EUCAST guideline of 2019, we calculate resistance as the portion of R (<code><ahref="../reference/portion.html">portion_R()</a></code>) and susceptibility as the portion of S and I (<code><ahref="../reference/portion.html">portion_SI()</a></code>). These functions can be used on their own:</p>
<p>Or can be used in conjuction with <code><ahref="https://dplyr.tidyverse.org/reference/group_by.html">group_by()</a></code> and <code><ahref="https://dplyr.tidyverse.org/reference/summarise.html">summarise()</a></code>, both from the <code>dplyr</code> package:</p>