Releases: msberends/AMR
Releases · msberends/AMR
AMR v3.0.1
This is a bugfix release following the release of v3.0.0 in June 2025.
Changed
- Fixed bugs introduced by
ggplot2v4.0.0 (#236)- MIC scale functions (such as
scale_y_mic()) will now be applied automatically when plotting values of classmic - SIR scale functions (such as
scale_x_sir()) will now be applied automatically when plotting values of classsir
- MIC scale functions (such as
- Fixed a bug in
antibiogram()for when no antimicrobials are set - Fixed a bug in
antibiogram()to allow column names containing the+character (#222) - Fixed a bug in
as.ab()for antimicrobial codes with a number in it if they are preceded by a space - Fixed a bug in
eucast_rules()for using specific custom rules - Fixed a bug in
as.sir()to allow any tidyselect language (#220) - Fixed a bug in
as.sir()to pick right breakpoint whenuti = FALSE(#216) - Fixed a bug in
ggplot_sir()when usingcombine_SI = FALSE(#213) - Fixed a bug in
mdro()to make sure all genes specified in arguments are acknowledged - Fixed a bug the
antimicrobialsdata set to remove statins (#229) - Fixed a bug the
microorganismsdata set for MycoBank IDs and synonyms (#233) - Fixed ATC J01CR05 to map to piperacillin/tazobactam rather than piperacillin/sulbactam (#230)
- Fixed skimmers (
skimrpackage) of classab,sir, anddisk(#234) - Fixed all plotting to contain a separate colour for SDD (susceptible dose-dependent) (#223)
- Fixed some specific Dutch translations for antimicrobials
- Added a warning to
as.ab()if input resembles antiviral codes or names (#232) - Added all reasons in verbose output of
mdro()(#227) - Added
namestoage_groups()so that custom names can be given (#215) - Added note to
as.sir()to make it explicit when higher-level taxonomic breakpoints are used (#218) - Added antibiotic codes from the Comprehensive Antibiotic Resistance Database (CARD) to the
antimicrobialsdata set (#225) - Updated Fosfomycin to be of antibiotic class Phosphonics (#225)
- Updated
random_mic()andrandom_disk()to set skewedness of the distribution and allow multiple microorganisms
AMR v3.0.0
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.
Breaking
- Dataset
antibioticshas been renamed toantimicrobialsas the data set contains more than just antibiotics. Usingantibioticswill still work, but now returns a warning. - Removed all functions and references that used the deprecated
rsiclass, which were all replaced with theirsirequivalents over two years ago. - Functions
resistance_predict()andsir_predict()are now deprecated and will be removed in a future version. Use thetidymodelsframework instead, for which we wrote a basic introduction.
New
- One Health implementation
- Function
as.sir()now has extensive support for veterinary breakpoints from CLSI. Usebreakpoint_type = "animal"and set thehostargument to a variable that contains animal species names. - The
clinical_breakpointsdata set contains all these breakpoints, and can be downloaded on our download page. - The (new)
antimicrobialsdata set contains all veterinary antimicrobials, such as pradofloxacin and enrofloxacin. All WHOCC codes for veterinary use have been added as well. ab_atc()now supports ATC codes of veterinary antimicrobials (that all start with "Q")ab_url()now supports retrieving the WHOCC url of their ATCvet pages
- Function
- Support for WISCA antibiograms
- The
antibiogram()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 dedicatedwisca()function is also available for easy usage.
- The
- More global coverage of languages
- Added full support for 8 new languages: Arabic, Bengali, Hindi, Indonesian, Korean, Swahili, Urdu, and Vietnamese. The
AMRpackage is now available in 28 languages.
- Added full support for 8 new languages: Arabic, Bengali, Hindi, Indonesian, Korean, Swahili, Urdu, and Vietnamese. The
- Major update to fungal taxonomy and tools for mycologists
- MycoBank has now been integrated as the primary taxonomic source for fungi. The
microorganismsdata set has been enriched with new columns (mycobank,mycobank_parent, andmycobank_renamed_to) that provide detailed information for fungal species. - A remarkable addition of over 20,000 new fungal records
- New function
mo_mycobank()to retrieve the MycoBank record number, analogous to existing functions such asmo_lpsn()andmo_gbif(). - The
as.mo()function and allmo_*()functions now include anonly_fungiargument, 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 newAMR_only_fungioption. - Also updated other kingdoms, welcoming a total of 2,149 new records from 2023 and 927 from 2024.
- MycoBank has now been integrated as the primary taxonomic source for fungi. The
- Updated clinical breakpoints
- Breakpoint of 2024 and 2025 of both CLSI and EUCAST are now supported, by adding all of their over 10,000 new clinical breakpoints to the
clinical_breakpointsdata set for usage inas.sir(). EUCAST 2025 is now the new default guideline for all MIC and disk diffusion interpretations. - Added all Expected Resistant Phenotypes from EUCAST (v1.2). The default
rulesforeucast_rules()are now:c("breakpoints", "expected_phenotypes"). - Updated the
intrinsic_resistantdata set, which is now based on EUCAST Expected Resistant Phenotypes v1.2 as.sir()now brings additional factor levels: "NI" for non-interpretable and "SDD" for susceptible dose-dependent. Currently, theclinical_breakpointsdata set contains 24 breakpoints that can return the value "SDD" instead of "I".- EUCAST interpretive rules (using
eucast_rules()) are now available for EUCAST 12 (2022), 13 (2023), 14 (2024), and 15 (2025). - EUCAST dosage tables (
dosagedata set) are now available for EUCAST 13 (2023), 14 (2024), and 15 (2025).
- Breakpoint of 2024 and 2025 of both CLSI and EUCAST are now supported, by adding all of their over 10,000 new clinical breakpoints to the
- New advanced ggplot2 extensions for MIC and SIR plotting and transforming
- New function group
scale_*_mic(), namely:scale_x_mic(),scale_y_mic(),scale_colour_mic()andscale_fill_mic(). They allow easy plotting of MIC values. They allow for manual range definition and plotting missing intermediate log2 levels. - New function group
scale_*_sir(), namely:scale_x_sir(),scale_colour_sir()andscale_fill_sir(). They allow to plot thesirclass, and translates into the system language at default. They also set colourblind-safe colours to the plots. - New function
rescale_mic(), which allows users to rescale MIC values to a manually set range. This is the powerhouse behind thescale_*_mic()functions, but it can be used independently to, for instance, compare equality in MIC distributions by rescaling them to the same range first.
- New function group
- Support for Python
- While using R for the heavy lifting, our 'AMR' Python Package was developed to run the AMR R package natively in Python. The Python package will always have the same version number as the R package, as it is built automatically with every code change.
- Support for
tidymodels- All antimicrobial selectors (such as
aminoglycosides()andbetalactams()) are now supported intidymodelspackages such asrecipeandparsnip. See for more info our tutorial on using these AMR functions for predictive modelling.
- All antimicrobial selectors (such as
- Other
- New function
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 genera - New function
mo_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. - New functions
mic_p50()andmic_p90()to retrieve the 50th and 90th percentile of MIC values.
- New function
Changed
- SIR interpretation
- Support for parallel computing to greatly improve speed using the
parallelpackage (part of base R). Useas.sir(your_data, parallel = TRUE)to run SIR interpretation using multiple cores. - It is now possible to use column names for arguments
guideline,ab,mo, anduti:as.sir(..., ab = "column1", mo = "column2", uti = "column3"). This greatly improves the flexibility for users. - Users can now set their own criteria (using regular expressions) as to what should be considered S, I, R, SDD, and NI.
- To get quantitative values,
as.double()on asirobject will return 1 for S, 2 for SDD/I, and 3 for R (NI will becomeNA). Other functions usingsirclasses (e.g.,summary()) are updated to reflect the change to contain NI and SDD. - Following CLSI interpretation rules, values outside the log2-dilution range will be rounded upwards to the nearest log2-level before interpretation. Only if using a CLSI guideline.
- Combined MIC values (e.g., from CLSI) are now supported
- The argument
conserve_capped_valuesinas.sir()has been replaced withcapped_mic_handling, which allows greater flexibility in handling capped MIC values (<,<=,>,>=). The four available options ("standard","strict","relaxed","inverse") provide full control over whether these values should be interpreted conservatively or ignored. Usingconserve_capped_valuesis now deprecated and returns a warning. - Added argument
infoto silence all console messages
- Support for parallel computing to greatly improve speed using the
antibiogram()function- Argument
antibioticshas been renamed toantimicrobials. Usingantibioticswill still work, but now returns a warning. - Added argument
formatting_typeto set any of the 22 options for the formatting of all 'cells'. This defaults to18for non-WISCA and14for WISCA, changing the output of antibiograms to cells with more info. - For this reason,
add_total_nis now deprecated andFALSEat default since the denominators are added to the cells dependent on theformatting_typesetting - The
ab_transformargument now defaults to"name", displaying antibiotic column names instead of codes
- Argument
- Antimicrobial selectors (previously: antibiotic selectors)
- 'Antibiotic selectors' are now called 'antimicrobial selectors' since their scope is broader than just antibiotics. All documentation have been updated, and
ab_class()andab_selector()have been replaced withamr_class()andamr_selector(). The old functions are now deprecated and will be removed in a future version. - Added selectors
isoxazolylpenicillins(),monobactams(),nitrofurans(),phenicols(),rifamycins(), andsulfonamides() - When using antimicrobial selectors that exclude non-treatable drugs (such as gentamicin-high when using
aminoglycosides()), the function now always returns a warning that these can be included usingonly_treatable = FALSE - Added a new argument
return_allto all selectors, which defaults toTRUEto include any match. WithFALSE, the old behaviour, only the first hit for each unique antimicrobial is returned. - All selectors can now be run as a separate command to retrieve a vector of all possible antimicrobials that the selector can select
- The selectors
lincosamides()andmacrolides()do not overlap anymore - each antibiotic is now cla...
- 'Antibiotic selectors' are now called 'antimicrobial selectors' since their scope is broader than just antibiotics. All documentation have been updated, and