Make anaerobes more specific than a Gram stain in rank_index

Anaerobes now have rank_index 5.5 (5.6 for a blocking row), and a Gram stain stays at 6. They had the same rank, so the order of sites could make the Gram-negative row with site Parenteral (CLSI Table 2B-5) precede the anaerobe row without a site (CLSI Table 2J), e.g., for ceftriaxone in B. fragilis.

A rebuild changes rank_index in 884 rows and nothing else.
This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2026-11-03 08:37:55 +01:00
1 parent e7077081b9
commit 81f5aaa7b8
16 files changed
+900 -890

No files matched your search

@@ -720,7 +720,8 @@ breakpoints_new <- breakpoints_new |>
mo_rank(mo, keep_synonyms = TRUE) == "genus" ~ 3,
mo_rank(mo, keep_synonyms = TRUE) == "family" ~ 4,
mo_rank(mo, keep_synonyms = TRUE) == "order" ~ 5,
mo != "UNKNOWN" ~ 6, # for B_ANAER, etc.
grepl("^B_ANAER", as.character(mo)) ~ 5.5, # anaerobes are more specific than a Gram stain
mo != "UNKNOWN" ~ 6, # for B_GRAMN, etc.
TRUE ~ 7
) +
# a breakpoint of the same organism always precedes its blocking row
@@ -2782,7 +2782,8 @@ breakpoints_eucast <- breakpoints_eucast |>
mutate(
rank_index = case_when(
mo == "UNKNOWN" ~ 7, # the PK-PD table, as for the WHONET-based rows
is.na(mo_rank(mo, keep_synonyms = TRUE)) ~ 6, # for B_GRAMN, B_ANAER, B_ANAER-NEG, etc.
grepl("^B_ANAER", as.character(mo)) ~ 5.5, # anaerobes are more specific than a Gram stain
is.na(mo_rank(mo, keep_synonyms = TRUE)) ~ 6, # for B_GRAMN, etc.
mo_rank(mo, keep_synonyms = TRUE) %like% "(infra|sub)" ~ 1,
mo_rank(mo, keep_synonyms = TRUE) == "species" ~ 2,
mo_rank(mo, keep_synonyms = TRUE) == "species group" ~ 2.5,