mirror of
https://github.com/msberends/AMR.git
synced 2026-06-29 06:56:20 +02:00
(v3.0.1.9081) fix mo
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 3.0.1.9080
|
Version: 3.0.1.9081
|
||||||
Date: 2026-06-27
|
Date: 2026-06-27
|
||||||
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)
|
||||||
|
|||||||
2
NEWS.md
2
NEWS.md
@@ -1,4 +1,4 @@
|
|||||||
# AMR 3.0.1.9080
|
# AMR 3.0.1.9081
|
||||||
|
|
||||||
Planned as v3.1.0, end of June 2026.
|
Planned as v3.1.0, end of June 2026.
|
||||||
|
|
||||||
|
|||||||
@@ -337,18 +337,16 @@ 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")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
|
||||||
test_that("as.mo() resolves abbreviated genus when species carries subspecies (#288 follow-up)", {
|
# "P. knowlesi" must resolve to Plasmodium knowlesi, not a Pseudomonas species,
|
||||||
# "P. ovale" must resolve to Plasmodium ovale, not a Pseudomonas species,
|
# even though P. knowlesi has subspecies (curtisi, wallikeri) sharing the epithet.
|
||||||
# even though P. ovale has subspecies (curtisi, wallikeri) sharing the epithet.
|
|
||||||
expect_identical(
|
expect_identical(
|
||||||
as.mo("P. ovale", keep_synonyms = TRUE, info = FALSE),
|
as.mo("P. knowlesi", keep_synonyms = TRUE, info = FALSE),
|
||||||
as.mo("Plasmodium ovale", keep_synonyms = TRUE, info = FALSE)
|
as.mo("Plasmodium knowlesi", keep_synonyms = TRUE, info = FALSE)
|
||||||
)
|
)
|
||||||
expect_identical(
|
expect_identical(
|
||||||
mo_name("P. ovale", keep_synonyms = TRUE, language = NULL),
|
mo_name("P. knowlesi", keep_synonyms = TRUE, language = NULL),
|
||||||
"Plasmodium ovale"
|
"Plasmodium knowlesi"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Non-regression: the original #288 example must still work.
|
# Non-regression: the original #288 example must still work.
|
||||||
@@ -356,12 +354,4 @@ test_that("as.mo() resolves abbreviated genus when species carries subspecies (#
|
|||||||
mo_genus("S. apiospermum", keep_synonyms = TRUE, language = NULL),
|
mo_genus("S. apiospermum", keep_synonyms = TRUE, language = NULL),
|
||||||
"Scedosporium"
|
"Scedosporium"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Explicit subspecies must not be collapsed to species rank.
|
|
||||||
if (any(microorganisms$fullname == "Plasmodium ovale curtisi")) {
|
|
||||||
expect_identical(
|
|
||||||
mo_name("P. ovale curtisi", keep_synonyms = TRUE, language = NULL),
|
|
||||||
"Plasmodium ovale curtisi"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user