(this beta version will eventually become v3.0. We're happy to reach a new major milestone soon, which will be all about the new One Health support! Install this beta using the instructions here.)
This package now supports not only tools for AMR data analysis in clinical settings, but also for veterinary and environmental microbiology. This was made possible through a collaboration with the University of Prince Edward Island's Atlantic Veterinary College, Canada. To celebrate this great improvement of the package, we also updated the package logo to reflect this change.
rsi
class, which were all replaced with their sir
equivalents two years agoas.sir()
now has extensive support for veterinary breakpoints from CLSI. Use breakpoint_type = "animal"
and set the host
argument to a variable that contains animal species names.guideline
is set to CLSI)clinical_breakpoints
data set contains all these breakpoints, and can be downloaded on our download page.antibiotics
data set contains all veterinary antibiotics, such as pradofloxacin and enrofloxacin. All WHOCC codes for veterinary use have been added as well.ab_atc()
now supports ATC codes of veterinary antibiotics (that all start with "Q")ab_url()
now supports retrieving the WHOCC url of their ATCvet pagesantibiogram()
function now supports creating true Weighted-Incidence Syndromic Combination Antibiograms (WISCA), a powerful Bayesian method for estimating regimen coverage probabilities using pathogen incidence and antimicrobial susceptibility data. WISCA offers improved precision for syndrome-specific treatment, even in datasets with sparse data. A dedicated wisca()
function is also available for easy usage.microorganisms
data set has been enriched with new columns (mycobank
, mycobank_parent
, and mycobank_renamed_to
) that provide detailed information for fungal species.mo_mycobank()
to retrieve the MycoBank record number, analogous to existing functions such as mo_lpsn()
and mo_gbif()
.as.mo()
function and all mo_*()
functions now include an only_fungi
argument, allowing users to restrict results solely to fungal species. This ensures fungi are prioritised over bacteria during microorganism identification. This can also be set globally with the new AMR_only_fungi
option.clinical_breakpoints
data set for usage in as.sir()
. EUCAST 2024 is now the new default guideline for all MIC and disk diffusion interpretations.as.sir()
now brings additional factor levels: "NI" for non-interpretable and "SDD" for susceptible dose-dependent. Currently, the clinical_breakpoints
data set contains 24 breakpoints that can return the value "SDD" instead of "I".scale_*_mic()
, namely: scale_x_mic()
, scale_y_mic()
, scale_colour_mic()
and scale_fill_mic()
. They are advanced ggplot2 extensions to allow easy plotting of MIC values. They allow for manual range definition and plotting missing intermediate log2 levels.rescale_mic()
, which allows users to rescale MIC values to a manually set range. This is the powerhouse behind the scale_*_mic()
functions, but it can be used independently to, for instance, compare equality in MIC distributions by rescaling them to the same range first.tidymodels
aminoglycosides()
and betalactams()
) are now supported in tidymodels
packages such as recipe
and parsnip
. See for more info our tutorial on using these AMR functions for predictive modelling.top_n_microorganisms()
to filter a data set to the top n of any taxonomic property, e.g., filter to the top 3 species, filter to any species in the top 5 genera, or filter to the top 3 species in each of the top 5 generamo_group_members()
to retrieve the member microorganisms of a microorganism group. For example, mo_group_members("Strep group C")
returns a vector of all microorganisms that belong to that group.ab
, mo
, and uti
: as.sir(..., ab = "column1", mo = "column2", uti = "column3")
. This greatly improves the flexibility for users.as.double()
on a sir
object will return 1 for S, 2 for SDD/I, and 3 for R (NI will become NA
). Other functions using sir
classes (e.g., summary()
) are updated to reflect the change to contain NI and SDD.antibiogram()
function
formatting_type
to set any of the 12 options for the formatting of all 'cells'. This defaults to 10
, changing the output of antibiograms to cells with 5% (15/300)
instead of the previous standard of just 5
.add_total_n
is now FALSE
at default since the denominators are added to the cellsab_transform
argument now defaults to "name"
, displaying antibiotic column names instead of codesab_class()
and ab_selector()
have been replaced with amr_class()
and amr_selector()
. The old functions are now deprecated and will be removed in a future version.nitrofurans()
, phenicols()
, and rifamycins()
aminoglycosides()
) that exclude non-treatable drugs (such as gentamicin-high), the function now always returns a warning that these can be included using only_treatable = FALSE
return_all
to all selectors, which defaults to TRUE
to include any match. With FALSE
, the old behaviour, only the first hit for each unique antimicrobial is returned.antibiotics
data set
CLI1
. Since clindamycin is a lincosamide, the antimicrobial selector lincosamides()
now contains the argument only_treatable = TRUE
(similar to other antibiotic selectors that contain non-treatable drugs)AMO
, D01AE16), which is now also part of the antifungals()
selectorEFF
), to allow mapping to AMRFinderPluskeep_operators
to as.mic()
. This can be "all"
(default), "none"
, or "edges"
. This argument is also available in the new rescale_mic()
and scale_*_mic()
functions.>32
is higher than (and never equal to) 32
. Thus, as.mic(">32") == as.mic(32)
now returns FALSE
, and as.mic(">32") > as.mic(32)
now returns TRUE
.sort()
) was fixed in the same manner; <0.001
now gets sorted before 0.001
, and >0.001
gets sorted after 0.001
.as.disk()
) is now between 0 and 50 mmitalicise_taxonomy()
to support HTML outputcustom_eucast_rules()
now supports multiple antibiotics and antibiotic groups to be affected by a single rulemo_info()
now contains an extra element rank
and group_members
(with the contents of the new mo_group_members()
function)mo_transform
in antibiogram()
antibiogram()
returns an empty data setas.ab()
(amphotericin B-high, gentamicin-high, kanamycin-high, streptomycin-high, tobramycin-high)as.ab()
for better performance and accuracyas.mo()
for better performance and accuracy. Specifically:
sir_confidence_interval()
when there are no isolates availablefirst_isolate()
when using the phenotype-based method, to prioritise records with the highest availability of SIR valuesscale_y_percent()
can now cope with ranges outside the 0-100% rangemdro()
)
esbl
, carbapenemase
, mecA
, mecC
, vanA
, vanB
to denote column names or logical values indicating presence of these genes (or production of their proteins)sir
class for Positronvctrs
integration, a Tidyverse package working in the background for many Tidyverse functions. For users, this means that functions such as dplyr
's bind_rows()
, rowwise()
and c_across()
are now supported for e.g. columns of class mic
. Despite this, this AMR
package is still zero-dependent on any other package, including dplyr
and vctrs
..xpt
) files, since their file structure and extremely inefficient and requires more disk space than GitHub allows in a single commit.This changelog only contains changes from AMR v3.0 (February 2025) and later.