mirror of
https://github.com/msberends/AMR.git
synced 2026-05-14 05:10:46 +02:00
#287: as.mo() now strips " complex" from input when that exact complex is not in the taxonomy and retries with the bare name, so inputs like "Proteus vulgaris complex" no longer return NA. #288: mo_matching_score() applies a ×2 bonus when the input has an abbreviated genus (≤3 chars) and the candidate's species epithet exactly matches the input species epithet. This ensures "S. apiospermum" resolves to Scedosporium apiospermum rather than Staphylococcus aureus, overcoming the kingdom/prevalence denominator bias in favour of common bacteria. https://claude.ai/code/session_01VH4Ju4Xq9aW1AHuoVbjGEo
This commit is contained in:
@@ -84,6 +84,16 @@ test_that("test-mo.R", {
|
||||
|
||||
# expect_warning(as.mo("Acinetobacter calcoaceticus/baumannii complex"))
|
||||
|
||||
# Issue #287: "X complex" fallback to "X" when complex is not a distinct taxon
|
||||
expect_identical(as.character(suppressWarnings(as.mo("Proteus vulgaris complex"))), as.character(suppressWarnings(as.mo("Proteus vulgaris"))))
|
||||
expect_identical(as.character(suppressWarnings(as.mo("Enterobacter cloacae complex"))), as.character(as.mo("Enterobacter cloacae complex")))
|
||||
|
||||
# Issue #288: abbreviated genus with exact species epithet match should win
|
||||
expect_identical(
|
||||
as.character(suppressWarnings(as.mo("S. apiospermum"))),
|
||||
as.character(suppressWarnings(as.mo("Scedosporium apiospermum")))
|
||||
)
|
||||
|
||||
# prevalent MO
|
||||
expect_identical(
|
||||
suppressWarnings(as.character(
|
||||
|
||||
Reference in New Issue
Block a user