(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:
dr. M.S. (Matthijs) Berends committed 2026-10-15 17:05:41 +02:00
1 parent fcfaa87f5d
commit 179eec584f
20 files changed
+374 -287

No files matched your search

+10
View File
@@ -344,6 +344,16 @@ as.mo <- function(x,
if (x_out %in% MO_lookup_current$fullname_lower) {
return(as.character(MO_lookup_current$mo[match(x_out, MO_lookup_current$fullname_lower)]))
}
# a complex named after several of its species, such as 'Acinetobacter calcoaceticus-baumannii complex', must return the complex of one of these species (here 'Acinetobacter baumannii complex') instead of being matched as one of the species after the " complex" was stripped
x_words <- strsplit(x_out, " ", fixed = TRUE)[[1]]
if (length(x_words) >= 2) {
x_epithets <- strsplit(paste(x_words[-1], collapse = " "), "[-/ ]+", perl = TRUE)[[1]]
x_complexes <- paste(x_words[1], x_epithets[x_epithets != ""], "complex")
x_complexes <- x_complexes[x_complexes %in% MO_lookup_current$fullname_lower]
if (length(x_complexes) > 0) {
return(as.character(MO_lookup_current$mo[match(x_complexes[1], MO_lookup_current$fullname_lower)]))
}
}
}
# Salmonella serovars are stored without species (e.g. 'Salmonella Typhi'), but are often written with it, as in