Leave EUCAST breakpoints in brackets out of clinical_breakpoints, and document where they are kept (#327)

as.sir() treats them as absent, so it can use PK/PD breakpoints or, for unknown `uti`, UTI breakpoints. The values stay available in data-raw/breakpoints_eucast_raw.csv, to which the manual now points. Organisms that a table excludes stay excluded, since these have their own blocking rows.

This also fixes the change for unknown `uti` of the previous commit: a blocking row only gives way to an actual UTI breakpoint, not to a UTI row without breakpoints.
This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2026-11-02 17:03:47 +01:00
1 parent 4c4a7d4392
commit fab20c5eaa
5 files changed
+35 -5

No files matched your search

+3 -1
View File
@@ -1962,7 +1962,9 @@ as_sir_method <- function(method_short,
taxonomic_level <- round(breakpoints_current$rank_index * 2) / 2
is_blocking <- is.na(breakpoints_current$breakpoint_S) & is.na(breakpoints_current$breakpoint_R)
is_uti <- breakpoints_current$uti %in% TRUE
too_broad <- !is_uti & is_blocking & taxonomic_level >= min(taxonomic_level[is_uti])
# a UTI row without breakpoints is no breakpoint either, so it does not take precedence over anything
is_uti_breakpoint <- is_uti & !is_blocking
too_broad <- !is_uti & is_blocking & any(is_uti_breakpoint) & taxonomic_level >= suppressWarnings(min(taxonomic_level[is_uti_breakpoint]))
breakpoints_current <- breakpoints_current[!too_broad, , drop = FALSE]
if (any(!breakpoints_current$uti %in% TRUE)) {
if (length(unique(breakpoints_current$site)) > 1) {