1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 11:51:59 +02:00

(v2.1.1.9287) fix antibiotics

This commit is contained in:
2025-06-01 12:17:47 +02:00
parent e70f3de02e
commit 5667ce3eae
13 changed files with 16 additions and 69 deletions

View File

@ -60,6 +60,7 @@ else
fi fi
git add data-raw/* git add data-raw/*
git add data/*
git add -u git add -u
exit 0 exit 0

View File

@ -51,6 +51,7 @@ if command -v Rscript > /dev/null; then
currentpkg=$(Rscript -e "cat(pkgload::pkg_name())") currentpkg=$(Rscript -e "cat(pkgload::pkg_name())")
echo "- Adding changed files in ./data-raw and ./man to this commit" echo "- Adding changed files in ./data-raw and ./man to this commit"
git add data-raw/* git add data-raw/*
git add data/*
git add man/* git add man/*
git add R/sysdata.rda git add R/sysdata.rda
git add NAMESPACE git add NAMESPACE
@ -112,6 +113,7 @@ echo ""
echo "${currentversion}" > .git/commit_version.tmp echo "${currentversion}" > .git/commit_version.tmp
git add data-raw/* git add data-raw/*
git add data/*
git add -u git add -u
exit 0 exit 0

View File

@ -1,5 +1,5 @@
Package: AMR Package: AMR
Version: 2.1.1.9286 Version: 2.1.1.9287
Date: 2025-06-01 Date: 2025-06-01
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)

View File

@ -166,7 +166,6 @@ export(amr_distance_from_row)
export(amr_selector) export(amr_selector)
export(anti_join_microorganisms) export(anti_join_microorganisms)
export(antibiogram) export(antibiogram)
export(antibiotics)
export(antifungals) export(antifungals)
export(antimicrobials_equal) export(antimicrobials_equal)
export(antimycobacterials) export(antimycobacterials)

43
NEWS.md
View File

@ -1,50 +1,9 @@
# AMR 2.1.1.9286 # AMR 2.1.1.9287
*(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](https://amr-for-r.org/#get-this-package).)* *(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](https://amr-for-r.org/#get-this-package).)*
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](https://www.upei.ca/avc), Canada. To celebrate this great improvement of the package, we also updated the package logo to reflect this change. 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](https://www.upei.ca/avc), Canada. To celebrate this great improvement of the package, we also updated the package logo to reflect this change.
## tl;dr
- Scope Expansion: One Health support (Human + Veterinary + Environmental microbiology).
- Data Updates:
- `antibiotics` renamed to `antimicrobials`.
- Veterinary antimicrobials and WHOCC codes added.
- MycoBank fungal taxonomy integrated (+20,000 fungi).
- Breakpoints & Interpretations:
- CLSI/EUCAST 2024-2025 breakpoints added; EUCAST 2025 default.
- `as.sir()` supports NI/SDD levels; parallel computation enabled.
- Custom S/I/R/SDD/NI definitions allowed.
- Improved handling of capped MICs.
- New Tools & Functions:
- WISCA antibiogram support (`antibiogram()`, `wisca()`).
- New ggplot2 extensions: `scale_*_mic()`, `scale_*_sir()`, `rescale_mic()`.
- New utility functions: `top_n_microorganisms()`, `mo_group_members()`, `mic_p50()`, `mic_p90()`.
- Predictive Modelling:
- Full tidymodels compatibility for antimicrobial selectors.
- Deprecated `resistance_predict()` and `sir_predict()`.
- Python Compatibility: AMR R package now runs in Python.
- Selector Improvements:
* Added selectors (`isoxazolylpenicillins()`, `monobactams()`, `nitrofurans()`, `phenicols()`, `rifamycins()`, and `sulfonamides()`)
- Selectors renamed from `ab_*` to `amr_*`; old names deprecated.
- MIC/Disks Handling:
- MIC strict comparisons, added levels.
- Disk diffusion range expanded (050 mm).
- EUCAST Rules and MDROs:
- EUCAST v12v15 rules implemented.
- Dutch MDRO 2024 guideline support in `mdro()`.
- Infrastructure:
- New website: https://amr-for-r.org.
- Improved `vctrs` integration for tidyverse workflows.
- Dropped SAS `.xpt` file support.
- Other Fixes & Enhancements:
- Support for 8 new languages, adding to a total of 28 languages.
- Faster microorganism identification.
- Improved antimicrobial and MIC handling.
- Extended documentation, additional contributors acknowledged.
## Full Changelog
### Breaking ### Breaking
* Dataset `antibiotics` has been renamed to `antimicrobials` as the data set contains more than just antibiotics. Using `antibiotics` will still work, but now returns a warning. * Dataset `antibiotics` has been renamed to `antimicrobials` as the data set contains more than just antibiotics. Using `antibiotics` will still work, but now returns a warning.
* Removed all functions and references that used the deprecated `rsi` class, which were all replaced with their `sir` equivalents over two years ago. * Removed all functions and references that used the deprecated `rsi` class, which were all replaced with their `sir` equivalents over two years ago.

View File

@ -35,17 +35,6 @@
#' @rdname AMR-deprecated #' @rdname AMR-deprecated
NULL NULL
#' @rdname AMR-deprecated
#' @usage antibiotics
#' @export
antibiotics <- local({
warned <- FALSE
value <- AMR::antimicrobials
structure(
value,
class = c("deprecated_amr_dataset", class(value))
)
})
.amr_deprecation_warn <- function() { .amr_deprecation_warn <- function() {
deprecation_warning(old = "antibiotics", new = "antimicrobials", is_dataset = TRUE) deprecation_warning(old = "antibiotics", new = "antimicrobials", is_dataset = TRUE)
invisible(NULL) invisible(NULL)

View File

@ -1,5 +1,5 @@
As with all previous >20 releases, some CHECKs might return a NOTE for *just* hitting the installation size limit, though its size has been brought down to a minimum in collaboration with CRAN maintainers previously. As with all previous >20 releases, some CHECKs on `oldrel` may return a `NOTE` for narrowly exceeding the installation size limit. This has been reduced to a minimum in prior coordination with CRAN maintainers and currently returns only an `INFO` on `release` and `devel`.
We consider this a high-impact package: it was published in the Journal of Statistical Software (2022), is included in a CRAN Task View (Epidemiology), and is according to download stats (cranlogs) used in almost all countries in the world. If there is anything to note, please let us know up-front without directly archiving the current version. That said, we continually unit test our package extensively and have no reason to assume that anything is wrong. We treat this as a high-impact package: it was published in the *Journal of Statistical Software* (2022), is listed in the CRAN Task View "Epidemiology", and (based on cranlogs download statistics) is used globally. If there is anything to address, we would appreciate being informed before archiving the current version. We conduct extensive automated unit testing and have no indication of unresolved issues.
Thanks for maintaining and hosting CRAN! It's empowering R and its use enormously! Thank you for your continued maintenance of CRAN, it plays a central role in the success and growth of the R ecosystem.

View File

@ -625,6 +625,11 @@ if (changed_md5(dosage)) {
try(arrow::write_parquet(dosage, "data-raw/datasets/dosage.parquet"), silent = TRUE) try(arrow::write_parquet(dosage, "data-raw/datasets/dosage.parquet"), silent = TRUE)
} }
# Set `antibiotics` as a deprecated data set
antibiotics <- structure(antimicrobials, class = c("deprecated_amr_dataset", class(antimicrobials)))
usethis::use_data(antibiotics, internal = FALSE, overwrite = TRUE, compress = "xz", version = 2)
rm(antibiotics)
suppressMessages(reset_AMR_locale()) suppressMessages(reset_AMR_locale())
devtools::load_all(quiet = TRUE) devtools::load_all(quiet = TRUE)

BIN
data/antibiotics.rda Normal file

Binary file not shown.

View File

@ -192,7 +192,7 @@ out %>% set_ab_names(property = "atc")
This package was intended as a comprehensive toolbox for integrated AMR data analysis. This package can be used for: This package was intended as a comprehensive toolbox for integrated AMR data analysis. This package can be used for:
* Reference for the taxonomy of microorganisms, since the package contains all microbial (sub)species from the List of Prokaryotic names with Standing in Nomenclature ([LPSN]((https://lpsn.dsmz.de))) and the Global Biodiversity Information Facility ([GBIF](https://www.gbif.org)) ([manual](./reference/mo_property.html)) * Reference for the taxonomy of microorganisms, since the package contains all microbial (sub)species from the List of Prokaryotic names with Standing in Nomenclature ([LPSN](https://lpsn.dsmz.de)) and the Global Biodiversity Information Facility ([GBIF](https://www.gbif.org)) ([manual](./reference/mo_property.html))
* Interpreting raw MIC and disk diffusion values, based on any CLSI or EUCAST guideline ([manual](./reference/as.sir.html)) * Interpreting raw MIC and disk diffusion values, based on any CLSI or EUCAST guideline ([manual](./reference/as.sir.html))
* Retrieving antimicrobial drug names, doses and forms of administration from clinical health care records ([manual](./reference/ab_from_text.html)) * Retrieving antimicrobial drug names, doses and forms of administration from clinical health care records ([manual](./reference/ab_from_text.html))
* Determining first isolates to be used for AMR data analysis ([manual](./reference/first_isolate.html)) * Determining first isolates to be used for AMR data analysis ([manual](./reference/first_isolate.html))

View File

@ -387,7 +387,7 @@ data analysis. This package can be used for:
- Reference for the taxonomy of microorganisms, since the package - Reference for the taxonomy of microorganisms, since the package
contains all microbial (sub)species from the List of Prokaryotic names contains all microbial (sub)species from the List of Prokaryotic names
with Standing in Nomenclature ([LPSN]((https://lpsn.dsmz.de))) and the with Standing in Nomenclature ([LPSN](https://lpsn.dsmz.de)) and the
Global Biodiversity Information Facility Global Biodiversity Information Facility
([GBIF](https://www.gbif.org)) ([GBIF](https://www.gbif.org))
([manual](./reference/mo_property.html)) ([manual](./reference/mo_property.html))

View File

@ -1,18 +1,11 @@
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/zz_deprecated.R % Please edit documentation in R/zz_deprecated.R
\docType{data}
\name{AMR-deprecated} \name{AMR-deprecated}
\alias{AMR-deprecated} \alias{AMR-deprecated}
\alias{antibiotics}
\alias{ab_class} \alias{ab_class}
\alias{ab_selector} \alias{ab_selector}
\title{Deprecated Functions, Arguments, or Datasets} \title{Deprecated Functions, Arguments, or Datasets}
\format{
An object of class \code{deprecated_amr_dataset} (inherits from \code{tbl_df}, \code{tbl}, \code{data.frame}) with 497 rows and 14 columns.
}
\usage{ \usage{
antibiotics
ab_class(...) ab_class(...)
ab_selector(...) ab_selector(...)
@ -20,5 +13,4 @@ ab_selector(...)
\description{ \description{
These objects are so-called '\link{Deprecated}'. \strong{They will be removed in a future version of this package.} Using these will give a warning with the name of the alternative object it has been replaced by (if there is one). These objects are so-called '\link{Deprecated}'. \strong{They will be removed in a future version of this package.} Using these will give a warning with the name of the alternative object it has been replaced by (if there is one).
} }
\keyword{datasets}
\keyword{internal} \keyword{internal}

View File

@ -36,7 +36,7 @@ The `AMR` package is available in `r AMR:::vector_and(vapply(FUN.VALUE = charact
This package was intended as a comprehensive toolbox for integrated AMR data analysis. This package can be used for: This package was intended as a comprehensive toolbox for integrated AMR data analysis. This package can be used for:
* Reference for the taxonomy of microorganisms, since the package contains all microbial (sub)species from the List of Prokaryotic names with Standing in Nomenclature ([LPSN]((https://lpsn.dsmz.de))) and the Global Biodiversity Information Facility ([GBIF](https://www.gbif.org)) ([manual](https://amr-for-r.org/reference/mo_property.html)) * Reference for the taxonomy of microorganisms, since the package contains all microbial (sub)species from the List of Prokaryotic names with Standing in Nomenclature ([LPSN](https://lpsn.dsmz.de)) and the Global Biodiversity Information Facility ([GBIF](https://www.gbif.org)) ([manual](https://amr-for-r.org/reference/mo_property.html))
* Interpreting raw MIC and disk diffusion values, based on any CLSI or EUCAST guideline ([manual](https://amr-for-r.org/reference/as.sir.html)) * Interpreting raw MIC and disk diffusion values, based on any CLSI or EUCAST guideline ([manual](https://amr-for-r.org/reference/as.sir.html))
* Retrieving antimicrobial drug names, doses and forms of administration from clinical health care records ([manual](https://amr-for-r.org/reference/ab_from_text.html)) * Retrieving antimicrobial drug names, doses and forms of administration from clinical health care records ([manual](https://amr-for-r.org/reference/ab_from_text.html))
* Determining first isolates to be used for AMR data analysis ([manual](https://amr-for-r.org/reference/first_isolate.html)) * Determining first isolates to be used for AMR data analysis ([manual](https://amr-for-r.org/reference/first_isolate.html))