1
0
mirror of https://github.com/msberends/AMR.git synced 2026-04-28 10:23:53 +02:00

Add add_if_missing parameter to control NA handling in interpretive rules (#264)

This commit is contained in:
Matthijs Berends
2026-04-21 21:53:43 +02:00
committed by GitHub
parent fb8758f36b
commit 8ff5d4472a
46 changed files with 1232 additions and 1016 deletions

View File

@@ -15,8 +15,10 @@ library(readr)
library(tidyr)
# WHONET version of 16th Feb 2024
whonet_breakpoints <- read_tsv("WHONET/Resources/Breakpoints.txt", na = c("", "NA", "-"),
show_col_types = FALSE, guess_max = Inf) %>%
whonet_breakpoints <- read_tsv("WHONET/Resources/Breakpoints.txt",
na = c("", "NA", "-"),
show_col_types = FALSE, guess_max = Inf
) %>%
filter(GUIDELINES %in% c("CLSI", "EUCAST"))
dim(whonet_breakpoints)
@@ -48,9 +50,9 @@ whonet_breakpoints |>
```{r}
whonet_breakpoints |>
filter(HOST == "Cats", YEAR >= 2021) |>
select(GUIDELINES, YEAR, TEST_METHOD, ORGANISM_CODE, R, S) |>
mutate(MO_NAME = AMR::mo_shortname(ORGANISM_CODE), .before = R) |>
filter(HOST == "Cats", YEAR >= 2021) |>
select(GUIDELINES, YEAR, TEST_METHOD, ORGANISM_CODE, R, S) |>
mutate(MO_NAME = AMR::mo_shortname(ORGANISM_CODE), .before = R) |>
as.data.frame()
```
@@ -58,12 +60,14 @@ whonet_breakpoints |>
```{r}
whonet_breakpoints |>
filter(HOST == "Cats", YEAR == 2023) |>
mutate(MO = AMR::mo_shortname(ORGANISM_CODE),
AB = AMR::ab_name(WHONET_ABX_CODE),
SITE_OF_INFECTION = substr(SITE_OF_INFECTION, 1, 25)) |>
arrange(MO, AB) |>
select(MO, AB, SITE_OF_INFECTION) |>
filter(HOST == "Cats", YEAR == 2023) |>
mutate(
MO = AMR::mo_shortname(ORGANISM_CODE),
AB = AMR::ab_name(WHONET_ABX_CODE),
SITE_OF_INFECTION = substr(SITE_OF_INFECTION, 1, 25)
) |>
arrange(MO, AB) |>
select(MO, AB, SITE_OF_INFECTION) |>
as.data.frame()
```

View File

@@ -406,7 +406,7 @@ pre_commit_lst$AB_GLYCOPEPTIDES <- antimicrobials %>%
pre_commit_lst$AB_FUSIDANES <- antimicrobials %>%
filter(name %like% "fusi") %>%
pull(ab)
pre_commit_lst$AB_IONOPHORES<- antimicrobials %>%
pre_commit_lst$AB_IONOPHORES <- antimicrobials %>%
filter(name %like% "alamethicin|beauvericin|calcimycin|chloroquine|clioquinol|diiodohydroxyquinoline|dithiocarbamates|enniatin|epigallocatechin|gramicidin|hinokitiol|ionomycin|laidlomycin|lasalocid|maduramicin|monensin|narasin|nigericin|nonactin|nystatin|pyrazole|pyrithione|quercetin|salinomycin|semduramicin|valinomycin|zincophorin") %>%
pull(ab)
pre_commit_lst$AB_ISOXAZOLYLPENICILLINS <- antimicrobials %>%
@@ -478,7 +478,8 @@ pre_commit_lst$AB_BETALACTAMS <- sort(c(
pre_commit_lst$AB_PENICILLINS,
pre_commit_lst$AB_CEPHALOSPORINS,
pre_commit_lst$AB_CARBAPENEMS,
pre_commit_lst$AB_MONOBACTAMS))
pre_commit_lst$AB_MONOBACTAMS
))
pre_commit_lst$AB_BETALACTAMASE_INHIBITORS <- antimicrobials %>%
filter(atc_group2 %like% "Beta-lactamase inhibitors" | name %like% "bactam") %>%
pull(ab)
@@ -495,8 +496,9 @@ for (grp in pre_commit_lst$DEFINED_AB_GROUPS[pre_commit_lst$DEFINED_AB_GROUPS %u
fn_name <- tolower(gsub("^AB_", "", grp))
if (!fn_name %in% ls(envir = asNamespace("AMR"))) {
stop("Group '", grp, "' has ", length(pre_commit_lst[[grp]]),
" members (", toString(ab_name(pre_commit_lst[[grp]], tolower = T)), ") but no corresponding function '", fn_name, "()' exists in the AMR namespace.",
call. = FALSE)
" members (", toString(ab_name(pre_commit_lst[[grp]], tolower = T)), ") but no corresponding function '", fn_name, "()' exists in the AMR namespace.",
call. = FALSE
)
}
}
}
@@ -534,46 +536,48 @@ for (i in seq_along(group_map)) {
}
# create priority list for ab_group()
pre_commit_lst$ABX_PRIORITY_LIST <- c("Aminopenicillins",
"Isoxazolylpenicillins",
"Ureidopenicillins",
"Oxazolidinones",
"Carbapenems",
"Cephalosporins (1st gen.)",
"Cephalosporins (2nd gen.)",
"Cephalosporins (3rd gen.)",
"Cephalosporins (4th gen.)",
"Cephalosporins (5th gen.)",
"Cephalosporins",
"Penicillins",
"Monobactams",
"Aminoglycosides",
"Lipoglycopeptides",
"Glycopeptides",
"Peptides",
"Lincosamides",
"Streptogramins",
"Macrolides",
"Nitrofurans",
"Phenicols",
"Phosphonics",
"Polymyxins",
"Fluoroquinolones",
"Quinolones",
"Rifamycins",
"Spiropyrimidinetriones",
"Trimethoprims",
"Sulfonamides",
"Tetracyclines",
"Ionophores",
"Antifungals",
"Antimycobacterials",
"Fusidanes",
"Beta-lactams",
"Beta-lactamase inhibitors",
"Pleuromutilins",
"Aminocoumarins",
"Other")
pre_commit_lst$ABX_PRIORITY_LIST <- c(
"Aminopenicillins",
"Isoxazolylpenicillins",
"Ureidopenicillins",
"Oxazolidinones",
"Carbapenems",
"Cephalosporins (1st gen.)",
"Cephalosporins (2nd gen.)",
"Cephalosporins (3rd gen.)",
"Cephalosporins (4th gen.)",
"Cephalosporins (5th gen.)",
"Cephalosporins",
"Penicillins",
"Monobactams",
"Aminoglycosides",
"Lipoglycopeptides",
"Glycopeptides",
"Peptides",
"Lincosamides",
"Streptogramins",
"Macrolides",
"Nitrofurans",
"Phenicols",
"Phosphonics",
"Polymyxins",
"Fluoroquinolones",
"Quinolones",
"Rifamycins",
"Spiropyrimidinetriones",
"Trimethoprims",
"Sulfonamides",
"Tetracyclines",
"Ionophores",
"Antifungals",
"Antimycobacterials",
"Fusidanes",
"Beta-lactams",
"Beta-lactamase inhibitors",
"Pleuromutilins",
"Aminocoumarins",
"Other"
)
if (!all(unlist(antimicrobials$group) %in% pre_commit_lst$ABX_PRIORITY_LIST)) {
stop("Missing group(s) in priority list: ", paste(setdiff(unlist(antimicrobials$group), pre_commit_lst$ABX_PRIORITY_LIST), collapse = ", "))
}
@@ -589,17 +593,17 @@ pre_commit_lst$AV_LOOKUP <- create_AB_AV_lookup(antivirals)
# Export to package as internal data ----
# usethis::use_data() must receive unquoted object names, which is not flexible at all.
# we'll use good old base::save() instead
save(list = names(pre_commit_lst),
file = "R/sysdata.rda",
envir = as.environment(pre_commit_lst),
compress = "xz",
version = 2,
ascii = FALSE)
save(
list = names(pre_commit_lst),
file = "R/sysdata.rda",
envir = as.environment(pre_commit_lst),
compress = "xz",
version = 2,
ascii = FALSE
)
usethis::ui_done("Saved to {usethis::ui_value('R/sysdata.rda')}")
# Export data sets to the repository in different formats -----------------
for (pkg in c("haven", "openxlsx2", "arrow")) {
@@ -621,7 +625,9 @@ write_md5 <- function(object) {
}
changed_md5 <- function(object) {
path <- paste0("data-raw/", deparse(substitute(object)), ".md5")
if (!file.exists(path)) return(TRUE)
if (!file.exists(path)) {
return(TRUE)
}
tryCatch(
{
conn <- file(path)
@@ -759,11 +765,14 @@ devtools::load_all(quiet = TRUE)
suppressMessages(set_AMR_locale("English"))
files_changed <- function(paths = "^(R|data)/") {
tryCatch({
changed_files <- system("git status", intern = TRUE)
changed_files <- unlist(strsplit(changed_files, " "))
any(changed_files %like% paths[paths != "R/sysdata.rda"])
}, error = function(e) TRUE)
tryCatch(
{
changed_files <- system("git status", intern = TRUE)
changed_files <- unlist(strsplit(changed_files, " "))
any(changed_files %like% paths[paths != "R/sysdata.rda"])
},
error = function(e) TRUE
)
}
# Update URLs -------------------------------------------------------------
@@ -801,8 +810,10 @@ if (files_changed()) {
# Style pkg ---------------------------------------------------------------
if (files_changed(paths = "^(R|tests)/")) {
usethis::ui_info("Styling package")
styler::style_pkg(include_roxygen_examples = FALSE,
exclude_dirs = list.dirs(full.names = FALSE, recursive = FALSE)[!list.dirs(full.names = FALSE, recursive = FALSE) %in% c("R", "tests")])
styler::style_pkg(
include_roxygen_examples = FALSE,
exclude_dirs = list.dirs(full.names = FALSE, recursive = FALSE)[!list.dirs(full.names = FALSE, recursive = FALSE) %in% c("R", "tests")]
)
}
# Document pkg ------------------------------------------------------------
@@ -813,13 +824,13 @@ if (files_changed()) {
# Update index.md and README.md -------------------------------------------
if (files_changed("README.Rmd") ||
files_changed("index.Rmd") ||
files_changed("man/microorganisms.Rd") ||
files_changed("man/antimicrobials.Rd") ||
files_changed("man/clinical_breakpoints.Rd") ||
files_changed("man/antibiogram.Rd") ||
files_changed("R/antibiogram.R") ||
files_changed("data-raw/translations.tsv")) {
files_changed("index.Rmd") ||
files_changed("man/microorganisms.Rd") ||
files_changed("man/antimicrobials.Rd") ||
files_changed("man/clinical_breakpoints.Rd") ||
files_changed("man/antibiogram.Rd") ||
files_changed("R/antibiogram.R") ||
files_changed("data-raw/translations.tsv")) {
usethis::ui_info("Rendering {usethis::ui_field('index.md')} and {usethis::ui_field('README.md')}")
suppressWarnings(rmarkdown::render("index.Rmd", quiet = TRUE))
suppressWarnings(rmarkdown::render("README.Rmd", quiet = TRUE))

View File

@@ -262,9 +262,9 @@ get_synonyms <- function(CID, clean = TRUE) {
if (is.na(CID[i])) {
next
}
all_cids <- CID[i]
# we will now get the closest compounds with a 96% threshold
similar_cids <- tryCatch(
data.table::fread(
@@ -281,7 +281,7 @@ get_synonyms <- function(CID, clean = TRUE) {
# leave out all CIDs that we have in our antimicrobials dataset to prevent duplication
similar_cids <- similar_cids[!similar_cids %in% antimicrobials$cid[!is.na(antimicrobials$cid)]]
all_cids <- unique(c(all_cids, similar_cids))
# for each one, we are getting the synonyms
current_syns <- character(0)
for (j in seq_len(length(all_cids))) {
@@ -297,9 +297,9 @@ get_synonyms <- function(CID, clean = TRUE) {
)[[1]],
error = function(e) NA_character_
)
Sys.sleep(0.05)
if (clean == TRUE) {
# remove text between brackets
synonyms_txt <- trimws(gsub(
@@ -319,16 +319,16 @@ get_synonyms <- function(CID, clean = TRUE) {
synonyms_txt <- gsub("[^a-z]+$", "", ignore.case = TRUE, synonyms_txt)
# only length 5 to 20 and lower-case names starting with a capital letter
synonyms_txt <- synonyms_txt[nchar(synonyms_txt) %in% c(5:20) &
grepl("^[A-Z][a-z]+$", synonyms_txt, ignore.case = FALSE)]
grepl("^[A-Z][a-z]+$", synonyms_txt, ignore.case = FALSE)]
synonyms_txt <- unlist(strsplit(synonyms_txt, ";", fixed = TRUE))
}
# synonyms must not be set for other agents, so remove the duplicates
synonyms_txt <- synonyms_txt[!synonyms_txt %in% unlist(synonyms)]
current_syns <- c(current_syns, synonyms_txt)
}
current_syns <- unique(trimws(current_syns[tolower(current_syns) %in% unique(tolower(current_syns))]))
synonyms[i] <- list(sort(current_syns))
}
@@ -763,10 +763,12 @@ antimicrobials[which(antimicrobials$ab %in% c("CYC", "LNZ", "THA", "TZD")), "gro
# add efflux
effl <- antimicrobials |>
filter(ab == "ACM") |>
mutate(ab = as.character("EFF"),
cid = NA_real_,
name = "Efflux",
group = "Other")
mutate(
ab = as.character("EFF"),
cid = NA_real_,
name = "Efflux",
group = "Other"
)
antimicrobials <- antimicrobials |>
mutate(ab = as.character(ab)) |>
bind_rows(effl)
@@ -777,9 +779,11 @@ antimicrobials[which(antimicrobials$ab == "EFF"), "abbreviations"][[1]] <- list(
# add clindamycin inducible screening
clin <- antimicrobials |>
filter(ab == "FOX1") |>
mutate(ab = as.character("CLI-S"),
name = "Clindamycin inducible screening",
group = "Macrolides/lincosamides")
mutate(
ab = as.character("CLI-S"),
name = "Clindamycin inducible screening",
group = "Macrolides/lincosamides"
)
antimicrobials <- antimicrobials |>
mutate(ab = as.character(ab)) |>
bind_rows(clin)
@@ -791,109 +795,123 @@ antimicrobials <- antimicrobials |>
bind_rows(
antimicrobials |>
filter(ab == "EFF") |>
mutate(ab = "BLA-S",
name = paste("Beta-lactamase", "screening test"),
cid = NA_real_,
atc = list(character(0)),
atc_group1 = NA_character_,
atc_group2 = NA_character_,
abbreviations = list(c("beta-lactamase", "betalactamase", "bl screen", "blt screen")),
synonyms = list(character(0)),
oral_ddd = NA_real_,
oral_units = NA_character_,
iv_ddd = NA_real_,
iv_units = NA_character_,
loinc = list(character(0))),
mutate(
ab = "BLA-S",
name = paste("Beta-lactamase", "screening test"),
cid = NA_real_,
atc = list(character(0)),
atc_group1 = NA_character_,
atc_group2 = NA_character_,
abbreviations = list(c("beta-lactamase", "betalactamase", "bl screen", "blt screen")),
synonyms = list(character(0)),
oral_ddd = NA_real_,
oral_units = NA_character_,
iv_ddd = NA_real_,
iv_units = NA_character_,
loinc = list(character(0))
),
antimicrobials |>
filter(ab == "PEN") |>
mutate(ab = "PEN-S",
name = paste(name, "screening test"),
cid = NA,
atc = list(character(0)),
atc_group1 = NA_character_,
atc_group2 = NA_character_,
abbreviations = list(c("pen screen")),
synonyms = list(character(0)),
oral_ddd = NA_real_,
oral_units = NA_character_,
iv_ddd = NA_real_,
iv_units = NA_character_,
loinc = list(character(0))),
mutate(
ab = "PEN-S",
name = paste(name, "screening test"),
cid = NA,
atc = list(character(0)),
atc_group1 = NA_character_,
atc_group2 = NA_character_,
abbreviations = list(c("pen screen")),
synonyms = list(character(0)),
oral_ddd = NA_real_,
oral_units = NA_character_,
iv_ddd = NA_real_,
iv_units = NA_character_,
loinc = list(character(0))
),
antimicrobials |>
filter(ab == "OXA") |>
mutate(ab = "OXA-S",
name = paste(name, "screening test"),
cid = NA,
atc = list(character(0)),
atc_group1 = NA_character_,
atc_group2 = NA_character_,
abbreviations = list(c("oxa screen")),
synonyms = list(character(0)),
oral_ddd = NA_real_,
oral_units = NA_character_,
iv_ddd = NA_real_,
iv_units = NA_character_,
loinc = list(character(0))),
mutate(
ab = "OXA-S",
name = paste(name, "screening test"),
cid = NA,
atc = list(character(0)),
atc_group1 = NA_character_,
atc_group2 = NA_character_,
abbreviations = list(c("oxa screen")),
synonyms = list(character(0)),
oral_ddd = NA_real_,
oral_units = NA_character_,
iv_ddd = NA_real_,
iv_units = NA_character_,
loinc = list(character(0))
),
antimicrobials |>
filter(ab == "PEF") |>
mutate(ab = "PEF-S",
name = paste(name, "screening test"),
cid = NA,
atc = list(character(0)),
atc_group1 = NA_character_,
atc_group2 = NA_character_,
abbreviations = list(c("pef screen")),
synonyms = list(character(0)),
oral_ddd = NA_real_,
oral_units = NA_character_,
iv_ddd = NA_real_,
iv_units = NA_character_,
loinc = list(character(0))),
mutate(
ab = "PEF-S",
name = paste(name, "screening test"),
cid = NA,
atc = list(character(0)),
atc_group1 = NA_character_,
atc_group2 = NA_character_,
abbreviations = list(c("pef screen")),
synonyms = list(character(0)),
oral_ddd = NA_real_,
oral_units = NA_character_,
iv_ddd = NA_real_,
iv_units = NA_character_,
loinc = list(character(0))
),
antimicrobials |>
filter(ab == "NAL") |>
mutate(ab = "NAL-S",
name = paste(name, "screening test"),
cid = NA,
atc = list(character(0)),
atc_group1 = NA_character_,
atc_group2 = NA_character_,
abbreviations = list(c("nal screen")),
synonyms = list(character(0)),
oral_ddd = NA_real_,
oral_units = NA_character_,
iv_ddd = NA_real_,
iv_units = NA_character_,
loinc = list(character(0))),
mutate(
ab = "NAL-S",
name = paste(name, "screening test"),
cid = NA,
atc = list(character(0)),
atc_group1 = NA_character_,
atc_group2 = NA_character_,
abbreviations = list(c("nal screen")),
synonyms = list(character(0)),
oral_ddd = NA_real_,
oral_units = NA_character_,
iv_ddd = NA_real_,
iv_units = NA_character_,
loinc = list(character(0))
),
antimicrobials |>
filter(ab == "NOR") |>
mutate(ab = "NOR-S",
name = paste(name, "screening test"),
cid = NA,
atc = list(character(0)),
atc_group1 = NA_character_,
atc_group2 = NA_character_,
abbreviations = list(c("nor screen")),
synonyms = list(character(0)),
oral_ddd = NA_real_,
oral_units = NA_character_,
iv_ddd = NA_real_,
iv_units = NA_character_,
loinc = list(character(0))),
mutate(
ab = "NOR-S",
name = paste(name, "screening test"),
cid = NA,
atc = list(character(0)),
atc_group1 = NA_character_,
atc_group2 = NA_character_,
abbreviations = list(c("nor screen")),
synonyms = list(character(0)),
oral_ddd = NA_real_,
oral_units = NA_character_,
iv_ddd = NA_real_,
iv_units = NA_character_,
loinc = list(character(0))
),
antimicrobials |>
filter(ab == "TCY") |>
mutate(ab = "TCY-S",
name = paste(name, "screening test"),
cid = NA,
atc = list(character(0)),
atc_group1 = NA_character_,
atc_group2 = NA_character_,
abbreviations = list(c("tcy screen")),
synonyms = list(character(0)),
oral_ddd = NA_real_,
oral_units = NA_character_,
iv_ddd = NA_real_,
iv_units = NA_character_,
loinc = list(character(0)))
mutate(
ab = "TCY-S",
name = paste(name, "screening test"),
cid = NA,
atc = list(character(0)),
atc_group1 = NA_character_,
atc_group2 = NA_character_,
abbreviations = list(c("tcy screen")),
synonyms = list(character(0)),
oral_ddd = NA_real_,
oral_units = NA_character_,
iv_ddd = NA_real_,
iv_units = NA_character_,
loinc = list(character(0))
)
)
@@ -919,16 +937,20 @@ antimicrobials <- antimicrobials |>
antimicrobials |>
filter(ab == "FPE") |>
mutate(ab = as.character(ab)) |>
mutate(ab = "FTA",
name = "Cefepime/taniborbactam",
cid = NA_real_),
mutate(
ab = "FTA",
name = "Cefepime/taniborbactam",
cid = NA_real_
),
antimicrobials |>
filter(ab == "TBP") |>
mutate(ab = as.character(ab)) |>
mutate(ab = "TAN",
name = "Taniborbactam",
cid = 76902493,
abbreviations = list("VNRX-5133"))
mutate(
ab = "TAN",
name = "Taniborbactam",
cid = 76902493,
abbreviations = list("VNRX-5133")
)
)
antimicrobials <- antimicrobials |>
@@ -936,39 +958,51 @@ antimicrobials <- antimicrobials |>
bind_rows(
antimicrobials |>
filter(ab == "CTB") |>
mutate(ab = "CTA",
cid = NA_real_,
name = "Ceftibuten/avibactam") |>
mutate(
ab = "CTA",
cid = NA_real_,
name = "Ceftibuten/avibactam"
) |>
select(1:4),
antimicrobials |>
filter(ab == "KAC") |>
mutate(ab = "KAS",
cid = NA_real_,
name = "Kasugamycin") |>
mutate(
ab = "KAS",
cid = NA_real_,
name = "Kasugamycin"
) |>
select(1:4),
antimicrobials |>
filter(ab == "PRI") |>
mutate(ab = "OST",
cid = NA_real_,
name = "Ostreogrycin") |>
mutate(
ab = "OST",
cid = NA_real_,
name = "Ostreogrycin"
) |>
select(1:4),
antimicrobials |>
filter(ab == "PRI") |>
mutate(ab = "THS",
cid = NA_real_,
name = "Thiostrepton") |>
mutate(
ab = "THS",
cid = NA_real_,
name = "Thiostrepton"
) |>
select(1, 3),
antimicrobials |>
filter(ab == "CLA1") |>
mutate(ab = "XER",
cid = NA_real_,
name = "Xeruborbactam") |>
mutate(
ab = "XER",
cid = NA_real_,
name = "Xeruborbactam"
) |>
select(1:4),
antimicrobials |>
filter(ab == "BLM") |>
mutate(ab = "ZOR",
cid = NA_real_,
name = "Zorbamycin") |>
mutate(
ab = "ZOR",
cid = NA_real_,
name = "Zorbamycin"
) |>
select(1:4),
)
@@ -977,9 +1011,11 @@ antimicrobials <- antimicrobials |>
bind_rows(
antimicrobials |>
filter(ab == "NOV") |>
mutate(ab = "CLB",
cid = 54706138,
name = "Clorobiocin") |>
mutate(
ab = "CLB",
cid = 54706138,
name = "Clorobiocin"
) |>
select(1:4),
)
@@ -990,7 +1026,7 @@ get_atc_table <- function(ab_name, type = "human") {
if (type == "human") {
url <- "https://atcddd.fhi.no/atc_ddd_index/"
} else if (type == "veterinary") {
url <- "https://atcddd.fhi.no/atcvet/atcvet_index/"
url <- "https://atcddd.fhi.no/atcvet/atcvet_index/"
} else {
stop("invalid type")
}
@@ -1055,8 +1091,10 @@ to_update <- 1:nrow(antimicrobials)
# or just the empty ones:
to_update <- which(sapply(antimicrobials$atc, function(x) length(x[!is.na(x)])) == 0)
updated_atc <- lapply(seq_len(length(to_update)),
function(x) NA_character_)
updated_atc <- lapply(
seq_len(length(to_update)),
function(x) NA_character_
)
# this takes around 10 minutes for the whole table (some ABx are skipped and go faster)

View File

@@ -72,12 +72,12 @@ whonet_organisms <- whonet_organisms_raw |>
ORGANISM = if_else(ORGANISM_CODE == "ckr", "Candida krusei", ORGANISM)
) |>
# try to match on GBIF identifier
left_join(microorganisms |> distinct(mo, gbif, status) |> filter(!is.na(gbif)), by = c("GBIF_TAXON_ID" = "gbif")) |>
left_join(microorganisms |> distinct(mo, gbif, status) |> filter(!is.na(gbif)), by = c("GBIF_TAXON_ID" = "gbif")) |>
# remove duplicates
arrange(ORGANISM_CODE, GBIF_TAXON_ID, status) |>
distinct(ORGANISM_CODE, .keep_all = TRUE) |>
distinct(ORGANISM_CODE, .keep_all = TRUE) |>
# add Enterobacterales, which is a subkingdom code in their data
bind_rows(data.frame(ORGANISM_CODE = "ebc", ORGANISM = "Enterobacterales", mo = as.mo("Enterobacterales"))) |>
bind_rows(data.frame(ORGANISM_CODE = "ebc", ORGANISM = "Enterobacterales", mo = as.mo("Enterobacterales"))) |>
arrange(ORGANISM)
@@ -88,31 +88,39 @@ unmatched <- whonet_organisms |> filter(is.na(mo))
# generate the mo codes and add their names
message("Getting MO codes for WHONET input...")
unmatched <- unmatched |>
mutate(mo = as.mo(gsub("(sero[a-z]*| nontypable| non[-][a-zA-Z]+|var[.]| not .*|sp[.],.*|, .*variant.*|, .*toxin.*|, microaer.*| beta-haem[.])", "", ORGANISM),
minimum_matching_score = 0.55,
keep_synonyms = TRUE,
language = "en"),
mo = case_when(ORGANISM %like% "Anaerobic" & ORGANISM %like% "negative" ~ as.mo("B_ANAER-NEG"),
ORGANISM %like% "Anaerobic" & ORGANISM %like% "positive" ~ as.mo("B_ANAER-POS"),
ORGANISM %like% "Anaerobic" ~ as.mo("B_ANAER"),
TRUE ~ mo),
mo_name = mo_name(mo,
keep_synonyms = TRUE,
language = "en"))
unmatched <- unmatched |>
mutate(
mo = as.mo(gsub("(sero[a-z]*| nontypable| non[-][a-zA-Z]+|var[.]| not .*|sp[.],.*|, .*variant.*|, .*toxin.*|, microaer.*| beta-haem[.])", "", ORGANISM),
minimum_matching_score = 0.55,
keep_synonyms = TRUE,
language = "en"
),
mo = case_when(
ORGANISM %like% "Anaerobic" & ORGANISM %like% "negative" ~ as.mo("B_ANAER-NEG"),
ORGANISM %like% "Anaerobic" & ORGANISM %like% "positive" ~ as.mo("B_ANAER-POS"),
ORGANISM %like% "Anaerobic" ~ as.mo("B_ANAER"),
TRUE ~ mo
),
mo_name = mo_name(mo,
keep_synonyms = TRUE,
language = "en"
)
)
# check if coercion at least resembles the first part (genus)
unmatched <- unmatched |>
unmatched <- unmatched |>
mutate(
first_part = sapply(ORGANISM, function(x) strsplit(gsub("[^a-zA-Z _-]+", "", x), " ")[[1]][1], USE.NAMES = FALSE),
keep = mo_name %like_case% first_part | ORGANISM %like% "Gram " | ORGANISM == "Other" | ORGANISM %like% "anaerobic") |>
keep = mo_name %like_case% first_part | ORGANISM %like% "Gram " | ORGANISM == "Other" | ORGANISM %like% "anaerobic"
) |>
arrange(keep)
unmatched |> View()
unmatched <- unmatched |>
filter(keep == TRUE)
organisms <- matched |> transmute(code = toupper(ORGANISM_CODE), group = SPECIES_GROUP, mo) |>
bind_rows(unmatched |> transmute(code = toupper(ORGANISM_CODE), group = SPECIES_GROUP, mo)) |>
mutate(name = mo_name(mo, keep_synonyms = TRUE)) |>
organisms <- matched |>
transmute(code = toupper(ORGANISM_CODE), group = SPECIES_GROUP, mo) |>
bind_rows(unmatched |> transmute(code = toupper(ORGANISM_CODE), group = SPECIES_GROUP, mo)) |>
mutate(name = mo_name(mo, keep_synonyms = TRUE)) |>
arrange(code)
# self-defined codes in the MO table must be retained
@@ -125,25 +133,33 @@ organisms <- organisms |>
# some subspecies exist, while their upper species do not, add them as the species level:
subspp <- organisms |>
filter(mo_species(mo, keep_synonyms = TRUE) == mo_subspecies(mo, keep_synonyms = TRUE) &
mo_species(mo, keep_synonyms = TRUE) != "" &
mo_genus(mo, keep_synonyms = TRUE) != "Salmonella") |>
mutate(mo = as.mo(paste(mo_genus(mo, keep_synonyms = TRUE),
mo_species(mo, keep_synonyms = TRUE)),
keep_synonyms = TRUE),
name = mo_name(mo, keep_synonyms = TRUE))
mo_species(mo, keep_synonyms = TRUE) != "" &
mo_genus(mo, keep_synonyms = TRUE) != "Salmonella") |>
mutate(
mo = as.mo(
paste(
mo_genus(mo, keep_synonyms = TRUE),
mo_species(mo, keep_synonyms = TRUE)
),
keep_synonyms = TRUE
),
name = mo_name(mo, keep_synonyms = TRUE)
)
organisms <- organisms |>
filter(!code %in% subspp$code) |>
bind_rows(subspp) |>
arrange(code)
# add the groups
organisms <- organisms |>
bind_rows(tibble(code = organisms |> filter(!is.na(group)) |> pull(group) |> unique(),
group = NA,
mo = organisms |> filter(!is.na(group)) |> pull(group) |> unique() |> as.mo(keep_synonyms = TRUE),
name = mo_name(mo, keep_synonyms = TRUE))) |>
arrange(code, group) |>
select(-group) |>
organisms <- organisms |>
bind_rows(tibble(
code = organisms |> filter(!is.na(group)) |> pull(group) |> unique(),
group = NA,
mo = organisms |> filter(!is.na(group)) |> pull(group) |> unique() |> as.mo(keep_synonyms = TRUE),
name = mo_name(mo, keep_synonyms = TRUE)
)) |>
arrange(code, group) |>
select(-group) |>
distinct()
# no XXX
organisms <- organisms |> filter(code != "XXX")
@@ -153,7 +169,7 @@ organisms <- organisms |> filter(code != "XXX")
# 2025-04-20 still the case
# 2026-03-27 still the case, but fixed using `existing_codes` above
organisms |> filter(code == "SGM")
# organisms <- organisms |>
# organisms <- organisms |>
# filter(!(code == "SGM" & name %like% "Streptococcus"))
# this must be empty:
organisms$code[organisms$code |> duplicated()]
@@ -165,12 +181,12 @@ saveRDS(organisms, "data-raw/organisms.rds", version = 2)
#---
# update microorganisms.codes with the latest WHONET codes
microorganisms.codes2 <- microorganisms.codes |>
microorganisms.codes2 <- microorganisms.codes |>
# remove all old WHONET codes, whether we (in the end) keep them or not
filter(!toupper(code) %in% toupper(organisms$code)) |>
filter(!toupper(code) %in% toupper(organisms$code)) |>
# and add the new ones
bind_rows(organisms |> select(code, mo)) |>
arrange(code) |>
bind_rows(organisms |> select(code, mo)) |>
arrange(code) |>
distinct(code, .keep_all = TRUE)
# new codes:
microorganisms.codes2$code[which(!microorganisms.codes2$code %in% microorganisms.codes$code)]
@@ -214,47 +230,53 @@ devtools::load_all()
# now that we have the correct MO codes, get the breakpoints and convert them
whonet_breakpoints_raw |>
count(GUIDELINES, BREAKPOINT_TYPE) |>
pivot_wider(names_from = BREAKPOINT_TYPE, values_from = n) |>
whonet_breakpoints_raw |>
count(GUIDELINES, BREAKPOINT_TYPE) |>
pivot_wider(names_from = BREAKPOINT_TYPE, values_from = n) |>
janitor::adorn_totals(where = c("row", "col"))
whonet_breakpoints_raw |>
whonet_breakpoints_raw |>
filter(YEAR == format(Sys.Date(), "%Y")) |>
count(GUIDELINES, YEAR, BREAKPOINT_TYPE) |>
pivot_wider(names_from = BREAKPOINT_TYPE, values_from = n) |>
count(GUIDELINES, YEAR, BREAKPOINT_TYPE) |>
pivot_wider(names_from = BREAKPOINT_TYPE, values_from = n) |>
janitor::adorn_totals(where = c("row", "col"))
# compared to current
AMR::clinical_breakpoints |>
count(GUIDELINES = gsub("[^a-zA-Z]", "", guideline), type) |>
arrange(tolower(type)) |>
pivot_wider(names_from = type, values_from = n) |>
pivot_wider(names_from = type, values_from = n) |>
as.data.frame() |>
janitor::adorn_totals(where = c("row", "col"))
breakpoints <- whonet_breakpoints_raw |>
mutate(code = toupper(ORGANISM_CODE)) |>
left_join(bind_rows(microorganisms.codes |> filter(!code %in% c("ALL", "GEN")),
# GEN (Generic) and ALL (All) are PK/PD codes
data.frame(code = c("ALL", "GEN"),
mo = rep(as.mo("UNKNOWN"), 2))))
left_join(bind_rows(
microorganisms.codes |> filter(!code %in% c("ALL", "GEN")),
# GEN (Generic) and ALL (All) are PK/PD codes
data.frame(
code = c("ALL", "GEN"),
mo = rep(as.mo("UNKNOWN"), 2)
)
))
# these ones lack an MO name, they cannot be used:
unknown <- breakpoints |>
filter(is.na(mo)) |>
pull(code) |>
unique()
breakpoints |>
filter(code %in% unknown) |>
breakpoints |>
filter(code %in% unknown) |>
count(GUIDELINES, YEAR, ORGANISM_CODE, BREAKPOINT_TYPE, sort = TRUE)
# 2025-04-20: these codes are currently: cps, fso. No clue (are not in MO list of WHONET), and they are only ECOFFs, so remove them:
breakpoints <- breakpoints |>
breakpoints <- breakpoints |>
filter(!is.na(mo))
# and these ones have unknown antibiotics according to WHONET itself:
breakpoints |>
filter(!WHONET_ABX_CODE %in% whonet_antibiotics_raw$WHONET_ABX_CODE) |>
breakpoints |>
filter(!WHONET_ABX_CODE %in% whonet_antibiotics_raw$WHONET_ABX_CODE) |>
count(GUIDELINES, WHONET_ABX_CODE) |>
mutate(ab = as.ab(WHONET_ABX_CODE, fast_mode = TRUE),
ab_name = ab_name(ab))
mutate(
ab = as.ab(WHONET_ABX_CODE, fast_mode = TRUE),
ab_name = ab_name(ab)
)
# 2025-04-20: these codes are currently: CFC, ROX, FIX, and N/A. All have the right replacements in `antimicrobials`, so we can safely use as.ab() later on
# the NAs are for M. tuberculosis, they are empty breakpoints
breakpoints <- breakpoints |>
@@ -264,7 +286,7 @@ breakpoints <- breakpoints |>
## Build new breakpoints table ----
breakpoints_new <- breakpoints |>
filter(!is.na(WHONET_ABX_CODE)) |>
filter(!is.na(WHONET_ABX_CODE)) |>
transmute(
guideline = paste(GUIDELINES, YEAR),
type = ifelse(BREAKPOINT_TYPE == "ECOFF", "ECOFF", tolower(BREAKPOINT_TYPE)),
@@ -301,22 +323,26 @@ breakpoints_new <- breakpoints |>
distinct(guideline, type, host, ab, mo, method, site, breakpoint_S, .keep_all = TRUE)
# fix reference table names
breakpoints_new |> filter(guideline %like% "EUCAST", is.na(ref_tbl)) |> View()
breakpoints_new <- breakpoints_new |>
mutate(ref_tbl = case_when(is.na(ref_tbl) & guideline %like% "EUCAST 202" ~ lead(ref_tbl),
is.na(ref_tbl) ~ "Unknown",
TRUE ~ ref_tbl))
breakpoints_new |>
filter(guideline %like% "EUCAST", is.na(ref_tbl)) |>
View()
breakpoints_new <- breakpoints_new |>
mutate(ref_tbl = case_when(
is.na(ref_tbl) & guideline %like% "EUCAST 202" ~ lead(ref_tbl),
is.na(ref_tbl) ~ "Unknown",
TRUE ~ ref_tbl
))
# clean disk zones
breakpoints_new[which(breakpoints_new$method == "DISK"), "breakpoint_S"] <- as.double(as.disk(breakpoints_new[which(breakpoints_new$method == "DISK"), "breakpoint_S", drop = TRUE]))
breakpoints_new[which(breakpoints_new$method == "DISK"), "breakpoint_R"] <- as.double(as.disk(breakpoints_new[which(breakpoints_new$method == "DISK"), "breakpoint_R", drop = TRUE]))
# regarding animal breakpoints, CLSI has adults and foals for horses, but only for amikacin - only keep adult horses
breakpoints_new |>
breakpoints_new |>
filter(host %like% "foal") |>
count(guideline, host, ab)
breakpoints_new <- breakpoints_new |>
filter(host %unlike% "foal") |>
breakpoints_new <- breakpoints_new |>
filter(host %unlike% "foal") |>
mutate(host = ifelse(host %like% "horse", "horse", host))
# FIXES FOR WHONET ERRORS ----
@@ -324,8 +350,12 @@ m <- unique(as.double(as.mic(levels(as.mic(1)))))
# WHONET has no >1024 but instead uses 1025, 513, and 129, so as.mic() cannot be used to clean.
# instead, raise these one higher valid MIC factor level:
breakpoints_new |> filter(method == "MIC" & (!breakpoint_S %in% c(m, NA))) |> distinct(breakpoint_S)
breakpoints_new |> filter(method == "MIC" & (!breakpoint_R %in% c(m, NA))) |> distinct(breakpoint_R)
breakpoints_new |>
filter(method == "MIC" & (!breakpoint_S %in% c(m, NA))) |>
distinct(breakpoint_S)
breakpoints_new |>
filter(method == "MIC" & (!breakpoint_R %in% c(m, NA))) |>
distinct(breakpoint_R)
breakpoints_new[which(breakpoints_new$breakpoint_R == 129), "breakpoint_R"] <- m[which(m == 128) + 1]
breakpoints_new[which(breakpoints_new$breakpoint_R == 257), "breakpoint_R"] <- m[which(m == 256) + 1]
breakpoints_new[which(breakpoints_new$breakpoint_R == 513), "breakpoint_R"] <- m[which(m == 512) + 1]
@@ -353,12 +383,12 @@ breakpoints_new$mo[breakpoints_new$guideline %like% "EUCAST" & breakpoints_new$m
breakpoints_new |>
filter(method == "MIC" & guideline %like% "EUCAST" & mo %like% as.mo("B_HMPHL")) |>
count(guideline, mo)
breakpoints_new <- breakpoints_new |>
breakpoints_new <- breakpoints_new |>
bind_rows(
breakpoints_new |>
filter(guideline %like% "EUCAST", mo == "B_HMPHL_INFL") |>
filter(guideline %like% "EUCAST", mo == "B_HMPHL_INFL") |>
mutate(mo = as.mo("B_HMPHL_PRNF"))
) |>
) |>
arrange(desc(guideline), mo, ab, type, host, method) |>
distinct()
# Achromobacter denitrificans is in WHONET included in their A. xylosoxidans table, must be removed
@@ -387,7 +417,9 @@ breakpoints_new <- breakpoints_new |> filter(!wrong)
# 2025-04-20/ fixed now
# WHONET sets for EUCAST 2026 TMP breakpoints for all Klebsiella, but this is now only for non-aerogenes species
kleb_spp <- microorganisms |> filter(rank == "species", genus == "Klebsiella", !species %in% c("", "aerogenes")) |> pull(mo)
kleb_spp <- microorganisms |>
filter(rank == "species", genus == "Klebsiella", !species %in% c("", "aerogenes")) |>
pull(mo)
kleb_tmp_mic <- breakpoints_new |>
filter(guideline == "EUCAST 2026", method == "MIC", ab == "TMP", mo == as.mo("Klebsiella")) |>
uncount(length(kleb_spp)) |>
@@ -398,8 +430,10 @@ kleb_tmp_disk <- breakpoints_new |>
mutate(mo = kleb_spp)
breakpoints_new <- breakpoints_new |>
filter(!(guideline == "EUCAST 2026" & method == "MIC" & ab == "TMP" & mo == as.mo("Klebsiella"))) |>
bind_rows(kleb_tmp_mic,
kleb_tmp_disk)
bind_rows(
kleb_tmp_mic,
kleb_tmp_disk
)
# WHONET contains wrong EUCAST breakpoints for enterococci/SXT: disk should be 23/23, not 21/50, and MIC should be 1/1, not 0.032/1
# applies to all previous years, since v11 (2011)
@@ -441,14 +475,14 @@ breakpoints_new <- breakpoints_new |>
# check the strange duplicates
breakpoints_new |>
breakpoints_new |>
mutate(id = paste(guideline, type, host, method, site, mo, ab, uti)) %>%
filter(id %in% .$id[which(duplicated(id))]) |>
filter(id %in% .$id[which(duplicated(id))]) |>
arrange(desc(guideline)) |>
View()
# 2024-06-19/ mostly ECOFFs, but there's no explanation in the whonet_breakpoints_raw df, we have to remove duplicates
# 2025-04-20/ same, most important one seems M. tuberculosis in CLSI (also in 2025)
breakpoints_new <- breakpoints_new |>
breakpoints_new <- breakpoints_new |>
distinct(guideline, type, host, method, site, mo, ab, uti, .keep_all = TRUE)
@@ -469,7 +503,7 @@ dim(clinical_breakpoints)
# SAVE TO PACKAGE ----
# determine rank again now that some changes were made on taxonomic level (genus -> species)
breakpoints_new <- breakpoints_new |>
breakpoints_new <- breakpoints_new |>
mutate(rank_index = case_when(
mo_rank(mo, keep_synonyms = TRUE) %like% "(infra|sub)" ~ 1,
mo_rank(mo, keep_synonyms = TRUE) == "species" ~ 2,

View File

@@ -649,7 +649,9 @@ taxonomy_mycobank <- taxonomy_mycobank %>%
arrange(fullname)
taxonomy_mycobank %>% count(rank, sort = TRUE)
taxonomy_mycobank %>% filter(rank %like% "#") %>% count(rank)
taxonomy_mycobank %>%
filter(rank %like% "#") %>%
count(rank)
taxonomy_mycobank3 <- taxonomy_mycobank
@@ -2546,7 +2548,9 @@ taxonomy %>%
arrange(mo) %>%
View()
# keep the firsts
taxonomy <- taxonomy %>% arrange(mo) %>% distinct(mo, .keep_all = TRUE)
taxonomy <- taxonomy %>%
arrange(mo) %>%
distinct(mo, .keep_all = TRUE)
# are fullnames unique?
taxonomy %>%
@@ -2997,7 +3001,9 @@ taxonomy$rank[which(taxonomy$fullname %like% "unknown")] <- "(unknown rank)"
# this happened in early 2025, check that MO codes do not have repeated elements
# fixed it then like this: microorganisms$mo <- gsub("B_SCLLM_CNNM_LNSM_LNSM_LNSM_LNSM", "B_SCLLM_CNNM", microorganisms$mo)
taxonomy |> filter(mo %like% "_.*_.*_.*_") |> View()
taxonomy |>
filter(mo %like% "_.*_.*_.*_") |>
View()
fix_old_mos <- function(dataset) {
@@ -3085,7 +3091,9 @@ microorganisms <- taxonomy
# set class <mo>
class(microorganisms$mo) <- c("mo", "character")
microorganisms <- microorganisms %>% arrange(fullname) %>% df_remove_nonASCII()
microorganisms <- microorganisms %>%
arrange(fullname) %>%
df_remove_nonASCII()
usethis::use_data(
microorganisms,
overwrite = TRUE,

View File

@@ -59,72 +59,101 @@ whonet_organisms <- whonet_organisms %>%
mutate(
# this one was called Issatchenkia orientalis, but it should be:
ORGANISM = if_else(ORGANISM_CODE == "ckr", "Candida krusei", ORGANISM)
) %>%
) %>%
# try to match on GBIF identifier
left_join(microorganisms %>% distinct(mo, gbif, status) %>% filter(!is.na(gbif)), by = c("GBIF_TAXON_ID" = "gbif")) %>%
left_join(microorganisms %>% distinct(mo, gbif, status) %>% filter(!is.na(gbif)), by = c("GBIF_TAXON_ID" = "gbif")) %>%
# remove duplicates
arrange(ORGANISM_CODE, GBIF_TAXON_ID, status) %>%
distinct(ORGANISM_CODE, .keep_all = TRUE) %>%
distinct(ORGANISM_CODE, .keep_all = TRUE) %>%
# add Enterobacterales, which is a subkingdom code in their data
bind_rows(data.frame(ORGANISM_CODE = "ebc", ORGANISM = "Enterobacterales", mo = as.mo("Enterobacterales"))) %>%
bind_rows(data.frame(ORGANISM_CODE = "ebc", ORGANISM = "Enterobacterales", mo = as.mo("Enterobacterales"))) %>%
arrange(ORGANISM)
# check non-existing species groups in the microorganisms table
whonet_organisms %>%
filter(!is.na(SPECIES_GROUP)) %>%
group_by(SPECIES_GROUP) %>%
summarise(complex = ORGANISM[ORGANISM %like% " (group|complex)"][1],
organisms = paste0(n(), ": ", paste(sort(unique(ORGANISM)), collapse = ", "))) %>%
summarise(
complex = ORGANISM[ORGANISM %like% " (group|complex)"][1],
organisms = paste0(n(), ": ", paste(sort(unique(ORGANISM)), collapse = ", "))
) %>%
filter(!SPECIES_GROUP %in% microorganisms.codes$code)
# create the species group data set ----
microorganisms.groups <- whonet_organisms %>%
# these will not be translated well
filter(!ORGANISM %in% c("Trueperella pyogenes-like bacteria",
"Mycobacterium suricattae",
"Mycobacterium canetti")) %>%
filter(!ORGANISM %in% c(
"Trueperella pyogenes-like bacteria",
"Mycobacterium suricattae",
"Mycobacterium canetti"
)) %>%
filter(!is.na(SPECIES_GROUP), SPECIES_GROUP != ORGANISM_CODE) %>%
transmute(mo_group = as.mo(SPECIES_GROUP),
mo = ifelse(is.na(mo),
as.character(as.mo(ORGANISM, keep_synonyms = TRUE, minimum_matching_score = 0)),
mo)) %>%
transmute(
mo_group = as.mo(SPECIES_GROUP),
mo = ifelse(is.na(mo),
as.character(as.mo(ORGANISM, keep_synonyms = TRUE, minimum_matching_score = 0)),
mo
)
) %>%
# add our own CoNS and CoPS, WHONET does not strictly follow Becker et al. (2014, 2019, 2020)
filter(mo_group != as.mo("CoNS")) %>%
bind_rows(tibble(mo_group = as.mo("CoNS"), mo = MO_CONS)) %>%
filter(mo_group != as.mo("CoPS")) %>%
bind_rows(tibble(mo_group = as.mo("CoPS"), mo = MO_COPS)) %>%
filter(mo_group != as.mo("CoNS")) %>%
bind_rows(tibble(mo_group = as.mo("CoNS"), mo = MO_CONS)) %>%
filter(mo_group != as.mo("CoPS")) %>%
bind_rows(tibble(mo_group = as.mo("CoPS"), mo = MO_COPS)) %>%
# at least all our Lancefield-grouped streptococci must be in the beta-haemolytic group:
bind_rows(tibble(mo_group = as.mo("Beta-haemolytic streptococcus"),
mo = c(MO_LANCEFIELD,
microorganisms %>% filter(fullname %like% "^Streptococcus Group") %>% pull(mo)))) %>%
bind_rows(tibble(
mo_group = as.mo("Beta-haemolytic streptococcus"),
mo = c(
MO_LANCEFIELD,
microorganisms %>% filter(fullname %like% "^Streptococcus Group") %>% pull(mo)
)
)) %>%
# and per Streptococcus group as well:
# group A - S. pyogenes
bind_rows(tibble(mo_group = as.mo("Streptococcus Group A"),
mo = microorganisms$mo[which(microorganisms$mo %like% "^B_STRPT_PYGN(_|$)")])) %>%
bind_rows(tibble(
mo_group = as.mo("Streptococcus Group A"),
mo = microorganisms$mo[which(microorganisms$mo %like% "^B_STRPT_PYGN(_|$)")]
)) %>%
# group B - S. agalactiae
bind_rows(tibble(mo_group = as.mo("Streptococcus Group B"),
mo = microorganisms$mo[which(microorganisms$mo %like% "^B_STRPT_AGLC(_|$)")])) %>%
bind_rows(tibble(
mo_group = as.mo("Streptococcus Group B"),
mo = microorganisms$mo[which(microorganisms$mo %like% "^B_STRPT_AGLC(_|$)")]
)) %>%
# group C - all subspecies within S. dysgalactiae and S. equi (such as S. equi zooepidemicus)
bind_rows(tibble(mo_group = as.mo("Streptococcus Group C"),
mo = microorganisms$mo[which(microorganisms$mo %like% "^B_STRPT_(DYSG|EQUI)(_|$)")])) %>%
bind_rows(tibble(
mo_group = as.mo("Streptococcus Group C"),
mo = microorganisms$mo[which(microorganisms$mo %like% "^B_STRPT_(DYSG|EQUI)(_|$)")]
)) %>%
# group F - Milleri group == S. anginosus group, which incl. S. anginosus, S. constellatus, S. intermedius
bind_rows(tibble(mo_group = as.mo("Streptococcus Group F"),
mo = microorganisms$mo[which(microorganisms$mo %like% "^B_STRPT_(ANGN|CNST|INTR)(_|$)")])) %>%
bind_rows(tibble(
mo_group = as.mo("Streptococcus Group F"),
mo = microorganisms$mo[which(microorganisms$mo %like% "^B_STRPT_(ANGN|CNST|INTR)(_|$)")]
)) %>%
# group G - S. dysgalactiae and S. canis (though dysgalactiae is also group C and will be matched there)
bind_rows(tibble(mo_group = as.mo("Streptococcus Group G"),
mo = microorganisms$mo[which(microorganisms$mo %like% "^B_STRPT_(DYSG|CANS)(_|$)")])) %>%
bind_rows(tibble(
mo_group = as.mo("Streptococcus Group G"),
mo = microorganisms$mo[which(microorganisms$mo %like% "^B_STRPT_(DYSG|CANS)(_|$)")]
)) %>%
# group H - S. sanguinis
bind_rows(tibble(mo_group = as.mo("Streptococcus Group H"),
mo = microorganisms$mo[which(microorganisms$mo %like% "^B_STRPT_SNGN(_|$)")])) %>%
bind_rows(tibble(
mo_group = as.mo("Streptococcus Group H"),
mo = microorganisms$mo[which(microorganisms$mo %like% "^B_STRPT_SNGN(_|$)")]
)) %>%
# group K - S. salivarius, incl. S. salivarius salivariuss and S. salivarius thermophilus
bind_rows(tibble(mo_group = as.mo("Streptococcus Group K"),
mo = microorganisms$mo[which(microorganisms$mo %like% "^B_STRPT_SLVR(_|$)")])) %>%
bind_rows(tibble(
mo_group = as.mo("Streptococcus Group K"),
mo = microorganisms$mo[which(microorganisms$mo %like% "^B_STRPT_SLVR(_|$)")]
)) %>%
# group L - only S. dysgalactiae
bind_rows(tibble(mo_group = as.mo("Streptococcus Group L"),
mo = microorganisms$mo[which(microorganisms$mo %like% "^B_STRPT_DYSG(_|$)")])) %>%
bind_rows(tibble(
mo_group = as.mo("Streptococcus Group L"),
mo = microorganisms$mo[which(microorganisms$mo %like% "^B_STRPT_DYSG(_|$)")]
)) %>%
# and for EUCAST: Strep group A, B, C, G
bind_rows(tibble(mo_group = as.mo("Streptococcus Group A, B, C, G"),
mo = microorganisms$mo[which(microorganisms$mo %like% "^B_STRPT_(PYGN|AGLC|DYSG|EQUI|CANS|GRPA|GRPB|GRPC|GRPG)(_|$)")])) %>%
bind_rows(tibble(
mo_group = as.mo("Streptococcus Group A, B, C, G"),
mo = microorganisms$mo[which(microorganisms$mo %like% "^B_STRPT_(PYGN|AGLC|DYSG|EQUI|CANS|GRPA|GRPB|GRPC|GRPG)(_|$)")]
)) %>%
# HACEK is:
# - Haemophilus species
# - Aggregatibacter species
@@ -133,38 +162,46 @@ microorganisms.groups <- whonet_organisms %>%
# - Kingella species
# - and previously Actinobacillus actinomycetemcomitans
# see https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3656887/
filter(mo_group != as.mo("HACEK")) %>%
bind_rows(tibble(mo_group = as.mo("HACEK"), mo = microorganisms %>% filter(genus == "Haemophilus") %>% pull(mo))) %>%
bind_rows(tibble(mo_group = as.mo("HACEK"), mo = microorganisms %>% filter(genus == "Aggregatibacter") %>% pull(mo))) %>%
filter(mo_group != as.mo("HACEK")) %>%
bind_rows(tibble(mo_group = as.mo("HACEK"), mo = microorganisms %>% filter(genus == "Haemophilus") %>% pull(mo))) %>%
bind_rows(tibble(mo_group = as.mo("HACEK"), mo = microorganisms %>% filter(genus == "Aggregatibacter") %>% pull(mo))) %>%
bind_rows(tibble(mo_group = as.mo("HACEK"), mo = as.mo("Cardiobacterium hominis", keep_synonyms = TRUE))) %>%
bind_rows(tibble(mo_group = as.mo("HACEK"), mo = as.mo("Eikenella corrodens", keep_synonyms = TRUE))) %>%
bind_rows(tibble(mo_group = as.mo("HACEK"), mo = microorganisms %>% filter(genus == "Kingella") %>% pull(mo))) %>%
bind_rows(tibble(mo_group = as.mo("HACEK"), mo = as.mo("Actinobacillus actinomycetemcomitans", keep_synonyms = TRUE))) %>%
# Citrobacter freundii complex in the NCBI Taxonomy Browser:
# https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=1344959
filter(mo_group != "B_CTRBC_FRND-C") %>%
bind_rows(tibble(mo_group = as.mo("B_CTRBC_FRND-C"),
mo = paste("Citrobacter", c("freundii", "braakii", "gillenii", "murliniae", "portucalensis", "sedlakii", "werkmanii", "youngae")) %>% as.mo(keep_synonyms = TRUE))) %>%
filter(mo_group != "B_CTRBC_FRND-C") %>%
bind_rows(tibble(
mo_group = as.mo("B_CTRBC_FRND-C"),
mo = paste("Citrobacter", c("freundii", "braakii", "gillenii", "murliniae", "portucalensis", "sedlakii", "werkmanii", "youngae")) %>% as.mo(keep_synonyms = TRUE)
)) %>%
# Klebsiella pneumoniae complex
filter(mo_group != "B_KLBSL_PNMN-C") %>%
bind_rows(tibble(mo_group = as.mo("B_KLBSL_PNMN-C"),
mo = paste("Klebsiella", c("africana", "pneumoniae", "quasipneumoniae", "quasivariicola", "variicola")) %>% as.mo(keep_synonyms = TRUE))) %>%
filter(mo_group != "B_KLBSL_PNMN-C") %>%
bind_rows(tibble(
mo_group = as.mo("B_KLBSL_PNMN-C"),
mo = paste("Klebsiella", c("africana", "pneumoniae", "quasipneumoniae", "quasivariicola", "variicola")) %>% as.mo(keep_synonyms = TRUE)
)) %>%
# Yersinia pseudotuberculosis complex in the NCBI Taxonomy Browser:
# https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=1649845
filter(mo_group != "B_YERSN_PSDT-C") %>%
bind_rows(tibble(mo_group = as.mo("B_YERSN_PSDT-C"),
mo = paste("Yersinia", c("pseudotuberculosis", "pestis", "similis", "wautersii")) %>% as.mo(keep_synonyms = TRUE))) %>%
filter(mo_group != "B_YERSN_PSDT-C") %>%
bind_rows(tibble(
mo_group = as.mo("B_YERSN_PSDT-C"),
mo = paste("Yersinia", c("pseudotuberculosis", "pestis", "similis", "wautersii")) %>% as.mo(keep_synonyms = TRUE)
)) %>%
# RGM are Rapidly-growing Mycobacteria, see https://pubmed.ncbi.nlm.nih.gov/28084211/
filter(mo_group != "B_MYCBC_RGM") %>%
bind_rows(tibble(mo_group = as.mo("B_MYCBC_RGM"),
mo = paste("Mycobacterium", c( "abscessus abscessus", "abscessus bolletii", "abscessus massiliense", "agri", "aichiense", "algericum", "alvei", "anyangense", "arabiense", "aromaticivorans", "aubagnense", "aubagnense", "aurum", "austroafricanum", "bacteremicum", "boenickei", "bourgelatii", "brisbanense", "brumae", "canariasense", "celeriflavum", "chelonae", "chitae", "chlorophenolicum", "chubuense", "confluentis", "cosmeticum", "crocinum", "diernhoferi", "duvalii", "elephantis", "fallax", "flavescens", "fluoranthenivorans", "fortuitum", "franklinii", "frederiksbergense", "gadium", "gilvum", "goodii", "hassiacum", "hippocampi", "hodleri", "holsaticum", "houstonense", "immunogenum", "insubricum", "iranicum", "komossense", "litorale", "llatzerense", "madagascariense", "mageritense", "monacense", "moriokaense", "mucogenicum", "mucogenicum", "murale", "neoaurum", "neworleansense", "novocastrense", "obuense", "pallens", "parafortuitum", "peregrinum", "phlei", "phocaicum", "phocaicum", "porcinum", "poriferae", "psychrotolerans", "pyrenivorans", "rhodesiae", "rufum", "rutilum", "salmoniphilum", "sediminis", "senegalense", "septicum", "setense", "smegmatis", "sphagni", "thermoresistibile", "tokaiense", "vaccae", "vanbaalenii", "wolinskyi")) %>% as.mo(keep_synonyms = TRUE)))
filter(mo_group != "B_MYCBC_RGM") %>%
bind_rows(tibble(
mo_group = as.mo("B_MYCBC_RGM"),
mo = paste("Mycobacterium", c("abscessus abscessus", "abscessus bolletii", "abscessus massiliense", "agri", "aichiense", "algericum", "alvei", "anyangense", "arabiense", "aromaticivorans", "aubagnense", "aubagnense", "aurum", "austroafricanum", "bacteremicum", "boenickei", "bourgelatii", "brisbanense", "brumae", "canariasense", "celeriflavum", "chelonae", "chitae", "chlorophenolicum", "chubuense", "confluentis", "cosmeticum", "crocinum", "diernhoferi", "duvalii", "elephantis", "fallax", "flavescens", "fluoranthenivorans", "fortuitum", "franklinii", "frederiksbergense", "gadium", "gilvum", "goodii", "hassiacum", "hippocampi", "hodleri", "holsaticum", "houstonense", "immunogenum", "insubricum", "iranicum", "komossense", "litorale", "llatzerense", "madagascariense", "mageritense", "monacense", "moriokaense", "mucogenicum", "mucogenicum", "murale", "neoaurum", "neworleansense", "novocastrense", "obuense", "pallens", "parafortuitum", "peregrinum", "phlei", "phocaicum", "phocaicum", "porcinum", "poriferae", "psychrotolerans", "pyrenivorans", "rhodesiae", "rufum", "rutilum", "salmoniphilum", "sediminis", "senegalense", "septicum", "setense", "smegmatis", "sphagni", "thermoresistibile", "tokaiense", "vaccae", "vanbaalenii", "wolinskyi")) %>% as.mo(keep_synonyms = TRUE)
))
# add subspecies to all species
for (group in unique(microorganisms.groups$mo_group)) {
spp <- microorganisms.groups %>%
filter(mo_group == group & mo_rank(mo, keep_synonyms = TRUE) == "species") %>%
pull(mo) %>%
paste0(collapse = "|") %>%
filter(mo_group == group & mo_rank(mo, keep_synonyms = TRUE) == "species") %>%
pull(mo) %>%
paste0(collapse = "|") %>%
paste0("^(", ., ")")
mos <- microorganisms %>%
filter(mo %like% spp & rank == "subspecies") %>%
@@ -175,9 +212,11 @@ for (group in unique(microorganisms.groups$mo_group)) {
# add full names, arrange and clean
microorganisms.groups <- microorganisms.groups %>%
mutate(mo_group_name = mo_name(mo_group, keep_synonyms = TRUE, language = NULL),
mo_name = mo_name(mo, keep_synonyms = TRUE, language = NULL)) %>%
arrange(mo_group_name, mo_name) %>%
mutate(
mo_group_name = mo_name(mo_group, keep_synonyms = TRUE, language = NULL),
mo_name = mo_name(mo, keep_synonyms = TRUE, language = NULL)
) %>%
arrange(mo_group_name, mo_name) %>%
filter(mo_group != mo) %>%
distinct() %>%
dataset_UTF8_to_ASCII()

View File

@@ -68,9 +68,11 @@ new_ab <- complete_tbl |>
) |>
mutate(name = paste0(substr(toupper(name), 1, 1), substr(name, 2, 999))) |>
mutate(name = gsub(" and ", "/", name)) |>
filter(name %unlike% "^Combinations",
name %unlike% "/beta[-]lactamase inhibitor",
name %unlike% "combinations") |>
filter(
name %unlike% "^Combinations",
name %unlike% "/beta[-]lactamase inhibitor",
name %unlike% "combinations"
) |>
arrange(name)
new_atcs <- new_ab |>

View File

@@ -31,7 +31,7 @@
# Steps to reproduce:
# 1. Create a fake account at https://loinc.org (sad you have to create one...)
# 2. Download the CSV from https://loinc.org/download/loinc-complete/
# 2. Download the CSV from https://loinc.org/download/loinc-complete/
# 3. Read file LoincTable/Loinc.csv
loinc_df <- read.csv("data-raw/Loinc.csv",
row.names = NULL,
@@ -47,7 +47,7 @@ loinc_df %>%
filter(COMPONENT %like% "ampicillin|fluconazol|meropenem") %>%
count(CLASS, sort = TRUE)
loinc_df <- loinc_df %>%
filter(CLASS %in% c("DRUG/TOX", "ABXBACT")) %>%
filter(CLASS %in% c("DRUG/TOX", "ABXBACT")) %>%
mutate(name = generalise_antibiotic_name(COMPONENT), .before = 1)
# antimicrobials

View File

@@ -1,470 +1,470 @@
codes <- tibble::tribble(
~code, ~name,
"ABT773", "Abbott 773",
"AESCUL", "Aesculin",
"AGMATI", "Agmatine",
"AMDPEN", "Amidinopenicillin subclass",
"AMICYC", "Aminocyclitol class",
"AMIFLO", "Amifloxacin",
"AMIGLY", "Aminoglycoside class",
"AMIKAC", "Amikacin",
"AMIPEN", "Aminopenicillin subclass",
"AMOCL2", "Amoxicillin/ Clav.Acid */2",
"AMOCL4", "Amoxicillin/ Clav. Acid 4:1",
"AMOCLA", "Amoxicillin/ Clavulanic Acid",
"AMOXIC", "Amoxicillin",
"AMP100", "Ampicillin 100 ug/ml",
"AMP200", "Ampicillin 200 ug/ml",
"AMPHOT", "Amphotericin B",
"AMPICI", "Ampicillin",
"AMPSUL", "Ampicillin/ Sulbactam",
"ANIDUL", "Anidulafungin",
"ANSAMY", "Rifabutin",
"ANSMYC", "Ansamycin class",
"APALCI", "Apalcillin",
"APOXIC", "Apoxicillin",
"APRAMY", "Apramycin",
"ARABIN", "Arabinose",
"ARABIT", "Arabitol",
"ARBEKA", "Arbekacin",
"ARGINI", "Arginine",
"ASPOXI", "Aspoxicillin",
"ASTROM", "Astromycin",
"AVILAM", "Avilamycin",
"AZD256", "AZD2563",
"AZITHR", "Azithromycin",
"AZLOCI", "Azlocillin",
"AZT1", "Aztreonam 1 ug/ml",
"AZTREO", "Aztreonam",
"BACAMP", "Bacampicillin",
"BACITR", "Bacitracin",
"BAMMYC", "Bambermycin class",
"BAY12", "BAY12-8039",
"BERBER", "Berberine",
"BESIFL", "Besifloxacin",
"BETA", "Beta-lactamase",
"B", "HAEM Beta-haemolysis",
"BIAPEN", "Biapenem (L-627)",
"BLACT", "Beta-lactam class",
"BLINHB", "Beta-lactam Inhibitor class",
"B", "MGLU B-Methyl Glucoside",
"CAPREO", "Capreomycin",
"CAPRYL", "Caprylic Acid",
"CARBAD", "Carbadox",
"CARBAP", "Carbapenem class",
"CARBEN", "Carbenicillin",
"CARPEN", "Carboxypenicillin subclass",
"CASPOF", "Caspofungin",
"CATALA", "Catalase",
"CCARB", "Carbacephem subclass",
"CEFACL", "Cefaclor",
"CEFADR", "Cefadroxil",
"CEFAMA", "Cefamandole",
"CEFATR", "Cefatrizine",
"CEFAXE", "Cefuroxime (axetil)",
"CEFAZE", "Cefazedon",
"CEFAZO", "Cefazolin",
"CEFBUP", "Cefbuperazone",
"CEFCAP", "Cefcapene",
"CEFCLA", "Cefepime/ Clavulanic Acid",
"CEFCLI", "Cefclidin",
"CEFDIN", "Cefdinir",
"CEFDIT", "Cefditoren",
"CEFEP4", "Cefepime 4 ug/ml",
"CEFEPI", "Cefepime",
"CEFETA", "Cefetamet",
"CEFIXI", "Cefixime",
"CEFMEN", "Cefmenoxime",
"CEFMET", "Cefmetazole",
"CEFMIN", "Cefminox",
"CEFMTM", "Cefmetamet",
"CEFO32", "Cefotaxime 32 ug/ml",
"CEFONI", "Cefonicid",
"CEFOPE", "Cefoperazone",
"CEFORA", "Ceforanide",
"CEFOSE", "Cefoselis",
"CEFOTA", "Cefotaxime",
"CEFOTE", "Cefotetan",
"CEFOTI", "Cefotiam",
"CEFOVE", "Cefovecin",
"CEFOXI", "Cefoxitin",
"CEFOZO", "Cefozopran",
"CEFPAM", "Cefpiramide",
"CEFPIM", "Cefpimizole",
"CEFPOD", "Cefpodoxime",
"CEFPOM", "Cefpirome",
"CEFPRO", "Cefprozil",
"CEFQUI", "Cefquinome",
"CEFROX", "Cefroxidime",
"CEFSUL", "Cefsulodin",
"CEFTAR", "Ceftaroline",
"CEFTAZ", "Ceftazidime",
"CEFTER", "Cefteram",
"CEFTEZ", "Ceftezole",
"CEFTIB", "Ceftibuten",
"CEFTIF", "Ceftiofur",
"CEFTIX", "Ceftioxadine",
"CEFTIZ", "Ceftizoxime",
"CEFTOB", "Ceftobiprole",
"CEFTRI", "Ceftriaxone",
"CEFURO", "Cefuroxime (sodium)",
"CEFUZO", "Cefuzonam",
"CELLOB", "Cellobiose",
"CEPALE", "Cefalexin",
"CEPHAC", "Cephacetril",
"CEPHAL", "Cephalothin",
"CEPHAP", "Cephapirin",
"CEPHEM", "Cephem class",
"CEPHOR", "Cephem (oral) class",
"CEPHPA", "Cephem (parenteral) class",
"CEPHRA", "Cephradine",
"CEPLOR", "Cephaloridine",
"CHLORA", "Chloramphenicol",
"CHLTET", "Chlortetracycline",
"CI983", "CI-983",
"CINOXA", "Cinoxacin",
"CIPROF", "Ciprofloxacin",
"CIPROP", "CIPROP",
"CITRAT", "Citrate",
"CLARYT", "Clarithromycin",
"CLIN32", "Clindamycin 32 ug/ml",
"CLINAF", "Clinafloxacin",
"CLINDA", "Clindamycin",
"CLISPE", "Clindamycin/ Spectinomycin",
"CLOFAM", "Clofazimine",
"CLOXAC", "Cloxacillin",
"CMYC", "Cephamycin subclass",
"COAGUL", "Coagulase",
"COLFAZ", "Colfazamine",
"COLIST", "Colistin",
"COLMET", "Colistimethate",
"COMBO", "Combination class",
"CORAL", "Cephem (oral) class",
"COUMER", "Coumermycin",
"COXA", "Oxacephem subclass",
"CPAREN", "Cephem (parenteral) class",
"CPCA", "Cond. Pyridone Carboxylic Acid class",
"CSPOR", "Cephalosporin class",
"CSPOR1", "Cephalosporin I-Generation subclass",
"CSPOR2", "Cephalosporin II-Generation subclass",
"CSPOR3", "Cephalosporin III-Generation subclass",
"CSPOR4", "Cephalosporin IV-Generation subclass",
"CSPOR5", "Cephalosporin V-Generation subclass",
"CYCLAC", "Cyclacillin",
"CYCLOS", "Cycloserine",
"DALBAV", "Dalbavancin",
"DALFOP", "Dalfopristin",
"DANOFL", "Danofloxacin",
"DAPT25", "Daptomycin 25mg/L Ca",
"DAPT50", "Daptomycin 50mg/L Ca",
"DAPTOM", "Daptomycin",
"DEMECY", "Demeclocycline",
"DIBEKA", "Dibekacin",
"DICLOX", "Dicloxacillin",
"DIFLOX", "Difloxacin",
"DIRITH", "Dirithromycin",
"DORIPE", "Doripenem",
"DOXYCY", "Doxycycline",
"DTEST1", "DTest1",
"DTEST2", "DTest2",
"ENOXA", "Enoxacin",
"ENROFL", "Enrofloxacin",
"ERTAPE", "Ertapenem",
"ERY32", "Erythromycin 32 ug/ml",
"ERYSCH", "Erythromycin/ Sulphachloropyrid",
"ERYSDI", "Erythromycin/ Sulphadimethoxine",
"ERYSPE", "Erythromycin/ Spectinomycin",
"ERYSUL", "Erythromycin/ Sulfizoxazole",
"ERYTH", "Erythromycin",
"ESBL", "Extended spectrum beta-lactamase",
"ETHAMB", "Ethambutol",
"ETHION", "Ethionamide",
"FAROPE", "Faropenem",
"FLAVOM", "Flavomycin",
"FLEROX", "Fleroxacin",
"FLOMOX", "Flomoxef",
"FLORFE", "Florfenicol",
"FLQUIN", "Fluoroquinolone class",
"FLUCLO", "Flucloxacillin",
"FLUCON", "Fluconazole",
"FLUCYT", "5-Flucytosine",
"FLUMEQ", "Flumequine",
"FOPSUL", "Cefoperazone/ Sulbactam",
"FOSFOM", "Fosfomycin",
"FOSG6P", "Fosfomycin + Glucose6Phosphate",
"FOSMYC", "Fosfomycin class",
"FOSTRO", "Fosfomycin-trometamol",
"FOT1", "Cefotaxime 1 ug/ml",
"FOXSCR", "Cefoxitin Screen Test",
"FPINHB", "Folate Pathway Inhibitor class",
"FR1", "FR1",
"FR10", "FR10",
"FR12", "FR12",
"FR13", "FR13",
"FR14", "FR14",
"FR15", "FR15",
"FR16", "FR16",
"FR17", "FR17",
"FR18", "FR18",
"FR19", "FR19",
"FR20", "FR20",
"FR21", "FR21",
"FR22", "FR22",
"FR23", "FR23",
"FR24", "FR24",
"FR25", "FR25",
"FR26", "FR26",
"FR27", "FR27",
"FR28", "FR28",
"FR29", "FR29",
"FR3", "FR3",
"FR30", "FR30",
"FR31", "FR31",
"FR32", "FR32",
"FR5", "FR5",
"FR6", "FR6",
"FR7", "FR7",
"FR8", "FR8",
"FR9", "FR9",
"FRAMYC", "Framycetin",
"FRUCTO", "Fructose",
"FURALT", "Furaltadone",
"FURAZO", "Furazolidone",
"FUSACI", "Fusidic Acid",
"FUSIDA", "Fusidate",
"GARENO", "Garenoxacin",
"GARLIC", "Garlic",
"GATIFL", "Gatifloxacin",
"GE1000", "Gentamicin 1000 ug/ml",
"GE2000", "Gentamicin 2000 ug/ml",
"GEMIFL", "Gemifloxacin",
"GEN128", "Gentamicin 128 ug/ml",
"GEN500", "Gentamicin 500 ug/ml",
"GENTA1", "Gentamicin 1024 ug/ml",
"GENTAM", "Gentamicin",
"GLUCOS", "Glucose",
"GLYCER", "Glycerol",
"GLYCO", "Glycopeptide class",
"GREPAF", "Grepafloxacin",
"HETACI", "Hetacillin",
"HIPPUR", "Hippurate hydrolysis",
"HODGE", "Hodge Test",
"IB367", "IB-367",
"IBAFLO", "Ibafloxacin",
"ICLAPR", "Iclaprim",
"IMIDAZ", "Imidazole class",
"IMIP32", "Imipenem 32 ug/ml",
"IMIPEN", "Imipenem",
"INDOLE", "Indole",
"INOSIT", "Inositol",
"ISEPAM", "Isepamycin",
"ISONIA", "Isoniazid",
"ISOPEN", "Isoxazolyl Penicillin subclass",
"ITRACO", "Itraconazole",
"JOSAMY", "Josamycin",
"KANAMY", "Kanamycin",
"KETOCO", "Ketoconazole",
"KETOLI", "Ketolide class",
"LEVOFL", "Levofloxacin",
"LINCOM", "Lincomycin",
"LINCOS", "Lincosamide class",
"LINEZO", "Linezolid",
"LINFLO", "Linopristin-Flopristin",
"LINNEO", "Lincomycin/ Neomycin 2:1 ratio",
"LINSPE", "Lincomycin/ Spectinomycin",
"LIPGLY", "Lipoglycopeptide subclass",
"LIPOPE", "Lipopeptide class",
"LOMEFL", "Lomefloxacin",
"LORACA", "Loracarbef",
"LYSINE", "Lysine",
"MACCON", "Growth on MacConkey",
"MACRO", "Macrolide class",
"MALONA", "Malonate",
"MALTOS", "Maltose",
"MANNIT", "Mannitol",
"MARBOF", "Marbofloxacin",
"MECILL", "Mecillinam",
"MEROPE", "Meropenem",
"METHCY", "Methacycline",
"METHIC", "Methicillin",
"METRON", "Metronidazole",
"MEZLO", "Mezlocillin",
"MEZSUL", "Mezlocillin/ Sulbactam",
"MICAFU", "Micafungin",
"MICRON", "Micronomycin",
"MIDEKA", "Midekamycin",
"MINOCY", "Minocycline",
"MONOBA", "Monobactam class",
"MOTILI", "Motility",
"MOXALA", "Moxalactam",
"MOXIFL", "Moxifloxacin",
"MUPIRO", "Mupirocin",
"NAFCIL", "Nafcillin",
"NALAC", "Nalidixic Acid",
"NARASI", "Narasin",
"NEGCTL", "Negative Growth Control",
"NEOMYC", "Neomycin",
"NETILM", "Netilmicin",
"NFURAN", "Nitrofuran class",
"NIMIDA", "Nitroimidazole class",
"NIT16", "Nitrofurantoin 16ul",
"NITFUR", "Nitrofurazone",
"NITRAT", "Nitrate",
"NITRO", "Nitrofurantoin",
"NITSUL", "Nitrofurantoin/ Sulphadrazine",
"NORFLO", "Norfloxacin",
"NOVOBI", "Novobiocin",
"NYSTAN", "Nystantin",
"OFLOXA", "Ofloxacin",
"OLAQUI", "Olaquindox",
"OLEAND", "Oleandomycin",
"OPTOCH", "Optochin Sensitivity",
"ORBIFL", "Orbifloxacin",
"ORITAV", "Oritavancin",
"ORMSUL", "Ormetoprim/ Sulphadimethoxine",
"ORNIST", "Ornithine Spot Test",
"ORNITH", "Ornithine",
"OXACIL", "Oxacillin + 2% NaCl",
"OXAZOL", "Oxazolidinone class",
"OXIDAS", "Oxidase",
"OXOACI", "Oxolinic Acid",
"OXTSCH", "Oxytet/Tylosin Tar/Sulphachlor",
"OXTSDI", "Oxytet/Tylosin Tar/Sulphadimet",
"OXYCEP", "Oxyimino Cephalosporin subclass",
"OXYSCH", "Oxytetracycline/ Sulphachloropy",
"OXYTET", "Oxytetracycline",
"PASRAA", "Para-aminosalicylic acid",
"PEN003", "Penicillin 0.03ug",
"PENCIL", "Penicillin class",
"PENIC8", "Penicillin 8 ug/ml",
"PENICA", "Penicillin 1-2-8 ug/ml",
"PENICI", "Penicillin",
"PENMEN", "Penicillin(meningitis)",
"PENNME", "Penicillin(nonmeningitis)",
"PENNOV", "Penicillin/ Novobiocin",
"PENORA", "Penicillin (Oral)",
"PENSCH", "Penicillin/ Sulphachloropyridaz",
"PENSTR", "Penicillin/ Streptomycin",
"PERFLO", "Perfloxacin",
"PHENIC", "Phenicol class",
"PHEPEN", "Phenoxymethylpenicillin",
"PIGMEN", "Pigment",
"PIPACI", "Pipemidic Acid",
"PIPERA", "Piperacillin",
"PIPTAZ", "Piperacillin/ Tazobactam",
"PIRLIM", "Pirlimycin",
"PIVMEC", "Pivmecillinam",
"PLUERO", "Plueromutilin class",
"POD4", "Cefpodoxime 4 ug/ml",
"PODCLA", "Cefpodoxime/ Clavulanic Acid",
"POLION", "Polyether Ionophore class",
"POLPEP", "Polypeptide class",
"POLYB", "Polymyxin B",
"POSACO", "Posaconazole",
"POSCTL", "Positive Growth Control",
"PREMAF", "Premafloxacin",
"PRISTI", "Pristinamycin",
"PSPEN", "Penicillinase-stable Penicillin class",
"PYRUVA", "Pyruvate",
"QUIN", "Quinolone class",
"QUINOL", "Quinolones",
"QUINS1", "Quinolones subclass 1",
"QUINUP", "Quinupristin",
"R28965", "RU 28965",
"RAFFIN", "Raffinose",
"RAMOPL", "Ramoplanin",
"RAVUCO", "Ravuconazole",
"RAZUPE", "Razupenem",
"RHAMNO", "Rhamnose",
"RIFAMP", "Rifampin",
"RIFMYC", "Rifamycin class",
"ROKITA", "Rokitamycin",
"ROXITH", "Roxithromycin",
"S21420", "Schering 21420",
"S21561", "Schering 21561",
"S21562", "Schering 21562",
"S22591", "Schering 22591",
"S29482", "Schering 29482",
"S29486", "Schering 29486",
"S34343", "Schering 34343",
"S38609", "Schering 38609",
"SALCTL", "Positive Control +2% NaCl",
"SALINO", "Salinomycin",
"SANFET", "Sanfetrinem",
"SARAFL", "Sarafloxacin",
"SB2LB2", "SB265805/ LB20304",
"SBQLO", "SB265805",
"SDIMET", "Sulphadimethoxine",
"SIPRAM", "Sipramycin",
"SISOMY", "Sisomycin",
"SITAFL", "Sitafloxacin",
"SORBIT", "Sorbitol",
"SPARFL", "Sparfloxacin",
"SPECT", "Spectinomycin",
"SPIRAM", "Spiramycin",
"ST1000", "Streptomycin 1000 ug/ml",
"ST2000", "Streptomycin 2000 ug/ml",
"STREPT", "Streptomycin",
"STRGRA", "Streptogramin class",
"SUCROS", "Sucrose",
"SULAMI", "Sulfonamide subclass",
"SULBAC", "Sulbactam",
"SULBEN", "Sulbenicillin",
"SULCHL", "Sulphachloropyridazine",
"SULDIA", "Sulphadiazine",
"SULDIM", "Sulphadimidine",
"SULFAM", "Sulphamethoxazole",
"SULFIZ", "Sulfisoxazole",
"SULMET", "Sulphamethazine",
"SULOPE", "Sulopenem",
"SULTHI", "Sulphathiazole",
"SULTOS", "Sultamicillin Tosilate",
"SYNERC", "Quinupristin/dalfopristin",
"TANNAL", "Tannalbit",
"TAXCLA", "Cefotaxime/clavulanic acid",
"TAXMEN", "Cefotaxime (meningitis)",
"TAXNME", "Cefotaxime (nonmeningitis)",
"TAZCLA", "Ceftazidime/clavulanic acid",
"TAZOBA", "Tazobactam",
"TDA", "TDA",
"TEICOP", "Teicoplanin",
"TELAVA", "Telavancin",
"TELITH", "Telithromycin",
"TEMAFL", "Temafloxacin",
"TEMOCI", "Temocillin",
"TETCYC", "Tetracycline class",
"TETRA", "Tetracycline",
"THIAPH", "Thiaphenicol",
"TIAMUL", "Tiamulin",
"TICARC", "Ticarcillin",
"TICCLA", "Ticarcillin/ Clavulanic Acid",
"TIGECY", "Tigecycline",
"TILMIC", "Tilmicosin",
"TOBRAM", "Tobramycin",
"TOSUFL", "Tosufloxacin",
"TREHAL", "Trehalose",
"TRIBR", "Trimethoprim/ Sulphadiazine",
"TRICLA", "Ceftriaxone/clavulanic acid",
"TRIM", "Trimethoprim",
"TRIMEN", "Ceftriaxone (meningitis)",
"TRINME", "Ceftriaxone (nonmeningitis)",
"TRISUL", "Trimethoprim/ Sulphamethoxazole",
"TROSPE", "Trospectinomycin",
"TROVAF", "Trovafloxacin",
"TULATH", "Tulathromycin",
"TYLO", "Tylosin (Tartrate/ Base)",
"UNDECA", "Undecanoic Acid",
"UREA", "Urea",
"UREPEN", "Ureidopenicillin subclass",
"UVAURS", "Uva Ursa",
"VANCOM", "Vancomycin",
"VIRGIN", "Virginiamycin",
"VORICO", "Voriconazole",
"W49373", "Win 49373-3",
"W49548", "Win 49548-2A",
"W51692", "Win 51692",
"XYLOSE", "Xylose",
"YELPIG", "Yellow Pigment"
"ABT773", "Abbott 773",
"AESCUL", "Aesculin",
"AGMATI", "Agmatine",
"AMDPEN", "Amidinopenicillin subclass",
"AMICYC", "Aminocyclitol class",
"AMIFLO", "Amifloxacin",
"AMIGLY", "Aminoglycoside class",
"AMIKAC", "Amikacin",
"AMIPEN", "Aminopenicillin subclass",
"AMOCL2", "Amoxicillin/ Clav.Acid */2",
"AMOCL4", "Amoxicillin/ Clav. Acid 4:1",
"AMOCLA", "Amoxicillin/ Clavulanic Acid",
"AMOXIC", "Amoxicillin",
"AMP100", "Ampicillin 100 ug/ml",
"AMP200", "Ampicillin 200 ug/ml",
"AMPHOT", "Amphotericin B",
"AMPICI", "Ampicillin",
"AMPSUL", "Ampicillin/ Sulbactam",
"ANIDUL", "Anidulafungin",
"ANSAMY", "Rifabutin",
"ANSMYC", "Ansamycin class",
"APALCI", "Apalcillin",
"APOXIC", "Apoxicillin",
"APRAMY", "Apramycin",
"ARABIN", "Arabinose",
"ARABIT", "Arabitol",
"ARBEKA", "Arbekacin",
"ARGINI", "Arginine",
"ASPOXI", "Aspoxicillin",
"ASTROM", "Astromycin",
"AVILAM", "Avilamycin",
"AZD256", "AZD2563",
"AZITHR", "Azithromycin",
"AZLOCI", "Azlocillin",
"AZT1", "Aztreonam 1 ug/ml",
"AZTREO", "Aztreonam",
"BACAMP", "Bacampicillin",
"BACITR", "Bacitracin",
"BAMMYC", "Bambermycin class",
"BAY12", "BAY12-8039",
"BERBER", "Berberine",
"BESIFL", "Besifloxacin",
"BETA", "Beta-lactamase",
"B", "HAEM Beta-haemolysis",
"BIAPEN", "Biapenem (L-627)",
"BLACT", "Beta-lactam class",
"BLINHB", "Beta-lactam Inhibitor class",
"B", "MGLU B-Methyl Glucoside",
"CAPREO", "Capreomycin",
"CAPRYL", "Caprylic Acid",
"CARBAD", "Carbadox",
"CARBAP", "Carbapenem class",
"CARBEN", "Carbenicillin",
"CARPEN", "Carboxypenicillin subclass",
"CASPOF", "Caspofungin",
"CATALA", "Catalase",
"CCARB", "Carbacephem subclass",
"CEFACL", "Cefaclor",
"CEFADR", "Cefadroxil",
"CEFAMA", "Cefamandole",
"CEFATR", "Cefatrizine",
"CEFAXE", "Cefuroxime (axetil)",
"CEFAZE", "Cefazedon",
"CEFAZO", "Cefazolin",
"CEFBUP", "Cefbuperazone",
"CEFCAP", "Cefcapene",
"CEFCLA", "Cefepime/ Clavulanic Acid",
"CEFCLI", "Cefclidin",
"CEFDIN", "Cefdinir",
"CEFDIT", "Cefditoren",
"CEFEP4", "Cefepime 4 ug/ml",
"CEFEPI", "Cefepime",
"CEFETA", "Cefetamet",
"CEFIXI", "Cefixime",
"CEFMEN", "Cefmenoxime",
"CEFMET", "Cefmetazole",
"CEFMIN", "Cefminox",
"CEFMTM", "Cefmetamet",
"CEFO32", "Cefotaxime 32 ug/ml",
"CEFONI", "Cefonicid",
"CEFOPE", "Cefoperazone",
"CEFORA", "Ceforanide",
"CEFOSE", "Cefoselis",
"CEFOTA", "Cefotaxime",
"CEFOTE", "Cefotetan",
"CEFOTI", "Cefotiam",
"CEFOVE", "Cefovecin",
"CEFOXI", "Cefoxitin",
"CEFOZO", "Cefozopran",
"CEFPAM", "Cefpiramide",
"CEFPIM", "Cefpimizole",
"CEFPOD", "Cefpodoxime",
"CEFPOM", "Cefpirome",
"CEFPRO", "Cefprozil",
"CEFQUI", "Cefquinome",
"CEFROX", "Cefroxidime",
"CEFSUL", "Cefsulodin",
"CEFTAR", "Ceftaroline",
"CEFTAZ", "Ceftazidime",
"CEFTER", "Cefteram",
"CEFTEZ", "Ceftezole",
"CEFTIB", "Ceftibuten",
"CEFTIF", "Ceftiofur",
"CEFTIX", "Ceftioxadine",
"CEFTIZ", "Ceftizoxime",
"CEFTOB", "Ceftobiprole",
"CEFTRI", "Ceftriaxone",
"CEFURO", "Cefuroxime (sodium)",
"CEFUZO", "Cefuzonam",
"CELLOB", "Cellobiose",
"CEPALE", "Cefalexin",
"CEPHAC", "Cephacetril",
"CEPHAL", "Cephalothin",
"CEPHAP", "Cephapirin",
"CEPHEM", "Cephem class",
"CEPHOR", "Cephem (oral) class",
"CEPHPA", "Cephem (parenteral) class",
"CEPHRA", "Cephradine",
"CEPLOR", "Cephaloridine",
"CHLORA", "Chloramphenicol",
"CHLTET", "Chlortetracycline",
"CI983", "CI-983",
"CINOXA", "Cinoxacin",
"CIPROF", "Ciprofloxacin",
"CIPROP", "CIPROP",
"CITRAT", "Citrate",
"CLARYT", "Clarithromycin",
"CLIN32", "Clindamycin 32 ug/ml",
"CLINAF", "Clinafloxacin",
"CLINDA", "Clindamycin",
"CLISPE", "Clindamycin/ Spectinomycin",
"CLOFAM", "Clofazimine",
"CLOXAC", "Cloxacillin",
"CMYC", "Cephamycin subclass",
"COAGUL", "Coagulase",
"COLFAZ", "Colfazamine",
"COLIST", "Colistin",
"COLMET", "Colistimethate",
"COMBO", "Combination class",
"CORAL", "Cephem (oral) class",
"COUMER", "Coumermycin",
"COXA", "Oxacephem subclass",
"CPAREN", "Cephem (parenteral) class",
"CPCA", "Cond. Pyridone Carboxylic Acid class",
"CSPOR", "Cephalosporin class",
"CSPOR1", "Cephalosporin I-Generation subclass",
"CSPOR2", "Cephalosporin II-Generation subclass",
"CSPOR3", "Cephalosporin III-Generation subclass",
"CSPOR4", "Cephalosporin IV-Generation subclass",
"CSPOR5", "Cephalosporin V-Generation subclass",
"CYCLAC", "Cyclacillin",
"CYCLOS", "Cycloserine",
"DALBAV", "Dalbavancin",
"DALFOP", "Dalfopristin",
"DANOFL", "Danofloxacin",
"DAPT25", "Daptomycin 25mg/L Ca",
"DAPT50", "Daptomycin 50mg/L Ca",
"DAPTOM", "Daptomycin",
"DEMECY", "Demeclocycline",
"DIBEKA", "Dibekacin",
"DICLOX", "Dicloxacillin",
"DIFLOX", "Difloxacin",
"DIRITH", "Dirithromycin",
"DORIPE", "Doripenem",
"DOXYCY", "Doxycycline",
"DTEST1", "DTest1",
"DTEST2", "DTest2",
"ENOXA", "Enoxacin",
"ENROFL", "Enrofloxacin",
"ERTAPE", "Ertapenem",
"ERY32", "Erythromycin 32 ug/ml",
"ERYSCH", "Erythromycin/ Sulphachloropyrid",
"ERYSDI", "Erythromycin/ Sulphadimethoxine",
"ERYSPE", "Erythromycin/ Spectinomycin",
"ERYSUL", "Erythromycin/ Sulfizoxazole",
"ERYTH", "Erythromycin",
"ESBL", "Extended spectrum beta-lactamase",
"ETHAMB", "Ethambutol",
"ETHION", "Ethionamide",
"FAROPE", "Faropenem",
"FLAVOM", "Flavomycin",
"FLEROX", "Fleroxacin",
"FLOMOX", "Flomoxef",
"FLORFE", "Florfenicol",
"FLQUIN", "Fluoroquinolone class",
"FLUCLO", "Flucloxacillin",
"FLUCON", "Fluconazole",
"FLUCYT", "5-Flucytosine",
"FLUMEQ", "Flumequine",
"FOPSUL", "Cefoperazone/ Sulbactam",
"FOSFOM", "Fosfomycin",
"FOSG6P", "Fosfomycin + Glucose6Phosphate",
"FOSMYC", "Fosfomycin class",
"FOSTRO", "Fosfomycin-trometamol",
"FOT1", "Cefotaxime 1 ug/ml",
"FOXSCR", "Cefoxitin Screen Test",
"FPINHB", "Folate Pathway Inhibitor class",
"FR1", "FR1",
"FR10", "FR10",
"FR12", "FR12",
"FR13", "FR13",
"FR14", "FR14",
"FR15", "FR15",
"FR16", "FR16",
"FR17", "FR17",
"FR18", "FR18",
"FR19", "FR19",
"FR20", "FR20",
"FR21", "FR21",
"FR22", "FR22",
"FR23", "FR23",
"FR24", "FR24",
"FR25", "FR25",
"FR26", "FR26",
"FR27", "FR27",
"FR28", "FR28",
"FR29", "FR29",
"FR3", "FR3",
"FR30", "FR30",
"FR31", "FR31",
"FR32", "FR32",
"FR5", "FR5",
"FR6", "FR6",
"FR7", "FR7",
"FR8", "FR8",
"FR9", "FR9",
"FRAMYC", "Framycetin",
"FRUCTO", "Fructose",
"FURALT", "Furaltadone",
"FURAZO", "Furazolidone",
"FUSACI", "Fusidic Acid",
"FUSIDA", "Fusidate",
"GARENO", "Garenoxacin",
"GARLIC", "Garlic",
"GATIFL", "Gatifloxacin",
"GE1000", "Gentamicin 1000 ug/ml",
"GE2000", "Gentamicin 2000 ug/ml",
"GEMIFL", "Gemifloxacin",
"GEN128", "Gentamicin 128 ug/ml",
"GEN500", "Gentamicin 500 ug/ml",
"GENTA1", "Gentamicin 1024 ug/ml",
"GENTAM", "Gentamicin",
"GLUCOS", "Glucose",
"GLYCER", "Glycerol",
"GLYCO", "Glycopeptide class",
"GREPAF", "Grepafloxacin",
"HETACI", "Hetacillin",
"HIPPUR", "Hippurate hydrolysis",
"HODGE", "Hodge Test",
"IB367", "IB-367",
"IBAFLO", "Ibafloxacin",
"ICLAPR", "Iclaprim",
"IMIDAZ", "Imidazole class",
"IMIP32", "Imipenem 32 ug/ml",
"IMIPEN", "Imipenem",
"INDOLE", "Indole",
"INOSIT", "Inositol",
"ISEPAM", "Isepamycin",
"ISONIA", "Isoniazid",
"ISOPEN", "Isoxazolyl Penicillin subclass",
"ITRACO", "Itraconazole",
"JOSAMY", "Josamycin",
"KANAMY", "Kanamycin",
"KETOCO", "Ketoconazole",
"KETOLI", "Ketolide class",
"LEVOFL", "Levofloxacin",
"LINCOM", "Lincomycin",
"LINCOS", "Lincosamide class",
"LINEZO", "Linezolid",
"LINFLO", "Linopristin-Flopristin",
"LINNEO", "Lincomycin/ Neomycin 2:1 ratio",
"LINSPE", "Lincomycin/ Spectinomycin",
"LIPGLY", "Lipoglycopeptide subclass",
"LIPOPE", "Lipopeptide class",
"LOMEFL", "Lomefloxacin",
"LORACA", "Loracarbef",
"LYSINE", "Lysine",
"MACCON", "Growth on MacConkey",
"MACRO", "Macrolide class",
"MALONA", "Malonate",
"MALTOS", "Maltose",
"MANNIT", "Mannitol",
"MARBOF", "Marbofloxacin",
"MECILL", "Mecillinam",
"MEROPE", "Meropenem",
"METHCY", "Methacycline",
"METHIC", "Methicillin",
"METRON", "Metronidazole",
"MEZLO", "Mezlocillin",
"MEZSUL", "Mezlocillin/ Sulbactam",
"MICAFU", "Micafungin",
"MICRON", "Micronomycin",
"MIDEKA", "Midekamycin",
"MINOCY", "Minocycline",
"MONOBA", "Monobactam class",
"MOTILI", "Motility",
"MOXALA", "Moxalactam",
"MOXIFL", "Moxifloxacin",
"MUPIRO", "Mupirocin",
"NAFCIL", "Nafcillin",
"NALAC", "Nalidixic Acid",
"NARASI", "Narasin",
"NEGCTL", "Negative Growth Control",
"NEOMYC", "Neomycin",
"NETILM", "Netilmicin",
"NFURAN", "Nitrofuran class",
"NIMIDA", "Nitroimidazole class",
"NIT16", "Nitrofurantoin 16ul",
"NITFUR", "Nitrofurazone",
"NITRAT", "Nitrate",
"NITRO", "Nitrofurantoin",
"NITSUL", "Nitrofurantoin/ Sulphadrazine",
"NORFLO", "Norfloxacin",
"NOVOBI", "Novobiocin",
"NYSTAN", "Nystantin",
"OFLOXA", "Ofloxacin",
"OLAQUI", "Olaquindox",
"OLEAND", "Oleandomycin",
"OPTOCH", "Optochin Sensitivity",
"ORBIFL", "Orbifloxacin",
"ORITAV", "Oritavancin",
"ORMSUL", "Ormetoprim/ Sulphadimethoxine",
"ORNIST", "Ornithine Spot Test",
"ORNITH", "Ornithine",
"OXACIL", "Oxacillin + 2% NaCl",
"OXAZOL", "Oxazolidinone class",
"OXIDAS", "Oxidase",
"OXOACI", "Oxolinic Acid",
"OXTSCH", "Oxytet/Tylosin Tar/Sulphachlor",
"OXTSDI", "Oxytet/Tylosin Tar/Sulphadimet",
"OXYCEP", "Oxyimino Cephalosporin subclass",
"OXYSCH", "Oxytetracycline/ Sulphachloropy",
"OXYTET", "Oxytetracycline",
"PASRAA", "Para-aminosalicylic acid",
"PEN003", "Penicillin 0.03ug",
"PENCIL", "Penicillin class",
"PENIC8", "Penicillin 8 ug/ml",
"PENICA", "Penicillin 1-2-8 ug/ml",
"PENICI", "Penicillin",
"PENMEN", "Penicillin(meningitis)",
"PENNME", "Penicillin(nonmeningitis)",
"PENNOV", "Penicillin/ Novobiocin",
"PENORA", "Penicillin (Oral)",
"PENSCH", "Penicillin/ Sulphachloropyridaz",
"PENSTR", "Penicillin/ Streptomycin",
"PERFLO", "Perfloxacin",
"PHENIC", "Phenicol class",
"PHEPEN", "Phenoxymethylpenicillin",
"PIGMEN", "Pigment",
"PIPACI", "Pipemidic Acid",
"PIPERA", "Piperacillin",
"PIPTAZ", "Piperacillin/ Tazobactam",
"PIRLIM", "Pirlimycin",
"PIVMEC", "Pivmecillinam",
"PLUERO", "Plueromutilin class",
"POD4", "Cefpodoxime 4 ug/ml",
"PODCLA", "Cefpodoxime/ Clavulanic Acid",
"POLION", "Polyether Ionophore class",
"POLPEP", "Polypeptide class",
"POLYB", "Polymyxin B",
"POSACO", "Posaconazole",
"POSCTL", "Positive Growth Control",
"PREMAF", "Premafloxacin",
"PRISTI", "Pristinamycin",
"PSPEN", "Penicillinase-stable Penicillin class",
"PYRUVA", "Pyruvate",
"QUIN", "Quinolone class",
"QUINOL", "Quinolones",
"QUINS1", "Quinolones subclass 1",
"QUINUP", "Quinupristin",
"R28965", "RU 28965",
"RAFFIN", "Raffinose",
"RAMOPL", "Ramoplanin",
"RAVUCO", "Ravuconazole",
"RAZUPE", "Razupenem",
"RHAMNO", "Rhamnose",
"RIFAMP", "Rifampin",
"RIFMYC", "Rifamycin class",
"ROKITA", "Rokitamycin",
"ROXITH", "Roxithromycin",
"S21420", "Schering 21420",
"S21561", "Schering 21561",
"S21562", "Schering 21562",
"S22591", "Schering 22591",
"S29482", "Schering 29482",
"S29486", "Schering 29486",
"S34343", "Schering 34343",
"S38609", "Schering 38609",
"SALCTL", "Positive Control +2% NaCl",
"SALINO", "Salinomycin",
"SANFET", "Sanfetrinem",
"SARAFL", "Sarafloxacin",
"SB2LB2", "SB265805/ LB20304",
"SBQLO", "SB265805",
"SDIMET", "Sulphadimethoxine",
"SIPRAM", "Sipramycin",
"SISOMY", "Sisomycin",
"SITAFL", "Sitafloxacin",
"SORBIT", "Sorbitol",
"SPARFL", "Sparfloxacin",
"SPECT", "Spectinomycin",
"SPIRAM", "Spiramycin",
"ST1000", "Streptomycin 1000 ug/ml",
"ST2000", "Streptomycin 2000 ug/ml",
"STREPT", "Streptomycin",
"STRGRA", "Streptogramin class",
"SUCROS", "Sucrose",
"SULAMI", "Sulfonamide subclass",
"SULBAC", "Sulbactam",
"SULBEN", "Sulbenicillin",
"SULCHL", "Sulphachloropyridazine",
"SULDIA", "Sulphadiazine",
"SULDIM", "Sulphadimidine",
"SULFAM", "Sulphamethoxazole",
"SULFIZ", "Sulfisoxazole",
"SULMET", "Sulphamethazine",
"SULOPE", "Sulopenem",
"SULTHI", "Sulphathiazole",
"SULTOS", "Sultamicillin Tosilate",
"SYNERC", "Quinupristin/dalfopristin",
"TANNAL", "Tannalbit",
"TAXCLA", "Cefotaxime/clavulanic acid",
"TAXMEN", "Cefotaxime (meningitis)",
"TAXNME", "Cefotaxime (nonmeningitis)",
"TAZCLA", "Ceftazidime/clavulanic acid",
"TAZOBA", "Tazobactam",
"TDA", "TDA",
"TEICOP", "Teicoplanin",
"TELAVA", "Telavancin",
"TELITH", "Telithromycin",
"TEMAFL", "Temafloxacin",
"TEMOCI", "Temocillin",
"TETCYC", "Tetracycline class",
"TETRA", "Tetracycline",
"THIAPH", "Thiaphenicol",
"TIAMUL", "Tiamulin",
"TICARC", "Ticarcillin",
"TICCLA", "Ticarcillin/ Clavulanic Acid",
"TIGECY", "Tigecycline",
"TILMIC", "Tilmicosin",
"TOBRAM", "Tobramycin",
"TOSUFL", "Tosufloxacin",
"TREHAL", "Trehalose",
"TRIBR", "Trimethoprim/ Sulphadiazine",
"TRICLA", "Ceftriaxone/clavulanic acid",
"TRIM", "Trimethoprim",
"TRIMEN", "Ceftriaxone (meningitis)",
"TRINME", "Ceftriaxone (nonmeningitis)",
"TRISUL", "Trimethoprim/ Sulphamethoxazole",
"TROSPE", "Trospectinomycin",
"TROVAF", "Trovafloxacin",
"TULATH", "Tulathromycin",
"TYLO", "Tylosin (Tartrate/ Base)",
"UNDECA", "Undecanoic Acid",
"UREA", "Urea",
"UREPEN", "Ureidopenicillin subclass",
"UVAURS", "Uva Ursa",
"VANCOM", "Vancomycin",
"VIRGIN", "Virginiamycin",
"VORICO", "Voriconazole",
"W49373", "Win 49373-3",
"W49548", "Win 49548-2A",
"W51692", "Win 51692",
"XYLOSE", "Xylose",
"YELPIG", "Yellow Pigment"
)
codes$name <- gsub("Apoxi", "Aspoxi", codes$name)
@@ -476,10 +476,10 @@ codes$ab_name <- ab_name(codes$name_gen)
codes$lev <- unlist(Map(f = function(a, b) {
as.double(utils::adist(a, b,
ignore.case = FALSE,
fixed = TRUE,
costs = c(insertions = 5, deletions = 1, substitutions = 10),
counts = FALSE
ignore.case = FALSE,
fixed = TRUE,
costs = c(insertions = 5, deletions = 1, substitutions = 10),
counts = FALSE
))
}, codes$name_gen, generalise_antibiotic_name(codes$ab_name), USE.NAMES = FALSE))
@@ -487,7 +487,10 @@ codes$lev_pct <- codes$lev / nchar(codes$name)
View(codes)
import <- codes |> filter(lev <= 10 | name_gen == "PENICILLIN") |> as_tibble() |> mutate(ab = as.ab(ab_name, fast_mode = TRUE))
import <- codes |>
filter(lev <= 10 | name_gen == "PENICILLIN") |>
as_tibble() |>
mutate(ab = as.ab(ab_name, fast_mode = TRUE))
for (i in seq_len(NROW(import))) {
# put them in the abbreviations

View File

@@ -1056,8 +1056,10 @@ import$mo <- as.mo(import$mo_name)
microorganisms.codes <- microorganisms.codes |>
bind_rows(
tibble(code = toupper(import$code),
mo = import$mo) |>
tibble(
code = toupper(import$code),
mo = import$mo
) |>
distinct()
) |>
arrange(code)
@@ -1065,4 +1067,3 @@ class(microorganisms.codes$mo) <- c("mo", "character")
usethis::use_data(microorganisms.codes, overwrite = TRUE, compress = "xz", version = 2)
rm(microorganisms.codes)
devtools::load_all()

View File

@@ -3,13 +3,15 @@ df <- example_isolates |>
mutate(mo = ifelse(mo_genus(mo) == "Klebsiella", as.mo("Klebsiella"), mo)) |>
top_n_microorganisms(10)
out_new <- df |> antibiogram(c("TZP","TZP+GEN","TZP+TOB"), wisca = TRUE, syndromic_group = "ward")
out_nonwisca <- df |> antibiogram(c("TZP","TZP+GEN","TZP+TOB"),
syndromic_group = "ward",
mo_transform = function(x) "",
digits = 1,
minimum = 10,
formatting_type = 14) |>
out_new <- df |> antibiogram(c("TZP", "TZP+GEN", "TZP+TOB"), wisca = TRUE, syndromic_group = "ward")
out_nonwisca <- df |>
antibiogram(c("TZP", "TZP+GEN", "TZP+TOB"),
syndromic_group = "ward",
mo_transform = function(x) "",
digits = 1,
minimum = 10,
formatting_type = 14
) |>
as_tibble() |>
select(-Pathogen)
@@ -17,7 +19,3 @@ out_nonwisca <- df |> antibiogram(c("TZP","TZP+GEN","TZP+TOB"),
# parameters_amr.R: number of first isolates are determined on the whole data set, while Klebsiella is aggregated afterwards (=duplicates on genus level)
source("~/Downloads/estimate_definition_amr.R")