mirror of
https://github.com/msberends/AMR.git
synced 2024-12-26 07:26:13 +01:00
Compare commits
2 Commits
0d8a91db49
...
3e5c7d45c6
Author | SHA1 | Date | |
---|---|---|---|
3e5c7d45c6 | |||
25089e811e |
4
.github/prehooks/commit-msg
vendored
4
.github/prehooks/commit-msg
vendored
@ -36,7 +36,9 @@
|
||||
# check the commit message
|
||||
COMMIT_MSG=$(cat "$1")
|
||||
if [[ "$COMMIT_MSG" =~ \(no-check\)|\(no-checks\)|\(no-verify\) ]]; then
|
||||
echo "Not running pre-commit checks; commit message contains '(no-check)', '(no-checks)', or '(no-verify)."
|
||||
echo "Not running pre-commit checks:"
|
||||
echo "Commit message contains '(no-check)', '(no-checks)', or '(no-verify)."
|
||||
echo ""
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
Package: AMR
|
||||
Version: 2.1.1.9022
|
||||
Date: 2024-04-23
|
||||
Version: 2.1.1.9025
|
||||
Date: 2024-04-24
|
||||
Title: Antimicrobial Resistance Data Analysis
|
||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||
data analysis and to work with microbial and antimicrobial properties by
|
||||
|
4
NEWS.md
4
NEWS.md
@ -1,4 +1,4 @@
|
||||
# AMR 2.1.1.9022
|
||||
# AMR 2.1.1.9025
|
||||
|
||||
*(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!)*
|
||||
|
||||
@ -29,6 +29,8 @@ This package now supports not only tools for AMR data analysis in clinical setti
|
||||
* Greatly improved `vctrs` 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`.
|
||||
* Updated all ATC codes from WHOCC
|
||||
* Updated all antibiotic DDDs from WHOCC
|
||||
* Fix for using a manual value for `mo_transform` in `antibiogram()`
|
||||
* Fix for mapping 'high level' antibiotics in `as.ab()` (amphotericin B-high, gentamicin-high, kanamycin-high, streptomycin-high, tobramycin-high)
|
||||
|
||||
## Other
|
||||
* Added Jordan Stull, Matthew Saab, and Javier Sanchez as contributors, to thank them for their valuable input
|
||||
|
2
R/ab.R
2
R/ab.R
@ -645,6 +645,8 @@ generalise_antibiotic_name <- function(x) {
|
||||
x <- gsub("_(MIC|RSI|SIR|DIS[CK])$", "", x, perl = TRUE)
|
||||
# remove disk concentrations, like LVX_NM -> LVX
|
||||
x <- gsub("_[A-Z]{2}[0-9_.]{0,3}$", "", x, perl = TRUE)
|
||||
# correct for 'high level' antibiotics
|
||||
x <- gsub("([^A-Z0-9]+)?(HIGH(.?LEVEL)?|H[^A-Z0-9]?L)([^A-Z0-9]+)?", "-HIGH", x, perl = TRUE)
|
||||
# remove part between brackets if that's followed by another string
|
||||
x <- gsub("(.*)+ [(].*[)]", "\\1", x)
|
||||
# keep only max 1 space
|
||||
|
BIN
R/sysdata.rda
BIN
R/sysdata.rda
Binary file not shown.
Binary file not shown.
@ -79,6 +79,16 @@ expect_equal(
|
||||
# based on Levenshtein distance
|
||||
expect_identical(ab_name("ceftazidim/avibactam", language = NULL), "Ceftazidime/avibactam")
|
||||
|
||||
expect_identical(as.character(as.ab(c("gentamicine High Level",
|
||||
"gentamicine High",
|
||||
"gentamicine (High Level)",
|
||||
"gentamicine (High)",
|
||||
"gentamicine HL",
|
||||
"gentamicine H-L",
|
||||
"gentamicine (HL)",
|
||||
"gentamicine (H-L)"))),
|
||||
rep("GEH", 8))
|
||||
|
||||
# assigning and subsetting
|
||||
x <- antibiotics$ab
|
||||
expect_inherits(x[1], "ab")
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 91 KiB |
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 464 KiB After Width: | Height: | Size: 1.2 MiB |
Loading…
Reference in New Issue
Block a user