1
0
mirror of https://github.com/msberends/AMR.git synced 2026-07-17 19:50:55 +02:00

20 Commits

Author SHA1 Message Date
c4069da61f (v3.0.1.9085) website 2026-07-09 21:05:33 +02:00
9237bfbc19 (v3.0.1.9084) Fix breakpoint infer rules 2026-07-09 17:14:59 +02:00
ea996c8361 (v3.0.1.9083) website 2026-07-03 19:41:16 +02:00
65445bcfbe (v3.0.1.9082) website 2026-07-03 19:11:40 +02:00
e23d7b4c45 (v3.0.1.9081) fix mo 2026-06-27 15:33:08 +02:00
Matthijs Berends
518425311e (v3.0.1.9080) fix(as.mo): resolve abbreviated genus when species has subspecies (#288 follow-up) (#301)
When a genus+species abbreviation like "P. ovale" was used, the previous
bypass (Issue #288) checked sum(sp_exact) == 1, which failed if the species
also had subspecies sharing the epithet (ovale curtisi, ovale wallikeri).
The fix extends the bypass to fire whenever all exact species matches belong
to one genus, collapsing to the species-rank record (subspecies == "") for
genus+species queries and preserving the chosen row for explicit subspecies
queries.

Also extends the data-invariant test to cover all taxonomic rank columns
from domain to subspecies, not just the terminal three.


Claude-Session: https://claude.ai/code/session_01M4fqQYQYJ3drdudkDYNqAY

Co-authored-by: Claude <noreply@anthropic.com>
2026-06-27 15:20:38 +02:00
Matthijs Berends
03be4b87fc (v3.0.1.9079) docs: rename remaining 'antibiotic selectors'/'AB selectors' to 'antimicrobial selectors'/'AMR selectors'
* docs: rename remaining 'antibiotic selectors'/'AB selectors' to 'antimicrobial selectors'/'AMR selectors'

Five leftover occurrences of the old terminology updated in the AMR
vignette (section heading + code comment), the amr_selectors test file,
and two roxygen example comments in amr_selectors.R. The auto-generated
man/antimicrobial_selectors.Rd will update on the next devtools::document() run.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0169LucQ7SHDLHdTnDs1ENhd

* fix

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-06-27 14:31:58 +02:00
Matthijs Berends
12cabca29d (v3.0.1.9076) fix: normalise year-qualified AMR_guideline option in all affected functions 2026-06-27 13:53:25 +02:00
Matthijs Berends
f7d353361c improve top_n_microorganisms(): add property_for_each, fix property=NULL, enforce rank order (#297) 2026-06-26 21:40:11 +02:00
Matthijs Berends
02bd9a71c1 (v3.0.1.9076) document Python installation channels and enforce_method in vignette (#296) 2026-06-26 15:03:07 +02:00
5f6372342e (v3.0.1.9075) another go 2026-06-26 12:06:12 +02:00
3c17679382 (v3.0.1.9074) You go girl 2026-06-26 11:58:38 +02:00
4ca7fdf3d4 (v3.0.1.9073) yet another go 2026-06-26 11:51:08 +02:00
6edae2037a (v3.0.1.9072) fix py again 2026-06-26 11:47:11 +02:00
61e1fbf1e0 (v3.0.1.9071) fix python wrapper 2026-06-26 11:35:30 +02:00
637ada920b (v3.0.1.9070) Fix #293, update EUCAST rules for PEF 2026-06-26 08:56:59 +02:00
4fac683fac (v3.0.1.9069) fix Python wrapper 2026-06-24 20:27:39 +02:00
b6c1c26a5d (v3.0.1.9068) todo tracker update 2026-06-24 20:01:25 +02:00
935071ae01 (v3.0.1.9067) todo tracker update 2026-06-24 19:43:02 +02:00
a88150ca4a (v3.0.1.9066) fix documentation 2026-06-24 19:34:47 +02:00
53 changed files with 1263 additions and 2078 deletions

View File

@@ -49,7 +49,7 @@ jobs:
# Test all old versions of R >= 3.0, we support them all! # Test all old versions of R >= 3.0, we support them all!
# For these old versions, dependencies and vignettes will not be checked. # For these old versions, dependencies and vignettes will not be checked.
# For recent R versions, see check-recent.yaml (r-lib and tidyverse support the latest 5 major R releases). # For recent R versions, see check-recent.yaml (r-lib and tidyverse support the latest 5 major R releases).
- {os: ubuntu-latest, r: '3.6', allowfail: false} # - {os: ubuntu-latest, r: '3.6', allowfail: false}
# - {os: windows-latest, r: '3.5', allowfail: false} # always fails, horrible with UTF-8 # - {os: windows-latest, r: '3.5', allowfail: false} # always fails, horrible with UTF-8
# - {os: ubuntu-latest, r: '3.4', allowfail: false} # 3.1-3.4 now always fails with Error in grep(warn_re, lines, invert = TRUE, value = TRUE) attempt to set index 46/46 in SET_STRING_ELT # - {os: ubuntu-latest, r: '3.4', allowfail: false} # 3.1-3.4 now always fails with Error in grep(warn_re, lines, invert = TRUE, value = TRUE) attempt to set index 46/46 in SET_STRING_ELT
# - {os: ubuntu-latest, r: '3.3', allowfail: false} # - {os: ubuntu-latest, r: '3.3', allowfail: false}

View File

@@ -29,7 +29,6 @@
on: on:
push: push:
# only on main
branches: "main" branches: "main"
name: Update TODO Tracker name: Update TODO Tracker
@@ -40,39 +39,227 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with:
fetch-depth: 0 # full history required for git blame
- name: Generate TODO list from R/ - name: Generate TODO report
env:
GH_TOKEN: ${{ secrets.GH_REPO_SCOPE }}
run: | run: |
set -euo pipefail
export TZ=Europe/Amsterdam export TZ=Europe/Amsterdam
last_updated=$(date +"%e %B %Y %H:%M:%S %Z" | sed 's/^ *//')
echo "## \`TODO\` Report" > todo.md REPO="msberends/AMR"
echo "" >> todo.md REPO_URL="https://github.com/$REPO/blob/main"
echo "**Last Updated: ${last_updated}**" >> todo.md NOW=$(date +%s)
echo "" >> todo.md LAST_UPDATED=$(date +"%e %B %Y %H:%M:%S %Z" | sed 's/^ *//')
echo "_This overview is automatically updated on each push to \`main\`. It provides an automated overview of all mentions of the text \`TODO\`._" >> todo.md STALE_DAYS=180
echo "" >> todo.md
todos=$(grep -rn --include=\*.{R,Rmd,yaml,yml,md,css,js} --exclude={todo-tracker.yml,todo.md} "TODO" . || true) # ── helper: human-readable age ──────────────────────────────
if [ -z "$todos" ]; then format_age() {
echo "✅ No TODOs found." >> todo.md local d=$1
else if [ "$d" -lt 0 ] 2>/dev/null; then echo "unknown"; return; fi
echo "$todos" | awk -F: -v repo="https://github.com/msberends/AMR/blob/main/" ' local y=$((d / 365)) m=$(( (d % 365) / 30 ))
{ if [ "$y" -gt 0 ] && [ "$m" -gt 0 ]; then echo "${y}y ${m}m"
file = $1 elif [ "$y" -gt 0 ]; then echo "${y}y"
gsub("^\\./", "", file) # remove leading ./ if present elif [ "$m" -gt 0 ]; then echo "${m}m"
line = $2 else echo "${d}d"
text = substr($0, index($0,$3))
if (file != last_file) {
if (last_file != "") print "```"
print ""
print "### [`" file "`](" repo file ")"
print "```r"
last_file = file
}
printf "L%s: %s\n", line, text
}
' >> todo.md
echo "\`\`\`" >> todo.md
fi fi
}
export -f format_age
# ── step 1: find all markers ────────────────────────────────
grep -rn \
--include='*.R' --include='*.Rmd' --include='*.yaml' \
--include='*.yml' --include='*.md' --include='*.css' \
--include='*.js' \
--exclude='todo-tracker.yml' --exclude='todo.md' \
-E '\b(TODO|FIXME|HACK|XXX)\b' . > /tmp/raw.txt || true
if [ ! -s /tmp/raw.txt ]; then
echo -e "## \`TODO\` Report\n\n**Last Updated: ${LAST_UPDATED}**\n\nNo markers found." > todo.md
exit 0
fi
# ── step 2: enrich with git blame & extract issue refs ──────
> /tmp/enriched.tsv
> /tmp/issues_seen.txt
while IFS= read -r match; do
clean=$(printf '%s\n' "$match" | sed 's|^\./||')
file=$(printf '%s\n' "$clean" | cut -d: -f1)
lineno=$(printf '%s\n' "$clean" | cut -d: -f2)
text=$(printf '%s\n' "$clean" | cut -d: -f3-)
# determine marker type (first match wins, TODO is default)
marker="TODO"
for m in FIXME HACK XXX; do
if printf '%s\n' "$text" | grep -qw "$m"; then marker="$m"; break; fi
done
# git blame timestamp
blame_ts=$(git blame -L "${lineno},${lineno}" --porcelain -- "$file" 2>/dev/null \
| awk '/^author-time/{print $2}' || echo "0")
blame_ts=${blame_ts:-0}
if [ "$blame_ts" -gt 0 ] 2>/dev/null; then
age_days=$(( (NOW - blame_ts) / 86400 ))
else
age_days=-1
fi
# extract issue references (#NNN)
issues=$(printf '%s\n' "$text" | grep -oE '#[0-9]+' | sed 's/#//' | tr '\n' ',' | sed 's/,$//' || true)
if [ -n "$issues" ]; then
for inum in $(echo "$issues" | tr ',' ' '); do
echo "$inum" >> /tmp/issues_seen.txt
done
fi
printf '%s\t%s\t%s\t%s\t%s\t%s\n' \
"$file" "$lineno" "$marker" "$age_days" "$issues" "$text" >> /tmp/enriched.tsv
done < /tmp/raw.txt
# ── step 3: query GitHub API for referenced issues ──────────
> /tmp/issue_info.tsv
if [ -s /tmp/issues_seen.txt ]; then
sort -un /tmp/issues_seen.txt | while read -r inum; do
info=$(gh api "/repos/$REPO/issues/$inum" \
--jq '"\(.state)\t\(.title)"' 2>/dev/null \
|| echo "unknown (could not fetch)")
printf '%s\t%s\n' "$inum" "$info" >> /tmp/issue_info.tsv
done
fi
# ── step 4: build the report ────────────────────────────────
{
# ── header ──
echo "## \`TODO\` Report"
echo ""
echo "**Last Updated: ${LAST_UPDATED}**"
echo ""
echo "_This overview is automatically updated on each push to \`main\`. It scans for \`TODO\`, \`FIXME\`, \`HACK\`, and \`XXX\` markers across the codebase._"
echo ""
# ── summary table ──
total=$(wc -l < /tmp/enriched.tsv | tr -d ' ')
files_affected=$(awk -F'\t' '{print $1}' /tmp/enriched.tsv | sort -u | wc -l | tr -d ' ')
todo_n=$(awk -F'\t' '$3=="TODO"' /tmp/enriched.tsv | wc -l | tr -d ' ')
fixme_n=$(awk -F'\t' '$3=="FIXME"' /tmp/enriched.tsv | wc -l | tr -d ' ')
hack_n=$(awk -F'\t' '$3=="HACK"' /tmp/enriched.tsv | wc -l | tr -d ' ')
xxx_n=$(awk -F'\t' '$3=="XXX"' /tmp/enriched.tsv | wc -l | tr -d ' ')
stale_n=$(awk -F'\t' -v s="$STALE_DAYS" '$4 > s' /tmp/enriched.tsv | wc -l | tr -d ' ')
linked_n=$(awk -F'\t' '$5 != ""' /tmp/enriched.tsv | wc -l | tr -d ' ')
unlinked_n=$(awk -F'\t' '$5 == ""' /tmp/enriched.tsv | wc -l | tr -d ' ')
# oldest marker
oldest_line=$(awk -F'\t' '$4 >= 0' /tmp/enriched.tsv | sort -t$'\t' -k4 -rn | head -1)
oldest_days=$(echo "$oldest_line" | cut -f4)
oldest_file=$(echo "$oldest_line" | cut -f1)
oldest_lineno=$(echo "$oldest_line" | cut -f2)
oldest_age=$(format_age "$oldest_days")
echo "### Summary"
echo ""
echo "| Metric | Value |"
echo "|:---|---:|"
echo "| Total markers | **${total}** |"
[ "$todo_n" -gt 0 ] && echo "| \`TODO\` | ${todo_n} |"
[ "$fixme_n" -gt 0 ] && echo "| \`FIXME\` | ${fixme_n} |"
[ "$hack_n" -gt 0 ] && echo "| \`HACK\` | ${hack_n} |"
[ "$xxx_n" -gt 0 ] && echo "| \`XXX\` | ${xxx_n} |"
echo "| Files affected | ${files_affected} |"
echo "| Stale (> 6 months) | ${stale_n} |"
echo "| Oldest marker | ${oldest_age}, \`${oldest_file}\` L${oldest_lineno} |"
echo "| Linked to issues | ${linked_n} |"
echo "| Unlinked (no issue ref) | ${unlinked_n} |"
echo ""
# ── by referenced issue ──
if [ -s /tmp/issue_info.tsv ]; then
echo "### By Referenced Issue"
echo ""
has_closed=false
while IFS=$'\t' read -r inum state title; do
count=$(awk -F'\t' -v n="$inum" '$5 ~ "(^|,)"n"(,|$)"' /tmp/enriched.tsv | wc -l | tr -d ' ')
[ "$state" = "closed" ] && has_closed=true
state_icon=""
[ "$state" = "closed" ] && state_icon=" :warning:"
echo "<details><summary><b>#${inum}</b> (${state}): <i>${title}</i> &mdash; ${count} marker(s)${state_icon}</summary>"
echo ""
awk -F'\t' -v n="$inum" '$5 ~ "(^|,)"n"(,|$)"' /tmp/enriched.tsv \
| while IFS=$'\t' read -r f l m d refs txt; do
age_str=$(format_age "$d")
flag=""
[ "$d" -gt "$STALE_DAYS" ] 2>/dev/null && flag=" :warning:"
# re-read the actual source line and trim leading/trailing whitespace
src_text=$(sed -n "${l}p" "$f" 2>/dev/null | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' || true)
echo "- [\`${f}\` L${l}](${REPO_URL}/${f}#L${l}) (${age_str} ago)${flag}"
[ -n "$src_text" ] && echo " \`${src_text}\`"
done
echo ""
echo "</details>"
echo ""
done < /tmp/issue_info.tsv
if [ "$has_closed" = true ]; then
echo "> **Warning:** some markers reference closed issues and may be stale."
echo ""
fi
fi
# ── by file ──
echo "### By File"
echo ""
prev_file=""
prev_lineno=-99
while IFS=$'\t' read -r file lineno marker age_days issues text; do
if [ "$file" != "$prev_file" ]; then
# close previous code block
if [ -n "$prev_file" ]; then
echo '```'
echo ""
fi
file_count=$(awk -F'\t' -v f="$file" '$1==f' /tmp/enriched.tsv | wc -l | tr -d ' ')
echo "#### [\`${file}\`](${REPO_URL}/${file}) &mdash; ${file_count} marker(s)"
echo '```r'
prev_lineno=-99
fi
# blank line between non-sequential lines (visual grouping)
if [ "$file" = "$prev_file" ] && [ $((lineno - prev_lineno)) -gt 1 ]; then
echo ""
fi
age_str=$(format_age "$age_days")
flag=""
[ "$age_days" -gt "$STALE_DAYS" ] 2>/dev/null && flag=" !!"
# re-read the actual source line to avoid TSV round-trip corruption
src_line=$(sed -n "${lineno}p" "$file" 2>/dev/null | sed 's/[[:space:]]*$//' || true)
printf 'L%s: %s ◁ %s ago%s\n' "$lineno" "$src_line" "$age_str" "$flag"
prev_file="$file"
prev_lineno="$lineno"
done < <(sort -t$'\t' -k1,1 -k2,2n /tmp/enriched.tsv)
# close final code block
if [ -n "$prev_file" ]; then
echo '```'
fi
} > todo.md
- name: Update GitHub issue - name: Update GitHub issue
uses: peter-evans/create-or-update-comment@v4 uses: peter-evans/create-or-update-comment@v4

1
.gitignore vendored
View File

@@ -22,6 +22,7 @@ vignettes/*.R
^CRAN-RELEASE$ ^CRAN-RELEASE$
packrat/lib*/ packrat/lib*/
packrat/src/ packrat/src/
*~$*
data-raw/taxa.txt data-raw/taxa.txt
data-raw/taxon.tab data-raw/taxon.tab
data-raw/CLSI*.pdf data-raw/CLSI*.pdf

View File

@@ -85,6 +85,27 @@ _pkgdown.yml # pkgdown website configuration
- `translate.R` — 28-language translation system - `translate.R` — 28-language translation system
- `ggplot_sir.R` / `ggplot_pca.R` / `plotting.R` — visualisation functions - `ggplot_sir.R` / `ggplot_pca.R` / `plotting.R` — visualisation functions
## Code Style
Follow the [tidyverse style guide](https://style.tidyverse.org/) precisely. Key rules:
- 2-space indentation; no tabs
- `<-` for assignment, not `=`
- Spaces around all binary operators and after commas; no spaces inside parentheses
- When a function call must break across lines, place the first argument on a new line indented by 2 spaces, and put the closing `)` on its own line — **never align arguments to the opening parenthesis** (no hanging/forced mid-line indentation)
```r
# good
stop_(
"some long message part one ",
"part two"
)
# bad — forces indentation to match the opening parenthesis
stop_("some long message part one ",
"part two")
```
## Custom S3 Classes ## Custom S3 Classes
The package defines five S3 classes with full print/format/plot/vctrs support: The package defines five S3 classes with full print/format/plot/vctrs support:

View File

@@ -1,6 +1,6 @@
Package: AMR Package: AMR
Version: 3.0.1.9065 Version: 3.0.1.9085
Date: 2026-06-24 Date: 2026-07-09
Title: Antimicrobial Resistance Data Analysis Title: Antimicrobial Resistance Data Analysis
Description: Functions to simplify and standardise antimicrobial resistance (AMR) Description: Functions to simplify and standardise antimicrobial resistance (AMR)
data analysis and to work with microbial and antimicrobial properties by data analysis and to work with microbial and antimicrobial properties by

View File

@@ -1,4 +1,4 @@
# AMR 3.0.1.9065 # AMR 3.0.1.9085
Planned as v3.1.0, end of June 2026. Planned as v3.1.0, end of June 2026.
@@ -20,6 +20,7 @@ Planned as v3.1.0, end of June 2026.
* New `wisca_plot()` to assess the susceptibility and incidence distributions from the Monte Carlo simulations * New `wisca_plot()` to assess the susceptibility and incidence distributions from the Monte Carlo simulations
### Fixed ### Fixed
* Setting `options(AMR_guideline = "EUCAST 2012")` or any year-qualified value no longer causes errors or silent wrong behaviour in `interpretive_rules()`, `resistance()`, `susceptibility()`, `count_resistant()`, `count_susceptible()`, and SIR plotting/printing functions (#298)
* `as.sir()` * `as.sir()`
* On data frames: already-converted SIR columns no longer dropped on re-run (#278) * On data frames: already-converted SIR columns no longer dropped on re-run (#278)
* Metadata columns (e.g. `patient`, `ward`) no longer misidentified as antibiotic columns * Metadata columns (e.g. `patient`, `ward`) no longer misidentified as antibiotic columns
@@ -31,12 +32,14 @@ Planned as v3.1.0, end of June 2026.
* `as.mo()`: * `as.mo()`:
* Input of the form `"X complex"` now falls back to `"X"` when the complex is not a distinct taxon in the database, preventing `NA` results for valid clinical descriptions such as `"Proteus vulgaris complex"` (#287) * Input of the form `"X complex"` now falls back to `"X"` when the complex is not a distinct taxon in the database, preventing `NA` results for valid clinical descriptions such as `"Proteus vulgaris complex"` (#287)
* Abbreviated-genus input (e.g. `"S. apiospermum"`) now correctly ranks candidates whose species epithet exactly matches the input above more-prevalent organisms whose species does not match; fixes `"S. apiospermum"` resolving to *Staphylococcus* instead of *Scedosporium apiospermum* (#288) * Abbreviated-genus input (e.g. `"S. apiospermum"`) now correctly ranks candidates whose species epithet exactly matches the input above more-prevalent organisms whose species does not match; fixes `"S. apiospermum"` resolving to *Staphylococcus* instead of *Scedosporium apiospermum* (#288)
* Abbreviated-genus input for species that have subspecies (e.g. `"P. ovale"`) now collapses to the species-rank record instead of incorrectly matching a more-prevalent organism; explicit subspecies queries (e.g. `"P. ovale curtisi"`) are preserved (#288)
* `get_author_year()` in the microorganism reproduction script now strips `emend.` and everything after it, so `ref` reflects the combination authority rather than the emendation author (e.g. *Rhodococcus equi* now returns "Goodfellow et al., 1977" instead of "Nouioui et al., 2018") * `get_author_year()` in the microorganism reproduction script now strips `emend.` and everything after it, so `ref` reflects the combination authority rather than the emendation author (e.g. *Rhodococcus equi* now returns "Goodfellow et al., 1977" instead of "Nouioui et al., 2018")
* BRMO classification now includes bacterial complexes (#275) * BRMO classification now includes bacterial complexes (#275)
* Translation fixes for Italian CoNS/CoPS names (#256), Dutch antimicrobials, and `sir_df()` foreign-language output (#272) * Translation fixes for Italian CoNS/CoPS names (#256), Dutch antimicrobials, and `sir_df()` foreign-language output (#272)
* Fixed some EUCAST Expert Rules, mostly on *S. pneumoniae* * Fixed some EUCAST Expert Rules, mostly on *S. pneumoniae*
### Updated ### Updated
* `top_n_microorganisms()`: new `property_for_each` argument for sub-grouping within top *n* groups; rank ordering enforced (only lower taxonomic ranks allowed); fixed `property = NULL` not being accepted; inner filter now tracks original row indices to prevent cross-group contamination
* Taxonomic update for all microorganisms, now updated to June 2026 * Taxonomic update for all microorganisms, now updated to June 2026
* `mo_kingdom()` now returns the formal taxonomic kingdom; a one-time note per session explains the change when querying bacterial or archaeal records. * `mo_kingdom()` now returns the formal taxonomic kingdom; a one-time note per session explains the change when querying bacterial or archaeal records.
* `mo_taxonomy()` and `mo_info()` gained `domain` for the list output * `mo_taxonomy()` and `mo_info()` gained `domain` for the list output
@@ -50,7 +53,8 @@ Planned as v3.1.0, end of June 2026.
* `antimicrobials$group` is now a `list`, so that drugs belonging to multiple groups are fully represented; use `ab_group(all_groups = TRUE)` to retrieve all groups for a drug (#246) * `antimicrobials$group` is now a `list`, so that drugs belonging to multiple groups are fully represented; use `ab_group(all_groups = TRUE)` to retrieve all groups for a drug (#246)
* Improved console messages with clickable links throughout, powered by `cli` if it is installed (#191, #265) * Improved console messages with clickable links throughout, powered by `cli` if it is installed (#191, #265)
* `as.disk()`: input validation is now more strict, rejecting values that are not recognisable as a numeric disk zone diameter * `as.disk()`: input validation is now more strict, rejecting values that are not recognisable as a numeric disk zone diameter
* `as.sir()` gains an `enforce_method` argument (`"auto"`, `"mic"`, or `"disk"`) to force the interpretation method when S3 class information is lost, e.g. when called from Python (#291)
* `AMR for Python` vignette: added sections on installation channels (stable CRAN vs. development GitHub via `AMR.beta`) and on using `enforce_method` in `as_sir()` from Python
# AMR 3.0.1 # AMR 3.0.1

View File

@@ -202,7 +202,7 @@
#' # data.table -------------------------------------------------------------- #' # data.table --------------------------------------------------------------
#' #'
#' # data.table is supported as well, just use it in the same way as with #' # data.table is supported as well, just use it in the same way as with
#' # base R, but add `with = FALSE` if using a single AB selector. #' # base R, but add `with = FALSE` if using a single AMR selector.
#' #'
#' if (require("data.table")) { #' if (require("data.table")) {
#' dt <- as.data.table(example_isolates) #' dt <- as.data.table(example_isolates)
@@ -215,7 +215,7 @@
#' dt[, carbapenems(), with = FALSE] #' dt[, carbapenems(), with = FALSE]
#' } #' }
#' #'
#' # for multiple selections or AB selectors, `with = FALSE` is not needed: #' # for multiple selections or AMR selectors, `with = FALSE` is not needed:
#' if (require("data.table")) { #' if (require("data.table")) {
#' dt[, c("mo", aminoglycosides())] #' dt[, c("mo", aminoglycosides())]
#' } #' }

View File

@@ -126,6 +126,11 @@ count_resistant <- function(...,
only_all_tested = FALSE, only_all_tested = FALSE,
guideline = getOption("AMR_guideline", "EUCAST")) { guideline = getOption("AMR_guideline", "EUCAST")) {
# other arguments for meet_criteria are handled by sir_calc() # other arguments for meet_criteria are handled by sir_calc()
if (guideline %like% "EUCAST") {
guideline <- "EUCAST"
} else if (guideline %like% "CLSI") {
guideline <- "CLSI"
}
meet_criteria(guideline, allow_class = "character", is_in = c("EUCAST", "CLSI"), has_length = 1) meet_criteria(guideline, allow_class = "character", is_in = c("EUCAST", "CLSI"), has_length = 1)
if (is.null(getOption("AMR_guideline")) && missing(guideline) && message_not_thrown_before("count_resistant", "eucast_default", entire_session = TRUE)) { if (is.null(getOption("AMR_guideline")) && missing(guideline) && message_not_thrown_before("count_resistant", "eucast_default", entire_session = TRUE)) {
message_("{.help [{.fun count_resistant}](AMR::count_resistant)} assumes the EUCAST guideline and thus considers the 'I' category susceptible. Set the {.arg guideline} argument or the {.code AMR_guideline} option to either \"CLSI\" or \"EUCAST\", see {.topic [AMR-options](AMR::AMR-options)}.") message_("{.help [{.fun count_resistant}](AMR::count_resistant)} assumes the EUCAST guideline and thus considers the 'I' category susceptible. Set the {.arg guideline} argument or the {.code AMR_guideline} option to either \"CLSI\" or \"EUCAST\", see {.topic [AMR-options](AMR::AMR-options)}.")
@@ -150,6 +155,11 @@ count_susceptible <- function(...,
only_all_tested = FALSE, only_all_tested = FALSE,
guideline = getOption("AMR_guideline", "EUCAST")) { guideline = getOption("AMR_guideline", "EUCAST")) {
# other arguments for meet_criteria are handled by sir_calc() # other arguments for meet_criteria are handled by sir_calc()
if (guideline %like% "EUCAST") {
guideline <- "EUCAST"
} else if (guideline %like% "CLSI") {
guideline <- "CLSI"
}
meet_criteria(guideline, allow_class = "character", is_in = c("EUCAST", "CLSI"), has_length = 1) meet_criteria(guideline, allow_class = "character", is_in = c("EUCAST", "CLSI"), has_length = 1)
if (is.null(getOption("AMR_guideline")) && missing(guideline) && message_not_thrown_before("count_susceptible", "eucast_default", entire_session = TRUE)) { if (is.null(getOption("AMR_guideline")) && missing(guideline) && message_not_thrown_before("count_susceptible", "eucast_default", entire_session = TRUE)) {
message_("{.help [{.fun count_susceptible}](AMR::count_susceptible)} assumes the EUCAST guideline and thus considers the 'I' category susceptible. Set the {.arg guideline} argument or the {.code AMR_guideline} option to either \"CLSI\" or \"EUCAST\", see {.topic [AMR-options](AMR::AMR-options)}.") message_("{.help [{.fun count_susceptible}](AMR::count_susceptible)} assumes the EUCAST guideline and thus considers the 'I' category susceptible. Set the {.arg guideline} argument or the {.code AMR_guideline} option to either \"CLSI\" or \"EUCAST\", see {.topic [AMR-options](AMR::AMR-options)}.")

View File

@@ -143,11 +143,10 @@
#' ### Manual additions #' ### Manual additions
#' For convenience, some entries were added manually: #' For convenience, some entries were added manually:
#' #'
#' - All `r format_included_data_number(length(which(microorganisms$rank == "species group")))` groups and complexes of the [microorganisms.groups] data set, for cross-reference (examples include beta-haemolytic *Streptococcus* groups A to K, coagulase-negative *Staphylococcus* (CoNS), *Mycobacterium tuberculosis* complex, etc.)
#' - `r format_included_data_number(microorganisms[which(microorganisms$source == "manually added" & microorganisms$genus == "Salmonella"), , drop = FALSE])` entries of *Salmonella*, such as the city-like serovars and groups A to H #' - `r format_included_data_number(microorganisms[which(microorganisms$source == "manually added" & microorganisms$genus == "Salmonella"), , drop = FALSE])` entries of *Salmonella*, such as the city-like serovars and groups A to H
#' - `r format_included_data_number(length(which(microorganisms$rank == "species group")))` species groups (such as the beta-haemolytic *Streptococcus* groups A to K, coagulase-negative *Staphylococcus* (CoNS), *Mycobacterium tuberculosis* complex, etc.), of which the group compositions are stored in the [microorganisms.groups] data set
#' - 1 entry of *Blastocystis* (*B. hominis*), although it officially does not exist (Noel *et al.* 2005, PMID 15634993) #' - 1 entry of *Blastocystis* (*B. hominis*), although it officially does not exist (Noel *et al.* 2005, PMID 15634993)
#' - 1 entry of *Moraxella* (*M. catarrhalis*), which was formally named *Branhamella catarrhalis* (Catlin, 1970) though this change was never accepted within the field of clinical microbiology #' - `r sum(microorganisms$fullname %like% "unknown")` other 'undefined' entries (unknown, unknown Gram-negatives, unknown Gram-positives, unknown yeast, unknown fungus, and unknown anaerobic Gram-pos/Gram-neg bacteria)
#' - 8 other 'undefined' entries (unknown, unknown Gram-negatives, unknown Gram-positives, unknown yeast, unknown fungus, and unknown anaerobic Gram-pos/Gram-neg bacteria)
#' #'
#' The syntax used to transform the original data to a cleansed \R format, can be [found here](https://github.com/msberends/AMR/blob/main/data-raw/_reproduction_scripts/reproduction_of_microorganisms.R). #' The syntax used to transform the original data to a cleansed \R format, can be [found here](https://github.com/msberends/AMR/blob/main/data-raw/_reproduction_scripts/reproduction_of_microorganisms.R).
#' @inheritSection AMR Download Our Reference Data #' @inheritSection AMR Download Our Reference Data

View File

@@ -110,13 +110,8 @@ format_eucast_version_nr <- function(version, markdown = TRUE) {
#' @references #' @references
#' - EUCAST Expert Rules. Version 2.0, 2012.\cr #' - EUCAST Expert Rules. Version 2.0, 2012.\cr
#' Leclercq et al. **EUCAST expert rules in antimicrobial susceptibility testing.** *Clin Microbiol Infect.* 2013;19(2):141-60; \doi{https://doi.org/10.1111/j.1469-0691.2011.03703.x} #' Leclercq et al. **EUCAST expert rules in antimicrobial susceptibility testing.** *Clin Microbiol Infect.* 2013;19(2):141-60; \doi{https://doi.org/10.1111/j.1469-0691.2011.03703.x}
#' - EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes Tables. Version 3.1, 2016. [(link)](https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/Expert_rules_intrinsic_exceptional_V3.1.pdf) #' - EUCAST Expected Phenotypes. [(link)](https://www.eucast.org/bacteria/important-additional-information/expected-phenotypes/)
#' - EUCAST Intrinsic Resistance and Unusual Phenotypes. Version 3.2, 2020. [(link)](https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/2020/Intrinsic_Resistance_and_Unusual_Phenotypes_Tables_v3.2_20200225.pdf) #' - EUCAST Breakpoint tables for interpretation of MICs and zone diameters. [(link)](https://www.eucast.org/bacteria/clinical-breakpoints-and-interpretation/clinical-breakpoint-tables/)
#' - EUCAST Intrinsic Resistance and Unusual Phenotypes. Version 3.3, 2021. [(link)](https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/2021/Intrinsic_Resistance_and_Unusual_Phenotypes_Tables_v3.3_20211018.pdf)
#' - EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 9.0, 2019. [(link)](https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_9.0_Breakpoint_Tables.xlsx)
#' - EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 10.0, 2020. [(link)](https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_10.0_Breakpoint_Tables.xlsx)
#' - EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 11.0, 2021. [(link)](https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_11.0_Breakpoint_Tables.xlsx)
#' - EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 12.0, 2022. [(link)](https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_12.0_Breakpoint_Tables.xlsx)
#' @inheritSection AMR Download Our Reference Data #' @inheritSection AMR Download Our Reference Data
#' @examples #' @examples
#' \donttest{ #' \donttest{
@@ -175,6 +170,11 @@ interpretive_rules <- function(x,
...) { ...) {
meet_criteria(x, allow_class = "data.frame") meet_criteria(x, allow_class = "data.frame")
meet_criteria(col_mo, allow_class = "character", has_length = 1, is_in = colnames(x), allow_NULL = TRUE) meet_criteria(col_mo, allow_class = "character", has_length = 1, is_in = colnames(x), allow_NULL = TRUE)
if (guideline %like% "EUCAST") {
guideline <- "EUCAST"
} else if (guideline %like% "CLSI") {
guideline <- "CLSI"
}
meet_criteria(guideline, allow_class = "character", has_length = 1, is_in = c("EUCAST", "CLSI")) meet_criteria(guideline, allow_class = "character", has_length = 1, is_in = c("EUCAST", "CLSI"))
meet_criteria(info, allow_class = "logical", has_length = 1) meet_criteria(info, allow_class = "logical", has_length = 1)
meet_criteria(rules, allow_class = "character", has_length = c(1, 2, 3, 4, 5, 6), is_in = c("breakpoints", "expected_phenotypes", "expert", "other", "all", "custom")) meet_criteria(rules, allow_class = "character", has_length = c(1, 2, 3, 4, 5, 6), is_in = c("breakpoints", "expected_phenotypes", "expert", "other", "all", "custom"))
@@ -200,12 +200,6 @@ interpretive_rules <- function(x,
add_MO_lookup_to_AMR_env() add_MO_lookup_to_AMR_env()
if (guideline %like% "EUCAST") {
guideline <- "EUCAST"
} else if (guideline %like% "CLSI") {
guideline <- "CLSI"
}
if ("custom" %in% rules && is.null(custom_rules)) { if ("custom" %in% rules && is.null(custom_rules)) {
warning_("in {.help [{.fun interpretive_rules}](AMR::interpretive_rules)}: no custom rules were set with the {.arg custom_rules} argument", warning_("in {.help [{.fun interpretive_rules}](AMR::interpretive_rules)}: no custom rules were set with the {.arg custom_rules} argument",
immediate = TRUE immediate = TRUE

30
R/mo.R
View File

@@ -352,16 +352,34 @@ as.mo <- function(x,
(MO_lookup_current$species_first == substr(x_parts[2], 1, 1) | (MO_lookup_current$species_first == substr(x_parts[2], 1, 1) |
MO_lookup_current$subspecies_first == substr(x_parts[2], 1, 1) | MO_lookup_current$subspecies_first == substr(x_parts[2], 1, 1) |
MO_lookup_current$subspecies_first == substr(x_parts[3], 1, 1))) MO_lookup_current$subspecies_first == substr(x_parts[3], 1, 1)))
# Issue #288: if the species (and subspecies) word(s) in the input exactly match # Issue #288 (extended): if the species (and subspecies) word(s) in the input
# exactly one candidate, use only that candidate and bypass the 0.55 cutoff. # exactly match candidates that all belong to one and the same genus, bypass the
# This prevents prevalent bacteria from outranking a rarer organism whose species # 0.55 cutoff. A species together with its subspecies/autonyms (e.g. Plasmodium
# epithet is an unambiguous exact match, e.g. "S. apiospermum" → Scedosporium. # ovale + curtisi + wallikeri) is the same taxon, so for a genus+species input we
# collapse to the species-rank record (subspecies == ""). This prevents prevalent
# bacteria from outranking a rarer organism whose species epithet is an
# unambiguous exact match, e.g. "S. apiospermum" -> Scedosporium, "P. ovale" ->
# Plasmodium ovale. If two different genera share the epithet, the genus check
# stays FALSE and the normal matching score arbitrates.
sp_exact <- tolower(MO_lookup_current$species[filtr]) == x_parts[2] sp_exact <- tolower(MO_lookup_current$species[filtr]) == x_parts[2]
if (length(x_parts) == 3) { if (length(x_parts) == 3) {
sp_exact <- sp_exact & tolower(MO_lookup_current$subspecies[filtr]) == x_parts[3] sp_exact <- sp_exact & tolower(MO_lookup_current$subspecies[filtr]) == x_parts[3]
} }
if (sum(sp_exact) == 1) { exact_idx <- filtr[sp_exact]
filtr <- filtr[sp_exact] if (length(exact_idx) >= 1 &&
length(unique(MO_lookup_current$genus_lower[exact_idx])) == 1) {
if (length(x_parts) == 2) {
# genus + species only: collapse to the species-rank record (subspecies == "")
is_species_rank <- MO_lookup_current$subspecies[exact_idx] == ""
if (any(is_species_rank)) {
filtr <- exact_idx[is_species_rank][1]
} else {
filtr <- exact_idx[1]
}
} else {
# explicit subspecies given, unambiguous within the genus
filtr <- exact_idx[1]
}
minimum_matching_score <- 0 minimum_matching_score <- 0
} }
} else { } else {

View File

@@ -83,6 +83,7 @@
#' @examples #' @examples
#' # taxonomic tree ----------------------------------------------------------- #' # taxonomic tree -----------------------------------------------------------
#' #'
#' mo_domain("Klebsiella pneumoniae")
#' mo_kingdom("Klebsiella pneumoniae") #' mo_kingdom("Klebsiella pneumoniae")
#' mo_phylum("Klebsiella pneumoniae") #' mo_phylum("Klebsiella pneumoniae")
#' mo_class("Klebsiella pneumoniae") #' mo_class("Klebsiella pneumoniae")
@@ -92,6 +93,8 @@
#' mo_species("Klebsiella pneumoniae") #' mo_species("Klebsiella pneumoniae")
#' mo_subspecies("Klebsiella pneumoniae") #' mo_subspecies("Klebsiella pneumoniae")
#' #'
#' # all in one go
#' mo_taxonomy("Klebsiella pneumoniae")
#' #'
#' # full names and short names ----------------------------------------------- #' # full names and short names -----------------------------------------------
#' #'
@@ -112,6 +115,7 @@
#' mo_url("Klebsiella pneumoniae") #' mo_url("Klebsiella pneumoniae")
#' mo_is_yeast(c("Candida", "Trichophyton", "Klebsiella")) #' mo_is_yeast(c("Candida", "Trichophyton", "Klebsiella"))
#' #'
#' mo_group_members("Streptococcus group A")
#' mo_group_members(c( #' mo_group_members(c(
#' "Streptococcus group A", #' "Streptococcus group A",
#' "Streptococcus group C", #' "Streptococcus group C",
@@ -155,6 +159,7 @@
#' #'
#' mo_fullname("Staph epidermidis") #' mo_fullname("Staph epidermidis")
#' mo_fullname("Staph epidermidis", Becker = TRUE) #' mo_fullname("Staph epidermidis", Becker = TRUE)
#'
#' mo_shortname("Staph epidermidis") #' mo_shortname("Staph epidermidis")
#' mo_shortname("Staph epidermidis", Becker = TRUE) #' mo_shortname("Staph epidermidis", Becker = TRUE)
#' #'
@@ -163,6 +168,7 @@
#' #'
#' mo_fullname("Strep agalactiae") #' mo_fullname("Strep agalactiae")
#' mo_fullname("Strep agalactiae", Lancefield = TRUE) #' mo_fullname("Strep agalactiae", Lancefield = TRUE)
#'
#' mo_shortname("Strep agalactiae") #' mo_shortname("Strep agalactiae")
#' mo_shortname("Strep agalactiae", Lancefield = TRUE) #' mo_shortname("Strep agalactiae", Lancefield = TRUE)
#' #'
@@ -175,10 +181,10 @@
#' mo_gramstain("Klebsiella pneumoniae", language = "el") # Greek #' mo_gramstain("Klebsiella pneumoniae", language = "el") # Greek
#' mo_gramstain("Klebsiella pneumoniae", language = "uk") # Ukrainian #' mo_gramstain("Klebsiella pneumoniae", language = "uk") # Ukrainian
#' #'
#' # mo_type is equal to mo_kingdom, but mo_kingdom will remain untranslated #' # mo_type is equal to mo_domain, but mo_domain will remain untranslated
#' mo_kingdom("Klebsiella pneumoniae") #' mo_domain("Klebsiella pneumoniae")
#' mo_type("Klebsiella pneumoniae") #' mo_type("Klebsiella pneumoniae")
#' mo_kingdom("Klebsiella pneumoniae", language = "zh") # Chinese, no effect #' mo_domain("Klebsiella pneumoniae", language = "zh") # Chinese, no effect
#' mo_type("Klebsiella pneumoniae", language = "zh") # Chinese, translated #' mo_type("Klebsiella pneumoniae", language = "zh") # Chinese, translated
#' #'
#' mo_fullname("S. pyogenes", Lancefield = TRUE, language = "de") #' mo_fullname("S. pyogenes", Lancefield = TRUE, language = "de")
@@ -807,19 +813,19 @@ mo_taxonomy <- function(x, language = get_AMR_locale(), keep_synonyms = getOptio
language <- validate_language(language) language <- validate_language(language)
meet_criteria(keep_synonyms, allow_class = "logical", has_length = 1) meet_criteria(keep_synonyms, allow_class = "logical", has_length = 1)
x <- as.mo(x, language = language, keep_synonyms = keep_synonyms, ...) x.mo <- as.mo(x, language = language, keep_synonyms = keep_synonyms, ...)
metadata <- get_mo_uncertainties() metadata <- get_mo_uncertainties()
out <- list( out <- list(
domain = mo_domain(x, language = language, keep_synonyms = keep_synonyms), domain = mo_domain(x.mo, language = language, keep_synonyms = keep_synonyms),
kingdom = mo_kingdom(x, language = language, keep_synonyms = keep_synonyms), kingdom = suppressMessages(mo_kingdom(x.mo, language = language, keep_synonyms = keep_synonyms)),
phylum = mo_phylum(x, language = language, keep_synonyms = keep_synonyms), phylum = mo_phylum(x.mo, language = language, keep_synonyms = keep_synonyms),
class = mo_class(x, language = language, keep_synonyms = keep_synonyms), class = mo_class(x.mo, language = language, keep_synonyms = keep_synonyms),
order = mo_order(x, language = language, keep_synonyms = keep_synonyms), order = mo_order(x.mo, language = language, keep_synonyms = keep_synonyms),
family = mo_family(x, language = language, keep_synonyms = keep_synonyms), family = mo_family(x.mo, language = language, keep_synonyms = keep_synonyms),
genus = mo_genus(x, language = language, keep_synonyms = keep_synonyms), genus = mo_genus(x.mo, language = language, keep_synonyms = keep_synonyms),
species = mo_species(x, language = language, keep_synonyms = keep_synonyms), species = mo_species(x.mo, language = language, keep_synonyms = keep_synonyms),
subspecies = mo_subspecies(x, language = language, keep_synonyms = keep_synonyms) subspecies = mo_subspecies(x.mo, language = language, keep_synonyms = keep_synonyms)
) )
load_mo_uncertainties(metadata) load_mo_uncertainties(metadata)

View File

@@ -482,7 +482,7 @@ scale_x_sir <- function(colours_SIR = c(
R = "#ED553B" R = "#ED553B"
), ),
language = get_AMR_locale(), language = get_AMR_locale(),
eucast_I = getOption("AMR_guideline", "EUCAST") == "EUCAST", eucast_I = getOption("AMR_guideline", "EUCAST") %like% "EUCAST",
...) { ...) {
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3, 4)) meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3, 4))
language <- validate_language(language) language <- validate_language(language)
@@ -499,7 +499,7 @@ scale_colour_sir <- function(colours_SIR = c(
R = "#ED553B" R = "#ED553B"
), ),
language = get_AMR_locale(), language = get_AMR_locale(),
eucast_I = getOption("AMR_guideline", "EUCAST") == "EUCAST", eucast_I = getOption("AMR_guideline", "EUCAST") %like% "EUCAST",
...) { ...) {
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3, 4)) meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3, 4))
language <- validate_language(language) language <- validate_language(language)
@@ -528,7 +528,7 @@ scale_fill_sir <- function(colours_SIR = c(
R = "#ED553B" R = "#ED553B"
), ),
language = get_AMR_locale(), language = get_AMR_locale(),
eucast_I = getOption("AMR_guideline", "EUCAST") == "EUCAST", eucast_I = getOption("AMR_guideline", "EUCAST") %like% "EUCAST",
...) { ...) {
meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3, 4)) meet_criteria(colours_SIR, allow_class = "character", has_length = c(1, 3, 4))
language <- validate_language(language) language <- validate_language(language)

View File

@@ -236,6 +236,11 @@ resistance <- function(...,
only_all_tested = FALSE, only_all_tested = FALSE,
guideline = getOption("AMR_guideline", "EUCAST")) { guideline = getOption("AMR_guideline", "EUCAST")) {
# other arguments for meet_criteria are handled by sir_calc() # other arguments for meet_criteria are handled by sir_calc()
if (guideline %like% "EUCAST") {
guideline <- "EUCAST"
} else if (guideline %like% "CLSI") {
guideline <- "CLSI"
}
meet_criteria(guideline, allow_class = "character", is_in = c("EUCAST", "CLSI"), has_length = 1) meet_criteria(guideline, allow_class = "character", is_in = c("EUCAST", "CLSI"), has_length = 1)
if (is.null(getOption("AMR_guideline")) && missing(guideline) && message_not_thrown_before("resistance", "eucast_default", entire_session = TRUE)) { if (is.null(getOption("AMR_guideline")) && missing(guideline) && message_not_thrown_before("resistance", "eucast_default", entire_session = TRUE)) {
message_("{.help [{.fun resistance}](AMR::resistance)} assumes the EUCAST guideline and thus considers the 'I' category susceptible. Set the {.arg guideline} argument or the {.code AMR_guideline} option to either \"CLSI\" or \"EUCAST\", see {.topic [AMR-options](AMR::AMR-options)}.") message_("{.help [{.fun resistance}](AMR::resistance)} assumes the EUCAST guideline and thus considers the 'I' category susceptible. Set the {.arg guideline} argument or the {.code AMR_guideline} option to either \"CLSI\" or \"EUCAST\", see {.topic [AMR-options](AMR::AMR-options)}.")
@@ -264,6 +269,11 @@ susceptibility <- function(...,
only_all_tested = FALSE, only_all_tested = FALSE,
guideline = getOption("AMR_guideline", "EUCAST")) { guideline = getOption("AMR_guideline", "EUCAST")) {
# other arguments for meet_criteria are handled by sir_calc() # other arguments for meet_criteria are handled by sir_calc()
if (guideline %like% "EUCAST") {
guideline <- "EUCAST"
} else if (guideline %like% "CLSI") {
guideline <- "CLSI"
}
meet_criteria(guideline, allow_class = "character", is_in = c("EUCAST", "CLSI"), has_length = 1) meet_criteria(guideline, allow_class = "character", is_in = c("EUCAST", "CLSI"), has_length = 1)
if (is.null(getOption("AMR_guideline")) && missing(guideline) && message_not_thrown_before("susceptibility", "eucast_default", entire_session = TRUE)) { if (is.null(getOption("AMR_guideline")) && missing(guideline) && message_not_thrown_before("susceptibility", "eucast_default", entire_session = TRUE)) {
message_("{.help [{.fun susceptibility}](AMR::susceptibility)} assumes the EUCAST guideline and thus considers the 'I' category susceptible. Set the {.arg guideline} argument or the {.code AMR_guideline} option to either \"CLSI\" or \"EUCAST\", see {.topic [AMR-options](AMR::AMR-options)}.") message_("{.help [{.fun susceptibility}](AMR::susceptibility)} assumes the EUCAST guideline and thus considers the 'I' category susceptible. Set the {.arg guideline} argument or the {.code AMR_guideline} option to either \"CLSI\" or \"EUCAST\", see {.topic [AMR-options](AMR::AMR-options)}.")

14
R/sir.R
View File

@@ -73,6 +73,7 @@ VALID_SIR_LEVELS <- c("S", "SDD", "I", "R", "NI", "WT", "NWT", "NS")
#' @param threshold Maximum fraction of invalid antimicrobial interpretations of `x`, see *Examples*. #' @param threshold Maximum fraction of invalid antimicrobial interpretations of `x`, see *Examples*.
#' @param conserve_capped_values Deprecated, use `capped_mic_handling` instead. #' @param conserve_capped_values Deprecated, use `capped_mic_handling` instead.
#' @param ... For using on a [data.frame]: selection of columns to apply `as.sir()` to. Supports [tidyselect language][tidyselect::starts_with()] such as `where(is.mic)`, `starts_with(...)`, or `column1:column4`, and can thus also be [antimicrobial selectors][amr_selector()], e.g. `as.sir(df, penicillins())`. #' @param ... For using on a [data.frame]: selection of columns to apply `as.sir()` to. Supports [tidyselect language][tidyselect::starts_with()] such as `where(is.mic)`, `starts_with(...)`, or `column1:column4`, and can thus also be [antimicrobial selectors][amr_selector()], e.g. `as.sir(df, penicillins())`.
#' @param enforce_method A [character] string to force interpretation as a specific method, useful when the S3 class of `x` is lost (e.g., when called from Python via rpy2). Must be one of `"auto"` (default), `"mic"`, or `"disk"`.
#' #'
#' Otherwise: arguments passed on to methods. #' Otherwise: arguments passed on to methods.
#' @details #' @details
@@ -385,9 +386,16 @@ VALID_SIR_LEVELS <- c("S", "SDD", "I", "R", "NI", "WT", "NWT", "NS")
#' # mutate(across(where(is_sir_eligible), as.sir)) #' # mutate(across(where(is_sir_eligible), as.sir))
#' } #' }
#' } #' }
as.sir <- function(x, ...) { as.sir <- function(x, ..., enforce_method = "auto") {
meet_criteria(enforce_method, allow_class = "character", has_length = 1, is_in = c("auto", "mic", "disk"))
if (enforce_method == "mic") {
as.sir.mic(x, ...)
} else if (enforce_method == "disk") {
as.sir.disk(x, ...)
} else {
UseMethod("as.sir") UseMethod("as.sir")
} }
}
as_sir_structure <- function(x, as_sir_structure <- function(x,
guideline = NULL, guideline = NULL,
@@ -525,7 +533,7 @@ as.sir.default <- function(x,
} else if (!all(is.na(x)) && !identical(levels(x), VALID_SIR_LEVELS) && !all(x %in% c(VALID_SIR_LEVELS, NA))) { } else if (!all(is.na(x)) && !identical(levels(x), VALID_SIR_LEVELS) && !all(x %in% c(VALID_SIR_LEVELS, NA))) {
if (all(x %unlike% "(S|I|R)", na.rm = TRUE) && !all(x %in% c(1, 2, 3, 4, 5), na.rm = TRUE)) { if (all(x %unlike% "(S|I|R)", na.rm = TRUE) && !all(x %in% c(1, 2, 3, 4, 5), na.rm = TRUE)) {
# check if they are actually MICs or disks # check if they are actually MICs or disks
if (all_valid_mics(x) && !(all_valid_disks(x) && identical(x, floor(x)))) { if (all_valid_mics(x) && !(all_valid_disks(x) && identical(x, tryCatch(floor(x), error = function(e) NULL)))) {
warning_("in {.help [{.fun as.sir}](AMR::as.sir)}: input values were guessed to be MIC values - preferably transform them with {.help [{.fun as.mic}](AMR::as.mic)} before running {.help [{.fun as.sir}](AMR::as.sir)}.") warning_("in {.help [{.fun as.sir}](AMR::as.sir)}: input values were guessed to be MIC values - preferably transform them with {.help [{.fun as.mic}](AMR::as.mic)} before running {.help [{.fun as.sir}](AMR::as.sir)}.")
return(as.sir(as.mic(x), ...)) return(as.sir(as.mic(x), ...))
} else if (all_valid_disks(x)) { } else if (all_valid_disks(x)) {
@@ -2111,7 +2119,7 @@ pillar_shaft.sir <- function(x, ...) {
out[is.na(x)] <- pillar::style_subtle(" NA") out[is.na(x)] <- pillar::style_subtle(" NA")
out[x == "S"] <- font_green_bg(" S ") # has font_black internally out[x == "S"] <- font_green_bg(" S ") # has font_black internally
out[x == "SDD"] <- font_green_lighter_bg(" SDD ") # has font_black internally out[x == "SDD"] <- font_green_lighter_bg(" SDD ") # has font_black internally
if (getOption("AMR_guideline", "EUCAST")[1] == "EUCAST") { if (getOption("AMR_guideline", "EUCAST")[1] %like% "EUCAST") {
out[x == "I"] <- font_green_lighter_bg(" I ") # has font_black internally out[x == "I"] <- font_green_lighter_bg(" I ") # has font_black internally
} else { } else {
out[x == "I"] <- font_orange_bg(" I ") # has font_black internally out[x == "I"] <- font_orange_bg(" I ") # has font_black internally

Binary file not shown.

View File

@@ -126,7 +126,8 @@ step_mic_log2 <- function(
trained = FALSE, trained = FALSE,
columns = NULL, columns = NULL,
skip = FALSE, skip = FALSE,
id = recipes::rand_id("mic_log2")) { id = recipes::rand_id("mic_log2")
) {
recipes::add_step( recipes::add_step(
recipe, recipe,
step_mic_log2_new( step_mic_log2_new(
@@ -201,7 +202,8 @@ step_sir_numeric <- function(
trained = FALSE, trained = FALSE,
columns = NULL, columns = NULL,
skip = FALSE, skip = FALSE,
id = recipes::rand_id("sir_numeric")) { id = recipes::rand_id("sir_numeric")
) {
recipes::add_step( recipes::add_step(
recipe, recipe,
step_sir_numeric_new( step_sir_numeric_new(

View File

@@ -29,73 +29,88 @@
#' Filter Top *n* Microorganisms #' Filter Top *n* Microorganisms
#' #'
#' This function filters a data set to include only the top *n* microorganisms based on a specified property, such as taxonomic family or genus. For example, it can filter a data set to the top 3 species, or to any species in the top 5 genera, or to the top 3 species in each of the top 5 genera. #' Filters a data set to include only the top *n* microorganisms based on a specified property, such as taxonomic family or genus. For example, it can filter a data set to the top 3 species, to any species in the top 5 genera, or to the top 3 species in each of the top 5 genera.
#' @param x A data frame containing microbial data. #' @param x A data frame containing microbial data.
#' @param n An integer specifying the maximum number of unique values of the `property` to include in the output. #' @param n A positive whole number specifying the maximum number of unique values of `property` to include in the output.
#' @param property A character string indicating the microorganism property to use for filtering. Must be one of the column names of the [microorganisms] data set: `r vector_or(colnames(microorganisms), sort = FALSE, documentation = TRUE)`. If `NULL`, the raw values from `col_mo` will be used without transformation. When using `"species"` (default) or `"subpecies"`, the genus will be added to make sure each (sub)species still belongs to the right genus. #' @param property A character string indicating the microorganism property to use for filtering. Must be one of the column names of the [microorganisms] data set: `r vector_or(colnames(microorganisms), sort = FALSE, documentation = TRUE)`. If `NULL`, the raw values from `col_mo` will be used without transformation. When using `"species"` (default) or `"subspecies"`, the genus is prepended to ensure each name is unambiguous.
#' @param n_for_each An optional integer specifying the maximum number of rows to retain for each value of the selected property. If `NULL`, all rows within the top *n* groups will be included. #' @param n_for_each An optional positive whole number specifying the maximum number of distinct microorganism groups at the level of `property_for_each` to retain within each of the top *n* groups. Only used when `property_for_each` is also set.
#' @param property_for_each The microorganism property to use for sub-grouping within each top *n* group. Must be one of the column names of the [microorganisms] data set and at a strictly lower taxonomic rank than `property` (allowed order: domain > kingdom > phylum > class > order > family > genus > species > subspecies). Defaults to `"species"`. Only relevant when `n_for_each` is set.
#' @param col_mo A character string indicating the column in `x` that contains microorganism names or codes. Defaults to the first column of class [`mo`]. Values will be coerced using [as.mo()]. #' @param col_mo A character string indicating the column in `x` that contains microorganism names or codes. Defaults to the first column of class [`mo`]. Values will be coerced using [as.mo()].
#' @param ... Additional arguments passed on to [mo_property()] when `property` is not `NULL`. #' @param ... Additional arguments passed on to [mo_property()] when `property` is not `NULL`.
#' @details This function is useful for preprocessing data before creating [antibiograms][antibiogram()] or other analyses that require focused subsets of microbial data. For example, it can filter a data set to only include isolates from the top 10 species. #' @details This function is useful for preprocessing data before creating [antibiograms][antibiogram()] or other analyses that require focused subsets of microbial data.
#' @export #' @export
#' @seealso [mo_property()], [as.mo()], [antibiogram()] #' @seealso [mo_property()], [as.mo()], [antibiogram()]
#' @examples #' @examples
#' # filter to the top 3 species: #' # filter to the top 3 species:
#' top_n_microorganisms(example_isolates, #' top_n_microorganisms(example_isolates, n = 3)
#' n = 3
#' )
#' #'
#' # filter to any species in the top 5 genera: #' # filter to any species in the top 5 genera:
#' top_n_microorganisms(example_isolates, #' top_n_microorganisms(example_isolates, n = 5, property = "genus")
#' n = 5, property = "genus"
#' )
#' #'
#' # filter to the top 3 species in each of the top 5 genera: #' # filter to the top 3 species in each of the top 5 genera:
#' top_n_microorganisms(example_isolates, #' top_n_microorganisms(example_isolates,
#' n = 5, property = "genus", n_for_each = 3 #' n = 5, property = "genus", n_for_each = 3
#' ) #' )
top_n_microorganisms <- function(x, n, property = "species", n_for_each = NULL, col_mo = NULL, ...) { #'
#' # filter to the top 2 genera in each of the top 3 families:
#' top_n_microorganisms(example_isolates,
#' n = 3, property = "family", n_for_each = 2, property_for_each = "genus"
#' )
top_n_microorganisms <- function(x, n, property = "species", n_for_each = NULL, property_for_each = "species", col_mo = NULL, ...) {
meet_criteria(x, allow_class = "data.frame") # also checks dimensions to be >0 meet_criteria(x, allow_class = "data.frame") # also checks dimensions to be >0
meet_criteria(n, allow_class = c("numeric", "integer"), has_length = 1, is_finite = TRUE, is_positive = TRUE) meet_criteria(n, allow_class = c("numeric", "integer"), has_length = 1, is_finite = TRUE, is_positive = TRUE)
meet_criteria(property, allow_class = "character", has_length = 1, is_in = colnames(AMR::microorganisms)) meet_criteria(property, allow_class = "character", has_length = 1, is_in = colnames(AMR::microorganisms), allow_NULL = TRUE)
meet_criteria(n_for_each, allow_class = c("numeric", "integer"), has_length = 1, is_finite = TRUE, is_positive = TRUE, allow_NULL = TRUE) meet_criteria(n_for_each, allow_class = c("numeric", "integer"), has_length = 1, is_finite = TRUE, is_positive = TRUE, allow_NULL = TRUE)
meet_criteria(property_for_each, allow_class = "character", has_length = 1, is_in = colnames(AMR::microorganisms), allow_NULL = TRUE)
meet_criteria(col_mo, allow_class = "character", has_length = 1, allow_NULL = TRUE, is_in = colnames(x)) meet_criteria(col_mo, allow_class = "character", has_length = 1, allow_NULL = TRUE, is_in = colnames(x))
if (is.null(col_mo)) { if (is.null(col_mo)) {
col_mo <- search_type_in_df(x = x, type = "mo", info = TRUE) col_mo <- search_type_in_df(x = x, type = "mo", info = TRUE)
stop_if(is.null(col_mo), "{.arg col_mo} must be set") stop_if(is.null(col_mo), "{.arg col_mo} must be set")
} }
x.bak <- x .taxonomic_ranks <- c("domain", "kingdom", "phylum", "class", "order", "family", "genus", "species", "subspecies")
if (!is.null(n_for_each) && !is.null(property) && !is.null(property_for_each)) {
prop_rank <- match(property, .taxonomic_ranks)
each_rank <- match(property_for_each, .taxonomic_ranks)
if (!is.na(prop_rank) && !is.na(each_rank) && each_rank <= prop_rank) {
stop_(
"`property_for_each` (\"", property_for_each, "\") must be at a lower ",
"taxonomic rank than `property` (\"", property, "\")"
)
}
}
x.bak <- x
x[, col_mo] <- as.mo(x[, col_mo, drop = TRUE], keep_synonyms = TRUE) x[, col_mo] <- as.mo(x[, col_mo, drop = TRUE], keep_synonyms = TRUE)
if (is.null(property)) { get_prop_val <- function(prop) {
x$prop_val <- x[[col_mo]] if (is.null(prop)) {
} else if (property == "species") { x[[col_mo]]
x$prop_val <- paste(mo_genus(x[[col_mo]], ...), mo_species(x[[col_mo]], ...)) } else if (prop == "species") {
} else if (property == "subspecies") { paste(mo_genus(x[[col_mo]], ...), mo_species(x[[col_mo]], ...))
x$prop_val <- paste(mo_genus(x[[col_mo]], ...), mo_species(x[[col_mo]], ...), mo_subspecies(x[[col_mo]], ...)) } else if (prop == "subspecies") {
paste(mo_genus(x[[col_mo]], ...), mo_species(x[[col_mo]], ...), mo_subspecies(x[[col_mo]], ...))
} else { } else {
x$prop_val <- mo_property(x[[col_mo]], property = property, ...) mo_property(x[[col_mo]], property = prop, ...)
}
} }
counts <- sort(table(x$prop_val), decreasing = TRUE)
n <- as.integer(n) x$prop_val <- get_prop_val(property)
if (length(counts) < n) { counts <- sort(table(x$prop_val), decreasing = TRUE)
n <- length(counts) n <- min(as.integer(n), length(counts))
} filtered_rows <- which(x$prop_val %in% names(counts)[seq_len(n)])
count_values <- names(counts)[seq_len(n)]
filtered_rows <- which(x$prop_val %in% count_values)
if (!is.null(n_for_each)) { if (!is.null(n_for_each)) {
n_for_each <- as.integer(n_for_each) n_for_each <- as.integer(n_for_each)
x$prop_val_each <- get_prop_val(property_for_each)
filtered_x <- x[filtered_rows, , drop = FALSE] filtered_x <- x[filtered_rows, , drop = FALSE]
filtered_x$.orig_row <- filtered_rows
filtered_rows <- do.call( filtered_rows <- do.call(
c, c,
lapply(split(filtered_x, filtered_x$prop_val), function(group) { lapply(split(filtered_x, filtered_x$prop_val), function(group) {
top_values <- names(sort(table(group[[col_mo]]), decreasing = TRUE)[seq_len(n_for_each)]) top_each <- names(sort(table(group$prop_val_each), decreasing = TRUE)[seq_len(n_for_each)])
top_values <- top_values[!is.na(top_values)] group$.orig_row[group$prop_val_each %in% top_each[!is.na(top_each)]]
which(x[[col_mo]] %in% top_values)
}) })
) )
} }

View File

@@ -11,6 +11,7 @@ knitr::opts_chunk$set(
# fig.path = "man/figures/README-", # fig.path = "man/figures/README-",
out.width = "100%" out.width = "100%"
) )
options(width = 100)
AMR:::reset_all_thrown_messages() AMR:::reset_all_thrown_messages()
``` ```
@@ -21,7 +22,7 @@ Please visit our comprehensive package website <https://amr-for-r.org> to read m
Overview: Overview:
* Provides an **all-in-one solution** for antimicrobial resistance (AMR) data analysis in a One Health approach * Provides an **all-in-one solution** for antimicrobial resistance (AMR) data analysis in a One Health approach
* **Peer-reviewed**, used in over 175 countries, available in `r length(AMR:::LANGUAGES_SUPPORTED)` languages * **Peer-reviewed**, used in over 175 countries, cited over 100 times, available in `r length(AMR:::LANGUAGES_SUPPORTED)` languages
* Generates **antibiograms** - WISCA for empiric coverage estimates, or traditional/syndromic for AMR surveillance * Generates **antibiograms** - WISCA for empiric coverage estimates, or traditional/syndromic for AMR surveillance
* Provides the **full microbiological taxonomy** of `r AMR:::format_included_data_number(AMR::microorganisms)` distinct species and extensive info of `r AMR:::format_included_data_number(NROW(AMR::antimicrobials) + NROW(AMR::antivirals))` antimicrobial drugs * Provides the **full microbiological taxonomy** of `r AMR:::format_included_data_number(AMR::microorganisms)` distinct species and extensive info of `r AMR:::format_included_data_number(NROW(AMR::antimicrobials) + NROW(AMR::antivirals))` antimicrobial drugs
* Applies **CLSI `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, grepl("CLSI", guideline))$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, grepl("CLSI", guideline))$guideline)))`** and **EUCAST `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, grepl("EUCAST", guideline))$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, grepl("EUCAST", guideline))$guideline)))`** clinical and veterinary breakpoints, and ECOFFs, for MIC and disk zone interpretation * Applies **CLSI `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, grepl("CLSI", guideline))$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, grepl("CLSI", guideline))$guideline)))`** and **EUCAST `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, grepl("EUCAST", guideline))$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, grepl("EUCAST", guideline))$guideline)))`** clinical and veterinary breakpoints, and ECOFFs, for MIC and disk zone interpretation
@@ -31,7 +32,9 @@ Overview:
---- ----
The `AMR` package is a peer-reviewed, free and open-source R package with zero dependencies to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. **Our aim is to provide a standard** for clean and reproducible AMR data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting. The `AMR` package is a peer-reviewed, free and open-source R package with zero dependencies to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods.
**Our aim has always been to provide a standard** for clean and reproducible AMR data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting.
The `AMR` package supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). **It was designed to work in any setting, including those with very limited resources**. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the [University of Groningen](https://www.rug.nl) and the [University Medical Center Groningen](https://www.umcg.nl). The `AMR` package supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). **It was designed to work in any setting, including those with very limited resources**. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the [University of Groningen](https://www.rug.nl) and the [University Medical Center Groningen](https://www.umcg.nl).

View File

@@ -10,8 +10,8 @@ Overview:
- Provides an **all-in-one solution** for antimicrobial resistance (AMR) - Provides an **all-in-one solution** for antimicrobial resistance (AMR)
data analysis in a One Health approach data analysis in a One Health approach
- **Peer-reviewed**, used in over 175 countries, available in 28 - **Peer-reviewed**, used in over 175 countries, cited over 100 times,
languages available in 28 languages
- Generates **antibiograms** - WISCA for empiric coverage estimates, or - Generates **antibiograms** - WISCA for empiric coverage estimates, or
traditional/syndromic for AMR surveillance traditional/syndromic for AMR surveillance
- Provides the **full microbiological taxonomy** of ~97 000 distinct - Provides the **full microbiological taxonomy** of ~97 000 distinct
@@ -32,10 +32,11 @@ The `AMR` package is a peer-reviewed, free and open-source R package
with zero dependencies to simplify the analysis and prediction of with zero dependencies to simplify the analysis and prediction of
Antimicrobial Resistance (AMR) and to work with microbial and Antimicrobial Resistance (AMR) and to work with microbial and
antimicrobial data and properties, by using evidence-based methods. antimicrobial data and properties, by using evidence-based methods.
**Our aim is to provide a standard** for clean and reproducible AMR data
analysis, that can therefore empower epidemiological analyses to **Our aim has always been to provide a standard** for clean and
continuously enable surveillance and treatment evaluation in any reproducible AMR data analysis, that can therefore empower
setting. epidemiological analyses to continuously enable surveillance and
treatment evaluation in any setting.
The `AMR` package supports and can read any data format, including The `AMR` package supports and can read any data format, including
WHONET data. This package works on Windows, macOS and Linux with all WHONET data. This package works on Windows, macOS and Linux with all

View File

@@ -33,18 +33,20 @@
rm -rf ../PythonPackage/AMR/* rm -rf ../PythonPackage/AMR/*
mkdir -p ../PythonPackage/AMR/AMR mkdir -p ../PythonPackage/AMR/AMR
# Output Python file # Output files
setup_file="../PythonPackage/AMR/setup.py" setup_file="../PythonPackage/AMR/setup.py"
functions_file="../PythonPackage/AMR/AMR/functions.py"
datasets_file="../PythonPackage/AMR/AMR/datasets.py"
init_file="../PythonPackage/AMR/AMR/__init__.py" init_file="../PythonPackage/AMR/AMR/__init__.py"
engine_file="../PythonPackage/AMR/AMR/_engine.py"
datasets_file="../PythonPackage/AMR/AMR/datasets.py"
functions_file="../PythonPackage/AMR/AMR/functions.py"
beta_file="../PythonPackage/AMR/AMR/beta.py"
description_file="../DESCRIPTION" description_file="../DESCRIPTION"
# Write header to the datasets Python file, including the convert_to_python function # ---- _engine.py: R environment setup and installation logic ---- #
cat <<EOL > "$datasets_file"
cat <<'EOL' > "$engine_file"
import os import os
import sys import sys
import pandas as pd
import importlib.metadata as metadata import importlib.metadata as metadata
# Get the path to the virtual environment # Get the path to the virtual environment
@@ -56,48 +58,127 @@ os.makedirs(r_lib_path, exist_ok=True)
os.environ['R_LIBS_SITE'] = r_lib_path os.environ['R_LIBS_SITE'] = r_lib_path
from rpy2 import robjects from rpy2 import robjects
from rpy2.robjects.conversion import localconverter from rpy2.robjects.vectors import StrVector
from rpy2.robjects import default_converter, numpy2ri, pandas2ri
from rpy2.robjects.packages import importr, isinstalled from rpy2.robjects.packages import importr, isinstalled
# Import base and utils # Import base and utils once
base = importr('base') base = importr('base')
utils = importr('utils') utils = importr('utils')
base.options(warn=-1) # Silence R console output entirely
robjects.r('suppressMessages(suppressWarnings(sink(tempfile())))')
# Ensure library paths explicitly
base._libPaths(r_lib_path) base._libPaths(r_lib_path)
# Check if the AMR package is installed in R _installed_source = None
if not isinstalled('AMR', lib_loc=r_lib_path):
print(f"AMR: Installing latest AMR R package to {r_lib_path}...", flush=True)
utils.install_packages('AMR', repos='beta.amr-for-r.org', quiet=True)
# Retrieve Python AMR version def _r_version():
"""Return the currently installed AMR R package version, or None."""
try: try:
python_amr_version = str(metadata.version('AMR')) return str(robjects.r(
f'as.character(packageVersion("AMR", lib.loc = "{r_lib_path}"))')[0])
except Exception:
return None
def _py_version():
"""Return the Python AMR package version from metadata, or empty string."""
try:
return str(metadata.version('AMR'))
except metadata.PackageNotFoundError: except metadata.PackageNotFoundError:
python_amr_version = str('') return ''
# Retrieve R AMR version def _install_cran():
r_amr_version = robjects.r(f'as.character(packageVersion("AMR", lib.loc = "{r_lib_path}"))') """Install AMR from CRAN into the isolated library."""
r_amr_version = str(r_amr_version[0]) print("AMR: Installing from CRAN...", flush=True)
utils.install_packages(
'AMR',
repos='https://cloud.r-project.org',
lib=r_lib_path,
quiet=True
)
# Compare R and Python package versions def _install_github():
if r_amr_version != python_amr_version: """Install AMR development version from GitHub into the isolated library."""
print("AMR: Installing development version from GitHub...", flush=True)
utils.install_packages(
StrVector(['remotes', 'desc']),
repos='https://cloud.r-project.org',
lib=r_lib_path,
quiet=True
)
remotes = importr('remotes', lib_loc=r_lib_path)
remotes.install_github('msberends/AMR', lib=r_lib_path, quiet=True)
def ensure_amr(source="cran"):
"""Ensure AMR is installed from the requested source. Idempotent per source."""
global _installed_source
if _installed_source == source:
return
install_fn = _install_github if source == "github" else _install_cran
if not isinstalled('AMR', lib_loc=r_lib_path):
install_fn()
else:
# Check for version mismatch and update if needed
r_ver = _r_version()
py_ver = _py_version()
if r_ver != py_ver:
try: try:
print(f"AMR: Updating AMR package in {r_lib_path}...", flush=True) install_fn()
utils.install_packages('AMR', repos='beta.amr-for-r.org', quiet=True)
except Exception as e: except Exception as e:
print(f"AMR: Could not update: {e}", flush=True) print(f"AMR: Could not update ({e})", flush=True)
print(f"AMR: Setting up R environment and AMR datasets...", flush=True) print(f"AMR: R package version {_r_version()} ready.", flush=True)
_installed_source = source
def restore_sink():
"""Restore R console output after setup is complete."""
try:
robjects.r('sink()')
except Exception:
pass
EOL
# ---- datasets.py: only dataset loading ---- #
cat <<'EOL' > "$datasets_file"
import pandas as pd
from rpy2 import robjects
from rpy2.robjects.conversion import localconverter
from rpy2.robjects import default_converter, numpy2ri, pandas2ri
from ._engine import ensure_amr, restore_sink
_cache = {}
_loaded_source = None
def _load_datasets(source="cran"):
"""Load all AMR datasets into the module cache."""
global _loaded_source
if _cache and _loaded_source == source:
return
if _cache and _loaded_source != source:
_cache.clear()
ensure_amr(source)
# Activate the automatic conversion between R and pandas DataFrames
with localconverter(default_converter + numpy2ri.converter + pandas2ri.converter): with localconverter(default_converter + numpy2ri.converter + pandas2ri.converter):
# example_isolates _cache['example_isolates'] = _load_example_isolates()
example_isolates = robjects.r(''' _cache['microorganisms'] = robjects.r(
'AMR::microorganisms[, !sapply(AMR::microorganisms, is.list)]')
_cache['antimicrobials'] = robjects.r(
'AMR::antimicrobials[, !sapply(AMR::antimicrobials, is.list)]')
_cache['clinical_breakpoints'] = robjects.r(
'AMR::clinical_breakpoints[, !sapply(AMR::clinical_breakpoints, is.list)]')
restore_sink()
_loaded_source = source
def _load_example_isolates():
df = robjects.r('''
df <- AMR::example_isolates df <- AMR::example_isolates
df[] <- lapply(df, function(x) { df[] <- lapply(df, function(x) {
if (inherits(x, c("Date", "POSIXt", "factor"))) { if (inherits(x, c("Date", "POSIXt", "factor"))) {
@@ -109,26 +190,72 @@ with localconverter(default_converter + numpy2ri.converter + pandas2ri.converter
df <- df[, !sapply(df, is.list)] df <- df[, !sapply(df, is.list)]
df df
''') ''')
example_isolates['date'] = pd.to_datetime(example_isolates['date']) df['date'] = pd.to_datetime(df['date'])
return df
# microorganisms def get(name, source="cran"):
microorganisms = robjects.r('AMR::microorganisms[, !sapply(AMR::microorganisms, is.list)]') """Retrieve a dataset by name, installing AMR if needed."""
antimicrobials = robjects.r('AMR::antimicrobials[, !sapply(AMR::antimicrobials, is.list)]') _load_datasets(source)
clinical_breakpoints = robjects.r('AMR::clinical_breakpoints[, !sapply(AMR::clinical_breakpoints, is.list)]') return _cache[name]
base.options(warn = 0)
print(f"AMR: Done.", flush=True)
EOL EOL
echo "from .datasets import example_isolates" >> $init_file # ---- __init__.py: lazy module, CRAN by default ---- #
echo "from .datasets import microorganisms" >> $init_file
echo "from .datasets import antimicrobials" >> $init_file
echo "from .datasets import clinical_breakpoints" >> $init_file
cat <<'EOL' > "$init_file"
import sys
# Write header to the functions Python file, including the convert_to_python function _DATASETS = frozenset({
cat <<EOL > "$functions_file" 'example_isolates', 'microorganisms',
'antimicrobials', 'clinical_breakpoints'
})
class _AMRModule(type(sys.modules[__name__])):
"""Lazy-loading module: nothing runs until an attribute is accessed."""
def __getattr__(self, name):
if name in _DATASETS:
from .datasets import get
return get(name, source="cran")
try:
from . import functions
return getattr(functions, name)
except AttributeError:
raise AttributeError(
f"module 'AMR' has no attribute '{name}'")
sys.modules[__name__].__class__ = _AMRModule
EOL
# ---- beta.py: GitHub development version ---- #
cat <<'EOL' > "$beta_file"
import sys
_DATASETS = frozenset({
'example_isolates', 'microorganisms',
'antimicrobials', 'clinical_breakpoints'
})
class _BetaModule(type(sys.modules[__name__])):
"""Lazy-loading module: installs AMR from GitHub on first access."""
def __getattr__(self, name):
if name in _DATASETS:
from .datasets import get
return get(name, source="github")
try:
from . import functions
return getattr(functions, name)
except AttributeError:
raise AttributeError(
f"module 'AMR.beta' has no attribute '{name}'")
sys.modules[__name__].__class__ = _BetaModule
EOL
# ---- functions.py: R-to-Python wrapper functions ---- #
cat <<'EOL' > "$functions_file"
import functools import functools
import rpy2.robjects as robjects import rpy2.robjects as robjects
from rpy2.robjects.packages import importr from rpy2.robjects.packages import importr
@@ -138,7 +265,10 @@ from rpy2.robjects import default_converter, numpy2ri, pandas2ri
import pandas as pd import pandas as pd
import numpy as np import numpy as np
# Import the AMR R package from ._engine import ensure_amr
# Ensure AMR is available before importing it in R
ensure_amr("cran")
amr_r = importr('AMR') amr_r = importr('AMR')
def convert_to_r(value): def convert_to_r(value):
@@ -204,12 +334,11 @@ def r_to_python(r_func):
return wrapper return wrapper
EOL EOL
# Directory where the .Rd files are stored (update path as needed) # ---- Generate wrapper functions from .Rd files ---- #
rd_dir="../man" rd_dir="../man"
# Iterate through each .Rd file in the man directory
for rd_file in "$rd_dir"/*.Rd; do for rd_file in "$rd_dir"/*.Rd; do
# Extract function names and their arguments from the .Rd files
awk ' awk '
BEGIN { BEGIN {
usage_started = 0 usage_started = 0
@@ -292,18 +421,19 @@ for rd_file in "$rd_dir"/*.Rd; do
' "$rd_file" ' "$rd_file"
done done
# Output completion message
echo "Python wrapper functions generated in $functions_file." echo "Python wrapper functions generated in $functions_file."
echo "Python wrapper functions listed in $init_file." echo "Python wrapper functions listed in $init_file."
# ---- README ---- #
cp ../vignettes/AMR_for_Python.Rmd ../PythonPackage/AMR/README.md cp ../vignettes/AMR_for_Python.Rmd ../PythonPackage/AMR/README.md
sed -i '1,/^# Introduction$/d' ../PythonPackage/AMR/README.md sed -i '1,/^# Introduction$/d' ../PythonPackage/AMR/README.md
echo "README copied" echo "README copied."
# ---- setup.py ---- #
# Extract the relevant fields from DESCRIPTION
version=$(grep "^Version:" "$description_file" | awk '{print $2}') version=$(grep "^Version:" "$description_file" | awk '{print $2}')
# Write the setup.py file
cat <<EOL > "$setup_file" cat <<EOL > "$setup_file"
from setuptools import setup, find_packages from setuptools import setup, find_packages
@@ -334,10 +464,10 @@ setup(
) )
EOL EOL
# Output completion message echo "setup.py generated."
echo "setup.py has been generated in $setup_file."
# ---- Build ---- #
cd ../PythonPackage/AMR cd ../PythonPackage/AMR
pip3 install build pip3 install build
python3 -m build python3 -m build
# python3 setup.py sdist bdist_wheel

View File

@@ -503,6 +503,72 @@ dim(breakpoints_new)
dim(clinical_breakpoints) dim(clinical_breakpoints)
# Correct anaerobic bacteria in EUCAST ----
eucast_anaerobe_corrections <- tibble::tribble(
~guideline, ~type, ~host, ~method, ~site, ~mo, ~rank_index, ~ab, ~ref_tbl, ~disk_dose, ~breakpoint_S, ~breakpoint_R, ~uti, ~is_SDD,
# Prevotella spp.
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Prevotella"), 3, as.ab("AMP"), "Prevotella", NA, 0.5, 0.5, FALSE, FALSE,
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Prevotella"), 3, as.ab("AMP"), "Prevotella", "2 mcg", 25, 25, FALSE, FALSE,
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Prevotella"), 3, as.ab("SAM"), "Prevotella", "10/10 mcg", 33, 33, FALSE, FALSE,
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Prevotella"), 3, as.ab("AMX"), "Prevotella", NA, 0.25, 0.25, FALSE, FALSE,
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Prevotella"), 3, as.ab("AMC"), "Prevotella", "2/1 mcg", 24, 24, FALSE, FALSE,
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Prevotella"), 3, as.ab("ETP"), "Prevotella", NA, 0.5, 0.5, FALSE, FALSE,
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Prevotella"), 3, as.ab("ETP"), "Prevotella", "10 mcg", 29, 29, FALSE, FALSE,
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Prevotella"), 3, as.ab("IPM"), "Prevotella", NA, 0.125, 0.125, FALSE, FALSE,
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Prevotella"), 3, as.ab("IPM"), "Prevotella", "10 mcg", 35, 35, FALSE, FALSE,
# Fusobacterium necrophorum
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Fusobacterium necrophorum"), 2, as.ab("AMP"), "F. necrophorum", NA, 0.5, 0.5, FALSE, FALSE,
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Fusobacterium necrophorum"), 2, as.ab("AMP"), "F. necrophorum", "2 mcg", 27, 27, FALSE, FALSE,
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Fusobacterium necrophorum"), 2, as.ab("SAM"), "F. necrophorum", NA, 0.5, 0.5, FALSE, FALSE,
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Fusobacterium necrophorum"), 2, as.ab("SAM"), "F. necrophorum", "10/10 mcg", 33, 33, FALSE, FALSE,
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Fusobacterium necrophorum"), 2, as.ab("AMX"), "F. necrophorum", NA, 0.5, 0.5, FALSE, FALSE,
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Fusobacterium necrophorum"), 2, as.ab("AMC"), "F. necrophorum", NA, 0.5, 0.5, FALSE, FALSE,
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Fusobacterium necrophorum"), 2, as.ab("AMC"), "F. necrophorum", "2/1 mcg", 23, 23, FALSE, FALSE,
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Fusobacterium necrophorum"), 2, as.ab("ETP"), "F. necrophorum", NA, 0.06, 0.06, FALSE, FALSE,
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Fusobacterium necrophorum"), 2, as.ab("ETP"), "F. necrophorum", "10 mcg", 35, 35, FALSE, FALSE,
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Fusobacterium necrophorum"), 2, as.ab("IPM"), "F. necrophorum", NA, 0.125, 0.125, FALSE, FALSE,
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Fusobacterium necrophorum"), 2, as.ab("IPM"), "F. necrophorum", "10 mcg", 36, 36, FALSE, FALSE,
# Clostridium perfringens
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Clostridium perfringens"), 2, as.ab("AMP"), "C. perfringens", NA, 0.25, 0.25, FALSE, FALSE,
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Clostridium perfringens"), 2, as.ab("AMP"), "C. perfringens", "2 mcg", 23, 23, FALSE, FALSE,
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Clostridium perfringens"), 2, as.ab("SAM"), "C. perfringens", NA, 0.25, 0.25, FALSE, FALSE,
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Clostridium perfringens"), 2, as.ab("SAM"), "C. perfringens", "10/10 mcg", 27, 27, FALSE, FALSE,
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Clostridium perfringens"), 2, as.ab("AMX"), "C. perfringens", NA, 0.25, 0.25, FALSE, FALSE,
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Clostridium perfringens"), 2, as.ab("AMC"), "C. perfringens", NA, 0.25, 0.25, FALSE, FALSE,
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Clostridium perfringens"), 2, as.ab("AMC"), "C. perfringens", "2/1 mcg", 23, 23, FALSE, FALSE,
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Clostridium perfringens"), 2, as.ab("ETP"), "C. perfringens", NA, 0.5, 0.5, FALSE, FALSE,
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Clostridium perfringens"), 2, as.ab("ETP"), "C. perfringens", "10 mcg", 24, 24, FALSE, FALSE,
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Clostridium perfringens"), 2, as.ab("IPM"), "C. perfringens", NA, 0.5, 0.5, FALSE, FALSE,
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Clostridium perfringens"), 2, as.ab("IPM"), "C. perfringens", "10 mcg", 25, 25, FALSE, FALSE,
# Cutibacterium acnes
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Cutibacterium acnes"), 2, as.ab("AMP"), "C. acnes", NA, 0.25, 0.25, FALSE, FALSE,
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Cutibacterium acnes"), 2, as.ab("AMP"), "C. acnes", "2 mcg", 23, 23, FALSE, FALSE,
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Cutibacterium acnes"), 2, as.ab("SAM"), "C. acnes", "10/10 mcg", 33, 33, FALSE, FALSE,
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Cutibacterium acnes"), 2, as.ab("AMX"), "C. acnes", NA, 0.25, 0.25, FALSE, FALSE,
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Cutibacterium acnes"), 2, as.ab("AMC"), "C. acnes", "2/1 mcg", 24, 24, FALSE, FALSE,
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Cutibacterium acnes"), 2, as.ab("CTX"), "C. acnes", "5 mcg", 26, 26, FALSE, FALSE,
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Cutibacterium acnes"), 2, as.ab("CRO"), "C. acnes", NA, 0.06, 0.06, FALSE, FALSE,
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Cutibacterium acnes"), 2, as.ab("CRO"), "C. acnes", "30 mcg", 33, 33, FALSE, FALSE,
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Cutibacterium acnes"), 2, as.ab("ETP"), "C. acnes", NA, 0.25, 0.25, FALSE, FALSE,
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Cutibacterium acnes"), 2, as.ab("ETP"), "C. acnes", "10 mcg", 28, 28, FALSE, FALSE,
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Cutibacterium acnes"), 2, as.ab("IPM"), "C. acnes", NA, 0.03, 0.03, FALSE, FALSE,
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Cutibacterium acnes"), 2, as.ab("IPM"), "C. acnes", "10 mcg", 39, 39, FALSE, FALSE,
"EUCAST 2025", "human", "human", "MIC", NA, as.mo("Cutibacterium acnes"), 2, as.ab("LNZ"), "C. acnes", NA, 2, 2, FALSE, FALSE,
"EUCAST 2025", "human", "human", "DISK", NA, as.mo("Cutibacterium acnes"), 2, as.ab("LNZ"), "C. acnes", "10 mcg", 34, 34, FALSE, FALSE
)
breakpoints_new <- clinical_breakpoints |>
bind_rows(eucast_anaerobe_corrections) |>
bind_rows(eucast_anaerobe_corrections |> mutate(guideline = "EUCAST 2026")) |>
bind_rows(eucast_anaerobe_corrections |> mutate(guideline = "EUCAST 2023")) |>
bind_rows(eucast_anaerobe_corrections |> mutate(guideline = "EUCAST 2024"))
# SAVE TO PACKAGE ---- # SAVE TO PACKAGE ----
# determine rank again now that some changes were made on taxonomic level (genus -> species) # determine rank again now that some changes were made on taxonomic level (genus -> species)

View File

@@ -1 +1 @@
7bcb6eaf7e2da23ac552acbfd12b3e62 634c5e23bed1e92783eeb4739c0d1486

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -90,7 +90,7 @@ EUCAST Breakpoints 10 Staphylococcus genus is Staphylococcus NOR S CIP, LVX, MFX
EUCAST Breakpoints 10 Staphylococcus genus is Staphylococcus ERY S AZM, CLR, RXT S EUCAST Breakpoints 10 Staphylococcus genus is Staphylococcus ERY S AZM, CLR, RXT S
EUCAST Breakpoints 10 Staphylococcus genus is Staphylococcus ERY I AZM, CLR, RXT I EUCAST Breakpoints 10 Staphylococcus genus is Staphylococcus ERY I AZM, CLR, RXT I
EUCAST Breakpoints 10 Staphylococcus genus is Staphylococcus ERY R AZM, CLR, RXT R EUCAST Breakpoints 10 Staphylococcus genus is Staphylococcus ERY R AZM, CLR, RXT R
EUCAST Breakpoints 10 Staphylococcus genus is Staphylococcus TCY S DOX, MNO S EUCAST Breakpoints 10 Staphylococcus genus is Staphylococcus TCY-S S DOX, MNO S
EUCAST Breakpoints 10 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G PEN S aminopenicillins, ureidopenicillins, cephalosporins_except_CAZ, carbapenems, FLC, AMC S EUCAST Breakpoints 10 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G PEN S aminopenicillins, ureidopenicillins, cephalosporins_except_CAZ, carbapenems, FLC, AMC S
EUCAST Breakpoints 10 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G PEN I aminopenicillins, ureidopenicillins, cephalosporins_except_CAZ, carbapenems, FLC, AMC I EUCAST Breakpoints 10 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G PEN I aminopenicillins, ureidopenicillins, cephalosporins_except_CAZ, carbapenems, FLC, AMC I
EUCAST Breakpoints 10 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G PEN R aminopenicillins, ureidopenicillins, cephalosporins_except_CAZ, carbapenems, FLC, AMC R EUCAST Breakpoints 10 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G PEN R aminopenicillins, ureidopenicillins, cephalosporins_except_CAZ, carbapenems, FLC, AMC R
@@ -199,7 +199,7 @@ EUCAST Breakpoints 11 Staphylococcus genus is Staphylococcus NOR S CIP, LVX, MFX
EUCAST Breakpoints 11 Staphylococcus genus is Staphylococcus ERY S AZM, CLR, RXT S EUCAST Breakpoints 11 Staphylococcus genus is Staphylococcus ERY S AZM, CLR, RXT S
EUCAST Breakpoints 11 Staphylococcus genus is Staphylococcus ERY I AZM, CLR, RXT I EUCAST Breakpoints 11 Staphylococcus genus is Staphylococcus ERY I AZM, CLR, RXT I
EUCAST Breakpoints 11 Staphylococcus genus is Staphylococcus ERY R AZM, CLR, RXT R EUCAST Breakpoints 11 Staphylococcus genus is Staphylococcus ERY R AZM, CLR, RXT R
EUCAST Breakpoints 11 Staphylococcus genus is Staphylococcus TCY S DOX, MNO S EUCAST Breakpoints 11 Staphylococcus genus is Staphylococcus TCY-S S DOX, MNO S
EUCAST Breakpoints 11 Staphylococcus genus_species is Staphylococcus aureus FOX-S S CTX, CRO I EUCAST Breakpoints 11 Staphylococcus genus_species is Staphylococcus aureus FOX-S S CTX, CRO I
EUCAST Breakpoints 11 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G PEN S aminopenicillins, ureidopenicillins, cephalosporins_except_CAZ, carbapenems, FLC, AMC S EUCAST Breakpoints 11 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G PEN S aminopenicillins, ureidopenicillins, cephalosporins_except_CAZ, carbapenems, FLC, AMC S
EUCAST Breakpoints 11 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G PEN I aminopenicillins, ureidopenicillins, cephalosporins_except_CAZ, carbapenems, FLC, AMC I EUCAST Breakpoints 11 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G PEN I aminopenicillins, ureidopenicillins, cephalosporins_except_CAZ, carbapenems, FLC, AMC I
@@ -260,7 +260,7 @@ EUCAST Breakpoints 12 Enterococcus genus is Enterococcus AMP R AMP, SAM, AMX, AM
EUCAST Breakpoints 12 Enterococcus genus is Enterococcus NOR-S S CIP, LVX S EUCAST Breakpoints 12 Enterococcus genus is Enterococcus NOR-S S CIP, LVX S
EUCAST Breakpoints 12 Enterococcus genus is Enterococcus NOR-S I CIP, LVX I EUCAST Breakpoints 12 Enterococcus genus is Enterococcus NOR-S I CIP, LVX I
EUCAST Breakpoints 12 Enterococcus genus is Enterococcus NOR-S R CIP, LVX R EUCAST Breakpoints 12 Enterococcus genus is Enterococcus NOR-S R CIP, LVX R
EUCAST Breakpoints 12 Haemophilus influenzae genus_species is Haemophilus influenzae PEN-S S AMC, AMP, AMX, CFM, CPD, CPT, CRO, CTB, CTX, CXM, CZT, DOR, ETP, FEP, IMR, IPM, MEM, MEV, PEN, SAM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2022" & clinical_breakpoints$mo == as.mo("H. influenzae"))]), "IMR", "MEV"); sort(x[x %in% betalactams()]) EUCAST Breakpoints 12 Haemophilus influenzae genus_species is Haemophilus influenzae PEN-S S AMC, AMP, AMX, PEN, SAM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2022" & clinical_breakpoints$mo == as.mo("H. influenzae"))])); sort(x[x %in% penicillins()]) |> toString()
EUCAST Breakpoints 12 Haemophilus influenzae genus_species is Haemophilus influenzae PEN-S, BLA-S R, R AMP, AMX, PIP R EUCAST Breakpoints 12 Haemophilus influenzae genus_species is Haemophilus influenzae PEN-S, BLA-S R, R AMP, AMX, PIP R
EUCAST Breakpoints 12 Haemophilus influenzae genus_species is Haemophilus influenzae AMC S SAM S EUCAST Breakpoints 12 Haemophilus influenzae genus_species is Haemophilus influenzae AMC S SAM S
EUCAST Breakpoints 12 Haemophilus influenzae genus_species is Haemophilus influenzae AMC I SAM I EUCAST Breakpoints 12 Haemophilus influenzae genus_species is Haemophilus influenzae AMC I SAM I
@@ -331,6 +331,9 @@ EUCAST Breakpoints 12 Staphylococcus genus_species is Staphylococcus aureus FOX-
EUCAST Breakpoints 12 Staphylococcus genus is Staphylococcus ERY S AZM, CLR, RXT S EUCAST Breakpoints 12 Staphylococcus genus is Staphylococcus ERY S AZM, CLR, RXT S
EUCAST Breakpoints 12 Staphylococcus genus is Staphylococcus TCY-S S DOX, MNO S EUCAST Breakpoints 12 Staphylococcus genus is Staphylococcus TCY-S S DOX, MNO S
EUCAST Breakpoints 12 Staphylococcus genus_species is Staphylococcus aureus FOX-S S CTX, CRO I EUCAST Breakpoints 12 Staphylococcus genus_species is Staphylococcus aureus FOX-S S CTX, CRO I
EUCAST Breakpoints 12 Staphylococcus genus is Staphylococcus TCY-S R DOX, MNO R
EUCAST Breakpoints 12 Staphylococcus genus is Staphylococcus ERY R AZM, CLR, RXT R
EUCAST Breakpoints 12 Staphylococcus genus is Staphylococcus NOR-S R CIP, MFX, LVX R
EUCAST Breakpoints 12 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN S penicillins S EUCAST Breakpoints 12 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN S penicillins S
EUCAST Breakpoints 12 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN I penicillins I EUCAST Breakpoints 12 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN I penicillins I
EUCAST Breakpoints 12 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN R penicillins R EUCAST Breakpoints 12 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN R penicillins R
@@ -351,8 +354,8 @@ EUCAST Breakpoints 12 Streptococcus groups A, B, C, G genus_species one_of Strep
EUCAST Breakpoints 12 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G ERY R AZM, CLR, RXT R EUCAST Breakpoints 12 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G ERY R AZM, CLR, RXT R
EUCAST Breakpoints 12 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G TCY-S S DOX, MNO S EUCAST Breakpoints 12 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G TCY-S S DOX, MNO S
EUCAST Breakpoints 12 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G TCY-S R DOX, MNO R EUCAST Breakpoints 12 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G TCY-S R DOX, MNO R
EUCAST Breakpoints 12 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S S AMC, AMP, AMX, CPD, CPT, CRO, CTX, CXM, DOR, ETP, FEP, IMR, IPM, MEM, MEV, OXA, PEN, PHN, PIP, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2022" & clinical_breakpoints$mo == as.mo("S. pneumoniae") & clinical_breakpoints$ab != as.ab("cefaclor"))]); sort(c(x[x %in% betalactams()], "SAM", "PIP", "TZP", "PHN", "IMR", "MEV")) EUCAST Breakpoints 12 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S S AMC, AMP, AMX, CPD, CPT, CRO, CTX, CXM, DOR, ETP, FEP, IMR, IPM, MEM, MEV, OXA, PEN, PHN, PIP, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2022" & clinical_breakpoints$mo == as.mo("S. pneumoniae") & clinical_breakpoints$ab != as.ab("cefaclor"))]); sort(c(x[x %in% betalactams()], "SAM", "PIP", "TZP", "PHN", "IMR", "MEV")) |> toString()
EUCAST Breakpoints 12 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae PEN S AMC, AMP, AMX, CPD, CPT, CRO, CTX, CXM, DOR, ETP, FEP, IMR, IPM, MEM, MEV, OXA, PEN, PHN, PIP, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2022" & clinical_breakpoints$mo == as.mo("S. pneumoniae") & clinical_breakpoints$ab != as.ab("cefaclor"))]); sort(c(x[x %in% betalactams()], "SAM", "PIP", "TZP", "PHN", "IMR", "MEV")) EUCAST Breakpoints 12 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae PEN S AMC, AMP, AMX, CPD, CPT, CRO, CTX, CXM, DOR, ETP, FEP, IMR, IPM, MEM, MEV, PEN, PHN, PIP, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2022" & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)) & clinical_breakpoints$mo == as.mo("S. pneumoniae") & clinical_breakpoints$ab != as.ab("cefaclor"))]); sort(c(x[x %in% betalactams()], "SAM", "PIP", "TZP", "PHN", "IMR", "MEV")) |> toString()
EUCAST Breakpoints 12 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S S CEC I EUCAST Breakpoints 12 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S S CEC I
EUCAST Breakpoints 12 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae PEN S CEC I EUCAST Breakpoints 12 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae PEN S CEC I
EUCAST Breakpoints 12 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S R PEN, PHN R from flowchart: when OXA < 20 or PEN > 0.06 EUCAST Breakpoints 12 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S R PEN, PHN R from flowchart: when OXA < 20 or PEN > 0.06
@@ -381,7 +384,6 @@ EUCAST Breakpoints 12 Viridans group streptococci genus_species one_of Viridans
EUCAST Breakpoints 12 Viridans group streptococci genus_species one_of Viridans Group Streptococcus (VGS) AMP S AMX, AMC, SAM, PIP, TZP S paste("Streptococcus", mo_species(microorganisms.groups$mo[which(microorganisms.groups$mo_group == "B_STRPT_VIRI")]), collapse = ", ") EUCAST Breakpoints 12 Viridans group streptococci genus_species one_of Viridans Group Streptococcus (VGS) AMP S AMX, AMC, SAM, PIP, TZP S paste("Streptococcus", mo_species(microorganisms.groups$mo[which(microorganisms.groups$mo_group == "B_STRPT_VIRI")]), collapse = ", ")
EUCAST Breakpoints 12 Viridans group streptococci genus_species one_of Viridans Group Streptococcus (VGS) AMP I AMX, AMC, SAM, PIP, TZP I paste("Streptococcus", mo_species(microorganisms.groups$mo[which(microorganisms.groups$mo_group == "B_STRPT_VIRI")]), collapse = ", ") EUCAST Breakpoints 12 Viridans group streptococci genus_species one_of Viridans Group Streptococcus (VGS) AMP I AMX, AMC, SAM, PIP, TZP I paste("Streptococcus", mo_species(microorganisms.groups$mo[which(microorganisms.groups$mo_group == "B_STRPT_VIRI")]), collapse = ", ")
EUCAST Breakpoints 12 Viridans group streptococci genus_species one_of Viridans Group Streptococcus (VGS) AMP R AMX, AMC, SAM, PIP, TZP R paste("Streptococcus", mo_species(microorganisms.groups$mo[which(microorganisms.groups$mo_group == "B_STRPT_VIRI")]), collapse = ", ") EUCAST Breakpoints 12 Viridans group streptococci genus_species one_of Viridans Group Streptococcus (VGS) AMP R AMX, AMC, SAM, PIP, TZP R paste("Streptococcus", mo_species(microorganisms.groups$mo[which(microorganisms.groups$mo_group == "B_STRPT_VIRI")]), collapse = ", ")
EUCAST Breakpoints 13 Staphylococcus genus_species is Staphylococcus aureus FOX-S S CTX, CRO I
EUCAST Breakpoints 14 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae AMP S AMX S EUCAST Breakpoints 14 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae AMP S AMX S
EUCAST Breakpoints 14 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae AMP I AMX I EUCAST Breakpoints 14 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae AMP I AMX I
EUCAST Breakpoints 14 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae AMP R AMX R EUCAST Breakpoints 14 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae AMP R AMX R
@@ -391,19 +393,19 @@ EUCAST Breakpoints 14 Aerococcus sanguinicola/urinae genus_species is Aerococcus
EUCAST Breakpoints 14 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae NOR-S S fluoroquinolones S EUCAST Breakpoints 14 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae NOR-S S fluoroquinolones S
EUCAST Breakpoints 14 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae NOR-S I fluoroquinolones I EUCAST Breakpoints 14 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae NOR-S I fluoroquinolones I
EUCAST Breakpoints 14 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae NOR-S R fluoroquinolones R EUCAST Breakpoints 14 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae NOR-S R fluoroquinolones R
EUCAST Breakpoints 14 Anaerobic bacteria genus is Prevotella PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, PIP, SAM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2024" & mo_genus(clinical_breakpoints$mo) == "Prevotella")]), "AMP", "SAM", "AMX", "AMC", "PIP", "ETP", "IPM"); sort(x[x %in% betalactams()]) EUCAST Breakpoints 14 Anaerobic bacteria genus is Prevotella PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2024" & mo_genus(clinical_breakpoints$mo) == "Prevotella" & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)))]); x[x %in% betalactams()] |> sort() |> toString()
EUCAST Breakpoints 14 Anaerobic bacteria genus is Prevotella AMP S AMX S EUCAST Breakpoints 14 Anaerobic bacteria genus is Prevotella AMP S AMX S
EUCAST Breakpoints 14 Anaerobic bacteria genus is Prevotella AMP I AMX I EUCAST Breakpoints 14 Anaerobic bacteria genus is Prevotella AMP I AMX I
EUCAST Breakpoints 14 Anaerobic bacteria genus is Prevotella AMP R AMX R EUCAST Breakpoints 14 Anaerobic bacteria genus is Prevotella AMP R AMX R
EUCAST Breakpoints 14 Anaerobic bacteria genus_species is Fusobacterium necrophorum PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, PIP, SAM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2024" & clinical_breakpoints$mo == as.mo("Fusobacterium necrophorum"))]), "AMP", "SAM", "AMX", "AMC", "PIP", "ETP", "IPM"); sort(x[x %in% betalactams()]) EUCAST Breakpoints 14 Anaerobic bacteria genus_species is Fusobacterium necrophorum PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2024" & clinical_breakpoints$mo == as.mo("Fusibacterium necrophorum") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)))]); x[x %in% betalactams()] |> sort() |> toString()
EUCAST Breakpoints 14 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP S AMX S EUCAST Breakpoints 14 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP S AMX S
EUCAST Breakpoints 14 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP I AMX I EUCAST Breakpoints 14 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP I AMX I
EUCAST Breakpoints 14 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP R AMX R EUCAST Breakpoints 14 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP R AMX R
EUCAST Breakpoints 14 Anaerobic bacteria genus_species is Clostridium perfringens PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, PIP, SAM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2024" & clinical_breakpoints$mo == as.mo("Fusobacterium necrophorum"))]), "AMP", "SAM", "AMX", "AMC", "PIP", "ETP", "IPM"); sort(x[x %in% betalactams()]) EUCAST Breakpoints 14 Anaerobic bacteria genus_species is Clostridium perfringens PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2024" & clinical_breakpoints$mo == as.mo("Clostridium perfringens") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)))]); x[x %in% betalactams()] |> sort() |> toString()
EUCAST Breakpoints 14 Anaerobic bacteria genus_species is Clostridium perfringens AMP S AMX S EUCAST Breakpoints 14 Anaerobic bacteria genus_species is Clostridium perfringens AMP S AMX S
EUCAST Breakpoints 14 Anaerobic bacteria genus_species is Clostridium perfringens AMP I AMX I EUCAST Breakpoints 14 Anaerobic bacteria genus_species is Clostridium perfringens AMP I AMX I
EUCAST Breakpoints 14 Anaerobic bacteria genus_species is Clostridium perfringens AMP R AMX R EUCAST Breakpoints 14 Anaerobic bacteria genus_species is Clostridium perfringens AMP R AMX R
EUCAST Breakpoints 14 Anaerobic bacteria genus_species is Cutibacterium acnes PEN S AMC, AMP, AMX, CRO, CTX, ETP, IPM, MEM, PEN, PIP, SAM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2024" & clinical_breakpoints$mo == as.mo("Cutibacterium acnes"))]), "AMP", "SAM", "AMX", "AMC", "PIP", "ETP", "IPM", "TZP", "CTX", "CRO"); sort(x[x %in% betalactams()]) EUCAST Breakpoints 14 Anaerobic bacteria genus_species is Cutibacterium acnes PEN S AMC, AMP, AMX, CRO, CTX, ETP, IPM, MEM, PEN, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2024" & clinical_breakpoints$mo == as.mo("Cutibacterium acnes") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)))]); x[x %in% betalactams()] |> sort() |> toString()
EUCAST Breakpoints 14 Anaerobic bacteria genus_species is Cutibacterium acnes AMP S AMX S EUCAST Breakpoints 14 Anaerobic bacteria genus_species is Cutibacterium acnes AMP S AMX S
EUCAST Breakpoints 14 Anaerobic bacteria genus_species is Cutibacterium acnes AMP I AMX I EUCAST Breakpoints 14 Anaerobic bacteria genus_species is Cutibacterium acnes AMP I AMX I
EUCAST Breakpoints 14 Anaerobic bacteria genus_species is Cutibacterium acnes AMP R AMX R EUCAST Breakpoints 14 Anaerobic bacteria genus_species is Cutibacterium acnes AMP R AMX R
@@ -439,9 +441,9 @@ EUCAST Breakpoints 14 Enterobacterales (Order) order is Enterobacterales AMP I A
EUCAST Breakpoints 14 Enterobacterales (Order) order is Enterobacterales AMP R AMX R EUCAST Breakpoints 14 Enterobacterales (Order) order is Enterobacterales AMP R AMX R
EUCAST Breakpoints 14 Enterobacterales (Order) order is Enterobacterales LEX S CZO I EUCAST Breakpoints 14 Enterobacterales (Order) order is Enterobacterales LEX S CZO I
EUCAST Breakpoints 14 Enterobacterales (Order) order is Enterobacterales CFR S CZO I EUCAST Breakpoints 14 Enterobacterales (Order) order is Enterobacterales CFR S CZO I
EUCAST Breakpoints 14 Enterobacterales (Order) genus is Salmonella PEF-S S CIP S EUCAST Breakpoints 14 Enterobacterales (Order) order is Enterobacterales PEF-S S fluoroquinolones S
EUCAST Breakpoints 14 Enterobacterales (Order) genus is Salmonella PEF-S I CIP I EUCAST Breakpoints 14 Enterobacterales (Order) order is Enterobacterales PEF-S I fluoroquinolones I
EUCAST Breakpoints 14 Enterobacterales (Order) genus is Salmonella PEF-S R CIP R EUCAST Breakpoints 14 Enterobacterales (Order) order is Enterobacterales PEF-S R fluoroquinolones R
EUCAST Breakpoints 14 Enterobacterales (Order) genus_species is Yersinia enterocolitica TCY S DOX S EUCAST Breakpoints 14 Enterobacterales (Order) genus_species is Yersinia enterocolitica TCY S DOX S
EUCAST Breakpoints 14 Enterobacterales (Order) genus_species is Yersinia enterocolitica TCY I DOX I EUCAST Breakpoints 14 Enterobacterales (Order) genus_species is Yersinia enterocolitica TCY I DOX I
EUCAST Breakpoints 14 Enterobacterales (Order) genus_species is Yersinia enterocolitica TCY R DOX R EUCAST Breakpoints 14 Enterobacterales (Order) genus_species is Yersinia enterocolitica TCY R DOX R
@@ -451,7 +453,7 @@ EUCAST Breakpoints 14 Enterococcus genus is Enterococcus AMP R AMP, SAM, AMX, AM
EUCAST Breakpoints 14 Enterococcus genus is Enterococcus NOR-S S CIP, LVX S EUCAST Breakpoints 14 Enterococcus genus is Enterococcus NOR-S S CIP, LVX S
EUCAST Breakpoints 14 Enterococcus genus is Enterococcus NOR-S I CIP, LVX I EUCAST Breakpoints 14 Enterococcus genus is Enterococcus NOR-S I CIP, LVX I
EUCAST Breakpoints 14 Enterococcus genus is Enterococcus NOR-S R CIP, LVX R EUCAST Breakpoints 14 Enterococcus genus is Enterococcus NOR-S R CIP, LVX R
EUCAST Breakpoints 14 Haemophilus influenzae genus_species is Haemophilus influenzae PEN-S S AMC, AMP, AMX, CEC, CFM, CPD, CPT, CRO, CTB, CTX, CXM, CZT, DOR, ETP, FEP, IMR, IPM, MEM, MEV, PEN, SAM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2024" & clinical_breakpoints$mo == as.mo("H. influenzae"))]), "IMR", "MEV"); sort(x[x %in% betalactams()]) |> sort() |> toString() EUCAST Breakpoints 14 Haemophilus influenzae genus_species is Haemophilus influenzae PEN-S S AMC, AMP, AMX, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2024" & clinical_breakpoints$mo == as.mo("Haemophilus influenzae") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)))]); x[x %in% penicillins()] |> sort() |> toString()
EUCAST Breakpoints 14 Haemophilus influenzae genus_species is Haemophilus influenzae PEN-S, BLA-S R, R AMP, AMX, PIP R EUCAST Breakpoints 14 Haemophilus influenzae genus_species is Haemophilus influenzae PEN-S, BLA-S R, R AMP, AMX, PIP R
EUCAST Breakpoints 14 Haemophilus influenzae genus_species is Haemophilus influenzae AMC S SAM S EUCAST Breakpoints 14 Haemophilus influenzae genus_species is Haemophilus influenzae AMC S SAM S
EUCAST Breakpoints 14 Haemophilus influenzae genus_species is Haemophilus influenzae AMC I SAM I EUCAST Breakpoints 14 Haemophilus influenzae genus_species is Haemophilus influenzae AMC I SAM I
@@ -521,8 +523,11 @@ EUCAST Breakpoints 14 Staphylococcus genus_species is Staphylococcus coagulase-n
EUCAST Breakpoints 14 Staphylococcus genus_species is Staphylococcus aureus VAN S DAL, ORI S EUCAST Breakpoints 14 Staphylococcus genus_species is Staphylococcus aureus VAN S DAL, ORI S
EUCAST Breakpoints 14 Staphylococcus genus_species is Staphylococcus aureus FOX-S, VAN R, S TLV S MRSA isolates are in this file safely denoted as FOX resistant EUCAST Breakpoints 14 Staphylococcus genus_species is Staphylococcus aureus FOX-S, VAN R, S TLV S MRSA isolates are in this file safely denoted as FOX resistant
EUCAST Breakpoints 14 Staphylococcus genus is Staphylococcus ERY S AZM, CLR, RXT S EUCAST Breakpoints 14 Staphylococcus genus is Staphylococcus ERY S AZM, CLR, RXT S
EUCAST Breakpoints 14 Staphylococcus genus is Staphylococcus TCY-S S DOX, MNO S EUCAST Breakpoints 14 Staphylococcus genus is Staphylococcus TCY S DOX, MNO S
EUCAST Breakpoints 14 Staphylococcus genus_species is Staphylococcus aureus FOX-S S CTX, CRO I EUCAST Breakpoints 14 Staphylococcus genus_species is Staphylococcus aureus FOX-S S CTX, CRO I
EUCAST Breakpoints 14 Staphylococcus genus is Staphylococcus TCY R DOX, MNO R
EUCAST Breakpoints 14 Staphylococcus genus is Staphylococcus ERY R AZM, CLR, RXT R
EUCAST Breakpoints 14 Staphylococcus genus is Staphylococcus NOR-S R CIP, MFX, LVX R
EUCAST Breakpoints 14 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN S penicillins S EUCAST Breakpoints 14 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN S penicillins S
EUCAST Breakpoints 14 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN I penicillins I EUCAST Breakpoints 14 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN I penicillins I
EUCAST Breakpoints 14 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN R penicillins R EUCAST Breakpoints 14 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN R penicillins R
@@ -543,8 +548,8 @@ EUCAST Breakpoints 14 Streptococcus groups A, B, C, G genus_species one_of Strep
EUCAST Breakpoints 14 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G ERY R AZM, CLR, RXT R EUCAST Breakpoints 14 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G ERY R AZM, CLR, RXT R
EUCAST Breakpoints 14 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G TCY-S S DOX, MNO S EUCAST Breakpoints 14 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G TCY-S S DOX, MNO S
EUCAST Breakpoints 14 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G TCY-S R DOX, MNO R EUCAST Breakpoints 14 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G TCY-S R DOX, MNO R
EUCAST Breakpoints 14 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S S AMC, AMP, AMX, CPD, CPT, CRO, CTX, CXM, DOR, ETP, FEP, IMR, IPM, MEM, MEV, PEN, PHN, PIP, SAM, TZP S x <- unique(c("SAM", "PIP", "TZP", "PHN", "IMR", "MEV", clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2024" & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)) & clinical_breakpoints$mo == as.mo("S. pneumoniae"))])); x[x %in% betalactams()] |> sort() |> toString() AND REMOVE CEC EUCAST Breakpoints 14 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S S AMC, AMP, AMX, CPD, CPT, CRO, CTX, CXM, DOR, ETP, FEP, IMR, IPM, MEM, MEV, PEN, PHN, PIP, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2024" & clinical_breakpoints$mo == as.mo("S. pneumoniae") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)) & clinical_breakpoints$ab != as.ab("cefaclor"))]); sort(c(x[x %in% betalactams()], "SAM", "PIP", "TZP", "PHN", "IMR", "MEV")) |> toString()
EUCAST Breakpoints 14 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae PEN S AMC, AMP, AMX, CPD, CPT, CRO, CTX, CXM, DOR, ETP, FEP, IMR, IPM, MEM, MEV, PEN, PHN, PIP, SAM, TZP S x <- unique(c("SAM", "PIP", "TZP", "PHN", "IMR", "MEV", clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2024" & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)) & clinical_breakpoints$mo == as.mo("S. pneumoniae"))])); x[x %in% betalactams()] |> sort() |> toString() AND REMOVE CEC EUCAST Breakpoints 14 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae PEN S AMC, AMP, AMX, CPD, CPT, CRO, CTX, CXM, DOR, ETP, FEP, IMR, IPM, MEM, MEV, PEN, PHN, PIP, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2024" & clinical_breakpoints$mo == as.mo("S. pneumoniae") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)) & clinical_breakpoints$ab != as.ab("cefaclor"))]); sort(c(x[x %in% betalactams()], "SAM", "PIP", "TZP", "PHN", "IMR", "MEV")) |> toString()
EUCAST Breakpoints 14 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S S CEC I EUCAST Breakpoints 14 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S S CEC I
EUCAST Breakpoints 14 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae PEN S CEC I EUCAST Breakpoints 14 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae PEN S CEC I
EUCAST Breakpoints 14 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S R PEN, PHN R from flowchart: when OXA < 20 or PEN > 0.06 EUCAST Breakpoints 14 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S R PEN, PHN R from flowchart: when OXA < 20 or PEN > 0.06
@@ -582,19 +587,19 @@ EUCAST Breakpoints 15 Aerococcus sanguinicola/urinae genus_species is Aerococcus
EUCAST Breakpoints 15 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae NOR-S S fluoroquinolones S EUCAST Breakpoints 15 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae NOR-S S fluoroquinolones S
EUCAST Breakpoints 15 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae NOR-S I fluoroquinolones I EUCAST Breakpoints 15 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae NOR-S I fluoroquinolones I
EUCAST Breakpoints 15 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae NOR-S R fluoroquinolones R EUCAST Breakpoints 15 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae NOR-S R fluoroquinolones R
EUCAST Breakpoints 15 Anaerobic bacteria genus is Prevotella PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, PIP, SAM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2025" & mo_genus(clinical_breakpoints$mo) == "Prevotella")]), "AMP", "SAM", "AMX", "AMC", "PIP", "ETP", "IPM"); sort(x[x %in% betalactams()]) |> toString() EUCAST Breakpoints 15 Anaerobic bacteria genus is Prevotella PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2025" & mo_genus(clinical_breakpoints$mo) == "Prevotella" & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)))]); x[x %in% betalactams()] |> sort() |> toString()
EUCAST Breakpoints 15 Anaerobic bacteria genus is Prevotella AMP S AMX S EUCAST Breakpoints 15 Anaerobic bacteria genus is Prevotella AMP S AMX S
EUCAST Breakpoints 15 Anaerobic bacteria genus is Prevotella AMP I AMX I EUCAST Breakpoints 15 Anaerobic bacteria genus is Prevotella AMP I AMX I
EUCAST Breakpoints 15 Anaerobic bacteria genus is Prevotella AMP R AMX R EUCAST Breakpoints 15 Anaerobic bacteria genus is Prevotella AMP R AMX R
EUCAST Breakpoints 15 Anaerobic bacteria genus_species is Fusobacterium necrophorum PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, PIP, SAM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2025" & clinical_breakpoints$mo == as.mo("Fusobacterium necrophorum"))]), "AMP", "SAM", "AMX", "AMC", "PIP", "ETP", "IPM"); sort(x[x %in% betalactams()]) |> toString() EUCAST Breakpoints 15 Anaerobic bacteria genus_species is Fusobacterium necrophorum PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2025" & clinical_breakpoints$mo == as.mo("Fusibacterium necrophorum") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)))]); x[x %in% betalactams()] |> sort() |> toString()
EUCAST Breakpoints 15 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP S AMX S EUCAST Breakpoints 15 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP S AMX S
EUCAST Breakpoints 15 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP I AMX I EUCAST Breakpoints 15 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP I AMX I
EUCAST Breakpoints 15 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP R AMX R EUCAST Breakpoints 15 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP R AMX R
EUCAST Breakpoints 15 Anaerobic bacteria genus_species is Clostridium perfringens PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, PIP, SAM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2025" & clinical_breakpoints$mo == as.mo("Clostridium perfringens"))]), "AMP", "SAM", "AMX", "AMC", "PIP", "ETP", "IPM"); sort(x[x %in% betalactams()]) |> toString() EUCAST Breakpoints 15 Anaerobic bacteria genus_species is Clostridium perfringens PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2025" & clinical_breakpoints$mo == as.mo("Clostridium perfringens") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)))]); x[x %in% betalactams()] |> sort() |> toString()
EUCAST Breakpoints 15 Anaerobic bacteria genus_species is Clostridium perfringens AMP S AMX S EUCAST Breakpoints 15 Anaerobic bacteria genus_species is Clostridium perfringens AMP S AMX S
EUCAST Breakpoints 15 Anaerobic bacteria genus_species is Clostridium perfringens AMP I AMX I EUCAST Breakpoints 15 Anaerobic bacteria genus_species is Clostridium perfringens AMP I AMX I
EUCAST Breakpoints 15 Anaerobic bacteria genus_species is Clostridium perfringens AMP R AMX R EUCAST Breakpoints 15 Anaerobic bacteria genus_species is Clostridium perfringens AMP R AMX R
EUCAST Breakpoints 15 Anaerobic bacteria genus_species is Cutibacterium acnes PEN S AMC, AMP, AMX, CRO, CTX, ETP, IPM, MEM, PEN, PIP, SAM, TZP, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2025" & clinical_breakpoints$mo == as.mo("Cutibacterium acnes"))]), "AMP", "SAM", "AMX", "AMC", "PIP", "ETP", "IPM", "TZP", "CTX", "CRO"); sort(x[x %in% betalactams()]) |> toString() EUCAST Breakpoints 15 Anaerobic bacteria genus_species is Cutibacterium acnes PEN S AMC, AMP, AMX, CRO, CTX, ETP, IPM, MEM, PEN, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2025" & clinical_breakpoints$mo == as.mo("Cutibacterium acnes") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)))]); x[x %in% betalactams()] |> sort() |> toString()
EUCAST Breakpoints 15 Anaerobic bacteria genus_species is Cutibacterium acnes AMP S AMX S EUCAST Breakpoints 15 Anaerobic bacteria genus_species is Cutibacterium acnes AMP S AMX S
EUCAST Breakpoints 15 Anaerobic bacteria genus_species is Cutibacterium acnes AMP I AMX I EUCAST Breakpoints 15 Anaerobic bacteria genus_species is Cutibacterium acnes AMP I AMX I
EUCAST Breakpoints 15 Anaerobic bacteria genus_species is Cutibacterium acnes AMP R AMX R EUCAST Breakpoints 15 Anaerobic bacteria genus_species is Cutibacterium acnes AMP R AMX R
@@ -630,9 +635,9 @@ EUCAST Breakpoints 15 Enterobacterales (Order) order is Enterobacterales AMP I A
EUCAST Breakpoints 15 Enterobacterales (Order) order is Enterobacterales AMP R AMX R EUCAST Breakpoints 15 Enterobacterales (Order) order is Enterobacterales AMP R AMX R
EUCAST Breakpoints 15 Enterobacterales (Order) order is Enterobacterales LEX S CZO I EUCAST Breakpoints 15 Enterobacterales (Order) order is Enterobacterales LEX S CZO I
EUCAST Breakpoints 15 Enterobacterales (Order) order is Enterobacterales CFR S CZO I EUCAST Breakpoints 15 Enterobacterales (Order) order is Enterobacterales CFR S CZO I
EUCAST Breakpoints 15 Enterobacterales (Order) genus is Salmonella PEF-S S CIP S EUCAST Breakpoints 15 Enterobacterales (Order) order is Enterobacterales PEF-S S fluoroquinolones S
EUCAST Breakpoints 15 Enterobacterales (Order) genus is Salmonella PEF-S I CIP I EUCAST Breakpoints 15 Enterobacterales (Order) order is Enterobacterales PEF-S I fluoroquinolones I
EUCAST Breakpoints 15 Enterobacterales (Order) genus is Salmonella PEF-S R CIP R EUCAST Breakpoints 15 Enterobacterales (Order) order is Enterobacterales PEF-S R fluoroquinolones R
EUCAST Breakpoints 15 Enterobacterales (Order) genus_species is Yersinia enterocolitica TCY S DOX S EUCAST Breakpoints 15 Enterobacterales (Order) genus_species is Yersinia enterocolitica TCY S DOX S
EUCAST Breakpoints 15 Enterobacterales (Order) genus_species is Yersinia enterocolitica TCY I DOX I EUCAST Breakpoints 15 Enterobacterales (Order) genus_species is Yersinia enterocolitica TCY I DOX I
EUCAST Breakpoints 15 Enterobacterales (Order) genus_species is Yersinia enterocolitica TCY R DOX R EUCAST Breakpoints 15 Enterobacterales (Order) genus_species is Yersinia enterocolitica TCY R DOX R
@@ -643,7 +648,7 @@ EUCAST Breakpoints 15 Enterococcus genus is Enterococcus AMP R AMX, AMC R
EUCAST Breakpoints 15 Enterococcus genus is Enterococcus NOR-S S CIP, LVX S EUCAST Breakpoints 15 Enterococcus genus is Enterococcus NOR-S S CIP, LVX S
EUCAST Breakpoints 15 Enterococcus genus is Enterococcus NOR-S I CIP, LVX I EUCAST Breakpoints 15 Enterococcus genus is Enterococcus NOR-S I CIP, LVX I
EUCAST Breakpoints 15 Enterococcus genus is Enterococcus NOR-S R CIP, LVX R EUCAST Breakpoints 15 Enterococcus genus is Enterococcus NOR-S R CIP, LVX R
EUCAST Breakpoints 15 Haemophilus influenzae genus_species is Haemophilus influenzae PEN-S S AMC, AMP, AMX, CAZ, CEC, CFM, CPD, CPT, CRO, CTB, CTX, CXM, CZT, DOR, ETP, FEP, IMR, IPM, MEM, MEV, PEN, SAM, TEM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2025" & clinical_breakpoints$mo == as.mo("H. influenzae"))]), "IMR", "MEV"); sort(x[x %in% betalactams()]) |> toString() EUCAST Breakpoints 15 Haemophilus influenzae genus_species is Haemophilus influenzae PEN-S S AMC, AMP, AMX, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2025" & clinical_breakpoints$mo == as.mo("Haemophilus influenzae") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)))]); x[x %in% penicillins()] |> sort() |> toString()
EUCAST Breakpoints 15 Haemophilus influenzae genus_species is Haemophilus influenzae PEN-S, BLA-S R, R AMP, AMX, PIP R EUCAST Breakpoints 15 Haemophilus influenzae genus_species is Haemophilus influenzae PEN-S, BLA-S R, R AMP, AMX, PIP R
EUCAST Breakpoints 15 Haemophilus influenzae genus_species is Haemophilus influenzae AMC S SAM S EUCAST Breakpoints 15 Haemophilus influenzae genus_species is Haemophilus influenzae AMC S SAM S
EUCAST Breakpoints 15 Haemophilus influenzae genus_species is Haemophilus influenzae AMC I SAM I EUCAST Breakpoints 15 Haemophilus influenzae genus_species is Haemophilus influenzae AMC I SAM I
@@ -708,9 +713,12 @@ EUCAST Breakpoints 15 Staphylococcus genus_species one_of Staphylococcus pseudin
EUCAST Breakpoints 15 Staphylococcus genus_species one_of Staphylococcus pseudintermedius, Staphylococcus schleiferi, Staphylococcus coagulans OXA-S R carbapenems R Not explicitly mentioned in guidelines in this section, but previous section about these 3 species do mention OXA as preferred method EUCAST Breakpoints 15 Staphylococcus genus_species one_of Staphylococcus pseudintermedius, Staphylococcus schleiferi, Staphylococcus coagulans OXA-S R carbapenems R Not explicitly mentioned in guidelines in this section, but previous section about these 3 species do mention OXA as preferred method
EUCAST Breakpoints 15 Staphylococcus genus is Staphylococcus NOR-S S MFX S EUCAST Breakpoints 15 Staphylococcus genus is Staphylococcus NOR-S S MFX S
EUCAST Breakpoints 15 Staphylococcus genus is Staphylococcus NOR-S S CIP, LVX I EUCAST Breakpoints 15 Staphylococcus genus is Staphylococcus NOR-S S CIP, LVX I
EUCAST Breakpoints 15 Staphylococcus genus is Staphylococcus NOR-S R CIP, MFX, LVX R
EUCAST Breakpoints 15 Staphylococcus genus is Staphylococcus ERY S AZM, CLR, RXT S EUCAST Breakpoints 15 Staphylococcus genus is Staphylococcus ERY S AZM, CLR, RXT S
EUCAST Breakpoints 15 Staphylococcus genus is Staphylococcus TCY-S S DOX, MNO S EUCAST Breakpoints 15 Staphylococcus genus is Staphylococcus TCY S DOX, MNO S
EUCAST Breakpoints 15 Staphylococcus genus_species is Staphylococcus aureus FOX-S S CTX, CRO I EUCAST Breakpoints 15 Staphylococcus genus_species is Staphylococcus aureus FOX-S S CTX, CRO I
EUCAST Breakpoints 15 Staphylococcus genus is Staphylococcus TCY R DOX, MNO R
EUCAST Breakpoints 15 Staphylococcus genus is Staphylococcus ERY R AZM, CLR, RXT R
EUCAST Breakpoints 15 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN S penicillins S EUCAST Breakpoints 15 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN S penicillins S
EUCAST Breakpoints 15 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN I penicillins I EUCAST Breakpoints 15 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN I penicillins I
EUCAST Breakpoints 15 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN R penicillins R EUCAST Breakpoints 15 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN R penicillins R
@@ -731,8 +739,8 @@ EUCAST Breakpoints 15 Streptococcus groups A, B, C, G genus_species one_of Strep
EUCAST Breakpoints 15 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G ERY R AZM, CLR, RXT R EUCAST Breakpoints 15 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G ERY R AZM, CLR, RXT R
EUCAST Breakpoints 15 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G TCY-S S DOX, MNO S EUCAST Breakpoints 15 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G TCY-S S DOX, MNO S
EUCAST Breakpoints 15 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G TCY-S R DOX, MNO R EUCAST Breakpoints 15 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G TCY-S R DOX, MNO R
EUCAST Breakpoints 15 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S S AMC, AMP, AMX, BPR, CFM, CPD, CPT, CRO, CTX, CXM, CZT, DOR, ETP, FEP, IMR, IPM, MEM, MEV, OXA, PEN, PHN, PHN, PIP, PIP, SAM, TZP, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2025" & clinical_breakpoints$mo == as.mo("S. pneumoniae") & clinical_breakpoints$ab != as.ab("cefaclor"))]); sort(c(x[x %in% betalactams()], "SAM", "PIP", "TZP", "PHN", "IMR", "MEV")) |> toString() EUCAST Breakpoints 15 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S S AMC, AMP, AMX, CPD, CPT, CRO, CTX, CXM, DOR, ETP, FEP, FPE, IMR, IPM, MEM, MEV, PEN, PHN, PIP, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2025" & clinical_breakpoints$mo == as.mo("S. pneumoniae") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)) & clinical_breakpoints$ab != as.ab("cefaclor"))]); sort(c(x[x %in% betalactams()], "SAM", "PIP", "TZP", "PHN", "IMR", "MEV", "FPE")) |> toString()
EUCAST Breakpoints 15 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae PEN S AMC, AMP, AMX, BPR, CFM, CPD, CPT, CRO, CTX, CXM, CZT, DOR, ETP, FEP, IMR, IPM, MEM, MEV, OXA, PEN, PHN, PHN, PIP, PIP, SAM, TZP, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2025" & clinical_breakpoints$mo == as.mo("S. pneumoniae") & clinical_breakpoints$ab != as.ab("cefaclor"))]); sort(c(x[x %in% betalactams()], "SAM", "PIP", "TZP", "PHN", "IMR", "MEV")) |> toString() EUCAST Breakpoints 15 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae PEN S AMC, AMP, AMX, CPD, CPT, CRO, CTX, CXM, DOR, ETP, FEP, FPE, IMR, IPM, MEM, MEV, PEN, PHN, PIP, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2025" & clinical_breakpoints$mo == as.mo("S. pneumoniae") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)) & clinical_breakpoints$ab != as.ab("cefaclor"))]); sort(c(x[x %in% betalactams()], "SAM", "PIP", "TZP", "PHN", "IMR", "MEV", "FPE")) |> toString()
EUCAST Breakpoints 15 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S S CEC I EUCAST Breakpoints 15 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S S CEC I
EUCAST Breakpoints 15 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae PEN S CEC I EUCAST Breakpoints 15 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae PEN S CEC I
EUCAST Breakpoints 15 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S R PEN, PHN R from flowchart: when OXA < 20 or PEN > 0.06 EUCAST Breakpoints 15 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S R PEN, PHN R from flowchart: when OXA < 20 or PEN > 0.06
@@ -770,19 +778,19 @@ EUCAST Breakpoints 16 Aerococcus sanguinicola/urinae genus_species is Aerococcus
EUCAST Breakpoints 16 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae NOR-S S fluoroquinolones S EUCAST Breakpoints 16 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae NOR-S S fluoroquinolones S
EUCAST Breakpoints 16 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae NOR-S I fluoroquinolones I EUCAST Breakpoints 16 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae NOR-S I fluoroquinolones I
EUCAST Breakpoints 16 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae NOR-S R fluoroquinolones R EUCAST Breakpoints 16 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae NOR-S R fluoroquinolones R
EUCAST Breakpoints 16 Anaerobic bacteria genus is Prevotella PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, PIP, SAM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2026" & mo_genus(clinical_breakpoints$mo) == "Prevotella")]), "AMP", "SAM", "AMX", "AMC", "PIP", "ETP", "IPM"); sort(x[x %in% betalactams()]) |> toString() EUCAST Breakpoints 16 Anaerobic bacteria genus is Prevotella PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2026" & mo_genus(clinical_breakpoints$mo) == "Prevotella" & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)))]); x[x %in% betalactams()] |> sort() |> toString()
EUCAST Breakpoints 16 Anaerobic bacteria genus is Prevotella AMP S AMX S EUCAST Breakpoints 16 Anaerobic bacteria genus is Prevotella AMP S AMX S
EUCAST Breakpoints 16 Anaerobic bacteria genus is Prevotella AMP I AMX I EUCAST Breakpoints 16 Anaerobic bacteria genus is Prevotella AMP I AMX I
EUCAST Breakpoints 16 Anaerobic bacteria genus is Prevotella AMP R AMX R EUCAST Breakpoints 16 Anaerobic bacteria genus is Prevotella AMP R AMX R
EUCAST Breakpoints 16 Anaerobic bacteria genus_species is Fusobacterium necrophorum PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, PIP, SAM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2024" & clinical_breakpoints$mo == as.mo("Fusobacterium necrophorum"))]), "AMP", "SAM", "AMX", "AMC", "PIP", "ETP", "IPM"); sort(x[x %in% betalactams()]) EUCAST Breakpoints 16 Anaerobic bacteria genus_species is Fusobacterium necrophorum PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2026" & clinical_breakpoints$mo == as.mo("Fusibacterium necrophorum") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)))]); x[x %in% betalactams()] |> sort() |> toString()
EUCAST Breakpoints 16 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP S AMX S EUCAST Breakpoints 16 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP S AMX S
EUCAST Breakpoints 16 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP I AMX I EUCAST Breakpoints 16 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP I AMX I
EUCAST Breakpoints 16 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP R AMX R EUCAST Breakpoints 16 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP R AMX R
EUCAST Breakpoints 16 Anaerobic bacteria genus_species is Clostridium perfringens PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, PIP, SAM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2026" & clinical_breakpoints$mo == as.mo("Clostridium perfringens"))]), "AMP", "SAM", "AMX", "AMC", "PIP", "ETP", "IPM"); sort(x[x %in% betalactams()]) |> toString() EUCAST Breakpoints 16 Anaerobic bacteria genus_species is Clostridium perfringens PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2026" & clinical_breakpoints$mo == as.mo("Clostridium perfringens") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)))]); x[x %in% betalactams()] |> sort() |> toString()
EUCAST Breakpoints 16 Anaerobic bacteria genus_species is Clostridium perfringens AMP S AMX S EUCAST Breakpoints 16 Anaerobic bacteria genus_species is Clostridium perfringens AMP S AMX S
EUCAST Breakpoints 16 Anaerobic bacteria genus_species is Clostridium perfringens AMP I AMX I EUCAST Breakpoints 16 Anaerobic bacteria genus_species is Clostridium perfringens AMP I AMX I
EUCAST Breakpoints 16 Anaerobic bacteria genus_species is Clostridium perfringens AMP R AMX R EUCAST Breakpoints 16 Anaerobic bacteria genus_species is Clostridium perfringens AMP R AMX R
EUCAST Breakpoints 16 Anaerobic bacteria genus_species is Cutibacterium acnes PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, PIP, SAM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2026" & clinical_breakpoints$mo == as.mo("Cutibacterium acnes"))]), "AMP", "SAM", "AMX", "AMC", "PIP", "ETP", "IPM"); sort(x[x %in% betalactams()]) |> toString() EUCAST Breakpoints 16 Anaerobic bacteria genus_species is Cutibacterium acnes PEN S AMC, AMP, AMX, CRO, CTX, ETP, IPM, MEM, PEN, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2026" & clinical_breakpoints$mo == as.mo("Cutibacterium acnes") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)))]); x[x %in% betalactams()] |> sort() |> toString()
EUCAST Breakpoints 16 Anaerobic bacteria genus_species is Cutibacterium acnes AMP S AMX S EUCAST Breakpoints 16 Anaerobic bacteria genus_species is Cutibacterium acnes AMP S AMX S
EUCAST Breakpoints 16 Anaerobic bacteria genus_species is Cutibacterium acnes AMP I AMX I EUCAST Breakpoints 16 Anaerobic bacteria genus_species is Cutibacterium acnes AMP I AMX I
EUCAST Breakpoints 16 Anaerobic bacteria genus_species is Cutibacterium acnes AMP R AMX R EUCAST Breakpoints 16 Anaerobic bacteria genus_species is Cutibacterium acnes AMP R AMX R
@@ -818,9 +826,9 @@ EUCAST Breakpoints 16 Enterobacterales (Order) order is Enterobacterales AMP I A
EUCAST Breakpoints 16 Enterobacterales (Order) order is Enterobacterales AMP R AMX R EUCAST Breakpoints 16 Enterobacterales (Order) order is Enterobacterales AMP R AMX R
EUCAST Breakpoints 16 Enterobacterales (Order) order is Enterobacterales LEX S CZO I EUCAST Breakpoints 16 Enterobacterales (Order) order is Enterobacterales LEX S CZO I
EUCAST Breakpoints 16 Enterobacterales (Order) order is Enterobacterales CFR S CZO I EUCAST Breakpoints 16 Enterobacterales (Order) order is Enterobacterales CFR S CZO I
EUCAST Breakpoints 16 Enterobacterales (Order) genus is Salmonella PEF-S S CIP S EUCAST Breakpoints 16 Enterobacterales (Order) order is Enterobacterales PEF-S S fluoroquinolones S
EUCAST Breakpoints 16 Enterobacterales (Order) genus is Salmonella PEF-S I CIP I EUCAST Breakpoints 16 Enterobacterales (Order) order is Enterobacterales PEF-S I fluoroquinolones I
EUCAST Breakpoints 16 Enterobacterales (Order) genus is Salmonella PEF-S R CIP R EUCAST Breakpoints 16 Enterobacterales (Order) order is Enterobacterales PEF-S R fluoroquinolones R
EUCAST Breakpoints 16 Enterobacterales (Order) genus_species is Yersinia enterocolitica TCY S DOX S EUCAST Breakpoints 16 Enterobacterales (Order) genus_species is Yersinia enterocolitica TCY S DOX S
EUCAST Breakpoints 16 Enterobacterales (Order) genus_species is Yersinia enterocolitica TCY I DOX I EUCAST Breakpoints 16 Enterobacterales (Order) genus_species is Yersinia enterocolitica TCY I DOX I
EUCAST Breakpoints 16 Enterobacterales (Order) genus_species is Yersinia enterocolitica TCY R DOX R EUCAST Breakpoints 16 Enterobacterales (Order) genus_species is Yersinia enterocolitica TCY R DOX R
@@ -831,7 +839,7 @@ EUCAST Breakpoints 16 Enterococcus genus is Enterococcus AMP R AMX, AMC R
EUCAST Breakpoints 16 Enterococcus genus is Enterococcus NOR-S S CIP, LVX S EUCAST Breakpoints 16 Enterococcus genus is Enterococcus NOR-S S CIP, LVX S
EUCAST Breakpoints 16 Enterococcus genus is Enterococcus NOR-S I CIP, LVX I EUCAST Breakpoints 16 Enterococcus genus is Enterococcus NOR-S I CIP, LVX I
EUCAST Breakpoints 16 Enterococcus genus is Enterococcus NOR-S R CIP, LVX R EUCAST Breakpoints 16 Enterococcus genus is Enterococcus NOR-S R CIP, LVX R
EUCAST Breakpoints 16 Haemophilus influenzae genus_species is Haemophilus influenzae PEN-S S AMC, AMP, AMX, CAZ, CEC, CFM, CPD, CPT, CRO, CTB, CTX, CXM, CZT, DOR, ETP, FEP, IMR, IPM, MEM, MEV, PEN, SAM, TEM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2026" & clinical_breakpoints$mo == as.mo("H. influenzae"))]), "IMR", "MEV"); sort(x[x %in% betalactams()]) |> toString() EUCAST Breakpoints 16 Haemophilus influenzae genus_species is Haemophilus influenzae PEN-S S AMC, AMP, AMX, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2026" & clinical_breakpoints$mo == as.mo("Haemophilus influenzae") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)))]); x[x %in% penicillins()] |> sort() |> toString()
EUCAST Breakpoints 16 Haemophilus influenzae genus_species is Haemophilus influenzae PEN-S, BLA-S R, R AMP, AMX, PIP R EUCAST Breakpoints 16 Haemophilus influenzae genus_species is Haemophilus influenzae PEN-S, BLA-S R, R AMP, AMX, PIP R
EUCAST Breakpoints 16 Haemophilus influenzae genus_species is Haemophilus influenzae AMC S SAM S EUCAST Breakpoints 16 Haemophilus influenzae genus_species is Haemophilus influenzae AMC S SAM S
EUCAST Breakpoints 16 Haemophilus influenzae genus_species is Haemophilus influenzae AMC I SAM I EUCAST Breakpoints 16 Haemophilus influenzae genus_species is Haemophilus influenzae AMC I SAM I
@@ -897,9 +905,12 @@ EUCAST Breakpoints 16 Staphylococcus genus_species one_of Staphylococcus pseudin
EUCAST Breakpoints 16 Staphylococcus genus_species one_of Staphylococcus pseudintermedius, Staphylococcus schleiferi, Staphylococcus coagulans OXA-S I carbapenems I Not explicitly mentioned in guidelines in this section, but previous section about these 3 species do mention OXA as preferred method EUCAST Breakpoints 16 Staphylococcus genus_species one_of Staphylococcus pseudintermedius, Staphylococcus schleiferi, Staphylococcus coagulans OXA-S I carbapenems I Not explicitly mentioned in guidelines in this section, but previous section about these 3 species do mention OXA as preferred method
EUCAST Breakpoints 16 Staphylococcus genus_species one_of Staphylococcus pseudintermedius, Staphylococcus schleiferi, Staphylococcus coagulans OXA-S R carbapenems R Not explicitly mentioned in guidelines in this section, but previous section about these 3 species do mention OXA as preferred method EUCAST Breakpoints 16 Staphylococcus genus_species one_of Staphylococcus pseudintermedius, Staphylococcus schleiferi, Staphylococcus coagulans OXA-S R carbapenems R Not explicitly mentioned in guidelines in this section, but previous section about these 3 species do mention OXA as preferred method
EUCAST Breakpoints 16 Staphylococcus genus is Staphylococcus NOR-S S MFX S EUCAST Breakpoints 16 Staphylococcus genus is Staphylococcus NOR-S S MFX S
EUCAST Breakpoints 16 Staphylococcus genus is Staphylococcus NOR-S R CIP, MFX, LVX R
EUCAST Breakpoints 16 Staphylococcus genus is Staphylococcus NOR-S S CIP, LVX I EUCAST Breakpoints 16 Staphylococcus genus is Staphylococcus NOR-S S CIP, LVX I
EUCAST Breakpoints 16 Staphylococcus genus is Staphylococcus ERY S AZM, CLR, RXT S EUCAST Breakpoints 16 Staphylococcus genus is Staphylococcus ERY S AZM, CLR, RXT S
EUCAST Breakpoints 16 Staphylococcus genus is Staphylococcus TCY-S S DOX, MNO S EUCAST Breakpoints 16 Staphylococcus genus is Staphylococcus TCY S DOX, MNO S
EUCAST Breakpoints 16 Staphylococcus genus is Staphylococcus TCY R DOX, MNO R
EUCAST Breakpoints 16 Staphylococcus genus is Staphylococcus ERY R AZM, CLR, RXT R
EUCAST Breakpoints 16 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN S penicillins S EUCAST Breakpoints 16 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN S penicillins S
EUCAST Breakpoints 16 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN I penicillins I EUCAST Breakpoints 16 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN I penicillins I
EUCAST Breakpoints 16 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN R penicillins R EUCAST Breakpoints 16 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN R penicillins R
@@ -920,8 +931,8 @@ EUCAST Breakpoints 16 Streptococcus groups A, B, C, G genus_species one_of Strep
EUCAST Breakpoints 16 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G ERY R AZM, CLR, RXT R EUCAST Breakpoints 16 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G ERY R AZM, CLR, RXT R
EUCAST Breakpoints 16 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G TCY-S S DOX, MNO S EUCAST Breakpoints 16 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G TCY-S S DOX, MNO S
EUCAST Breakpoints 16 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G TCY-S R DOX, MNO R EUCAST Breakpoints 16 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G TCY-S R DOX, MNO R
EUCAST Breakpoints 16 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S S AMC, AMP, AMX, BPR, CFM, CPD, CPT, CRO, CTX, CXM, CZT, DOR, ETP, FEP, IMR, IPM, MEM, MEV, OXA, PEN, PHN, PHN, PIP, PIP, SAM, TZP, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2026" & clinical_breakpoints$mo == as.mo("S. pneumoniae") & clinical_breakpoints$ab != as.ab("cefaclor"))]); sort(c(x[x %in% betalactams()], "SAM", "PIP", "TZP", "PHN", "IMR", "MEV")) |> toString() EUCAST Breakpoints 16 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S S AMC, AMP, AMX, CPD, CPT, CRO, CTX, CXM, DOR, ETP, FEP, FPE, IMR, IPM, MEM, MEV, PEN, PHN, PIP, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2026" & clinical_breakpoints$mo == as.mo("S. pneumoniae") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)) & clinical_breakpoints$ab != as.ab("cefaclor"))]); sort(c(x[x %in% betalactams()], "SAM", "PIP", "TZP", "PHN", "IMR", "MEV", "FPE")) |> toString()
EUCAST Breakpoints 16 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae PEN S AMC, AMP, AMX, BPR, CFM, CPD, CPT, CRO, CTX, CXM, CZT, DOR, ETP, FEP, IMR, IPM, MEM, MEV, OXA, PEN, PHN, PHN, PIP, PIP, SAM, TZP, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2026" & clinical_breakpoints$mo == as.mo("S. pneumoniae") & clinical_breakpoints$ab != as.ab("cefaclor"))]); sort(c(x[x %in% betalactams()], "SAM", "PIP", "TZP", "PHN", "IMR", "MEV")) |> toString() EUCAST Breakpoints 16 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae PEN S AMC, AMP, AMX, CPD, CPT, CRO, CTX, CXM, DOR, ETP, FEP, FPE, IMR, IPM, MEM, MEV, PEN, PHN, PIP, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2026" & clinical_breakpoints$mo == as.mo("S. pneumoniae") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)) & clinical_breakpoints$ab != as.ab("cefaclor"))]); sort(c(x[x %in% betalactams()], "SAM", "PIP", "TZP", "PHN", "IMR", "MEV", "FPE")) |> toString()
EUCAST Breakpoints 16 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S S CEC I EUCAST Breakpoints 16 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S S CEC I
EUCAST Breakpoints 16 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae PEN S CEC I EUCAST Breakpoints 16 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae PEN S CEC I
EUCAST Breakpoints 16 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S R PEN, PHN R from flowchart: when OXA < 20 or PEN > 0.06 EUCAST Breakpoints 16 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S R PEN, PHN R from flowchart: when OXA < 20 or PEN > 0.06
@@ -959,19 +970,19 @@ EUCAST Breakpoints 13.1 Aerococcus sanguinicola/urinae genus_species is Aerococc
EUCAST Breakpoints 13.1 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae NOR-S S fluoroquinolones S EUCAST Breakpoints 13.1 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae NOR-S S fluoroquinolones S
EUCAST Breakpoints 13.1 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae NOR-S I fluoroquinolones I EUCAST Breakpoints 13.1 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae NOR-S I fluoroquinolones I
EUCAST Breakpoints 13.1 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae NOR-S R fluoroquinolones R EUCAST Breakpoints 13.1 Aerococcus sanguinicola/urinae genus_species is Aerococcus sanguinicola, Aerococcus urinae NOR-S R fluoroquinolones R
EUCAST Breakpoints 13.1 Anaerobic bacteria genus is Prevotella PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, PIP, SAM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2026" & mo_genus(clinical_breakpoints$mo) == "Prevotella")]), "AMP", "SAM", "AMX", "AMC", "PIP", "ETP", "IPM"); sort(x[x %in% betalactams()]) |> toString() EUCAST Breakpoints 13.1 Anaerobic bacteria genus is Prevotella PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2023" & mo_genus(clinical_breakpoints$mo) == "Prevotella" & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)))]); x[x %in% betalactams()] |> sort() |> toString()
EUCAST Breakpoints 13.1 Anaerobic bacteria genus is Prevotella AMP S AMX S EUCAST Breakpoints 13.1 Anaerobic bacteria genus is Prevotella AMP S AMX S
EUCAST Breakpoints 13.1 Anaerobic bacteria genus is Prevotella AMP I AMX I EUCAST Breakpoints 13.1 Anaerobic bacteria genus is Prevotella AMP I AMX I
EUCAST Breakpoints 13.1 Anaerobic bacteria genus is Prevotella AMP R AMX R EUCAST Breakpoints 13.1 Anaerobic bacteria genus is Prevotella AMP R AMX R
EUCAST Breakpoints 13.1 Anaerobic bacteria genus_species is Fusobacterium necrophorum PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, PIP, SAM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2026" & clinical_breakpoints$mo == as.mo("Fusobacterium necrophorum"))]), "AMP", "SAM", "AMX", "AMC", "PIP", "ETP", "IPM"); sort(x[x %in% betalactams()]) |> toString() EUCAST Breakpoints 13.1 Anaerobic bacteria genus_species is Fusobacterium necrophorum PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2023" & clinical_breakpoints$mo == as.mo("Fusibacterium necrophorum") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)))]); x[x %in% betalactams()] |> sort() |> toString()
EUCAST Breakpoints 13.1 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP S AMX S EUCAST Breakpoints 13.1 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP S AMX S
EUCAST Breakpoints 13.1 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP I AMX I EUCAST Breakpoints 13.1 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP I AMX I
EUCAST Breakpoints 13.1 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP R AMX R EUCAST Breakpoints 13.1 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP R AMX R
EUCAST Breakpoints 13.1 Anaerobic bacteria genus_species is Clostridium perfringens PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, PIP, SAM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2026" & clinical_breakpoints$mo == as.mo("Clostridium perfringensm"))]), "AMP", "SAM", "AMX", "AMC", "PIP", "ETP", "IPM"); sort(x[x %in% betalactams()]) |> toString() EUCAST Breakpoints 13.1 Anaerobic bacteria genus_species is Clostridium perfringens PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2023" & clinical_breakpoints$mo == as.mo("Clostridium perfringens") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)))]); x[x %in% betalactams()] |> sort() |> toString()
EUCAST Breakpoints 13.1 Anaerobic bacteria genus_species is Clostridium perfringens AMP S AMX S EUCAST Breakpoints 13.1 Anaerobic bacteria genus_species is Clostridium perfringens AMP S AMX S
EUCAST Breakpoints 13.1 Anaerobic bacteria genus_species is Clostridium perfringens AMP I AMX I EUCAST Breakpoints 13.1 Anaerobic bacteria genus_species is Clostridium perfringens AMP I AMX I
EUCAST Breakpoints 13.1 Anaerobic bacteria genus_species is Clostridium perfringens AMP R AMX R EUCAST Breakpoints 13.1 Anaerobic bacteria genus_species is Clostridium perfringens AMP R AMX R
EUCAST Breakpoints 13.1 Anaerobic bacteria genus_species is Cutibacterium acnes PEN S AMC, AMP, AMX, CRO, CTX, ETP, IPM, MEM, PEN, PIP, SAM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2026" & clinical_breakpoints$mo == as.mo("Cutibacterium acnes"))]), "AMP", "SAM", "AMX", "AMC", "PIP", "ETP", "IPM", "TZP", "CTX", "CRO"); sort(x[x %in% betalactams()]) |> toString() EUCAST Breakpoints 13.1 Anaerobic bacteria genus_species is Cutibacterium acnes PEN S AMC, AMP, AMX, CRO, CTX, ETP, IPM, MEM, PEN, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2023" & clinical_breakpoints$mo == as.mo("Cutibacterium acnes") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)))]); x[x %in% betalactams()] |> sort() |> toString()
EUCAST Breakpoints 13.1 Anaerobic bacteria genus_species is Cutibacterium acnes AMP S AMX S EUCAST Breakpoints 13.1 Anaerobic bacteria genus_species is Cutibacterium acnes AMP S AMX S
EUCAST Breakpoints 13.1 Anaerobic bacteria genus_species is Cutibacterium acnes AMP I AMX I EUCAST Breakpoints 13.1 Anaerobic bacteria genus_species is Cutibacterium acnes AMP I AMX I
EUCAST Breakpoints 13.1 Anaerobic bacteria genus_species is Cutibacterium acnes AMP R AMX R EUCAST Breakpoints 13.1 Anaerobic bacteria genus_species is Cutibacterium acnes AMP R AMX R
@@ -1003,9 +1014,9 @@ EUCAST Breakpoints 13.1 Enterobacterales (Order) order is Enterobacterales AMP I
EUCAST Breakpoints 13.1 Enterobacterales (Order) order is Enterobacterales AMP R AMX R EUCAST Breakpoints 13.1 Enterobacterales (Order) order is Enterobacterales AMP R AMX R
EUCAST Breakpoints 13.1 Enterobacterales (Order) order is Enterobacterales LEX S CZO I EUCAST Breakpoints 13.1 Enterobacterales (Order) order is Enterobacterales LEX S CZO I
EUCAST Breakpoints 13.1 Enterobacterales (Order) order is Enterobacterales CFR S CZO I EUCAST Breakpoints 13.1 Enterobacterales (Order) order is Enterobacterales CFR S CZO I
EUCAST Breakpoints 13.1 Enterobacterales (Order) genus is Salmonella PEF-S S CIP S EUCAST Breakpoints 13.1 Enterobacterales (Order) order is Enterobacterales PEF-S S fluoroquinolones S
EUCAST Breakpoints 13.1 Enterobacterales (Order) genus is Salmonella PEF-S I CIP I EUCAST Breakpoints 13.1 Enterobacterales (Order) order is Enterobacterales PEF-S I fluoroquinolones I
EUCAST Breakpoints 13.1 Enterobacterales (Order) genus is Salmonella PEF-S R CIP R EUCAST Breakpoints 13.1 Enterobacterales (Order) order is Enterobacterales PEF-S R fluoroquinolones R
EUCAST Breakpoints 13.1 Enterobacterales (Order) genus_species is Yersinia enterocolitica TCY S DOX S EUCAST Breakpoints 13.1 Enterobacterales (Order) genus_species is Yersinia enterocolitica TCY S DOX S
EUCAST Breakpoints 13.1 Enterobacterales (Order) genus_species is Yersinia enterocolitica TCY I DOX I EUCAST Breakpoints 13.1 Enterobacterales (Order) genus_species is Yersinia enterocolitica TCY I DOX I
EUCAST Breakpoints 13.1 Enterobacterales (Order) genus_species is Yersinia enterocolitica TCY R DOX R EUCAST Breakpoints 13.1 Enterobacterales (Order) genus_species is Yersinia enterocolitica TCY R DOX R
@@ -1015,7 +1026,7 @@ EUCAST Breakpoints 13.1 Enterococcus genus is Enterococcus AMP R AMP, SAM, AMX,
EUCAST Breakpoints 13.1 Enterococcus genus is Enterococcus NOR-S S CIP, LVX S EUCAST Breakpoints 13.1 Enterococcus genus is Enterococcus NOR-S S CIP, LVX S
EUCAST Breakpoints 13.1 Enterococcus genus is Enterococcus NOR-S I CIP, LVX I EUCAST Breakpoints 13.1 Enterococcus genus is Enterococcus NOR-S I CIP, LVX I
EUCAST Breakpoints 13.1 Enterococcus genus is Enterococcus NOR-S R CIP, LVX R EUCAST Breakpoints 13.1 Enterococcus genus is Enterococcus NOR-S R CIP, LVX R
EUCAST Breakpoints 13.1 Haemophilus influenzae genus_species is Haemophilus influenzae PEN-S S AMC, AMP, AMX, CFM, CPD, CPT, CRO, CTB, CTX, CXM, CZT, DOR, ETP, FEP, IMR, IPM, MEM, MEV, PEN, SAM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2022" & clinical_breakpoints$mo == as.mo("H. influenzae"))]), "IMR", "MEV"); sort(x[x %in% betalactams()]) EUCAST Breakpoints 13.1 Haemophilus influenzae genus_species is Haemophilus influenzae PEN-S S AMC, AMP, AMX, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2023" & clinical_breakpoints$mo == as.mo("Haemophilus influenzae") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)))]); x[x %in% penicillins()] |> sort() |> toString()
EUCAST Breakpoints 13.1 Haemophilus influenzae genus_species is Haemophilus influenzae PEN-S, BLA-S R, R AMP, AMX, PIP R EUCAST Breakpoints 13.1 Haemophilus influenzae genus_species is Haemophilus influenzae PEN-S, BLA-S R, R AMP, AMX, PIP R
EUCAST Breakpoints 13.1 Haemophilus influenzae genus_species is Haemophilus influenzae AMC S SAM S EUCAST Breakpoints 13.1 Haemophilus influenzae genus_species is Haemophilus influenzae AMC S SAM S
EUCAST Breakpoints 13.1 Haemophilus influenzae genus_species is Haemophilus influenzae AMC I SAM I EUCAST Breakpoints 13.1 Haemophilus influenzae genus_species is Haemophilus influenzae AMC I SAM I
@@ -1084,7 +1095,10 @@ EUCAST Breakpoints 13.1 Staphylococcus genus is Staphylococcus NOR-S S CIP, LVX
EUCAST Breakpoints 13.1 Staphylococcus genus_species is Staphylococcus aureus VAN S DAL, ORI S EUCAST Breakpoints 13.1 Staphylococcus genus_species is Staphylococcus aureus VAN S DAL, ORI S
EUCAST Breakpoints 13.1 Staphylococcus genus_species is Staphylococcus aureus FOX-S, VAN R, S TLV S MRSA isolates are in this file safely denoted as FOX resistant EUCAST Breakpoints 13.1 Staphylococcus genus_species is Staphylococcus aureus FOX-S, VAN R, S TLV S MRSA isolates are in this file safely denoted as FOX resistant
EUCAST Breakpoints 13.1 Staphylococcus genus is Staphylococcus ERY S AZM, CLR, RXT S EUCAST Breakpoints 13.1 Staphylococcus genus is Staphylococcus ERY S AZM, CLR, RXT S
EUCAST Breakpoints 13.1 Staphylococcus genus is Staphylococcus TCY-S S DOX, MNO S EUCAST Breakpoints 13.1 Staphylococcus genus is Staphylococcus TCY S DOX, MNO S
EUCAST Breakpoints 13.1 Staphylococcus genus is Staphylococcus TCY R DOX, MNO R
EUCAST Breakpoints 13.1 Staphylococcus genus is Staphylococcus ERY R AZM, CLR, RXT R
EUCAST Breakpoints 13.1 Staphylococcus genus is Staphylococcus NOR-S R CIP, MFX, LVX R
EUCAST Breakpoints 13.1 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN S penicillins S EUCAST Breakpoints 13.1 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN S penicillins S
EUCAST Breakpoints 13.1 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN I penicillins I EUCAST Breakpoints 13.1 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN I penicillins I
EUCAST Breakpoints 13.1 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN R penicillins R EUCAST Breakpoints 13.1 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group C, Streptococcus Group G PEN R penicillins R
@@ -1105,8 +1119,8 @@ EUCAST Breakpoints 13.1 Streptococcus groups A, B, C, G genus_species one_of Str
EUCAST Breakpoints 13.1 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G ERY R AZM, CLR, RXT R EUCAST Breakpoints 13.1 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G ERY R AZM, CLR, RXT R
EUCAST Breakpoints 13.1 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G TCY-S S DOX, MNO S EUCAST Breakpoints 13.1 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G TCY-S S DOX, MNO S
EUCAST Breakpoints 13.1 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G TCY-S R DOX, MNO R EUCAST Breakpoints 13.1 Streptococcus groups A, B, C, G genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G TCY-S R DOX, MNO R
EUCAST Breakpoints 13.1 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S S AMC, AMP, AMX, CPD, CPT, CRO, CTX, CXM, DOR, ETP, FEP, IMR, IPM, MEM, MEV, OXA, PEN, PHN, PIP, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2022" & clinical_breakpoints$mo == as.mo("S. pneumoniae") & clinical_breakpoints$ab != as.ab("cefaclor"))]); sort(c(x[x %in% betalactams()], "SAM", "PIP", "TZP", "PHN", "IMR", "MEV")) EUCAST Breakpoints 13.1 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S S AMC, AMP, AMX, CPD, CPT, CRO, CTX, CXM, DOR, ETP, FEP, IMR, IPM, MEM, MEV, PEN, PHN, PIP, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2023" & clinical_breakpoints$mo == as.mo("S. pneumoniae") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)) & clinical_breakpoints$ab != as.ab("cefaclor"))]); sort(c(x[x %in% betalactams()], "SAM", "PIP", "TZP", "PHN", "IMR", "MEV")) |> toString()
EUCAST Breakpoints 13.1 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae PEN S AMC, AMP, AMX, CPD, CPT, CRO, CTX, CXM, DOR, ETP, FEP, IMR, IPM, MEM, MEV, OXA, PEN, PHN, PIP, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2022" & clinical_breakpoints$mo == as.mo("S. pneumoniae") & clinical_breakpoints$ab != as.ab("cefaclor"))]); sort(c(x[x %in% betalactams()], "SAM", "PIP", "TZP", "PHN", "IMR", "MEV")) EUCAST Breakpoints 13.1 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae PEN S AMC, AMP, AMX, CPD, CPT, CRO, CTX, CXM, DOR, ETP, FEP, IMR, IPM, MEM, MEV, PEN, PHN, PIP, SAM, TZP S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2023" & clinical_breakpoints$mo == as.mo("S. pneumoniae") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)) & clinical_breakpoints$ab != as.ab("cefaclor"))]); sort(c(x[x %in% betalactams()], "SAM", "PIP", "TZP", "PHN", "IMR", "MEV")) |> toString()
EUCAST Breakpoints 13.1 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S S CEC I EUCAST Breakpoints 13.1 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S S CEC I
EUCAST Breakpoints 13.1 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae PEN S CEC I EUCAST Breakpoints 13.1 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae PEN S CEC I
EUCAST Breakpoints 13.1 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S R PEN, PHN R from flowchart: when OXA < 20 or PEN > 0.06 EUCAST Breakpoints 13.1 Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA-S R PEN, PHN R from flowchart: when OXA < 20 or PEN > 0.06
@@ -1135,25 +1149,6 @@ EUCAST Breakpoints 13.1 Viridans group streptococci genus_species one_of Viridan
EUCAST Breakpoints 13.1 Viridans group streptococci genus_species one_of Viridans Group Streptococcus (VGS) AMP S AMX, AMC, SAM, PIP, TZP S will be expanded in eucast_rules() EUCAST Breakpoints 13.1 Viridans group streptococci genus_species one_of Viridans Group Streptococcus (VGS) AMP S AMX, AMC, SAM, PIP, TZP S will be expanded in eucast_rules()
EUCAST Breakpoints 13.1 Viridans group streptococci genus_species one_of Viridans Group Streptococcus (VGS) AMP I AMX, AMC, SAM, PIP, TZP I will be expanded in eucast_rules() EUCAST Breakpoints 13.1 Viridans group streptococci genus_species one_of Viridans Group Streptococcus (VGS) AMP I AMX, AMC, SAM, PIP, TZP I will be expanded in eucast_rules()
EUCAST Breakpoints 13.1 Viridans group streptococci genus_species one_of Viridans Group Streptococcus (VGS) AMP R AMX, AMC, SAM, PIP, TZP R will be expanded in eucast_rules() EUCAST Breakpoints 13.1 Viridans group streptococci genus_species one_of Viridans Group Streptococcus (VGS) AMP R AMX, AMC, SAM, PIP, TZP R will be expanded in eucast_rules()
EUCAST Breakpoints 13.0 Anaerobic bacteria genus is Prevotella PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, PIP, SAM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2023" & mo_genus(clinical_breakpoints$mo) == "Prevotella")]), "AMP", "SAM", "AMX", "AMC", "PIP", "ETP", "IPM"); sort(x[x %in% betalactams()])
EUCAST Breakpoints 13.0 Anaerobic bacteria genus is Prevotella AMP S AMX S
EUCAST Breakpoints 13.0 Anaerobic bacteria genus is Prevotella AMP I AMX I
EUCAST Breakpoints 13.0 Anaerobic bacteria genus is Prevotella AMP R AMX R
EUCAST Breakpoints 13.0 Anaerobic bacteria genus_species is Fusobacterium necrophorum PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, PIP, SAM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2023" & clinical_breakpoints$mo == as.mo("Fusobacterium necrophorum"))]), "AMP", "SAM", "AMX", "AMC", "PIP", "ETP", "IPM"); sort(x[x %in% betalactams()])
EUCAST Breakpoints 13.0 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP S AMX S
EUCAST Breakpoints 13.0 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP I AMX I
EUCAST Breakpoints 13.0 Anaerobic bacteria genus_species is Fusobacterium necrophorum AMP R AMX R
EUCAST Breakpoints 13.0 Anaerobic bacteria genus_species is Clostridium perfringens PEN S AMC, AMP, AMX, ETP, IPM, MEM, PEN, PIP, SAM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2023" & clinical_breakpoints$mo == as.mo("Fusobacterium necrophorum"))]), "AMP", "SAM", "AMX", "AMC", "PIP", "ETP", "IPM"); sort(x[x %in% betalactams()])
EUCAST Breakpoints 13.0 Anaerobic bacteria genus_species is Clostridium perfringens AMP S AMX S
EUCAST Breakpoints 13.0 Anaerobic bacteria genus_species is Clostridium perfringens AMP I AMX I
EUCAST Breakpoints 13.0 Anaerobic bacteria genus_species is Clostridium perfringens AMP R AMX R
EUCAST Breakpoints 13.0 Anaerobic bacteria genus_species is Cutibacterium acnes PEN S AMC, AMP, AMX, CRO, CTX, ETP, IPM, MEM, PEN, PIP, SAM, TZP S x <- c(unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2023" & clinical_breakpoints$mo == as.mo("Cutibacterium acnes"))]), "AMP", "SAM", "AMX", "AMC", "PIP", "ETP", "IPM", "TZP", "CTX", "CRO"); sort(x[x %in% betalactams()])
EUCAST Breakpoints 13.0 Anaerobic bacteria genus_species is Cutibacterium acnes AMP S AMX S
EUCAST Breakpoints 13.0 Anaerobic bacteria genus_species is Cutibacterium acnes AMP I AMX I
EUCAST Breakpoints 13.0 Anaerobic bacteria genus_species is Cutibacterium acnes AMP R AMX R
EUCAST Breakpoints 13.0 Anaerobic bacteria genus_species is Cutibacterium acnes CTX S CRO S
EUCAST Breakpoints 13.0 Anaerobic bacteria genus_species is Cutibacterium acnes CTX I CRO I
EUCAST Breakpoints 13.0 Anaerobic bacteria genus_species is Cutibacterium acnes CTX R CRO R
EUCAST Breakpoints Corynebacterium diphtheriae/ulcerans genus_species one_of Corynebacterium diphtheriae, Corynebacterium ulcerans PEN I AMX S EUCAST Breakpoints Corynebacterium diphtheriae/ulcerans genus_species one_of Corynebacterium diphtheriae, Corynebacterium ulcerans PEN I AMX S
EUCAST Breakpoints Corynebacterium diphtheriae/ulcerans genus_species one_of Corynebacterium diphtheriae, Corynebacterium ulcerans PEN R AMX R EUCAST Breakpoints Corynebacterium diphtheriae/ulcerans genus_species one_of Corynebacterium diphtheriae, Corynebacterium ulcerans PEN R AMX R
EUCAST Breakpoints Corynebacterium diphtheriae/ulcerans genus_species one_of Corynebacterium diphtheriae, Corynebacterium ulcerans PEN S CTX S EUCAST Breakpoints Corynebacterium diphtheriae/ulcerans genus_species one_of Corynebacterium diphtheriae, Corynebacterium ulcerans PEN S CTX S
@@ -1455,13 +1450,7 @@ EUCAST Expert Rules 3.3 Expert Rules on Staphylococcus genus is Staphylococcus M
EUCAST Expert Rules 3.3 Expert Rules on Staphylococcus genus is Staphylococcus TCY S DOX, MNO, TGC S EUCAST Expert Rules 3.3 Expert Rules on Staphylococcus genus is Staphylococcus TCY S DOX, MNO, TGC S
EUCAST Expert Rules 3.3 Expert Rules on Staphylococcus genus is Staphylococcus TCY R DOX, MNO R EUCAST Expert Rules 3.3 Expert Rules on Staphylococcus genus is Staphylococcus TCY R DOX, MNO R
EUCAST Expert Rules 3.3 Expert Rules on Staphylococcus genus is Staphylococcus LNZ S TZD S EUCAST Expert Rules 3.3 Expert Rules on Staphylococcus genus is Staphylococcus LNZ S TZD S
EUCAST Expert Rules 3.3 Expert Rules on Streptococcus species genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G PEN S aminopenicillins, cephalosporins, carbapenems S EUCAST Expert Rules 3.3 Expert Rules on Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA S AMC, AMP, AMX, CEC, CPD, CPT, CRO, CTX, CXM, DOR, ETP, FEP, IPM, MEM, PEN S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2025" & clinical_breakpoints$mo == as.mo("S. pneumoniae") & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)))]); sort(c(x[x %in% betalactams()])) |> toString()
EUCAST Expert Rules 3.3 Expert Rules on Streptococcus species genus_species one_of Viridans Group Streptococcus (VGS) PEN S aminopenicillins, CTX, CRO S Weird that this rules in in the Strep A/B/C/G document, while it's not in the Strep viridans document - document title itself it for "S. species"
EUCAST Expert Rules 3.3 Expert Rules on Streptococcus species genus_species one_of Viridans Group Streptococcus (VGS) PEN R aminopenicillins, CTX, CRO R Weird that this rules in in the Strep A/B/C/G document, while it's not in the Strep viridans document - document title itself it for "S. species"
EUCAST Expert Rules 3.3 Expert Rules on Streptococcus species genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G NOR S LVX I
EUCAST Expert Rules 3.3 Expert Rules on Streptococcus species genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G NOR S MFX S
EUCAST Expert Rules 3.3 Expert Rules on Streptococcus species genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G NOR R LVX, MFX R
EUCAST Expert Rules 3.3 Expert Rules on Streptococcus pneumoniae genus_species is Streptococcus pneumoniae OXA S AMC, AMP, AMX, CEC, CPD, CPT, CRO, CTX, CXM, DOR, ETP, FEP, IPM, MEM, PEN S x <- unique(clinical_breakpoints$ab[which(clinical_breakpoints$guideline == "EUCAST 2025" & clinical_breakpoints$host == "human" & (clinical_breakpoints$site != "Screen" | is.na(clinical_breakpoints$site)) & clinical_breakpoints$mo == as.mo("S. pneumoniae"))]); x[x %in% betalactams()] |> toString()
EUCAST Expert Rules 3.3 Expert Rules on Streptococcus pneumoniae genus_species is Streptococcus pneumoniae NOR S LVX I EUCAST Expert Rules 3.3 Expert Rules on Streptococcus pneumoniae genus_species is Streptococcus pneumoniae NOR S LVX I
EUCAST Expert Rules 3.3 Expert Rules on Streptococcus pneumoniae genus_species is Streptococcus pneumoniae NOR S MFX S EUCAST Expert Rules 3.3 Expert Rules on Streptococcus pneumoniae genus_species is Streptococcus pneumoniae NOR S MFX S
EUCAST Expert Rules 3.3 Expert Rules on Streptococcus pneumoniae genus_species is Streptococcus pneumoniae ERY, CLI S, S macrolides, lincosamides S EUCAST Expert Rules 3.3 Expert Rules on Streptococcus pneumoniae genus_species is Streptococcus pneumoniae ERY, CLI S, S macrolides, lincosamides S
@@ -1470,6 +1459,12 @@ EUCAST Expert Rules 3.3 Expert Rules on Streptococcus pneumoniae genus_species i
EUCAST Expert Rules 3.3 Expert Rules on Streptococcus pneumoniae genus_species is Streptococcus pneumoniae MFX R fluoroquinolones R EUCAST Expert Rules 3.3 Expert Rules on Streptococcus pneumoniae genus_species is Streptococcus pneumoniae MFX R fluoroquinolones R
EUCAST Expert Rules 3.3 Expert Rules on Streptococcus pneumoniae genus_species is Streptococcus pneumoniae TCY S DOX, MNO S EUCAST Expert Rules 3.3 Expert Rules on Streptococcus pneumoniae genus_species is Streptococcus pneumoniae TCY S DOX, MNO S
EUCAST Expert Rules 3.3 Expert Rules on Streptococcus pneumoniae genus_species is Streptococcus pneumoniae TCY R DOX, MNO R EUCAST Expert Rules 3.3 Expert Rules on Streptococcus pneumoniae genus_species is Streptococcus pneumoniae TCY R DOX, MNO R
EUCAST Expert Rules 3.3 Expert Rules on Streptococcus species genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G PEN S aminopenicillins, cephalosporins, carbapenems S
EUCAST Expert Rules 3.3 Expert Rules on Streptococcus species genus_species one_of Viridans Group Streptococcus (VGS) PEN S aminopenicillins, CTX, CRO S Weird that this rules in in the Strep A/B/C/G document, while it's not in the Strep viridans document - document title itself it for "S. species"
EUCAST Expert Rules 3.3 Expert Rules on Streptococcus species genus_species one_of Viridans Group Streptococcus (VGS) PEN R aminopenicillins, CTX, CRO R Weird that this rules in in the Strep A/B/C/G document, while it's not in the Strep viridans document - document title itself it for "S. species"
EUCAST Expert Rules 3.3 Expert Rules on Streptococcus species genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G NOR S LVX I
EUCAST Expert Rules 3.3 Expert Rules on Streptococcus species genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G NOR S MFX S
EUCAST Expert Rules 3.3 Expert Rules on Streptococcus species genus_species one_of Streptococcus Group A, Streptococcus Group B, Streptococcus Group C, Streptococcus Group G NOR R LVX, MFX R
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. order is Enterobacterales PEN, glycopeptides_except_lipo, lipoglycopeptides, FUS, macrolides, lincosamides, streptogramins, RIF, oxazolidinones R EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. order is Enterobacterales PEN, glycopeptides_except_lipo, lipoglycopeptides, FUS, macrolides, lincosamides, streptogramins, RIF, oxazolidinones R
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. fullname like ^Citrobacter (koseri|amalonaticus|sedlakii|farmeri|rodentium) aminopenicillins, TIC R EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. fullname like ^Citrobacter (koseri|amalonaticus|sedlakii|farmeri|rodentium) aminopenicillins, TIC R
EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. fullname like ^Citrobacter (freundii|braakii|murliniae|werkmanii|youngae) aminopenicillins, AMC, SAM, CZO, CEP, LEX, CFR, FOX R EUCAST Expert Rules 3.3 Table 1: Intrinsic resistance in Enterobacterales and Aeromonas spp. fullname like ^Citrobacter (freundii|braakii|murliniae|werkmanii|youngae) aminopenicillins, AMC, SAM, CZO, CEP, LEX, CFR, FOX R
Can't render this file because it has a wrong number of fields in line 10.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -13,13 +13,14 @@ knitr::opts_chunk$set(
fig.path = "pkgdown/assets/", fig.path = "pkgdown/assets/",
out.width = "100%" out.width = "100%"
) )
options(width = 100)
AMR:::reset_all_thrown_messages() AMR:::reset_all_thrown_messages()
``` ```
# The `AMR` Package for R <a href="https://amr-for-r.org/"><img src="./logo.svg" align="right" height="139" /></a> # The `AMR` Package for R <a href="https://amr-for-r.org/"><img src="./logo.svg" align="right" height="139" /></a>
* Provides an **all-in-one solution** for antimicrobial resistance (AMR) data analysis in a One Health approach * Provides an **all-in-one solution** for antimicrobial resistance (AMR) data analysis in a One Health approach
* **Peer-reviewed**, used in over 175 countries, available in `r length(AMR:::LANGUAGES_SUPPORTED)` languages * **Peer-reviewed**, used in over 175 countries, cited over 100 times, available in `r length(AMR:::LANGUAGES_SUPPORTED)` languages
* Generates **antibiograms** - WISCA for empiric coverage estimates, or traditional/syndromic for AMR surveillance * Generates **antibiograms** - WISCA for empiric coverage estimates, or traditional/syndromic for AMR surveillance
* Provides the **full microbiological taxonomy** of `r AMR:::format_included_data_number(AMR::microorganisms)` distinct species and extensive info of `r AMR:::format_included_data_number(NROW(AMR::antimicrobials) + NROW(AMR::antivirals))` antimicrobial drugs * Provides the **full microbiological taxonomy** of `r AMR:::format_included_data_number(AMR::microorganisms)` distinct species and extensive info of `r AMR:::format_included_data_number(NROW(AMR::antimicrobials) + NROW(AMR::antivirals))` antimicrobial drugs
* Applies **CLSI `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, grepl("CLSI", guideline))$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, grepl("CLSI", guideline))$guideline)))`** and **EUCAST `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, grepl("EUCAST", guideline))$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, grepl("EUCAST", guideline))$guideline)))`** clinical and veterinary breakpoints, and ECOFFs, for MIC and disk zone interpretation * Applies **CLSI `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, grepl("CLSI", guideline))$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, grepl("CLSI", guideline))$guideline)))`** and **EUCAST `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, grepl("EUCAST", guideline))$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, grepl("EUCAST", guideline))$guideline)))`** clinical and veterinary breakpoints, and ECOFFs, for MIC and disk zone interpretation
@@ -40,9 +41,9 @@ AMR:::reset_all_thrown_messages()
## Introduction ## Introduction
The `AMR` package is a peer-reviewed, [free and open-source](#copyright) R package with [zero dependencies](https://en.wikipedia.org/wiki/Dependency_hell) to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. **Our aim is to provide a standard** for clean and reproducible AMR data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting. We are a team of [many different researchers](./authors.html) from around the globe to make this a successful and durable project! The `AMR` package is a peer-reviewed, [free and open-source](#copyright) R package with [zero dependencies](https://en.wikipedia.org/wiki/Dependency_hell) to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods.
This work was published in the Journal of Statistical Software (Volume 104(3); [DOI 10.18637/jss.v104.i03](https://doi.org/10.18637/jss.v104.i03)) and formed the basis of two PhD theses ([DOI 10.33612/diss.177417131](https://doi.org/10.33612/diss.177417131) and [DOI 10.33612/diss.192486375](https://doi.org/10.33612/diss.192486375)). **Our aim has always been to provide a standard** for clean and reproducible AMR data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting. We are a team of [many different researchers](./authors.html) from around the globe to make this a successful and durable project! The `AMR` package was already cited [over 100 times](https://scholar.google.com/citations?view_op=view_citation&hl=en&citation_for_view=sAoHvIgAAAAJ:0EnyYjriUFMC) in scientific research.
After installing this package, R knows [**`r AMR:::format_included_data_number(AMR::microorganisms)` distinct microbial species**](./reference/microorganisms.html) (updated `r format(AMR:::TAXONOMY_VERSION$GBIF$accessed_date, "%B %Y")`) and all [**`r AMR:::format_included_data_number(NROW(AMR::antimicrobials) + NROW(AMR::antivirals))` antimicrobial and antiviral drugs**](./reference/antimicrobials.html) by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, grepl("CLSI", guideline))$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, grepl("CLSI", guideline))$guideline)))` and EUCAST `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, grepl("EUCAST", guideline))$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, grepl("EUCAST", guideline))$guideline)))` are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). **It was designed to work in any setting, including those with very limited resources**. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the [University of Groningen](https://www.rug.nl) and the [University Medical Center Groningen](https://www.umcg.nl). After installing this package, R knows [**`r AMR:::format_included_data_number(AMR::microorganisms)` distinct microbial species**](./reference/microorganisms.html) (updated `r format(AMR:::TAXONOMY_VERSION$GBIF$accessed_date, "%B %Y")`) and all [**`r AMR:::format_included_data_number(NROW(AMR::antimicrobials) + NROW(AMR::antivirals))` antimicrobial and antiviral drugs**](./reference/antimicrobials.html) by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, grepl("CLSI", guideline))$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, grepl("CLSI", guideline))$guideline)))` and EUCAST `r min(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, grepl("EUCAST", guideline))$guideline)))`-`r max(as.integer(gsub("[^0-9]", "", subset(AMR::clinical_breakpoints, grepl("EUCAST", guideline))$guideline)))` are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). **It was designed to work in any setting, including those with very limited resources**. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the [University of Groningen](https://www.rug.nl) and the [University Medical Center Groningen](https://www.umcg.nl).

View File

@@ -5,8 +5,8 @@
- Provides an **all-in-one solution** for antimicrobial resistance (AMR) - Provides an **all-in-one solution** for antimicrobial resistance (AMR)
data analysis in a One Health approach data analysis in a One Health approach
- **Peer-reviewed**, used in over 175 countries, available in 28 - **Peer-reviewed**, used in over 175 countries, cited over 100 times,
languages available in 28 languages
- Generates **antibiograms** - WISCA for empiric coverage estimates, or - Generates **antibiograms** - WISCA for empiric coverage estimates, or
traditional/syndromic for AMR surveillance traditional/syndromic for AMR surveillance
- Provides the **full microbiological taxonomy** of ~97 000 distinct - Provides the **full microbiological taxonomy** of ~97 000 distinct
@@ -27,12 +27,9 @@
<div style="display: flex; font-size: 0.8em;"> <div style="display: flex; font-size: 0.8em;">
<p style="text-align:left; width: 50%;"> <p style="text-align:left; width: 50%;">
<small><a href="https://amr-for-r.org/">amr-for-r.org</a></small> <small><a href="https://amr-for-r.org/">amr-for-r.org</a></small>
</p> </p>
<p style="text-align:right; width: 50%;"> <p style="text-align:right; width: 50%;">
<small><a href="https://doi.org/10.18637/jss.v104.i03" target="_blank">doi.org/10.18637/jss.v104.i03</a></small> <small><a href="https://doi.org/10.18637/jss.v104.i03" target="_blank">doi.org/10.18637/jss.v104.i03</a></small>
</p> </p>
@@ -49,22 +46,20 @@ R package with [zero
dependencies](https://en.wikipedia.org/wiki/Dependency_hell) to simplify dependencies](https://en.wikipedia.org/wiki/Dependency_hell) to simplify
the analysis and prediction of Antimicrobial Resistance (AMR) and to the analysis and prediction of Antimicrobial Resistance (AMR) and to
work with microbial and antimicrobial data and properties, by using work with microbial and antimicrobial data and properties, by using
evidence-based methods. **Our aim is to provide a standard** for clean evidence-based methods.
and reproducible AMR data analysis, that can therefore empower
**Our aim has always been to provide a standard** for clean and
reproducible AMR data analysis, that can therefore empower
epidemiological analyses to continuously enable surveillance and epidemiological analyses to continuously enable surveillance and
treatment evaluation in any setting. We are a team of [many different treatment evaluation in any setting. We are a team of [many different
researchers](./authors.html) from around the globe to make this a researchers](./authors.html) from around the globe to make this a
successful and durable project! successful and durable project! The `AMR` package was already cited
[over 100
This work was published in the Journal of Statistical Software (Volume times](https://scholar.google.com/citations?view_op=view_citation&hl=en&citation_for_view=sAoHvIgAAAAJ:0EnyYjriUFMC)
104(3); [DOI in scientific research.
10.18637/jss.v104.i03](https://doi.org/10.18637/jss.v104.i03)) and
formed the basis of two PhD theses ([DOI
10.33612/diss.177417131](https://doi.org/10.33612/diss.177417131) and
[DOI 10.33612/diss.192486375](https://doi.org/10.33612/diss.192486375)).
After installing this package, R knows [**~97 000 distinct microbial After installing this package, R knows [**~97 000 distinct microbial
species**](./reference/microorganisms.html) (updated May 2026) and all species**](./reference/microorganisms.html) (updated mei 2026) and all
[**~620 antimicrobial and antiviral [**~620 antimicrobial and antiviral
drugs**](./reference/antimicrobials.html) by name and code (including drugs**](./reference/antimicrobials.html) by name and code (including
ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all
@@ -175,11 +170,13 @@ example_isolates %>%
#> Using column mo as input for `mo_fullname()` #> Using column mo as input for `mo_fullname()`
#> Using column mo as input for `mo_is_gram_negative()` #> Using column mo as input for `mo_is_gram_negative()`
#> Using column mo as input for `mo_is_intrinsic_resistant()` #> Using column mo as input for `mo_is_intrinsic_resistant()`
#> Determining intrinsic resistance based on 'EUCAST Expected Resistant #> Determining intrinsic resistance based on 'EUCAST Expected
#> Phenotypes' v1.2 (2023). This note will be shown once per session. #> Resistant Phenotypes' v1.2 (2023). This note will be shown
#> For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK #> once per session.
#> (amikacin), and KAN (kanamycin) #> For `aminoglycosides()` using columns GEN (gentamicin), TOB
#> For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem) #> (tobramycin), AMK (amikacin), and KAN (kanamycin)
#> For `carbapenems()` using columns IPM (imipenem) and MEM
#> (meropenem)
#> # A tibble: 35 × 7 #> # A tibble: 35 × 7
#> bacteria GEN TOB AMK KAN IPM MEM #> bacteria GEN TOB AMK KAN IPM MEM
#> <chr> <sir> <sir> <sir> <sir> <sir> <sir> #> <chr> <sir> <sir> <sir> <sir> <sir> <sir>
@@ -229,8 +226,8 @@ wisca(example_isolates,
``` ```
| Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin | | Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|:---|:---|:---| |:------------------------|:-------------------------------------|:-------------------------------------|
| 70.1% (64.9-75.7%) | 93.6% (92.2-95%) | 89.8% (86.7-92.3%) | | 70% (64.8-75.1%) | 93.6% (92.1-95%) | 89.9% (86.9-92.3%) |
WISCA supports stratification by any clinical variable, so you can WISCA supports stratification by any clinical variable, so you can
generate syndrome-specific or ward-specific coverage estimates: generate syndrome-specific or ward-specific coverage estimates:
@@ -244,10 +241,10 @@ wisca(example_isolates,
``` ```
| Syndromic Group | Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin | | Syndromic Group | Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|:---|:---|:---|:---| |:----------------|:------------------------|:-------------------------------------|:-------------------------------------|
| Clinical | 74.5% (69.3-80.1%) | 93.7% (92-95.1%) | 90.5% (87.1-93.1%) | | Clinical | 74.7% (69-80.3%) | 93.6% (92-95.2%) | 90.4% (86.8-93.1%) |
| ICU | 56.7% (48-65.5%) | 86.7% (83.4-89.8%) | 82.9% (78.2-87.3%) | | ICU | 56.9% (48.7-66%) | 86.8% (83.6-90%) | 82.8% (78.3-87.3%) |
| Outpatient | 57.8% (46.4-69.7%) | 76.5% (70.1-82.2%) | 67.9% (57.9-77.5%) | | Outpatient | 57.2% (46-68.2%) | 76.5% (70.3-82.2%) | 67.7% (57.3-77.2%) |
**For AMR surveillance**, traditional antibiograms remain the right tool **For AMR surveillance**, traditional antibiograms remain the right tool
for tracking resistance per species over time: for tracking resistance per species over time:
@@ -256,11 +253,12 @@ for tracking resistance per species over time:
antibiogram(example_isolates, antibiogram(example_isolates,
mo_transform = "gramstain", mo_transform = "gramstain",
antimicrobials = c("AMC", carbapenems(), "TZP")) antimicrobials = c("AMC", carbapenems(), "TZP"))
#> For `carbapenems()` using columns IPM (imipenem) and MEM (meropenem) #> For `carbapenems()` using columns IPM (imipenem) and MEM
#> (meropenem)
``` ```
| Pathogen | Amoxicillin/clavulanic acid | Imipenem | Meropenem | Piperacillin/tazobactam | | Pathogen | Amoxicillin/clavulanic acid | Imipenem | Meropenem | Piperacillin/tazobactam |
|:---|:---|:---|:---|:---| |:--------------|:----------------------------|:--------------------|:---------------------|:------------------------|
| Gram-negative | 76% (73-79%,N=726) | 99% (98-100%,N=631) | 100% (99-100%,N=626) | 88% (85-91%,N=641) | | Gram-negative | 76% (73-79%,N=726) | 99% (98-100%,N=631) | 100% (99-100%,N=626) | 88% (85-91%,N=641) |
| Gram-positive | 76% (74-79%,N=1138) | 81% (75-85%,N=257) | 77% (70-82%,N=203) | 86% (82-89%,N=345) | | Gram-positive | 76% (74-79%,N=1138) | 81% (75-85%,N=257) | 77% (70-82%,N=203) | 86% (82-89%,N=345) |
@@ -274,7 +272,7 @@ antibiogram(example_isolates,
``` ```
| Pathogen | Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin | | Pathogen | Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|:---|:---|:---|:---| |:--------------|:------------------------|:-------------------------------------|:-------------------------------------|
| Gram-negative | 88% (85-91%,N=641) | 99% (97-99%,N=691) | 98% (97-99%,N=693) | | Gram-negative | 88% (85-91%,N=641) | 99% (97-99%,N=691) | 98% (97-99%,N=693) |
| Gram-positive | 86% (82-89%,N=345) | 98% (96-98%,N=1044) | 95% (93-97%,N=550) | | Gram-positive | 86% (82-89%,N=345) | 98% (96-98%,N=1044) | 95% (93-97%,N=550) |
@@ -349,10 +347,6 @@ example_isolates %>%
summarise(across(c(GEN, TOB), summarise(across(c(GEN, TOB),
list(total_R = resistance, list(total_R = resistance,
conf_int = function(x) sir_confidence_interval(x, collapse = "-")))) conf_int = function(x) sir_confidence_interval(x, collapse = "-"))))
#> `resistance()` assumes the EUCAST guideline and thus considers the 'I'
#> category susceptible. Set the `guideline` argument or the `AMR_guideline`
#> option to either "CLSI" or "EUCAST", see `?AMR-options`.
#> This message will be shown once per session.
#> # A tibble: 3 × 5 #> # A tibble: 3 × 5
#> ward GEN_total_R GEN_conf_int TOB_total_R TOB_conf_int #> ward GEN_total_R GEN_conf_int TOB_total_R TOB_conf_int
#> <chr> <dbl> <chr> <dbl> <chr> #> <chr> <dbl> <chr> <dbl> <chr>
@@ -375,15 +369,16 @@ out <- example_isolates %>%
# calculate AMR using resistance(), over all aminoglycosides and polymyxins: # calculate AMR using resistance(), over all aminoglycosides and polymyxins:
summarise(across(c(aminoglycosides(), polymyxins()), summarise(across(c(aminoglycosides(), polymyxins()),
resistance)) resistance))
#> For `aminoglycosides()` using columns GEN (gentamicin), TOB (tobramycin), AMK #> For `aminoglycosides()` using columns GEN (gentamicin), TOB
#> (amikacin), and KAN (kanamycin) #> (tobramycin), AMK (amikacin), and KAN (kanamycin)
#> For `polymyxins()` using column COL (colistin) #> For `polymyxins()` using column COL (colistin)
#> Warning: There was 1 warning in `summarise()`. #> Warning: There was 1 warning in `summarise()`.
#> In argument: `across(c(aminoglycosides(), polymyxins()), resistance)`. #> In argument: `across(c(aminoglycosides(), polymyxins()),
#> resistance)`.
#> In group 3: `ward = "Outpatient"`. #> In group 3: `ward = "Outpatient"`.
#> Caused by warning: #> Caused by warning:
#> ! Introducing NA: only 23 results available for KAN in group: ward = "Outpatient" #> ! Introducing NA: only 23 results available for KAN in group:
#> (whilst `minimum = 30`). #> ward = "Outpatient" (whilst `minimum = 30`).
out out
#> # A tibble: 3 × 6 #> # A tibble: 3 × 6
#> ward GEN TOB AMK KAN COL #> ward GEN TOB AMK KAN COL

View File

@@ -12,7 +12,7 @@ The \code{AMR} package is a peer-reviewed, \href{https://amr-for-r.org/#copyrigh
This work was published in the Journal of Statistical Software (Volume 104(3); \doi{10.18637/jss.v104.i03}) and formed the basis of two PhD theses (\doi{10.33612/diss.177417131} and \doi{10.33612/diss.192486375}). This work was published in the Journal of Statistical Software (Volume 104(3); \doi{10.18637/jss.v104.i03}) and formed the basis of two PhD theses (\doi{10.33612/diss.177417131} and \doi{10.33612/diss.192486375}).
After installing this package, R knows \href{https://amr-for-r.org/reference/microorganisms.html}{\strong{~97 000 distinct microbial species}} (updated May 2026) and all \href{https://amr-for-r.org/reference/antimicrobials.html}{\strong{~620 antimicrobial and antiviral drugs}} by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI 2011-2026 and EUCAST 2011-2026 are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). \strong{It was designed to work in any setting, including those with very limited resources}. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the \href{https://www.rug.nl}{University of Groningen} and the \href{https://www.umcg.nl}{University Medical Center Groningen}. After installing this package, R knows \href{https://amr-for-r.org/reference/microorganisms.html}{\strong{~97 000 distinct microbial species}} (updated mei 2026) and all \href{https://amr-for-r.org/reference/antimicrobials.html}{\strong{~620 antimicrobial and antiviral drugs}} by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI 2011-2026 and EUCAST 2011-2026 are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). \strong{It was designed to work in any setting, including those with very limited resources}. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the \href{https://www.rug.nl}{University of Groningen} and the \href{https://www.umcg.nl}{University Medical Center Groningen}.
The \code{AMR} package is available in English, Arabic, Bengali, Chinese, Czech, Danish, Dutch, Finnish, French, German, Greek, Hindi, Indonesian, Italian, Japanese, Korean, Norwegian, Polish, Portuguese, Romanian, Russian, Spanish, Swahili, Swedish, Turkish, Ukrainian, Urdu, and Vietnamese. Antimicrobial drug (group) names and colloquial microorganism names are provided in these languages. The \code{AMR} package is available in English, Arabic, Bengali, Chinese, Czech, Danish, Dutch, Finnish, French, German, Greek, Hindi, Indonesian, Italian, Japanese, Korean, Norwegian, Polish, Portuguese, Romanian, Russian, Spanish, Swahili, Swedish, Turkish, Ukrainian, Urdu, and Vietnamese. Antimicrobial drug (group) names and colloquial microorganism names are provided in these languages.
} }

View File

@@ -437,7 +437,7 @@ example_isolates[, amr_selector(oral_ddd > 1 & oral_units == "g")]
# data.table -------------------------------------------------------------- # data.table --------------------------------------------------------------
# data.table is supported as well, just use it in the same way as with # data.table is supported as well, just use it in the same way as with
# base R, but add `with = FALSE` if using a single AB selector. # base R, but add `with = FALSE` if using a single AMR selector.
if (require("data.table")) { if (require("data.table")) {
dt <- as.data.table(example_isolates) dt <- as.data.table(example_isolates)
@@ -450,7 +450,7 @@ if (require("data.table")) {
dt[, carbapenems(), with = FALSE] dt[, carbapenems(), with = FALSE]
} }
# for multiple selections or AB selectors, `with = FALSE` is not needed: # for multiple selections or AMR selectors, `with = FALSE` is not needed:
if (require("data.table")) { if (require("data.table")) {
dt[, c("mo", aminoglycosides())] dt[, c("mo", aminoglycosides())]
} }

View File

@@ -14,7 +14,7 @@
\alias{sir_interpretation_history} \alias{sir_interpretation_history}
\title{Interpret MIC and Disk Diffusion as SIR, or Clean Existing SIR Data} \title{Interpret MIC and Disk Diffusion as SIR, or Clean Existing SIR Data}
\usage{ \usage{
as.sir(x, ...) as.sir(x, ..., enforce_method = "auto")
NA_sir_ NA_sir_
@@ -108,7 +108,9 @@ sir_interpretation_history(clean = FALSE)
\arguments{ \arguments{
\item{x}{Vector of values (for class \code{\link{mic}}: MIC values in mg/L, for class \code{\link{disk}}: a disk diffusion radius in millimetres).} \item{x}{Vector of values (for class \code{\link{mic}}: MIC values in mg/L, for class \code{\link{disk}}: a disk diffusion radius in millimetres).}
\item{...}{For using on a \link{data.frame}: selection of columns to apply \code{as.sir()} to. Supports \link[tidyselect:starts_with]{tidyselect language} such as \code{where(is.mic)}, \code{starts_with(...)}, or \code{column1:column4}, and can thus also be \link[=amr_selector]{antimicrobial selectors}, e.g. \code{as.sir(df, penicillins())}. \item{...}{For using on a \link{data.frame}: selection of columns to apply \code{as.sir()} to. Supports \link[tidyselect:starts_with]{tidyselect language} such as \code{where(is.mic)}, \code{starts_with(...)}, or \code{column1:column4}, and can thus also be \link[=amr_selector]{antimicrobial selectors}, e.g. \code{as.sir(df, penicillins())}.}
\item{enforce_method}{A \link{character} string to force interpretation as a specific method, useful when the S3 class of \code{x} is lost (e.g., when called from Python via rpy2). Must be one of \code{"auto"} (default), \code{"mic"}, or \code{"disk"}.
Otherwise: arguments passed on to methods.} Otherwise: arguments passed on to methods.}

View File

@@ -5,7 +5,7 @@
\alias{clinical_breakpoints} \alias{clinical_breakpoints}
\title{Data Set with Clinical Breakpoints for SIR Interpretation} \title{Data Set with Clinical Breakpoints for SIR Interpretation}
\format{ \format{
A \link[tibble:tibble]{tibble} with 45 555 observations and 14 variables: A \link[tibble:tibble]{tibble} with 45 735 observations and 14 variables:
\itemize{ \itemize{
\item \code{guideline}\cr Name of the guideline \item \code{guideline}\cr Name of the guideline
\item \code{type}\cr Breakpoint type, either \code{"ECOFF"}, \code{"animal"}, or \code{"human"} \item \code{type}\cr Breakpoint type, either \code{"ECOFF"}, \code{"animal"}, or \code{"human"}

View File

@@ -46,7 +46,7 @@ A list with class \code{"htest"} containing the following
\code{(observed - expected) / sqrt(expected)}.} \code{(observed - expected) / sqrt(expected)}.}
\item{stdres}{standardized residuals, \item{stdres}{standardized residuals,
\code{(observed - expected) / sqrt(V)}, where \code{V} is the \code{(observed - expected) / sqrt(V)}, where \code{V} is the
residual cell variance (Agresti, 2007, section 2.4.5 residual cell variance {(\if{html}{\out{<a href="#reference+chisq.test.Rd+R+3AAgresti+3A2007" class="citation">}}Agresti 2007\if{html}{\out{</a>}}, section 2.4.5)}
for the case where \code{x} is a matrix, \code{n * p * (1 - p)} otherwise).} for the case where \code{x} is a matrix, \code{n * p * (1 - p)} otherwise).}
} }
\description{ \description{

View File

@@ -59,8 +59,9 @@ ggplot_pca(
} }
\item{pc.biplot}{ \item{pc.biplot}{
If true, use what Gabriel (1971) refers to as a "principal component If true, use what {\if{html}{\cite{}\out{<a href="#reference+biplot.princomp.Rd+R+3AGabriel+3A1971" class="citation">}}Gabriel (1971)\if{html}{\out{</a>}}} refers to as a
biplot", with \code{lambda = 1} and observations scaled up by sqrt(n) and \dQuote{principal component biplot},
with \code{lambda = 1} and observations scaled up by sqrt(n) and
variables scaled down by sqrt(n). Then inner products between variables scaled down by sqrt(n). Then inner products between
variables approximate covariances and distances between observations variables approximate covariances and distances between observations
approximate Mahalanobis distance. approximate Mahalanobis distance.

View File

@@ -173,12 +173,7 @@ eucast_dosage(c("tobra", "genta", "cipro"), "iv", version_breakpoints = 10)
\itemize{ \itemize{
\item EUCAST Expert Rules. Version 2.0, 2012.\cr \item EUCAST Expert Rules. Version 2.0, 2012.\cr
Leclercq et al. \strong{EUCAST expert rules in antimicrobial susceptibility testing.} \emph{Clin Microbiol Infect.} 2013;19(2):141-60; \doi{https://doi.org/10.1111/j.1469-0691.2011.03703.x} Leclercq et al. \strong{EUCAST expert rules in antimicrobial susceptibility testing.} \emph{Clin Microbiol Infect.} 2013;19(2):141-60; \doi{https://doi.org/10.1111/j.1469-0691.2011.03703.x}
\item EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes Tables. Version 3.1, 2016. \href{https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/Expert_rules_intrinsic_exceptional_V3.1.pdf}{(link)} \item EUCAST Expected Phenotypes. \href{https://www.eucast.org/bacteria/important-additional-information/expected-phenotypes/}{(link)}
\item EUCAST Intrinsic Resistance and Unusual Phenotypes. Version 3.2, 2020. \href{https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/2020/Intrinsic_Resistance_and_Unusual_Phenotypes_Tables_v3.2_20200225.pdf}{(link)} \item EUCAST Breakpoint tables for interpretation of MICs and zone diameters. \href{https://www.eucast.org/bacteria/clinical-breakpoints-and-interpretation/clinical-breakpoint-tables/}{(link)}
\item EUCAST Intrinsic Resistance and Unusual Phenotypes. Version 3.3, 2021. \href{https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/2021/Intrinsic_Resistance_and_Unusual_Phenotypes_Tables_v3.3_20211018.pdf}{(link)}
\item EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 9.0, 2019. \href{https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_9.0_Breakpoint_Tables.xlsx}{(link)}
\item EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 10.0, 2020. \href{https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_10.0_Breakpoint_Tables.xlsx}{(link)}
\item EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 11.0, 2021. \href{https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_11.0_Breakpoint_Tables.xlsx}{(link)}
\item EUCAST Breakpoint tables for interpretation of MICs and zone diameters. Version 12.0, 2022. \href{https://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Breakpoint_tables/v_12.0_Breakpoint_Tables.xlsx}{(link)}
} }
} }

View File

@@ -59,11 +59,10 @@ Included taxonomic data from \href{https://lpsn.dsmz.de}{LPSN}, \href{https://ww
For convenience, some entries were added manually: For convenience, some entries were added manually:
\itemize{ \itemize{
\item All 37 groups and complexes of the \link{microorganisms.groups} data set, for cross-reference (examples include beta-haemolytic \emph{Streptococcus} groups A to K, coagulase-negative \emph{Staphylococcus} (CoNS), \emph{Mycobacterium tuberculosis} complex, etc.)
\item ~1 500 entries of \emph{Salmonella}, such as the city-like serovars and groups A to H \item ~1 500 entries of \emph{Salmonella}, such as the city-like serovars and groups A to H
\item 37 species groups (such as the beta-haemolytic \emph{Streptococcus} groups A to K, coagulase-negative \emph{Staphylococcus} (CoNS), \emph{Mycobacterium tuberculosis} complex, etc.), of which the group compositions are stored in the \link{microorganisms.groups} data set
\item 1 entry of \emph{Blastocystis} (\emph{B. hominis}), although it officially does not exist (Noel \emph{et al.} 2005, PMID 15634993) \item 1 entry of \emph{Blastocystis} (\emph{B. hominis}), although it officially does not exist (Noel \emph{et al.} 2005, PMID 15634993)
\item 1 entry of \emph{Moraxella} (\emph{M. catarrhalis}), which was formally named \emph{Branhamella catarrhalis} (Catlin, 1970) though this change was never accepted within the field of clinical microbiology \item 9 other 'undefined' entries (unknown, unknown Gram-negatives, unknown Gram-positives, unknown yeast, unknown fungus, and unknown anaerobic Gram-pos/Gram-neg bacteria)
\item 8 other 'undefined' entries (unknown, unknown Gram-negatives, unknown Gram-positives, unknown yeast, unknown fungus, and unknown anaerobic Gram-pos/Gram-neg bacteria)
} }
The syntax used to transform the original data to a cleansed \R format, can be \href{https://github.com/msberends/AMR/blob/main/data-raw/_reproduction_scripts/reproduction_of_microorganisms.R}{found here}. The syntax used to transform the original data to a cleansed \R format, can be \href{https://github.com/msberends/AMR/blob/main/data-raw/_reproduction_scripts/reproduction_of_microorganisms.R}{found here}.

View File

@@ -401,6 +401,7 @@ Visit \href{https://amr-for-r.org/articles/datasets.html}{our website for direct
\examples{ \examples{
# taxonomic tree ----------------------------------------------------------- # taxonomic tree -----------------------------------------------------------
mo_domain("Klebsiella pneumoniae")
mo_kingdom("Klebsiella pneumoniae") mo_kingdom("Klebsiella pneumoniae")
mo_phylum("Klebsiella pneumoniae") mo_phylum("Klebsiella pneumoniae")
mo_class("Klebsiella pneumoniae") mo_class("Klebsiella pneumoniae")
@@ -410,6 +411,8 @@ mo_genus("Klebsiella pneumoniae")
mo_species("Klebsiella pneumoniae") mo_species("Klebsiella pneumoniae")
mo_subspecies("Klebsiella pneumoniae") mo_subspecies("Klebsiella pneumoniae")
# all in one go
mo_taxonomy("Klebsiella pneumoniae")
# full names and short names ----------------------------------------------- # full names and short names -----------------------------------------------
@@ -430,6 +433,7 @@ mo_rank("Klebsiella pneumoniae")
mo_url("Klebsiella pneumoniae") mo_url("Klebsiella pneumoniae")
mo_is_yeast(c("Candida", "Trichophyton", "Klebsiella")) mo_is_yeast(c("Candida", "Trichophyton", "Klebsiella"))
mo_group_members("Streptococcus group A")
mo_group_members(c( mo_group_members(c(
"Streptococcus group A", "Streptococcus group A",
"Streptococcus group C", "Streptococcus group C",
@@ -473,6 +477,7 @@ mo_shortname("K. pneu rh")
mo_fullname("Staph epidermidis") mo_fullname("Staph epidermidis")
mo_fullname("Staph epidermidis", Becker = TRUE) mo_fullname("Staph epidermidis", Becker = TRUE)
mo_shortname("Staph epidermidis") mo_shortname("Staph epidermidis")
mo_shortname("Staph epidermidis", Becker = TRUE) mo_shortname("Staph epidermidis", Becker = TRUE)
@@ -481,6 +486,7 @@ mo_shortname("Staph epidermidis", Becker = TRUE)
mo_fullname("Strep agalactiae") mo_fullname("Strep agalactiae")
mo_fullname("Strep agalactiae", Lancefield = TRUE) mo_fullname("Strep agalactiae", Lancefield = TRUE)
mo_shortname("Strep agalactiae") mo_shortname("Strep agalactiae")
mo_shortname("Strep agalactiae", Lancefield = TRUE) mo_shortname("Strep agalactiae", Lancefield = TRUE)
@@ -493,10 +499,10 @@ mo_gramstain("Klebsiella pneumoniae", language = "es") # Spanish
mo_gramstain("Klebsiella pneumoniae", language = "el") # Greek mo_gramstain("Klebsiella pneumoniae", language = "el") # Greek
mo_gramstain("Klebsiella pneumoniae", language = "uk") # Ukrainian mo_gramstain("Klebsiella pneumoniae", language = "uk") # Ukrainian
# mo_type is equal to mo_kingdom, but mo_kingdom will remain untranslated # mo_type is equal to mo_domain, but mo_domain will remain untranslated
mo_kingdom("Klebsiella pneumoniae") mo_domain("Klebsiella pneumoniae")
mo_type("Klebsiella pneumoniae") mo_type("Klebsiella pneumoniae")
mo_kingdom("Klebsiella pneumoniae", language = "zh") # Chinese, no effect mo_domain("Klebsiella pneumoniae", language = "zh") # Chinese, no effect
mo_type("Klebsiella pneumoniae", language = "zh") # Chinese, translated mo_type("Klebsiella pneumoniae", language = "zh") # Chinese, translated
mo_fullname("S. pyogenes", Lancefield = TRUE, language = "de") mo_fullname("S. pyogenes", Lancefield = TRUE, language = "de")

View File

@@ -36,21 +36,21 @@ scale_fill_mic(keep_operators = "edges", mic_range = NULL, ...)
scale_x_sir( scale_x_sir(
colours_SIR = c(S = "#3CAEA3", SDD = "#8FD6C4", I = "#F6D55C", R = "#ED553B"), colours_SIR = c(S = "#3CAEA3", SDD = "#8FD6C4", I = "#F6D55C", R = "#ED553B"),
language = get_AMR_locale(), language = get_AMR_locale(),
eucast_I = getOption("AMR_guideline", "EUCAST") == "EUCAST", eucast_I = getOption("AMR_guideline", "EUCAST") \%like\% "EUCAST",
... ...
) )
scale_colour_sir( scale_colour_sir(
colours_SIR = c(S = "#3CAEA3", SDD = "#8FD6C4", I = "#F6D55C", R = "#ED553B"), colours_SIR = c(S = "#3CAEA3", SDD = "#8FD6C4", I = "#F6D55C", R = "#ED553B"),
language = get_AMR_locale(), language = get_AMR_locale(),
eucast_I = getOption("AMR_guideline", "EUCAST") == "EUCAST", eucast_I = getOption("AMR_guideline", "EUCAST") \%like\% "EUCAST",
... ...
) )
scale_fill_sir( scale_fill_sir(
colours_SIR = c(S = "#3CAEA3", SDD = "#8FD6C4", I = "#F6D55C", R = "#ED553B"), colours_SIR = c(S = "#3CAEA3", SDD = "#8FD6C4", I = "#F6D55C", R = "#ED553B"),
language = get_AMR_locale(), language = get_AMR_locale(),
eucast_I = getOption("AMR_guideline", "EUCAST") == "EUCAST", eucast_I = getOption("AMR_guideline", "EUCAST") \%like\% "EUCAST",
... ...
) )

View File

@@ -9,6 +9,7 @@ top_n_microorganisms(
n, n,
property = "species", property = "species",
n_for_each = NULL, n_for_each = NULL,
property_for_each = "species",
col_mo = NULL, col_mo = NULL,
... ...
) )
@@ -16,37 +17,40 @@ top_n_microorganisms(
\arguments{ \arguments{
\item{x}{A data frame containing microbial data.} \item{x}{A data frame containing microbial data.}
\item{n}{An integer specifying the maximum number of unique values of the \code{property} to include in the output.} \item{n}{A positive whole number specifying the maximum number of unique values of \code{property} to include in the output.}
\item{property}{A character string indicating the microorganism property to use for filtering. Must be one of the column names of the \link{microorganisms} data set: \code{"mo"}, \code{"fullname"}, \code{"status"}, \code{"domain"}, \code{"kingdom"}, \code{"phylum"}, \code{"class"}, \code{"order"}, \code{"family"}, \code{"genus"}, \code{"species"}, \code{"subspecies"}, \code{"rank"}, \code{"ref"}, \code{"oxygen_tolerance"}, \code{"morphology"}, \code{"source"}, \code{"lpsn"}, \code{"lpsn_parent"}, \code{"lpsn_renamed_to"}, \code{"mycobank"}, \code{"mycobank_parent"}, \code{"mycobank_renamed_to"}, \code{"gbif"}, \code{"gbif_parent"}, \code{"gbif_renamed_to"}, \code{"prevalence"}, or \code{"snomed"}. If \code{NULL}, the raw values from \code{col_mo} will be used without transformation. When using \code{"species"} (default) or \code{"subpecies"}, the genus will be added to make sure each (sub)species still belongs to the right genus.} \item{property}{A character string indicating the microorganism property to use for filtering. Must be one of the column names of the \link{microorganisms} data set: \code{"mo"}, \code{"fullname"}, \code{"status"}, \code{"domain"}, \code{"kingdom"}, \code{"phylum"}, \code{"class"}, \code{"order"}, \code{"family"}, \code{"genus"}, \code{"species"}, \code{"subspecies"}, \code{"rank"}, \code{"ref"}, \code{"oxygen_tolerance"}, \code{"morphology"}, \code{"source"}, \code{"lpsn"}, \code{"lpsn_parent"}, \code{"lpsn_renamed_to"}, \code{"mycobank"}, \code{"mycobank_parent"}, \code{"mycobank_renamed_to"}, \code{"gbif"}, \code{"gbif_parent"}, \code{"gbif_renamed_to"}, \code{"prevalence"}, or \code{"snomed"}. If \code{NULL}, the raw values from \code{col_mo} will be used without transformation. When using \code{"species"} (default) or \code{"subspecies"}, the genus is prepended to ensure each name is unambiguous.}
\item{n_for_each}{An optional integer specifying the maximum number of rows to retain for each value of the selected property. If \code{NULL}, all rows within the top \emph{n} groups will be included.} \item{n_for_each}{An optional positive whole number specifying the maximum number of distinct microorganism groups at the level of \code{property_for_each} to retain within each of the top \emph{n} groups. Only used when \code{property_for_each} is also set.}
\item{property_for_each}{The microorganism property to use for sub-grouping within each top \emph{n} group. Must be one of the column names of the \link{microorganisms} data set and at a strictly lower taxonomic rank than \code{property} (allowed order: domain > kingdom > phylum > class > order > family > genus > species > subspecies). Defaults to \code{"species"}. Only relevant when \code{n_for_each} is set.}
\item{col_mo}{A character string indicating the column in \code{x} that contains microorganism names or codes. Defaults to the first column of class \code{\link{mo}}. Values will be coerced using \code{\link[=as.mo]{as.mo()}}.} \item{col_mo}{A character string indicating the column in \code{x} that contains microorganism names or codes. Defaults to the first column of class \code{\link{mo}}. Values will be coerced using \code{\link[=as.mo]{as.mo()}}.}
\item{...}{Additional arguments passed on to \code{\link[=mo_property]{mo_property()}} when \code{property} is not \code{NULL}.} \item{...}{Additional arguments passed on to \code{\link[=mo_property]{mo_property()}} when \code{property} is not \code{NULL}.}
} }
\description{ \description{
This function filters a data set to include only the top \emph{n} microorganisms based on a specified property, such as taxonomic family or genus. For example, it can filter a data set to the top 3 species, or to any species in the top 5 genera, or to the top 3 species in each of the top 5 genera. Filters a data set to include only the top \emph{n} microorganisms based on a specified property, such as taxonomic family or genus. For example, it can filter a data set to the top 3 species, to any species in the top 5 genera, or to the top 3 species in each of the top 5 genera.
} }
\details{ \details{
This function is useful for preprocessing data before creating \link[=antibiogram]{antibiograms} or other analyses that require focused subsets of microbial data. For example, it can filter a data set to only include isolates from the top 10 species. This function is useful for preprocessing data before creating \link[=antibiogram]{antibiograms} or other analyses that require focused subsets of microbial data.
} }
\examples{ \examples{
# filter to the top 3 species: # filter to the top 3 species:
top_n_microorganisms(example_isolates, top_n_microorganisms(example_isolates, n = 3)
n = 3
)
# filter to any species in the top 5 genera: # filter to any species in the top 5 genera:
top_n_microorganisms(example_isolates, top_n_microorganisms(example_isolates, n = 5, property = "genus")
n = 5, property = "genus"
)
# filter to the top 3 species in each of the top 5 genera: # filter to the top 3 species in each of the top 5 genera:
top_n_microorganisms(example_isolates, top_n_microorganisms(example_isolates,
n = 5, property = "genus", n_for_each = 3 n = 5, property = "genus", n_for_each = 3
) )
# filter to the top 2 genera in each of the top 3 families:
top_n_microorganisms(example_isolates,
n = 3, property = "family", n_for_each = 2, property_for_each = "genus"
)
} }
\seealso{ \seealso{
\code{\link[=mo_property]{mo_property()}}, \code{\link[=as.mo]{as.mo()}}, \code{\link[=antibiogram]{antibiogram()}} \code{\link[=mo_property]{mo_property()}}, \code{\link[=as.mo]{as.mo()}}, \code{\link[=antibiogram]{antibiogram()}}

View File

@@ -88,7 +88,7 @@ test_that("test-amr selectors.R", {
expect_equal(nrow(example_isolates[any(carbapenems() != "R"), ]), 910, tolerance = 0.5) expect_equal(nrow(example_isolates[any(carbapenems() != "R"), ]), 910, tolerance = 0.5)
expect_equal(nrow(example_isolates[carbapenems() != "R", ]), 704, tolerance = 0.5) expect_equal(nrow(example_isolates[carbapenems() != "R", ]), 704, tolerance = 0.5)
# filter with multiple antibiotic selectors using c() # filter with multiple antimicrobial selectors using c()
expect_equal(nrow(example_isolates[all(c(carbapenems(), aminoglycosides()) == "R"), ]), 26, tolerance = 0.5) expect_equal(nrow(example_isolates[all(c(carbapenems(), aminoglycosides()) == "R"), ]), 26, tolerance = 0.5)
# filter + select in one go: get penicillins in carbapenems-resistant strains # filter + select in one go: get penicillins in carbapenems-resistant strains

View File

@@ -142,3 +142,9 @@ test_that("test-data.R", {
# x <- check_non_ascii() %>% # x <- check_non_ascii() %>%
# filter(file %unlike% "^(data-raw|docs|git_)") # filter(file %unlike% "^(data-raw|docs|git_)")
}) })
test_that("taxonomic name columns contain no NA (empty string is used instead)", {
for (col in c("domain", "kingdom", "phylum", "class", "order", "family", "genus", "species", "subspecies")) {
expect_false(anyNA(microorganisms[[col]]), info = col)
}
})

View File

@@ -337,4 +337,21 @@ test_that("test-mo.R", {
c("skim_type", "skim_variable", "n_missing", "complete_rate", "mo.n_unique", "mo.gram_negative", "mo.gram_positive", "mo.yeast", "mo.top_genus", "mo.top_species") c("skim_type", "skim_variable", "n_missing", "complete_rate", "mo.n_unique", "mo.gram_negative", "mo.gram_positive", "mo.yeast", "mo.top_genus", "mo.top_species")
) )
} }
# "P. knowlesi" must resolve to Plasmodium knowlesi, not a Pseudomonas species,
# even though P. knowlesi has subspecies (curtisi, wallikeri) sharing the epithet.
expect_identical(
as.mo("P. knowlesi", keep_synonyms = TRUE, info = FALSE),
as.mo("Plasmodium knowlesi", keep_synonyms = TRUE, info = FALSE)
)
expect_identical(
mo_name("P. knowlesi", keep_synonyms = TRUE, language = NULL),
"Plasmodium knowlesi"
)
# Non-regression: the original #288 example must still work.
expect_identical(
mo_genus("S. apiospermum", keep_synonyms = TRUE, language = NULL),
"Scedosporium"
)
}) })

View File

@@ -220,9 +220,9 @@ our_data_1st %>%
count(mo_name(bacteria), sort = TRUE) count(mo_name(bacteria), sort = TRUE)
``` ```
## Select and filter with antibiotic selectors ## Select and filter with antimicrobial selectors
Using so-called antibiotic class selectors, you can select or filter columns based on the antibiotic class that your antibiotic results are in: Using so-called antimicrobial class selectors, you can select or filter columns based on the antimicrobial class that your antimicrobial results are in:
```{r bug_drg 2a} ```{r bug_drg 2a}
our_data_1st %>% our_data_1st %>%
@@ -234,7 +234,7 @@ our_data_1st %>%
our_data_1st %>% our_data_1st %>%
select(bacteria, where(is.sir)) select(bacteria, where(is.sir))
# filtering using AB selectors is also possible: # filtering using antimicrobial selectors is also possible:
our_data_1st %>% our_data_1st %>%
filter(any(aminoglycosides() == "R")) filter(any(aminoglycosides() == "R"))

View File

@@ -200,6 +200,48 @@ AMR.antimicrobials
| ZFD | NaN | Zoliflodacin | None | NaN | None | NaN | None | | ZFD | NaN | Zoliflodacin | None | NaN | None | NaN | None |
# Installation Channels
## Stable Release (CRAN)
The default `AMR` Python package uses the latest stable version of the `AMR` R package, published on CRAN. After running `pip install AMR`, import it as usual:
```python
import AMR
AMR.example_isolates
```
## Development Version (GitHub)
To use the latest development version of the `AMR` R package (sourced directly from GitHub), import the `beta` sub-package and alias it as `AMR`:
```python
import AMR.beta as AMR
AMR.example_isolates
```
Aliasing with `as AMR` keeps all downstream code identical to the stable import. Switching between the stable release and the development version requires changing only the import line — nothing else in your script needs to change.
# SIR Classification with `as_sir()`
## Using `enforce_method`
The `as_sir()` function in R uses S3 method dispatch to select the correct calculation method based on the input class: `<mic>` for MIC values and `<disk>` for disk diffusion values. Because Python objects do not carry R class attributes through the `rpy2` bridge, this automatic dispatch may not resolve correctly.
To explicitly specify the input type, use the `enforce_method` argument:
```python
# Treat the column as MIC values — maps to R's as.sir.mic()
AMR.as_sir(df["MIC_col"], mo="E. coli", ab="AMX", guideline="EUCAST", enforce_method="mic")
# Treat the column as disk diffusion values — maps to R's as.sir.disk()
AMR.as_sir(df["disk_col"], mo="E. coli", ab="AMX", guideline="EUCAST", enforce_method="disk")
```
Without `enforce_method`, R falls back to class-based dispatch on the raw Python input, which may fail or return unexpected results. Always supply `enforce_method` when calling `as_sir()` from Python.
# Conclusion # Conclusion
With the `AMR` Python package, Python users can now effortlessly call R functions from the `AMR` R package. This eliminates the need for complex `rpy2` configurations and provides a clean, easy-to-use interface for antimicrobial resistance analysis. The examples provided above demonstrate how this can be applied to typical workflows, such as standardising microorganism and antimicrobial names or calculating resistance. With the `AMR` Python package, Python users can now effortlessly call R functions from the `AMR` R package. This eliminates the need for complex `rpy2` configurations and provides a clean, easy-to-use interface for antimicrobial resistance analysis. The examples provided above demonstrate how this can be applied to typical workflows, such as standardising microorganism and antimicrobial names or calculating resistance.