mirror of
https://github.com/msberends/AMR.git
synced 2026-11-16 04:20:53 +01:00
(v3.0.1.9148) Store zone diameters without S category as blocking rows for EUCAST and as R-only rows for CLSI instead of capping them at 50 mm, let as.mo() return the complex for names such as 'Acinetobacter calcoaceticus-baumannii complex', make the breakpoint reproduction scripts stop on unchecked data defects and year-independent, and document that as.disk() returns NA above 50 mm
The full rebuild of clinical_breakpoints also assigns Salmonella serovars and the Bacteroides fragilis complex correctly and adds ECOFFs for Neocosmospora solani. The rebuilt microorganisms.codes is not included, since it remaps WHONET codes that need review first.
This commit is contained in:
1 parent
fcfaa87f5d
commit
179eec584f
20 files changed
+374
-287
No files matched your search
@@ -69,7 +69,10 @@ test_that("test-data.R", {
|
||||
expect_true(all(clinical_breakpoints$guideline[is_blocking] %like% "EUCAST"))
|
||||
expect_false(anyNA(as.mic(clinical_breakpoints[which(clinical_breakpoints$method == "MIC" & clinical_breakpoints$ref_tbl != "ECOFF" & !is_blocking), "breakpoint_S", drop = TRUE])))
|
||||
expect_true(anyNA(as.mic(clinical_breakpoints[which(clinical_breakpoints$method == "MIC" & clinical_breakpoints$ref_tbl != "ECOFF" & !is_blocking), "breakpoint_R", drop = TRUE])))
|
||||
expect_false(anyNA(as.disk(clinical_breakpoints[which(clinical_breakpoints$method == "DISK" & clinical_breakpoints$ref_tbl != "ECOFF" & !is_blocking), "breakpoint_S", drop = TRUE])))
|
||||
# zone diameters without S category in the guideline (e.g. CLSI for fluconazole in C. glabrata) only have an R breakpoint, and must state this
|
||||
no_S_category <- grepl("^\\[No S category\\] ", clinical_breakpoints$note)
|
||||
expect_true(all(is.na(clinical_breakpoints$breakpoint_S[no_S_category]) & !is.na(clinical_breakpoints$breakpoint_R[no_S_category]) & clinical_breakpoints$method[no_S_category] == "DISK"))
|
||||
expect_false(anyNA(as.disk(clinical_breakpoints[which(clinical_breakpoints$method == "DISK" & clinical_breakpoints$ref_tbl != "ECOFF" & !is_blocking & !no_S_category), "breakpoint_S", drop = TRUE])))
|
||||
expect_true(anyNA(as.disk(clinical_breakpoints[which(clinical_breakpoints$method == "DISK" & clinical_breakpoints$ref_tbl != "ECOFF" & !is_blocking), "breakpoint_R", drop = TRUE])))
|
||||
|
||||
# antibiotic names must always be coercible to their original AB code
|
||||
|
||||
@@ -87,6 +87,9 @@ test_that("test-mo.R", {
|
||||
# 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")))
|
||||
# a complex named after several of its species returns the complex, not one of the species
|
||||
expect_identical(as.character(as.mo(c("Acinetobacter calcoaceticus-baumannii complex", "Acinetobacter calcoaceticus/baumannii complex"))), c("B_ACNTB_BMNN-C", "B_ACNTB_BMNN-C"))
|
||||
expect_identical(as.character(as.mo("Klebsiella pneumoniae-variicola complex")), "B_KLBSL_PNMN-C")
|
||||
|
||||
# Issue #288: abbreviated genus with exact species epithet match should win
|
||||
expect_identical(
|
||||
|
||||
Reference in new issue
Block a user