1
0
mirror of https://github.com/msberends/AMR.git synced 2026-05-31 18:21:44 +02:00

Built site for AMR@3.0.1.9053: 23beebc

This commit is contained in:
github-actions
2026-04-30 08:07:42 +00:00
parent 425f4ad827
commit 3a3027f171
100 changed files with 742 additions and 649 deletions

View File

@@ -30,7 +30,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9052</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -91,7 +91,7 @@
website update since they are based on randomly created values and the
page was written in <a href="https://rmarkdown.rstudio.com/" class="external-link">R
Markdown</a>. However, the methodology remains unchanged. This page was
generated on 25 April 2026.</p>
generated on 30 April 2026.</p>
<div class="section level2">
<h2 id="introduction">Introduction<a class="anchor" aria-label="anchor" href="#introduction"></a>
</h2>
@@ -147,21 +147,21 @@ make the structure of your data generally look like this:</p>
</tr></thead>
<tbody>
<tr class="odd">
<td align="center">2026-04-25</td>
<td align="center">2026-04-30</td>
<td align="center">abcd</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">S</td>
</tr>
<tr class="even">
<td align="center">2026-04-25</td>
<td align="center">2026-04-30</td>
<td align="center">abcd</td>
<td align="center">Escherichia coli</td>
<td align="center">S</td>
<td align="center">R</td>
</tr>
<tr class="odd">
<td align="center">2026-04-25</td>
<td align="center">2026-04-30</td>
<td align="center">efgh</td>
<td align="center">Escherichia coli</td>
<td align="center">R</td>

View File

@@ -3,7 +3,7 @@
**Note:** values on this page will change with every website update
since they are based on randomly created values and the page was written
in [R Markdown](https://rmarkdown.rstudio.com/). However, the
methodology remains unchanged. This page was generated on 25 April 2026.
methodology remains unchanged. This page was generated on 30 April 2026.
## Introduction
@@ -51,9 +51,9 @@ structure of your data generally look like this:
| date | patient_id | mo | AMX | CIP |
|:----------:|:----------:|:----------------:|:---:|:---:|
| 2026-04-25 | abcd | Escherichia coli | S | S |
| 2026-04-25 | abcd | Escherichia coli | S | R |
| 2026-04-25 | efgh | Escherichia coli | R | S |
| 2026-04-30 | abcd | Escherichia coli | S | S |
| 2026-04-30 | abcd | Escherichia coli | S | R |
| 2026-04-30 | efgh | Escherichia coli | R | S |
### Needed R packages
@@ -69,6 +69,7 @@ We will also use the `cleaner` package, that can be used for cleaning
data and creating frequency tables.
``` r
library(dplyr)
library(ggplot2)
library(AMR)
@@ -81,6 +82,7 @@ The `AMR` package contains a data set `example_isolates_unclean`, which
might look data that users have extracted from their laboratory systems:
``` r
example_isolates_unclean
#> # A tibble: 3,000 × 8
#> patient_id hospital date bacteria AMX AMC CIP GEN
@@ -119,6 +121,7 @@ still human readable. More importantly,
of input:
``` r
as.mo("Klebsiella pneumoniae")
#> Class <mo>
#> [1] B_KLBSL_PNMN
@@ -143,6 +146,7 @@ Gram-stain. They all start with `mo_` and they use
that still any arbitrary user input can be used:
``` r
mo_family("K. pneumoniae")
#> [1] "Enterobacteriaceae"
mo_genus("K. pneumoniae")
@@ -165,6 +169,7 @@ mo_snomed("K. pneumoniae")
Now we can thus clean our data:
``` r
our_data$bacteria <- as.mo(our_data$bacteria, info = TRUE)
#> Retrieved values from the `microorganisms.codes` data set for "ESCCOL",
#> "KLEPNE", "STAAUR", and "STRPNE".
@@ -177,6 +182,7 @@ Apparently, there was some uncertainty about the translation to
taxonomic codes. Lets check this:
``` r
mo_uncertainties()
#> Matching scores are based on the resemblance between the input and the full
#> taxonomic name, and the pathogenicity in humans. See `mo_matching_score()`.
@@ -231,6 +237,7 @@ diffusion values, read more about that on the
For now, we will just clean the SIR columns in our data using dplyr:
``` r
# method 1, be explicit about the columns:
our_data <- our_data %>%
mutate_at(vars(AMX:GEN), as.sir)
@@ -308,6 +315,7 @@ page.
The outcome of the function can easily be added to our data:
``` r
our_data <- our_data %>%
mutate(first = first_isolate(info = TRUE))
#> Determining first isolates using an episode length of 365 days
@@ -326,6 +334,7 @@ with the [`filter()`](https://dplyr.tidyverse.org/reference/filter.html)
function, also from the `dplyr` package:
``` r
our_data_1st <- our_data %>%
filter(first == TRUE)
```
@@ -333,6 +342,7 @@ our_data_1st <- our_data %>%
For future use, the above two syntaxes can be shortened:
``` r
our_data_1st <- our_data %>%
filter_first_isolate()
```
@@ -340,6 +350,7 @@ our_data_1st <- our_data %>%
So we end up with 2 724 isolates for analysis. Now our data looks like:
``` r
our_data_1st
#> # A tibble: 2,724 × 9
#> patient_id hospital date bacteria AMX AMC CIP GEN first
@@ -366,6 +377,7 @@ gives a good first impression, as it comes with support for the new `mo`
and `sir` classes that we now have in our data set:
``` r
summary(our_data_1st)
#> patient_id hospital date bacteria
#> Length :2724 Length :2724 Min. :2011-01-01 Class :mo
@@ -417,6 +429,7 @@ table with [`count()`](https://amr-for-r.org/reference/count.md) based
on the name of the microorganisms:
``` r
our_data %>%
count(mo_name(bacteria), sort = TRUE)
#> # A tibble: 4 × 2
@@ -445,6 +458,7 @@ columns based on the antibiotic class that your antibiotic results are
in:
``` r
our_data_1st %>%
select(date, aminoglycosides())
#> For `aminoglycosides()` using column GEN
@@ -590,6 +604,7 @@ function to create any of the above antibiogram types. For starters,
this is what the included `example_isolates` data set looks like:
``` r
example_isolates
#> # A tibble: 2,000 × 46
#> date patient age gender ward mo PEN OXA FLC AMX
@@ -622,6 +637,7 @@ function supports any (combination) of the previously mentioned
antibiotic class selectors:
``` r
antibiogram(example_isolates,
antibiotics = c(aminoglycosides(), carbapenems())
)
@@ -630,18 +646,18 @@ antibiogram(example_isolates,
#> For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem)
```
| Pathogen | Amikacin | Gentamicin | Imipenem | Kanamycin | Meropenem | Tobramycin |
|:-----------------|:---------------------|:--------------------|:---------------------|:----------------|:---------------------|:--------------------|
| CoNS | 0% (0-8%,N=43) | 86% (82-90%,N=309) | 52% (37-67%,N=48) | 0% (0-8%,N=43) | 52% (37-67%,N=48) | 22% (12-35%,N=55) |
| *E. coli* | 100% (98-100%,N=171) | 98% (96-99%,N=460) | 100% (99-100%,N=422) | NA | 100% (99-100%,N=418) | 97% (96-99%,N=462) |
| *E. faecalis* | 0% (0-9%,N=39) | 0% (0-9%,N=39) | 100% (91-100%,N=38) | 0% (0-9%,N=39) | NA | 0% (0-9%,N=39) |
| *K. pneumoniae* | NA | 90% (79-96%,N=58) | 100% (93-100%,N=51) | NA | 100% (93-100%,N=53) | 90% (79-96%,N=58) |
| *P. aeruginosa* | NA | 100% (88-100%,N=30) | NA | 0% (0-12%,N=30) | NA | 100% (88-100%,N=30) |
| *P. mirabilis* | NA | 94% (80-99%,N=34) | 94% (79-99%,N=32) | NA | NA | 94% (80-99%,N=34) |
| *S. aureus* | NA | 99% (97-100%,N=233) | NA | NA | NA | 98% (92-100%,N=86) |
| *S. epidermidis* | 0% (0-8%,N=44) | 79% (71-85%,N=163) | NA | 0% (0-8%,N=44) | NA | 51% (40-61%,N=89) |
| *S. hominis* | NA | 92% (84-97%,N=80) | NA | NA | NA | 85% (74-93%,N=62) |
| *S. pneumoniae* | 0% (0-3%,N=117) | 0% (0-3%,N=117) | NA | 0% (0-3%,N=117) | NA | 0% (0-3%,N=117) |
| Pathogen | Amikacin | Gentamicin | Imipenem | Kanamycin | Meropenem | Tobramycin |
|:---|:---|:---|:---|:---|:---|:---|
| CoNS | 0% (0-8%,N=43) | 86% (82-90%,N=309) | 52% (37-67%,N=48) | 0% (0-8%,N=43) | 52% (37-67%,N=48) | 22% (12-35%,N=55) |
| *E. coli* | 100% (98-100%,N=171) | 98% (96-99%,N=460) | 100% (99-100%,N=422) | NA | 100% (99-100%,N=418) | 97% (96-99%,N=462) |
| *E. faecalis* | 0% (0-9%,N=39) | 0% (0-9%,N=39) | 100% (91-100%,N=38) | 0% (0-9%,N=39) | NA | 0% (0-9%,N=39) |
| *K. pneumoniae* | NA | 90% (79-96%,N=58) | 100% (93-100%,N=51) | NA | 100% (93-100%,N=53) | 90% (79-96%,N=58) |
| *P. aeruginosa* | NA | 100% (88-100%,N=30) | NA | 0% (0-12%,N=30) | NA | 100% (88-100%,N=30) |
| *P. mirabilis* | NA | 94% (80-99%,N=34) | 94% (79-99%,N=32) | NA | NA | 94% (80-99%,N=34) |
| *S. aureus* | NA | 99% (97-100%,N=233) | NA | NA | NA | 98% (92-100%,N=86) |
| *S. epidermidis* | 0% (0-8%,N=44) | 79% (71-85%,N=163) | NA | 0% (0-8%,N=44) | NA | 51% (40-61%,N=89) |
| *S. hominis* | NA | 92% (84-97%,N=80) | NA | NA | NA | 85% (74-93%,N=62) |
| *S. pneumoniae* | 0% (0-3%,N=117) | 0% (0-3%,N=117) | NA | 0% (0-3%,N=117) | NA | 0% (0-3%,N=117) |
Notice that the
[`antibiogram()`](https://amr-for-r.org/reference/antibiogram.md)
@@ -659,6 +675,7 @@ Ukrainian, Urdu, or Vietnamese. In this next example, we force the
language to be Spanish using the `language` argument:
``` r
antibiogram(example_isolates,
mo_transform = "gramstain",
antibiotics = aminoglycosides(),
@@ -669,10 +686,10 @@ antibiogram(example_isolates,
#> (amikacin), and KAN (kanamycin)
```
| Patógeno | Amikacina | Gentamicina | Kanamicina | Tobramicina |
|:--------------|:-------------------|:--------------------|:----------------|:-------------------|
| Gram negativo | 98% (96-99%,N=256) | 96% (95-98%,N=684) | 0% (0-10%,N=35) | 96% (94-97%,N=686) |
| Gram positivo | 0% (0-1%,N=436) | 63% (60-66%,N=1170) | 0% (0-1%,N=436) | 34% (31-38%,N=665) |
| Patógeno | Amikacina | Gentamicina | Kanamicina | Tobramicina |
|:---|:---|:---|:---|:---|
| Gram negativo | 98% (96-99%,N=256) | 96% (95-98%,N=684) | 0% (0-10%,N=35) | 96% (94-97%,N=686) |
| Gram positivo | 0% (0-1%,N=436) | 63% (60-66%,N=1170) | 0% (0-1%,N=436) | 34% (31-38%,N=665) |
#### Combined Antibiogram
@@ -680,6 +697,7 @@ To create a combined antibiogram, use antibiotic codes or names with a
plus `+` character like this:
``` r
combined_ab <- antibiogram(example_isolates,
antibiotics = c("TZP", "TZP+TOB", "TZP+GEN"),
ab_transform = NULL
@@ -687,17 +705,17 @@ combined_ab <- antibiogram(example_isolates,
combined_ab
```
| Pathogen | TZP | TZP + GEN | TZP + TOB |
|:-----------------|:---------------------|:---------------------|:---------------------|
| CoNS | 30% (16-49%,N=33) | 97% (95-99%,N=274) | NA |
| *E. coli* | 94% (92-96%,N=416) | 100% (98-100%,N=459) | 99% (97-100%,N=461) |
| *K. pneumoniae* | 89% (77-96%,N=53) | 93% (83-98%,N=58) | 93% (83-98%,N=58) |
| *P. aeruginosa* | NA | 100% (88-100%,N=30) | 100% (88-100%,N=30) |
| *P. mirabilis* | NA | 100% (90-100%,N=34) | 100% (90-100%,N=34) |
| *S. aureus* | NA | 100% (98-100%,N=231) | 100% (96-100%,N=91) |
| *S. epidermidis* | NA | 100% (97-100%,N=128) | 100% (92-100%,N=46) |
| *S. hominis* | NA | 100% (95-100%,N=74) | 100% (93-100%,N=53) |
| *S. pneumoniae* | 100% (97-100%,N=112) | 100% (97-100%,N=112) | 100% (97-100%,N=112) |
| Pathogen | TZP | TZP + GEN | TZP + TOB |
|:---|:---|:---|:---|
| CoNS | 30% (16-49%,N=33) | 97% (95-99%,N=274) | NA |
| *E. coli* | 94% (92-96%,N=416) | 100% (98-100%,N=459) | 99% (97-100%,N=461) |
| *K. pneumoniae* | 89% (77-96%,N=53) | 93% (83-98%,N=58) | 93% (83-98%,N=58) |
| *P. aeruginosa* | NA | 100% (88-100%,N=30) | 100% (88-100%,N=30) |
| *P. mirabilis* | NA | 100% (90-100%,N=34) | 100% (90-100%,N=34) |
| *S. aureus* | NA | 100% (98-100%,N=231) | 100% (96-100%,N=91) |
| *S. epidermidis* | NA | 100% (97-100%,N=128) | 100% (92-100%,N=46) |
| *S. hominis* | NA | 100% (95-100%,N=74) | 100% (93-100%,N=53) |
| *S. pneumoniae* | 100% (97-100%,N=112) | 100% (97-100%,N=112) | 100% (97-100%,N=112) |
#### Syndromic Antibiogram
@@ -707,6 +725,7 @@ be used. This can be any column in the data, or e.g. an
on certain columns:
``` r
antibiogram(example_isolates,
antibiotics = c(aminoglycosides(), carbapenems()),
syndromic_group = "ward"
@@ -716,22 +735,22 @@ antibiogram(example_isolates,
#> For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem)
```
| Syndromic Group | Pathogen | Amikacin | Gentamicin | Imipenem | Kanamycin | Meropenem | Tobramycin |
|:----------------|:-----------------|:---------------------|:--------------------|:---------------------|:----------------|:---------------------|:--------------------|
| Clinical | CoNS | NA | 89% (84-93%,N=205) | 57% (39-74%,N=35) | NA | 57% (39-74%,N=35) | 26% (12-45%,N=31) |
| ICU | CoNS | NA | 79% (68-88%,N=73) | NA | NA | NA | NA |
| Outpatient | CoNS | NA | 84% (66-95%,N=31) | NA | NA | NA | NA |
| Clinical | *E. coli* | 100% (97-100%,N=104) | 98% (96-99%,N=297) | 100% (99-100%,N=266) | NA | 100% (99-100%,N=276) | 98% (96-99%,N=299) |
| ICU | *E. coli* | 100% (93-100%,N=52) | 99% (95-100%,N=137) | 100% (97-100%,N=133) | NA | 100% (97-100%,N=118) | 96% (92-99%,N=137) |
| Clinical | *K. pneumoniae* | NA | 92% (81-98%,N=51) | 100% (92-100%,N=44) | NA | 100% (92-100%,N=46) | 92% (81-98%,N=51) |
| Clinical | *P. mirabilis* | NA | 100% (88-100%,N=30) | NA | NA | NA | 100% (88-100%,N=30) |
| Clinical | *S. aureus* | NA | 99% (95-100%,N=150) | NA | NA | NA | 97% (89-100%,N=63) |
| ICU | *S. aureus* | NA | 100% (95-100%,N=66) | NA | NA | NA | NA |
| Clinical | *S. epidermidis* | NA | 82% (72-90%,N=79) | NA | NA | NA | 55% (39-70%,N=44) |
| ICU | *S. epidermidis* | NA | 72% (60-82%,N=75) | NA | NA | NA | 41% (26-58%,N=41) |
| Clinical | *S. hominis* | NA | 96% (85-99%,N=45) | NA | NA | NA | 94% (79-99%,N=31) |
| Clinical | *S. pneumoniae* | 0% (0-5%,N=78) | 0% (0-5%,N=78) | NA | 0% (0-5%,N=78) | NA | 0% (0-5%,N=78) |
| ICU | *S. pneumoniae* | 0% (0-12%,N=30) | 0% (0-12%,N=30) | NA | 0% (0-12%,N=30) | NA | 0% (0-12%,N=30) |
| Syndromic Group | Pathogen | Amikacin | Gentamicin | Imipenem | Kanamycin | Meropenem | Tobramycin |
|:---|:---|:---|:---|:---|:---|:---|:---|
| Clinical | CoNS | NA | 89% (84-93%,N=205) | 57% (39-74%,N=35) | NA | 57% (39-74%,N=35) | 26% (12-45%,N=31) |
| ICU | CoNS | NA | 79% (68-88%,N=73) | NA | NA | NA | NA |
| Outpatient | CoNS | NA | 84% (66-95%,N=31) | NA | NA | NA | NA |
| Clinical | *E. coli* | 100% (97-100%,N=104) | 98% (96-99%,N=297) | 100% (99-100%,N=266) | NA | 100% (99-100%,N=276) | 98% (96-99%,N=299) |
| ICU | *E. coli* | 100% (93-100%,N=52) | 99% (95-100%,N=137) | 100% (97-100%,N=133) | NA | 100% (97-100%,N=118) | 96% (92-99%,N=137) |
| Clinical | *K. pneumoniae* | NA | 92% (81-98%,N=51) | 100% (92-100%,N=44) | NA | 100% (92-100%,N=46) | 92% (81-98%,N=51) |
| Clinical | *P. mirabilis* | NA | 100% (88-100%,N=30) | NA | NA | NA | 100% (88-100%,N=30) |
| Clinical | *S. aureus* | NA | 99% (95-100%,N=150) | NA | NA | NA | 97% (89-100%,N=63) |
| ICU | *S. aureus* | NA | 100% (95-100%,N=66) | NA | NA | NA | NA |
| Clinical | *S. epidermidis* | NA | 82% (72-90%,N=79) | NA | NA | NA | 55% (39-70%,N=44) |
| ICU | *S. epidermidis* | NA | 72% (60-82%,N=75) | NA | NA | NA | 41% (26-58%,N=41) |
| Clinical | *S. hominis* | NA | 96% (85-99%,N=45) | NA | NA | NA | 94% (79-99%,N=31) |
| Clinical | *S. pneumoniae* | 0% (0-5%,N=78) | 0% (0-5%,N=78) | NA | 0% (0-5%,N=78) | NA | 0% (0-5%,N=78) |
| ICU | *S. pneumoniae* | 0% (0-12%,N=30) | 0% (0-12%,N=30) | NA | 0% (0-12%,N=30) | NA | 0% (0-12%,N=30) |
#### Weighted-Incidence Syndromic Combination Antibiogram (WISCA)
@@ -745,6 +764,7 @@ susceptibility estimates, weighted by pathogen incidence and
antimicrobial susceptibility patterns.
``` r
example_isolates %>%
wisca(
antibiotics = c("TZP", "TZP+TOB", "TZP+GEN"),
@@ -753,8 +773,8 @@ example_isolates %>%
```
| Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|:------------------------|:-------------------------------------|:-------------------------------------|
| 69.4% (64.3-74.3%) | 92.6% (91.1-93.9%) | 88.7% (85.8-91.2%) |
|:---|:---|:---|
| 69.4% (64.3-74.3%) | 92.6% (91.1-93.9%) | 88.7% (85.8-91.2%) |
WISCA uses a **Bayesian decision model** to integrate data from multiple
pathogens, improving empirical therapy guidance, especially for
@@ -775,6 +795,7 @@ grouped `tibble`, i.e., using
first:
``` r
example_isolates %>%
top_n_microorganisms(n = 10) %>%
group_by(
@@ -785,15 +806,15 @@ example_isolates %>%
```
| age_group | gender | Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|:----------|:-------|:------------------------|:-------------------------------------|:-------------------------------------|
| 0-24 | F | 56.6% (25.2-83.9%) | 73.6% (48-91.6%) | 68.6% (42.9-89.5%) |
| 0-24 | M | 60.3% (28.4-87.1%) | 79.7% (57.6-94.2%) | 60.1% (29.5-87.7%) |
| 25-49 | F | 66.6% (45.6-85.5%) | 91.7% (84.6-96.7%) | 83% (67.9-94%) |
| 25-49 | M | 56.4% (29.1-81.7%) | 89.2% (80.3-95.7%) | 72.4% (49.7-90%) |
| 50-74 | F | 67.8% (55.8-80.1%) | 95.6% (93.2-97.5%) | 88.1% (80.4-94.6%) |
| 50-74 | M | 66.2% (54.8-75.8%) | 95.2% (92.4-97.4%) | 84.4% (74.4-92.5%) |
| 75+ | F | 71.7% (61-81.7%) | 96.6% (94.4-98.2%) | 90.6% (84.6-95.3%) |
| 75+ | M | 72.9% (63.8-82%) | 96.6% (94.6-98.1%) | 92.8% (87.8-96.5%) |
|:---|:---|:---|:---|:---|
| 0-24 | F | 56.6% (25.2-83.9%) | 73.6% (48-91.6%) | 68.6% (42.9-89.5%) |
| 0-24 | M | 60.3% (28.4-87.1%) | 79.7% (57.6-94.2%) | 60.1% (29.5-87.7%) |
| 25-49 | F | 66.6% (45.6-85.5%) | 91.7% (84.6-96.7%) | 83% (67.9-94%) |
| 25-49 | M | 56.4% (29.1-81.7%) | 89.2% (80.3-95.7%) | 72.4% (49.7-90%) |
| 50-74 | F | 67.8% (55.8-80.1%) | 95.6% (93.2-97.5%) | 88.1% (80.4-94.6%) |
| 50-74 | M | 66.2% (54.8-75.8%) | 95.2% (92.4-97.4%) | 84.4% (74.4-92.5%) |
| 75+ | F | 71.7% (61-81.7%) | 96.6% (94.4-98.2%) | 90.6% (84.6-95.3%) |
| 75+ | M | 72.9% (63.8-82%) | 96.6% (94.6-98.1%) | 92.8% (87.8-96.5%) |
#### Plotting antibiograms
@@ -803,6 +824,7 @@ from the `ggplot2` packages, since this `AMR` package provides an
extension to that function:
``` r
autoplot(combined_ab)
```
@@ -847,6 +869,7 @@ equal to
These functions can be used on their own:
``` r
our_data_1st %>% resistance(AMX)
#> `resistance()` assumes the EUCAST guideline and thus considers the 'I'
#> category susceptible. Set the `guideline` argument or the `AMR_guideline`
@@ -861,6 +884,7 @@ Or can be used in conjunction with
both from the `dplyr` package:
``` r
our_data_1st %>%
group_by(hospital) %>%
summarise(amoxicillin = resistance(AMX))
@@ -881,6 +905,7 @@ example with randomly generated MIC values for *Klebsiella pneumoniae*
and ciprofloxacin:
``` r
set.seed(123)
mic_values <- random_mic(100)
sir_values <- as.sir(mic_values, mo = "K. pneumoniae", ab = "cipro", guideline = "EUCAST 2024")
@@ -916,6 +941,7 @@ y-axis and
colour-code SIR categories.
``` r
# add a group
my_data$group <- rep(c("A", "B", "C", "D"), each = 25)
@@ -946,6 +972,7 @@ has been extended by this package to directly plot MIC and disk
diffusion values:
``` r
autoplot(mic_values)
```
@@ -953,6 +980,7 @@ autoplot(mic_values)
``` r
# by providing `mo` and `ab`, colours will indicate the SIR interpretation:
autoplot(mic_values, mo = "K. pneumoniae", ab = "cipro", guideline = "EUCAST 2024")
```

View File

@@ -30,7 +30,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9052</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@@ -168,37 +168,37 @@ regular Python data frames:
AMR.microorganisms
```
| mo | fullname | status | kingdom | gbif | gbif_parent | gbif_renamed_to | prevalence |
|--------------|------------------------------------|----------|----------|----------|-------------|-----------------|------------|
| B_GRAMN | (unknown Gram-negatives) | unknown | Bacteria | None | None | None | 2.0 |
| B_GRAMP | (unknown Gram-positives) | unknown | Bacteria | None | None | None | 2.0 |
| B_ANAER-NEG | (unknown anaerobic Gram-negatives) | unknown | Bacteria | None | None | None | 2.0 |
| B_ANAER-POS | (unknown anaerobic Gram-positives) | unknown | Bacteria | None | None | None | 2.0 |
| B_ANAER | (unknown anaerobic bacteria) | unknown | Bacteria | None | None | None | 2.0 |
| … | … | … | … | … | … | … | … |
| B_ZYMMN_POMC | Zymomonas pomaceae | accepted | Bacteria | 10744418 | 3221412 | None | 2.0 |
| B_ZYMPH | Zymophilus | synonym | Bacteria | None | 9475166 | None | 2.0 |
| B_ZYMPH_PCVR | Zymophilus paucivorans | synonym | Bacteria | None | None | None | 2.0 |
| B_ZYMPH_RFFN | Zymophilus raffinosivorans | synonym | Bacteria | None | None | None | 2.0 |
| F_ZYZYG | Zyzygomyces | unknown | Fungi | None | 7581 | None | 2.0 |
| mo | fullname | status | kingdom | gbif | gbif_parent | gbif_renamed_to | prevalence |
|----|----|----|----|----|----|----|----|
| B_GRAMN | (unknown Gram-negatives) | unknown | Bacteria | None | None | None | 2.0 |
| B_GRAMP | (unknown Gram-positives) | unknown | Bacteria | None | None | None | 2.0 |
| B_ANAER-NEG | (unknown anaerobic Gram-negatives) | unknown | Bacteria | None | None | None | 2.0 |
| B_ANAER-POS | (unknown anaerobic Gram-positives) | unknown | Bacteria | None | None | None | 2.0 |
| B_ANAER | (unknown anaerobic bacteria) | unknown | Bacteria | None | None | None | 2.0 |
| … | … | … | … | … | … | … | … |
| B_ZYMMN_POMC | Zymomonas pomaceae | accepted | Bacteria | 10744418 | 3221412 | None | 2.0 |
| B_ZYMPH | Zymophilus | synonym | Bacteria | None | 9475166 | None | 2.0 |
| B_ZYMPH_PCVR | Zymophilus paucivorans | synonym | Bacteria | None | None | None | 2.0 |
| B_ZYMPH_RFFN | Zymophilus raffinosivorans | synonym | Bacteria | None | None | None | 2.0 |
| F_ZYZYG | Zyzygomyces | unknown | Fungi | None | 7581 | None | 2.0 |
``` python
AMR.antimicrobials
```
| ab | cid | name | group | oral_ddd | oral_units | iv_ddd | iv_units |
|-----|------------|-----------------------|--------------------------|----------|------------|--------|----------|
| AMA | 4649.0 | 4-aminosalicylic acid | Antimycobacterials | 12.00 | g | NaN | None |
| ACM | 6450012.0 | Acetylmidecamycin | Macrolides/lincosamides | NaN | None | NaN | None |
| ASP | 49787020.0 | Acetylspiramycin | Macrolides/lincosamides | NaN | None | NaN | None |
| ALS | 8954.0 | Aldesulfone sodium | Other antibacterials | 0.33 | g | NaN | None |
| AMK | 37768.0 | Amikacin | Aminoglycosides | NaN | None | 1.0 | g |
| … | … | … | … | … | … | … | … |
| VIR | 11979535.0 | Virginiamycine | Other antibacterials | NaN | None | NaN | None |
| VOR | 71616.0 | Voriconazole | Antifungals/antimycotics | 0.40 | g | 0.4 | g |
| XBR | 72144.0 | Xibornol | Other antibacterials | NaN | None | NaN | None |
| ZID | 77846445.0 | Zidebactam | Other antibacterials | NaN | None | NaN | None |
| ZFD | NaN | Zoliflodacin | None | NaN | None | NaN | None |
| ab | cid | name | group | oral_ddd | oral_units | iv_ddd | iv_units |
|----|----|----|----|----|----|----|----|
| AMA | 4649.0 | 4-aminosalicylic acid | Antimycobacterials | 12.00 | g | NaN | None |
| ACM | 6450012.0 | Acetylmidecamycin | Macrolides/lincosamides | NaN | None | NaN | None |
| ASP | 49787020.0 | Acetylspiramycin | Macrolides/lincosamides | NaN | None | NaN | None |
| ALS | 8954.0 | Aldesulfone sodium | Other antibacterials | 0.33 | g | NaN | None |
| AMK | 37768.0 | Amikacin | Aminoglycosides | NaN | None | 1.0 | g |
| … | … | … | … | … | … | … | … |
| VIR | 11979535.0 | Virginiamycine | Other antibacterials | NaN | None | NaN | None |
| VOR | 71616.0 | Voriconazole | Antifungals/antimycotics | 0.40 | g | 0.4 | g |
| XBR | 72144.0 | Xibornol | Other antibacterials | NaN | None | NaN | None |
| ZID | 77846445.0 | Zidebactam | Other antibacterials | NaN | None | NaN | None |
| ZFD | NaN | Zoliflodacin | None | NaN | None | NaN | None |
## Conclusion

View File

@@ -30,7 +30,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9052</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@@ -49,6 +49,7 @@ We begin by loading the required libraries and preparing the
`example_isolates` dataset from the `AMR` package.
``` r
# Load required libraries
library(AMR) # For AMR data analysis
library(tidymodels) # For machine learning workflows, and data manipulation (dplyr, tidyr, ...)
@@ -57,6 +58,7 @@ library(tidymodels) # For machine learning workflows, and data manipulation (dpl
Prepare the data:
``` r
# Your data could look like this:
example_isolates
#> # A tibble: 2,000 × 46
@@ -127,6 +129,7 @@ preprocessing, model specification, and fitting.
We create a recipe to preprocess the data for modelling.
``` r
# Define the recipe for data preprocessing
resistance_recipe <- recipe(mo ~ ., data = data) %>%
step_corr(c(aminoglycosides(), betalactams()), threshold = 0.9)
@@ -148,6 +151,7 @@ have with `step_corr()`, the necessary parameters can be estimated from
a training set using `prep()`:
``` r
prep(resistance_recipe)
#> For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK
#> (amikacin), and KAN (kanamycin)
@@ -201,6 +205,7 @@ We define a logistic regression model since resistance prediction is a
binary classification task.
``` r
# Specify a logistic regression model
logistic_model <- logistic_reg() %>%
set_engine("glm") # Use the Generalised Linear Model engine
@@ -221,6 +226,7 @@ We bundle the recipe and model together into a `workflow`, which
organises the entire modelling process.
``` r
# Combine the recipe and model into a workflow
resistance_workflow <- workflow() %>%
add_recipe(resistance_recipe) %>% # Add the preprocessing recipe
@@ -248,6 +254,7 @@ Then, we fit the workflow on the training set and evaluate its
performance.
``` r
# Split data into training and testing sets
set.seed(123) # For reproducibility
data_split <- initial_split(data, prop = 0.8) # 80% training, 20% testing
@@ -271,6 +278,7 @@ they are stored in the recipe.
Next, we evaluate the model on the testing data.
``` r
# Make predictions on the testing set
predictions <- fitted_workflow %>%
predict(testing_data) # Generate predictions
@@ -338,6 +346,7 @@ AMR results of only aminoglycosides and beta-lactam antibiotics. The ROC
curve looks like this:
``` r
predictions %>%
roc_curve(mo, `.pred_Gram-negative`) %>%
autoplot()
@@ -390,6 +399,7 @@ Our goal is to:
We use the `esbl_isolates` dataset that comes with the AMR package.
``` r
# Load required libraries
library(AMR)
library(tidymodels)
@@ -437,6 +447,7 @@ selected using the new
[`all_mic_predictors()`](https://amr-for-r.org/reference/amr-tidymodels.md):
``` r
# Split into training and testing sets
set.seed(123)
split <- initial_split(data)
@@ -480,6 +491,7 @@ manual](https://parsnip.tidymodels.org/reference/details_boost_tree_xgboost.html
could be much more precise.
``` r
# Define the model
model <- logistic_reg(mode = "classification") %>%
set_engine("glm")
@@ -498,6 +510,7 @@ model
#### 3. Building the Workflow
``` r
# Create workflow
workflow_model <- workflow() %>%
add_recipe(mic_recipe) %>%
@@ -522,6 +535,7 @@ workflow_model
### **Training and Evaluating the Model**
``` r
# Fit the model
fitted <- fit(workflow_model, training_data)
@@ -566,6 +580,7 @@ We can visualise predictions by comparing predicted and actual ESBL
status.
``` r
library(ggplot2)
ggplot(predictions, aes(x = esbl, fill = .pred_class)) +
@@ -583,6 +598,7 @@ ggplot(predictions, aes(x = esbl, fill = .pred_class)) +
And plot the certainties too - how certain were the actual predictions?
``` r
predictions %>%
mutate(
certainty = ifelse(.pred_class == "FALSE",
@@ -646,6 +662,7 @@ We start by transforming the `example_isolates` dataset into a
structured time-series format.
``` r
# Load required libraries
library(AMR)
library(tidymodels)
@@ -706,6 +723,7 @@ step, a model specification, and the fitting process.
#### 1. Preprocessing with a Recipe
``` r
# Define the recipe
resistance_recipe_time <- recipe(res_AMX ~ year + gramstain, data = data_time) %>%
step_dummy(gramstain, one_hot = TRUE) %>% # Convert categorical to numerical
@@ -739,6 +757,7 @@ resistance_recipe_time
We use a linear regression model to predict resistance trends.
``` r
# Define the linear regression model
lm_model <- linear_reg() %>%
set_engine("lm") # Use linear regression
@@ -759,6 +778,7 @@ lm_model
We combine the preprocessing recipe and model into a workflow.
``` r
# Create workflow
resistance_workflow_time <- workflow() %>%
add_recipe(resistance_recipe_time) %>%
@@ -788,6 +808,7 @@ We split the data into training and testing sets, fit the model, and
evaluate performance.
``` r
# Split the data
set.seed(123)
data_split_time <- initial_split(data_time, prop = 0.8)
@@ -829,6 +850,7 @@ metrics_time
We plot resistance trends over time for amoxicillin.
``` r
library(ggplot2)
# Plot actual vs predicted resistance over time
@@ -849,6 +871,7 @@ Additionally, we can visualise resistance trends in `ggplot2` and
directly add linear models there:
``` r
ggplot(data_time, aes(x = year, y = res_AMX, color = gramstain)) +
geom_line() +
labs(

View File

@@ -30,7 +30,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9052</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@@ -36,6 +36,7 @@ function resolves this, by applying the latest EUCAST Expected
Resistant Phenotypes guideline:
``` r
oops <- tibble::tibble(
mo = c(
"Klebsiella pneumoniae",
@@ -64,6 +65,7 @@ that uses the same guideline, but allows to check for one or more
specific microorganisms or antimicrobials:
``` r
mo_is_intrinsic_resistant(
c("Klebsiella pneumoniae", "Escherichia coli"),
"ampicillin"
@@ -83,6 +85,7 @@ other antimicrobials drugs. This process is called *interpretive
reading*, and is basically a form of imputation:
``` r
data <- tibble::tibble(
mo = c(
"Staphylococcus aureus",
@@ -102,6 +105,7 @@ data <- tibble::tibble(
```
``` r
data
```
@@ -114,6 +118,7 @@ data
| Pseudomonas aeruginosa | \- | \- | \- | \- | \- | S | S |
``` r
eucast_rules(data, overwrite = TRUE)
```

View File

@@ -30,7 +30,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9052</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@@ -11,6 +11,7 @@ For PCA, we need to transform our AMR data first. This is what the
`example_isolates` data set in this package looks like:
``` r
library(AMR)
library(dplyr)
glimpse(example_isolates)
@@ -68,6 +69,7 @@ Now to transform this to a data set with only resistance percentages per
taxonomic order and genus:
``` r
resistance_data <- example_isolates %>%
group_by(
order = mo_order(mo), # group on anything, like order
@@ -103,6 +105,7 @@ automatically filter on rows that contain numeric values in all selected
variables, so we now only need to do:
``` r
pca_result <- pca(resistance_data)
#> Columns selected for PCA: "\033[1mAMC\033[22m", "\033[1mCAZ\033[22m",
#> "\033[1mCTX\033[22m", "\033[1mCXM\033[22m", "\033[1mGEN\033[22m",
@@ -114,6 +117,7 @@ The result can be reviewed with the good old
[`summary()`](https://rdrr.io/r/base/summary.html) function:
``` r
summary(pca_result)
#> Groups (n=4, named as 'order'):
#> [1] "Caryophanales" "Enterobacterales" "Lactobacillales" "Pseudomonadales"
@@ -137,6 +141,7 @@ microorganism.
## Plotting the results
``` r
biplot(pca_result)
```
@@ -148,6 +153,7 @@ better with our new
function, that automatically adds the right labels and even groups:
``` r
ggplot_pca(pca_result)
```
@@ -156,6 +162,7 @@ ggplot_pca(pca_result)
You can also print an ellipse per group, and edit the appearance:
``` r
ggplot_pca(pca_result, ellipse = TRUE) +
ggplot2::labs(title = "An AMR/PCA biplot!")
```

View File

@@ -30,7 +30,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9052</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">

View File

@@ -11,6 +11,7 @@ date fields are imported correctly.
An example syntax could look like this:
``` r
library(readxl)
data <- read_excel(path = "path/to/your/file.xlsx")
```
@@ -27,6 +28,7 @@ I suggest you read about it on their website:
<https://www.tidyverse.org/>.
``` r
library(dplyr) # part of tidyverse
library(ggplot2) # part of tidyverse
library(AMR) # this package
@@ -50,6 +52,7 @@ analysis:
for.
``` r
# transform variables
data <- WHONET %>%
# get microbial ID based on given organism
@@ -68,6 +71,7 @@ function can be used to create frequency tables.
So lets check our data, with a couple of frequency tables:
``` r
# our newly created `mo` variable, put in the mo_name() function
data %>% freq(mo_name(mo), nmax = 10)
```
@@ -82,22 +86,23 @@ Unique: 38
Shortest: 11
Longest: 40
| | Item | Count | Percent | Cum. Count | Cum. Percent |
|:----|:-----------------------------------------|------:|--------:|-----------:|-------------:|
| 1 | Escherichia coli | 245 | 49.0% | 245 | 49.0% |
| 2 | Coagulase-negative Staphylococcus (CoNS) | 74 | 14.8% | 319 | 63.8% |
| 3 | Staphylococcus epidermidis | 38 | 7.6% | 357 | 71.4% |
| 4 | Streptococcus pneumoniae | 31 | 6.2% | 388 | 77.6% |
| 5 | Staphylococcus hominis | 21 | 4.2% | 409 | 81.8% |
| 6 | Proteus mirabilis | 9 | 1.8% | 418 | 83.6% |
| 7 | Enterococcus faecium | 8 | 1.6% | 426 | 85.2% |
| 8 | Staphylococcus capitis urealyticus | 8 | 1.6% | 434 | 86.8% |
| 9 | Enterobacter cloacae | 5 | 1.0% | 439 | 87.8% |
| 10 | Enterococcus columbae | 4 | 0.8% | 443 | 88.6% |
| | Item | Count | Percent | Cum. Count | Cum. Percent |
|:---|:---|---:|---:|---:|---:|
| 1 | Escherichia coli | 245 | 49.0% | 245 | 49.0% |
| 2 | Coagulase-negative Staphylococcus (CoNS) | 74 | 14.8% | 319 | 63.8% |
| 3 | Staphylococcus epidermidis | 38 | 7.6% | 357 | 71.4% |
| 4 | Streptococcus pneumoniae | 31 | 6.2% | 388 | 77.6% |
| 5 | Staphylococcus hominis | 21 | 4.2% | 409 | 81.8% |
| 6 | Proteus mirabilis | 9 | 1.8% | 418 | 83.6% |
| 7 | Enterococcus faecium | 8 | 1.6% | 426 | 85.2% |
| 8 | Staphylococcus capitis urealyticus | 8 | 1.6% | 434 | 86.8% |
| 9 | Enterobacter cloacae | 5 | 1.0% | 439 | 87.8% |
| 10 | Enterococcus columbae | 4 | 0.8% | 443 | 88.6% |
(omitted 28 entries, n = 57 \[11.4%\])
``` r
# our transformed antibiotic columns
# amoxicillin/clavulanic acid (J01CR02) as an example
data %>% freq(AMC_ND2)
@@ -132,6 +137,7 @@ included [`ggplot_sir()`](https://amr-for-r.org/reference/ggplot_sir.md)
function:
``` r
data %>%
group_by(Country) %>%
select(Country, AMP_ND2, AMC_ED20, CAZ_ED10, CIP_ED5) %>%

View File

@@ -30,7 +30,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9052</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -151,7 +151,7 @@ isolates. Therefore, traditional antibiograms:</p>
regimen.</li>
</ul>
<p>We can write this as:</p>
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext mathvariant="normal">Coverage</mtext><mo>=</mo><munder><mo></mo><mi>i</mi></munder><mrow><mo stretchy="true" form="prefix">(</mo><msub><mtext mathvariant="normal">Incidence</mtext><mi>i</mi></msub><mo>×</mo><msub><mtext mathvariant="normal">Susceptibility</mtext><mi>i</mi></msub><mo stretchy="true" form="postfix">)</mo></mrow></mrow><annotation encoding="application/x-tex">\text{Coverage} = \sum_i (\text{Incidence}_i \times \text{Susceptibility}_i)</annotation></semantics></math></p>
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext mathvariant="normal">Coverage</mtext><mo>=</mo><munder><mo></mo><mi>i</mi></munder><mo stretchy="false" form="prefix">(</mo><msub><mtext mathvariant="normal">Incidence</mtext><mi>i</mi></msub><mo>×</mo><msub><mtext mathvariant="normal">Susceptibility</mtext><mi>i</mi></msub><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\text{Coverage} = \sum_i (\text{Incidence}_i \times \text{Susceptibility}_i)</annotation></semantics></math></p>
<p>For example, suppose:</p>
<ul>
<li>
@@ -162,7 +162,7 @@ are susceptible to a drug.</li>
<em>Klebsiella</em> are susceptible.</li>
</ul>
<p>Then:</p>
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext mathvariant="normal">Coverage</mtext><mo>=</mo><mrow><mo stretchy="true" form="prefix">(</mo><mn>0.6</mn><mo>×</mo><mn>0.9</mn><mo stretchy="true" form="postfix">)</mo></mrow><mo>+</mo><mrow><mo stretchy="true" form="prefix">(</mo><mn>0.4</mn><mo>×</mo><mn>0.7</mn><mo stretchy="true" form="postfix">)</mo></mrow><mo>=</mo><mn>0.82</mn></mrow><annotation encoding="application/x-tex">\text{Coverage} = (0.6 \times 0.9) + (0.4 \times 0.7) = 0.82</annotation></semantics></math></p>
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext mathvariant="normal">Coverage</mtext><mo>=</mo><mo stretchy="false" form="prefix">(</mo><mn>0.6</mn><mo>×</mo><mn>0.9</mn><mo stretchy="false" form="postfix">)</mo><mo>+</mo><mo stretchy="false" form="prefix">(</mo><mn>0.4</mn><mo>×</mo><mn>0.7</mn><mo stretchy="false" form="postfix">)</mo><mo>=</mo><mn>0.82</mn></mrow><annotation encoding="application/x-tex">\text{Coverage} = (0.6 \times 0.9) + (0.4 \times 0.7) = 0.82</annotation></semantics></math></p>
<p>But in real data, incidence and susceptibility are <strong>estimated
from samples</strong>, so they carry uncertainty. WISCA models this
<strong>probabilistically</strong>, using conjugate Bayesian
@@ -180,16 +180,16 @@ distributions.</p>
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mi>K</mi><annotation encoding="application/x-tex">K</annotation></semantics></math>
be the number of pathogens,</li>
<li>
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>α</mi><mo>=</mo><mrow><mo stretchy="true" form="prefix">(</mo><mn>1</mn><mo>,</mo><mn>1</mn><mo>,</mo><mi></mi><mo>,</mo><mn>1</mn><mo stretchy="true" form="postfix">)</mo></mrow></mrow><annotation encoding="application/x-tex">\alpha = (1, 1, \ldots, 1)</annotation></semantics></math>
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>α</mi><mo>=</mo><mo stretchy="false" form="prefix">(</mo><mn>1</mn><mo>,</mo><mn>1</mn><mo>,</mo><mi></mi><mo>,</mo><mn>1</mn><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\alpha = (1, 1, \ldots, 1)</annotation></semantics></math>
be a <strong>Dirichlet</strong> prior (uniform),</li>
<li>
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>n</mi><mo>=</mo><mrow><mo stretchy="true" form="prefix">(</mo><msub><mi>n</mi><mn>1</mn></msub><mo>,</mo><mi></mi><mo>,</mo><msub><mi>n</mi><mi>K</mi></msub><mo stretchy="true" form="postfix">)</mo></mrow></mrow><annotation encoding="application/x-tex">n = (n_1, \ldots, n_K)</annotation></semantics></math>
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>n</mi><mo>=</mo><mo stretchy="false" form="prefix">(</mo><msub><mi>n</mi><mn>1</mn></msub><mo>,</mo><mi></mi><mo>,</mo><msub><mi>n</mi><mi>K</mi></msub><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">n = (n_1, \ldots, n_K)</annotation></semantics></math>
be the observed counts per species.</li>
</ul>
<p>Then the posterior incidence is:</p>
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>p</mi><mo></mo><mtext mathvariant="normal">Dirichlet</mtext><mrow><mo stretchy="true" form="prefix">(</mo><msub><mi>α</mi><mn>1</mn></msub><mo>+</mo><msub><mi>n</mi><mn>1</mn></msub><mo>,</mo><mi></mi><mo>,</mo><msub><mi>α</mi><mi>K</mi></msub><mo>+</mo><msub><mi>n</mi><mi>K</mi></msub><mo stretchy="true" form="postfix">)</mo></mrow></mrow><annotation encoding="application/x-tex">p \sim \text{Dirichlet}(\alpha_1 + n_1, \ldots, \alpha_K + n_K)</annotation></semantics></math></p>
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>p</mi><mo></mo><mtext mathvariant="normal">Dirichlet</mtext><mo stretchy="false" form="prefix">(</mo><msub><mi>α</mi><mn>1</mn></msub><mo>+</mo><msub><mi>n</mi><mn>1</mn></msub><mo>,</mo><mi></mi><mo>,</mo><msub><mi>α</mi><mi>K</mi></msub><mo>+</mo><msub><mi>n</mi><mi>K</mi></msub><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">p \sim \text{Dirichlet}(\alpha_1 + n_1, \ldots, \alpha_K + n_K)</annotation></semantics></math></p>
<p>To simulate from this, we use:</p>
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>x</mi><mi>i</mi></msub><mo></mo><mtext mathvariant="normal">Gamma</mtext><mrow><mo stretchy="true" form="prefix">(</mo><msub><mi>α</mi><mi>i</mi></msub><mo>+</mo><msub><mi>n</mi><mi>i</mi></msub><mo>,</mo><mspace width="0.222em"></mspace><mn>1</mn><mo stretchy="true" form="postfix">)</mo></mrow><mo>,</mo><mspace width="1.0em"></mspace><msub><mi>p</mi><mi>i</mi></msub><mo>=</mo><mfrac><msub><mi>x</mi><mi>i</mi></msub><mrow><munderover><mo></mo><mrow><mi>j</mi><mo>=</mo><mn>1</mn></mrow><mi>K</mi></munderover><msub><mi>x</mi><mi>j</mi></msub></mrow></mfrac></mrow><annotation encoding="application/x-tex">x_i \sim \text{Gamma}(\alpha_i + n_i,\ 1), \quad p_i = \frac{x_i}{\sum_{j=1}^{K} x_j}</annotation></semantics></math></p>
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>x</mi><mi>i</mi></msub><mo></mo><mtext mathvariant="normal">Gamma</mtext><mo stretchy="false" form="prefix">(</mo><msub><mi>α</mi><mi>i</mi></msub><mo>+</mo><msub><mi>n</mi><mi>i</mi></msub><mo>,</mo><mspace width="0.222em"></mspace><mn>1</mn><mo stretchy="false" form="postfix">)</mo><mo>,</mo><mspace width="1.0em"></mspace><msub><mi>p</mi><mi>i</mi></msub><mo>=</mo><mfrac><msub><mi>x</mi><mi>i</mi></msub><mrow><munderover><mo></mo><mrow><mi>j</mi><mo>=</mo><mn>1</mn></mrow><mi>K</mi></munderover><msub><mi>x</mi><mi>j</mi></msub></mrow></mfrac></mrow><annotation encoding="application/x-tex">x_i \sim \text{Gamma}(\alpha_i + n_i,\ 1), \quad p_i = \frac{x_i}{\sum_{j=1}^{K} x_j}</annotation></semantics></math></p>
</div>
<div class="section level3">
<h3 id="susceptibility">Susceptibility<a class="anchor" aria-label="anchor" href="#susceptibility"></a>
@@ -197,7 +197,7 @@ be the observed counts per species.</li>
<p>Each pathogenregimen pair has a prior and data:</p>
<ul>
<li>Prior:
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext mathvariant="normal">Beta</mtext><mrow><mo stretchy="true" form="prefix">(</mo><msub><mi>α</mi><mn>0</mn></msub><mo>,</mo><msub><mi>β</mi><mn>0</mn></msub><mo stretchy="true" form="postfix">)</mo></mrow></mrow><annotation encoding="application/x-tex">\text{Beta}(\alpha_0, \beta_0)</annotation></semantics></math>,
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mtext mathvariant="normal">Beta</mtext><mo stretchy="false" form="prefix">(</mo><msub><mi>α</mi><mn>0</mn></msub><mo>,</mo><msub><mi>β</mi><mn>0</mn></msub><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\text{Beta}(\alpha_0, \beta_0)</annotation></semantics></math>,
with default
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>α</mi><mn>0</mn></msub><mo>=</mo><msub><mi>β</mi><mn>0</mn></msub><mo>=</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">\alpha_0 = \beta_0 = 1</annotation></semantics></math>
</li>
@@ -213,7 +213,7 @@ category could also include values SDD (susceptible, dose-dependent) and
I (intermediate [CLSI], or susceptible, increased exposure
[EUCAST]).</p>
<p>Then the posterior is:</p>
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>θ</mi><mo></mo><mtext mathvariant="normal">Beta</mtext><mrow><mo stretchy="true" form="prefix">(</mo><msub><mi>α</mi><mn>0</mn></msub><mo>+</mo><mi>S</mi><mo>,</mo><mspace width="0.222em"></mspace><msub><mi>β</mi><mn>0</mn></msub><mo>+</mo><mi>N</mi><mo></mo><mi>S</mi><mo stretchy="true" form="postfix">)</mo></mrow></mrow><annotation encoding="application/x-tex">\theta \sim \text{Beta}(\alpha_0 + S,\ \beta_0 + N - S)</annotation></semantics></math></p>
<p><math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>θ</mi><mo></mo><mtext mathvariant="normal">Beta</mtext><mo stretchy="false" form="prefix">(</mo><msub><mi>α</mi><mn>0</mn></msub><mo>+</mo><mi>S</mi><mo>,</mo><mspace width="0.222em"></mspace><msub><mi>β</mi><mn>0</mn></msub><mo>+</mo><mi>N</mi><mo></mo><mi>S</mi><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\theta \sim \text{Beta}(\alpha_0 + S,\ \beta_0 + N - S)</annotation></semantics></math></p>
</div>
<div class="section level3">
<h3 id="final-coverage-estimate">Final coverage estimate<a class="anchor" aria-label="anchor" href="#final-coverage-estimate"></a>
@@ -224,7 +224,7 @@ I (intermediate [CLSI], or susceptible, increased exposure
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>𝐩</mi><mo></mo><mtext mathvariant="normal">Dirichlet</mtext></mrow><annotation encoding="application/x-tex">\boldsymbol{p} \sim \text{Dirichlet}</annotation></semantics></math>
</li>
<li>Simulate susceptibility:
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>θ</mi><mi>i</mi></msub><mo></mo><mtext mathvariant="normal">Beta</mtext><mrow><mo stretchy="true" form="prefix">(</mo><mn>1</mn><mo>+</mo><msub><mi>S</mi><mi>i</mi></msub><mo>,</mo><mspace width="0.222em"></mspace><mn>1</mn><mo>+</mo><msub><mi>R</mi><mi>i</mi></msub><mo stretchy="true" form="postfix">)</mo></mrow></mrow><annotation encoding="application/x-tex">\theta_i \sim \text{Beta}(1 + S_i,\ 1 + R_i)</annotation></semantics></math>
<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>θ</mi><mi>i</mi></msub><mo></mo><mtext mathvariant="normal">Beta</mtext><mo stretchy="false" form="prefix">(</mo><mn>1</mn><mo>+</mo><msub><mi>S</mi><mi>i</mi></msub><mo>,</mo><mspace width="0.222em"></mspace><mn>1</mn><mo>+</mo><msub><mi>R</mi><mi>i</mi></msub><mo stretchy="false" form="postfix">)</mo></mrow><annotation encoding="application/x-tex">\theta_i \sim \text{Beta}(1 + S_i,\ 1 + R_i)</annotation></semantics></math>
</li>
<li>Combine:</li>
</ol>

View File

@@ -58,7 +58,9 @@ This means combining two things:
We can write this as:
$$\text{Coverage} = \sum\limits_{i}\left( \text{Incidence}_{i} \times \text{Susceptibility}_{i} \right)$$
``` math
\text{Coverage} = \sum_i (\text{Incidence}_i \times \text{Susceptibility}_i)
```
For example, suppose:
@@ -69,7 +71,9 @@ For example, suppose:
Then:
$$\text{Coverage} = (0.6 \times 0.9) + (0.4 \times 0.7) = 0.82$$
``` math
\text{Coverage} = (0.6 \times 0.9) + (0.4 \times 0.7) = 0.82
```
But in real data, incidence and susceptibility are **estimated from
samples**, so they carry uncertainty. WISCA models this
@@ -81,45 +85,53 @@ samples**, so they carry uncertainty. WISCA models this
Let:
- $K$ be the number of pathogens,
- $\alpha = (1,1,\ldots,1)$ be a **Dirichlet** prior (uniform),
- $n = \left( n_{1},\ldots,n_{K} \right)$ be the observed counts per
species.
- $`K`$ be the number of pathogens,
- $`\alpha = (1, 1, \ldots, 1)`$ be a **Dirichlet** prior (uniform),
- $`n = (n_1, \ldots, n_K)`$ be the observed counts per species.
Then the posterior incidence is:
$$p \sim \text{Dirichlet}\left( \alpha_{1} + n_{1},\ldots,\alpha_{K} + n_{K} \right)$$
``` math
p \sim \text{Dirichlet}(\alpha_1 + n_1, \ldots, \alpha_K + n_K)
```
To simulate from this, we use:
$$x_{i} \sim \text{Gamma}\left( \alpha_{i} + n_{i},\ 1 \right),\quad p_{i} = \frac{x_{i}}{\sum\limits_{j = 1}^{K}x_{j}}$$
``` math
x_i \sim \text{Gamma}(\alpha_i + n_i,\ 1), \quad p_i = \frac{x_i}{\sum_{j=1}^{K} x_j}
```
### Susceptibility
Each pathogenregimen pair has a prior and data:
- Prior: $\text{Beta}\left( \alpha_{0},\beta_{0} \right)$, with default
$\alpha_{0} = \beta_{0} = 1$
- Data: $S$ susceptible out of $N$ tested
- Prior: $`\text{Beta}(\alpha_0, \beta_0)`$, with default
$`\alpha_0 = \beta_0 = 1`$
- Data: $`S`$ susceptible out of $`N`$ tested
The $S$ category could also include values SDD (susceptible,
The $`S`$ category could also include values SDD (susceptible,
dose-dependent) and I (intermediate \[CLSI\], or susceptible, increased
exposure \[EUCAST\]).
Then the posterior is:
$$\theta \sim \text{Beta}\left( \alpha_{0} + S,\ \beta_{0} + N - S \right)$$
``` math
\theta \sim \text{Beta}(\alpha_0 + S,\ \beta_0 + N - S)
```
### Final coverage estimate
Putting it together:
1. Simulate pathogen incidence: $\mathbf{p} \sim \text{Dirichlet}$
1. Simulate pathogen incidence:
$`\boldsymbol{p} \sim \text{Dirichlet}`$
2. Simulate susceptibility:
$\theta_{i} \sim \text{Beta}\left( 1 + S_{i},\ 1 + R_{i} \right)$
$`\theta_i \sim \text{Beta}(1 + S_i,\ 1 + R_i)`$
3. Combine:
$$\text{Coverage} = \sum\limits_{i = 1}^{K}p_{i} \cdot \theta_{i}$$
``` math
\text{Coverage} = \sum_{i=1}^{K} p_i \cdot \theta_i
```
Repeat this simulation (e.g. 1000×) and summarise:
@@ -131,6 +143,7 @@ Repeat this simulation (e.g. 1000×) and summarise:
### Prepare data and simulate synthetic syndrome
``` r
library(AMR)
data <- example_isolates
@@ -164,6 +177,7 @@ data$syndrome <- ifelse(data$mo %like% "coli", "UTI", "No UTI")
### Basic WISCA antibiogram
``` r
wisca(data,
antimicrobials = c("AMC", "CIP", "GEN")
)
@@ -176,18 +190,20 @@ wisca(data,
### Use combination regimens
``` r
wisca(data,
antimicrobials = c("AMC", "AMC + CIP", "AMC + GEN")
)
```
| Amoxicillin/clavulanic acid | Amoxicillin/clavulanic acid + Ciprofloxacin | Amoxicillin/clavulanic acid + Gentamicin |
|:----------------------------|:--------------------------------------------|:-----------------------------------------|
| 73.8% (71.8-75.7%) | 87.5% (85.9-89%) | 89.7% (88.2-91.1%) |
|:---|:---|:---|
| 73.8% (71.8-75.7%) | 87.5% (85.9-89%) | 89.7% (88.2-91.1%) |
### Stratify by syndrome
``` r
wisca(data,
antimicrobials = c("AMC", "AMC + CIP", "AMC + GEN"),
syndromic_group = "syndrome"
@@ -195,15 +211,16 @@ wisca(data,
```
| Syndromic Group | Amoxicillin/clavulanic acid | Amoxicillin/clavulanic acid + Ciprofloxacin | Amoxicillin/clavulanic acid + Gentamicin |
|:----------------|:----------------------------|:--------------------------------------------|:-----------------------------------------|
| No UTI | 70.1% (67.8-72.3%) | 85.2% (83.1-87.2%) | 87.1% (85.3-88.7%) |
| UTI | 80.9% (77.7-83.8%) | 88.2% (85.7-90.5%) | 90.9% (88.7-93%) |
|:---|:---|:---|:---|
| No UTI | 70.1% (67.8-72.3%) | 85.2% (83.1-87.2%) | 87.1% (85.3-88.7%) |
| UTI | 80.9% (77.7-83.8%) | 88.2% (85.7-90.5%) | 90.9% (88.7-93%) |
The `AMR` package is available in 28 languages, which can all be used
for the [`wisca()`](https://amr-for-r.org/reference/antibiogram.md)
function too:
``` r
wisca(data,
antimicrobials = c("AMC", "AMC + CIP", "AMC + GEN"),
syndromic_group = gsub("UTI", "UCI", data$syndrome),
@@ -212,9 +229,9 @@ wisca(data,
```
| Grupo sindrómico | Amoxicilina/ácido clavulánico | Amoxicilina/ácido clavulánico + Ciprofloxacina | Amoxicilina/ácido clavulánico + Gentamicina |
|:-----------------|:------------------------------|:-----------------------------------------------|:--------------------------------------------|
| No UCI | 70% (67.8-72.4%) | 85.3% (83.3-87.2%) | 87% (85.3-88.8%) |
| UCI | 80.9% (77.7-83.9%) | 88.2% (85.5-90.6%) | 90.9% (88.7-93%) |
|:---|:---|:---|:---|
| No UCI | 70% (67.8-72.4%) | 85.3% (83.3-87.2%) | 87% (85.3-88.8%) |
| UCI | 80.9% (77.7-83.9%) | 88.2% (85.5-90.6%) | 90.9% (88.7-93%) |
## Sensible defaults, which can be customised
@@ -242,6 +259,7 @@ WISCA enables:
It is available in the `AMR` package via either:
``` r
wisca(...)
antibiogram(..., wisca = TRUE)

View File

@@ -30,7 +30,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9052</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -80,7 +80,7 @@
<main id="main" class="col-md-9"><div class="page-header">
<img src="../logo.svg" class="logo" alt=""><h1>Download data sets for download / own use</h1>
<h4 data-toc-skip class="date">25 April 2026</h4>
<h4 data-toc-skip class="date">30 April 2026</h4>
<small class="dont-index">Source: <a href="https://github.com/msberends/AMR/blob/main/vignettes/datasets.Rmd" class="external-link"><code>vignettes/datasets.Rmd</code></a></small>
<div class="d-none name"><code>datasets.Rmd</code></div>

View File

@@ -78,14 +78,14 @@ Included (sub)species per taxonomic kingdom:
First 6 rows when filtering on genus *Escherichia*:
| mo | fullname | status | kingdom | phylum | class | order | family | genus | species | subspecies | rank | ref | oxygen_tolerance | source | lpsn | lpsn_parent | lpsn_renamed_to | mycobank | mycobank_parent | mycobank_renamed_to | gbif | gbif_parent | gbif_renamed_to | prevalence | snomed |
|:-----------------:|:--------------------------:|:--------:|:--------:|:--------------:|:-------------------:|:----------------:|:------------------:|:-----------:|:--------------:|:----------:|:----------:|:-----------------------:|:---------------------------:|:------:|:------:|:-----------:|:---------------:|:--------:|:---------------:|:-------------------:|:--------:|:-----------:|:---------------:|:----------:|:-----------------------------------------:|
| B_ESCHR | Escherichia | accepted | Bacteria | Pseudomonadota | Gammaproteobacteria | Enterobacterales | Enterobacteriaceae | Escherichia | | | genus | Castellani et al., 1919 | facultative anaerobe | LPSN | 515602 | 482 | | | | | | 11158430 | | 1 | 407310004, 407251000, 407281008, … |
| B_ESCHR_ADCR | Escherichia adecarboxylata | synonym | Bacteria | Pseudomonadota | Gammaproteobacteria | Enterobacterales | Enterobacteriaceae | Escherichia | adecarboxylata | | species | Leclerc, 1962 | likely facultative anaerobe | LPSN | 776052 | 515602 | 777447 | | | | | | | 1 | |
| B_ESCHR_ALBR | Escherichia albertii | accepted | Bacteria | Pseudomonadota | Gammaproteobacteria | Enterobacterales | Enterobacteriaceae | Escherichia | albertii | | species | Huys et al., 2003 | facultative anaerobe | LPSN | 776053 | 515602 | | | | | 5427575 | | | 1 | 419388003 |
| B_ESCHR_BLTT | Escherichia blattae | synonym | Bacteria | Pseudomonadota | Gammaproteobacteria | Enterobacterales | Enterobacteriaceae | Escherichia | blattae | | species | Burgess et al., 1973 | likely facultative anaerobe | LPSN | 776056 | 515602 | 788468 | | | | | | | 1 | |
| B_ESCHR_COLI | Escherichia coli | accepted | Bacteria | Pseudomonadota | Gammaproteobacteria | Enterobacterales | Enterobacteriaceae | Escherichia | coli | | species | Castellani et al., 1919 | facultative anaerobe | LPSN | 776057 | 515602 | | | | | 11286021 | | | 1 | 1095001000112106, 715307006, 737528008, … |
| B_ESCHR_COLI_COLI | Escherichia coli coli | accepted | Bacteria | Pseudomonadota | Gammaproteobacteria | Enterobacterales | Enterobacteriaceae | Escherichia | coli | coli | subspecies | | | GBIF | | 776057 | | | | | 12233256 | 11286021 | | 1 | |
| mo | fullname | status | kingdom | phylum | class | order | family | genus | species | subspecies | rank | ref | oxygen_tolerance | source | lpsn | lpsn_parent | lpsn_renamed_to | mycobank | mycobank_parent | mycobank_renamed_to | gbif | gbif_parent | gbif_renamed_to | prevalence | snomed |
|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|
| B_ESCHR | Escherichia | accepted | Bacteria | Pseudomonadota | Gammaproteobacteria | Enterobacterales | Enterobacteriaceae | Escherichia | | | genus | Castellani et al., 1919 | facultative anaerobe | LPSN | 515602 | 482 | | | | | | 11158430 | | 1 | 407310004, 407251000, 407281008, … |
| B_ESCHR_ADCR | Escherichia adecarboxylata | synonym | Bacteria | Pseudomonadota | Gammaproteobacteria | Enterobacterales | Enterobacteriaceae | Escherichia | adecarboxylata | | species | Leclerc, 1962 | likely facultative anaerobe | LPSN | 776052 | 515602 | 777447 | | | | | | | 1 | |
| B_ESCHR_ALBR | Escherichia albertii | accepted | Bacteria | Pseudomonadota | Gammaproteobacteria | Enterobacterales | Enterobacteriaceae | Escherichia | albertii | | species | Huys et al., 2003 | facultative anaerobe | LPSN | 776053 | 515602 | | | | | 5427575 | | | 1 | 419388003 |
| B_ESCHR_BLTT | Escherichia blattae | synonym | Bacteria | Pseudomonadota | Gammaproteobacteria | Enterobacterales | Enterobacteriaceae | Escherichia | blattae | | species | Burgess et al., 1973 | likely facultative anaerobe | LPSN | 776056 | 515602 | 788468 | | | | | | | 1 | |
| B_ESCHR_COLI | Escherichia coli | accepted | Bacteria | Pseudomonadota | Gammaproteobacteria | Enterobacterales | Enterobacteriaceae | Escherichia | coli | | species | Castellani et al., 1919 | facultative anaerobe | LPSN | 776057 | 515602 | | | | | 11286021 | | | 1 | 1095001000112106, 715307006, 737528008, … |
| B_ESCHR_COLI_COLI | Escherichia coli coli | accepted | Bacteria | Pseudomonadota | Gammaproteobacteria | Enterobacterales | Enterobacteriaceae | Escherichia | coli | coli | subspecies | | | GBIF | | 776057 | | | | | 12233256 | 11286021 | | 1 | |
------------------------------------------------------------------------
@@ -134,14 +134,14 @@ as comma separated values.
**Example content**
| ab | cid | name | group | atc | atc_group1 | atc_group2 | abbreviations | synonyms | oral_ddd | oral_units | iv_ddd | iv_units | loinc |
|:---:|:--------:|:---------------------------:|:----------------------------------------------:|:------------------------------:|:-------------------------------------------:|:------------------------------------------------------------:|:-------------------:|:-------------------------------------------------------:|:--------:|:----------:|:------:|:--------:|:------------------------------:|
| AMK | 37768 | Amikacin | Aminoglycosides | D06AX12, J01GB06, QD06AX12, … | Aminoglycoside antibacterials | Other aminoglycosides | ak, ami, amik, … | amikacillin, amikacina, amikacine, … | | | 1.0 | g | 101493-5, 11-7, 12-5, … |
| AMX | 33613 | Amoxicillin | Aminopenicillins, Penicillins, Beta-lactams | J01CA04, QG51AA03, QJ01CA04 | Beta-lactam antibacterials, penicillins | Penicillins with extended spectrum | ac, amox, amoxic, … | acuotricina, alfamox, alfida, … | 1.5 | g | 3.0 | g | 101498-4, 15-8, 16-6, … |
| AMC | 23665637 | Amoxicillin/clavulanic acid | Aminopenicillins, Penicillins, Beta-lactams, … | J01CR02, QJ01CR02 | Beta-lactam antibacterials, penicillins | Combinations of penicillins, incl. beta-lactamase inhibitors | a/c, amcl, aml, … | amocla, amoclan, amoclav, … | 1.5 | g | 3.0 | g | |
| AMP | 6249 | Ampicillin | Aminopenicillins, Penicillins, Beta-lactams | J01CA01, QJ01CA01, QJ51CA01, … | Beta-lactam antibacterials, penicillins | Penicillins with extended spectrum | am, amp, amp100, … | adobacillin, alpen, amblosin, … | 2.0 | g | 6.0 | g | 101477-8, 101478-6, 18864-9, … |
| AZM | 447043 | Azithromycin | Macrolides | J01FA10, QJ01FA10, QS01AA26, … | Macrolides, lincosamides and streptogramins | Macrolides | az, azi, azit, … | aritromicina, aruzilina, azasite, … | 0.3 | g | 0.5 | g | 100043-9, 16420-2, 16421-0, … |
| PEN | 5904 | Benzylpenicillin | Penicillins, Beta-lactams | J01CE01, QJ01CE01, QJ51CE01, … | Combinations of antibacterials | Combinations of antibacterials | bepe, pen, peni, … | bencilpenicilina, benzopenicillin, benzylpenicilline, … | | | 3.6 | g | |
| ab | cid | name | group | atc | atc_group1 | atc_group2 | abbreviations | synonyms | oral_ddd | oral_units | iv_ddd | iv_units | loinc |
|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|
| AMK | 37768 | Amikacin | Aminoglycosides | D06AX12, J01GB06, QD06AX12, … | Aminoglycoside antibacterials | Other aminoglycosides | ak, ami, amik, … | amikacillin, amikacina, amikacine, … | | | 1.0 | g | 101493-5, 11-7, 12-5, … |
| AMX | 33613 | Amoxicillin | Aminopenicillins, Penicillins, Beta-lactams | J01CA04, QG51AA03, QJ01CA04 | Beta-lactam antibacterials, penicillins | Penicillins with extended spectrum | ac, amox, amoxic, … | acuotricina, alfamox, alfida, … | 1.5 | g | 3.0 | g | 101498-4, 15-8, 16-6, … |
| AMC | 23665637 | Amoxicillin/clavulanic acid | Aminopenicillins, Penicillins, Beta-lactams, … | J01CR02, QJ01CR02 | Beta-lactam antibacterials, penicillins | Combinations of penicillins, incl. beta-lactamase inhibitors | a/c, amcl, aml, … | amocla, amoclan, amoclav, … | 1.5 | g | 3.0 | g | |
| AMP | 6249 | Ampicillin | Aminopenicillins, Penicillins, Beta-lactams | J01CA01, QJ01CA01, QJ51CA01, … | Beta-lactam antibacterials, penicillins | Penicillins with extended spectrum | am, amp, amp100, … | adobacillin, alpen, amblosin, … | 2.0 | g | 6.0 | g | 101477-8, 101478-6, 18864-9, … |
| AZM | 447043 | Azithromycin | Macrolides | J01FA10, QJ01FA10, QS01AA26, … | Macrolides, lincosamides and streptogramins | Macrolides | az, azi, azit, … | aritromicina, aruzilina, azasite, … | 0.3 | g | 0.5 | g | 100043-9, 16420-2, 16421-0, … |
| PEN | 5904 | Benzylpenicillin | Penicillins, Beta-lactams | J01CE01, QJ01CE01, QJ51CE01, … | Combinations of antibacterials | Combinations of antibacterials | bepe, pen, peni, … | bencilpenicilina, benzopenicillin, benzylpenicilline, … | | | 3.6 | g | |
------------------------------------------------------------------------
@@ -186,14 +186,14 @@ here](https://amr-for-r.org/reference/clinical_breakpoints.html).
**Example content**
| guideline | type | host | method | site | mo | mo_name | rank_index | ab | ab_name | ref_tbl | disk_dose | breakpoint_S | breakpoint_R | uti | is_SDD |
|:-----------:|:-----:|:-----:|:------:|:----:|:-------------:|:--------------------------:|:----------:|:---:|:-----------------------------:|:---------------:|:--------------:|:------------:|:------------:|:-----:|:------:|
| EUCAST 2026 | human | human | DISK | | B_ACHRMB_XYLS | Achromobacter xylosoxidans | 2 | MEM | Meropenem | A. xylosoxidans | 10 mcg | 26.000 | 20.000 | FALSE | FALSE |
| EUCAST 2026 | human | human | MIC | | B_ACHRMB_XYLS | Achromobacter xylosoxidans | 2 | MEM | Meropenem | A. xylosoxidans | | 1.000 | 4.000 | FALSE | FALSE |
| EUCAST 2026 | human | human | DISK | | B_ACHRMB_XYLS | Achromobacter xylosoxidans | 2 | SXT | Trimethoprim/sulfamethoxazole | A. xylosoxidans | 1.25/23.75 mcg | 26.000 | 26.000 | FALSE | FALSE |
| EUCAST 2026 | human | human | MIC | | B_ACHRMB_XYLS | Achromobacter xylosoxidans | 2 | SXT | Trimethoprim/sulfamethoxazole | A. xylosoxidans | | 0.125 | 0.125 | FALSE | FALSE |
| EUCAST 2026 | human | human | DISK | | B_ACHRMB_XYLS | Achromobacter xylosoxidans | 2 | TZP | Piperacillin/tazobactam | A. xylosoxidans | 30/6 mcg | 26.000 | 26.000 | FALSE | FALSE |
| EUCAST 2026 | human | human | MIC | | B_ACHRMB_XYLS | Achromobacter xylosoxidans | 2 | TZP | Piperacillin/tazobactam | A. xylosoxidans | | 4.000 | 4.000 | FALSE | FALSE |
| guideline | type | host | method | site | mo | mo_name | rank_index | ab | ab_name | ref_tbl | disk_dose | breakpoint_S | breakpoint_R | uti | is_SDD |
|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|
| EUCAST 2026 | human | human | DISK | | B_ACHRMB_XYLS | Achromobacter xylosoxidans | 2 | MEM | Meropenem | A. xylosoxidans | 10 mcg | 26.000 | 20.000 | FALSE | FALSE |
| EUCAST 2026 | human | human | MIC | | B_ACHRMB_XYLS | Achromobacter xylosoxidans | 2 | MEM | Meropenem | A. xylosoxidans | | 1.000 | 4.000 | FALSE | FALSE |
| EUCAST 2026 | human | human | DISK | | B_ACHRMB_XYLS | Achromobacter xylosoxidans | 2 | SXT | Trimethoprim/sulfamethoxazole | A. xylosoxidans | 1.25/23.75 mcg | 26.000 | 26.000 | FALSE | FALSE |
| EUCAST 2026 | human | human | MIC | | B_ACHRMB_XYLS | Achromobacter xylosoxidans | 2 | SXT | Trimethoprim/sulfamethoxazole | A. xylosoxidans | | 0.125 | 0.125 | FALSE | FALSE |
| EUCAST 2026 | human | human | DISK | | B_ACHRMB_XYLS | Achromobacter xylosoxidans | 2 | TZP | Piperacillin/tazobactam | A. xylosoxidans | 30/6 mcg | 26.000 | 26.000 | FALSE | FALSE |
| EUCAST 2026 | human | human | MIC | | B_ACHRMB_XYLS | Achromobacter xylosoxidans | 2 | TZP | Piperacillin/tazobactam | A. xylosoxidans | | 4.000 | 4.000 | FALSE | FALSE |
------------------------------------------------------------------------
@@ -236,14 +236,14 @@ here](https://amr-for-r.org/reference/microorganisms.groups.html).
**Example content**
| mo_group | mo | mo_group_name | mo_name |
|:--------------:|:------------:|:-------------------------------:|:---------------------------:|
| B_ACNTB_BMNN-C | B_ACNTB_BMNN | Acinetobacter baumannii complex | Acinetobacter baumannii |
| mo_group | mo | mo_group_name | mo_name |
|:--:|:--:|:--:|:--:|
| B_ACNTB_BMNN-C | B_ACNTB_BMNN | Acinetobacter baumannii complex | Acinetobacter baumannii |
| B_ACNTB_BMNN-C | B_ACNTB_CLCC | Acinetobacter baumannii complex | Acinetobacter calcoaceticus |
| B_ACNTB_BMNN-C | B_ACNTB_LCTC | Acinetobacter baumannii complex | Acinetobacter dijkshoorniae |
| B_ACNTB_BMNN-C | B_ACNTB_NSCM | Acinetobacter baumannii complex | Acinetobacter nosocomialis |
| B_ACNTB_BMNN-C | B_ACNTB_PITT | Acinetobacter baumannii complex | Acinetobacter pittii |
| B_ACNTB_BMNN-C | B_ACNTB_SFRT | Acinetobacter baumannii complex | Acinetobacter seifertii |
| B_ACNTB_BMNN-C | B_ACNTB_NSCM | Acinetobacter baumannii complex | Acinetobacter nosocomialis |
| B_ACNTB_BMNN-C | B_ACNTB_PITT | Acinetobacter baumannii complex | Acinetobacter pittii |
| B_ACNTB_BMNN-C | B_ACNTB_SFRT | Acinetobacter baumannii complex | Acinetobacter seifertii |
------------------------------------------------------------------------
@@ -394,14 +394,14 @@ here](https://amr-for-r.org/reference/dosage.html).
**Example content**
| ab | name | type | dose | dose_times | administration | notes | original_txt | eucast_version |
|:---:|:-----------:|:-----------------:|:-----------:|:----------:|:--------------:|:-----:|:------------------:|:--------------:|
| AMK | Amikacin | standard_dosage | 25-30 mg/kg | 1 | iv | | 25-30 mg/kg x 1 iv | 15 |
| AMX | Amoxicillin | high_dosage | 2 g | 6 | iv | | 2 g x 6 iv | 15 |
| AMX | Amoxicillin | standard_dosage | 1 g | 3 | iv | | 1 g x 3-4 iv | 15 |
| AMX | Amoxicillin | high_dosage | 0.75-1 g | 3 | oral | | 0.75-1 g x 3 oral | 15 |
| AMX | Amoxicillin | standard_dosage | 0.5 g | 3 | oral | | 0.5 g x 3 oral | 15 |
| AMX | Amoxicillin | uncomplicated_uti | 0.5 g | 3 | oral | | 0.5 g x 3 oral | 15 |
| ab | name | type | dose | dose_times | administration | notes | original_txt | eucast_version |
|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|
| AMK | Amikacin | standard_dosage | 25-30 mg/kg | 1 | iv | | 25-30 mg/kg x 1 iv | 15 |
| AMX | Amoxicillin | high_dosage | 2 g | 6 | iv | | 2 g x 6 iv | 15 |
| AMX | Amoxicillin | standard_dosage | 1 g | 3 | iv | | 1 g x 3-4 iv | 15 |
| AMX | Amoxicillin | high_dosage | 0.75-1 g | 3 | oral | | 0.75-1 g x 3 oral | 15 |
| AMX | Amoxicillin | standard_dosage | 0.5 g | 3 | oral | | 0.5 g x 3 oral | 15 |
| AMX | Amoxicillin | uncomplicated_uti | 0.5 g | 3 | oral | | 0.5 g x 3 oral | 15 |
------------------------------------------------------------------------
@@ -424,14 +424,14 @@ here](https://amr-for-r.org/reference/example_isolates.html).
**Example content**
| date | patient | age | gender | ward | mo | PEN | OXA | FLC | AMX | AMC | AMP | TZP | CZO | FEP | CXM | FOX | CTX | CAZ | CRO | GEN | TOB | AMK | KAN | TMP | SXT | NIT | FOS | LNZ | CIP | MFX | VAN | TEC | TCY | TGC | DOX | ERY | CLI | AZM | IPM | MEM | MTR | CHL | COL | MUP | RIF |
|:----------:|:-------:|:---:|:------:|:--------:|:------------:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| 2002-01-02 | A77334 | 65 | F | Clinical | B_ESCHR_COLI | R | | | | I | | | | | I | | | | | | | | | R | R | | | R | | | R | R | R | | | R | R | R | | | | | | | R |
| 2002-01-03 | A77334 | 65 | F | Clinical | B_ESCHR_COLI | R | | | | I | | | | | I | | | | | | | | | R | R | | | R | | | R | R | R | | | R | R | R | | | | | | | R |
| 2002-01-07 | 067927 | 45 | F | ICU | B_STPHY_EPDR | R | | R | | | | | | | R | | | R | | | | | | S | S | | | | | | S | | S | S | S | R | | R | | | | | R | | |
| 2002-01-07 | 067927 | 45 | F | ICU | B_STPHY_EPDR | R | | R | | | | | | | R | | | R | | | | | | S | S | | | | | | S | | S | S | S | R | | R | | | | | R | | |
| 2002-01-13 | 067927 | 45 | F | ICU | B_STPHY_EPDR | R | | R | | | | | | | R | | | R | | | | | | R | | | | | | | S | | S | S | S | R | | R | | | | | R | | |
| 2002-01-13 | 067927 | 45 | F | ICU | B_STPHY_EPDR | R | | R | | | | | | | R | | | R | | | | | | R | | | | | | | S | | S | S | S | R | R | R | | | | | R | | |
| date | patient | age | gender | ward | mo | PEN | OXA | FLC | AMX | AMC | AMP | TZP | CZO | FEP | CXM | FOX | CTX | CAZ | CRO | GEN | TOB | AMK | KAN | TMP | SXT | NIT | FOS | LNZ | CIP | MFX | VAN | TEC | TCY | TGC | DOX | ERY | CLI | AZM | IPM | MEM | MTR | CHL | COL | MUP | RIF |
|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|
| 2002-01-02 | A77334 | 65 | F | Clinical | B_ESCHR_COLI | R | | | | I | | | | | I | | | | | | | | | R | R | | | R | | | R | R | R | | | R | R | R | | | | | | | R |
| 2002-01-03 | A77334 | 65 | F | Clinical | B_ESCHR_COLI | R | | | | I | | | | | I | | | | | | | | | R | R | | | R | | | R | R | R | | | R | R | R | | | | | | | R |
| 2002-01-07 | 067927 | 45 | F | ICU | B_STPHY_EPDR | R | | R | | | | | | | R | | | R | | | | | | S | S | | | | | | S | | S | S | S | R | | R | | | | | R | | |
| 2002-01-07 | 067927 | 45 | F | ICU | B_STPHY_EPDR | R | | R | | | | | | | R | | | R | | | | | | S | S | | | | | | S | | S | S | S | R | | R | | | | | R | | |
| 2002-01-13 | 067927 | 45 | F | ICU | B_STPHY_EPDR | R | | R | | | | | | | R | | | R | | | | | | R | | | | | | | S | | S | S | S | R | | R | | | | | R | | |
| 2002-01-13 | 067927 | 45 | F | ICU | B_STPHY_EPDR | R | | R | | | | | | | R | | | R | | | | | | R | | | | | | | S | | S | S | S | R | R | R | | | | | R | | |
------------------------------------------------------------------------
@@ -555,11 +555,11 @@ contain the trade names and LOINC codes as comma separated values.
**Example content**
| av | name | atc | cid | atc_group | synonyms | oral_ddd | oral_units | iv_ddd | iv_units | loinc |
|:---:|:------------------:|:-------:|:---------:|:------------------------------------------------------------------:|:-----------------------------------------------------:|:--------:|:----------:|:------:|:--------:|:----------------------------:|
| ABA | Abacavir | J05AF06 | 441300 | Nucleoside and nucleotide reverse transcriptase inhibitors | abacavir sulfate, avacavir, ziagen | 0.6 | g | | | 29113-8, 30273-7, 30287-7, … |
| ACI | Aciclovir | J05AB01 | 135398513 | Nucleosides and nucleotides excl. reverse transcriptase inhibitors | acicloftal, aciclovier, aciclovirum, … | 4.0 | g | 4 | g | |
| ADD | Adefovir dipivoxil | J05AF08 | 60871 | Nucleoside and nucleotide reverse transcriptase inhibitors | adefovir di, adefovir di ester, adefovir dipivoxyl, … | 10.0 | mg | | | |
| AME | Amenamevir | J05AX26 | 11397521 | Other antivirals | amenalief | 0.4 | g | | | |
| AMP | Amprenavir | J05AE05 | 65016 | Protease inhibitors | agenerase, carbamate, prozei | 1.2 | g | | | 29114-6, 30296-8, 30297-6, … |
| ASU | Asunaprevir | J05AP06 | 16076883 | Antivirals for treatment of HCV infections | sunvepra, sunvepratrade | 0.2 | g | | | |
| av | name | atc | cid | atc_group | synonyms | oral_ddd | oral_units | iv_ddd | iv_units | loinc |
|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|
| ABA | Abacavir | J05AF06 | 441300 | Nucleoside and nucleotide reverse transcriptase inhibitors | abacavir sulfate, avacavir, ziagen | 0.6 | g | | | 29113-8, 30273-7, 30287-7, … |
| ACI | Aciclovir | J05AB01 | 135398513 | Nucleosides and nucleotides excl. reverse transcriptase inhibitors | acicloftal, aciclovier, aciclovirum, … | 4.0 | g | 4 | g | |
| ADD | Adefovir dipivoxil | J05AF08 | 60871 | Nucleoside and nucleotide reverse transcriptase inhibitors | adefovir di, adefovir di ester, adefovir dipivoxyl, … | 10.0 | mg | | | |
| AME | Amenamevir | J05AX26 | 11397521 | Other antivirals | amenalief | 0.4 | g | | | |
| AMP | Amprenavir | J05AE05 | 65016 | Protease inhibitors | agenerase, carbamate, prozei | 1.2 | g | | | 29114-6, 30296-8, 30297-6, … |
| ASU | Asunaprevir | J05AP06 | 16076883 | Antivirals for treatment of HCV infections | sunvepra, sunvepratrade | 0.2 | g | | | |

View File

@@ -7,7 +7,7 @@
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9052</small>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">3.0.1.9053</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">