1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-21 12:13:20 +02:00

(v2.1.1.9195) add BTL-S, fix ranks in unknown microorganisms

This commit is contained in:
2025-03-13 14:30:14 +01:00
parent a7ef22a21e
commit 9aab129ea6
48 changed files with 1789 additions and 1710 deletions

View File

@ -1 +1 @@
a5a28ebde6fc79e231c0a6bcfcd8818d
b52ea0014f63a73b9369475611c74644

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -39,6 +39,7 @@
"PEN" 5904 "Benzylpenicillin" "Beta-lactams/penicillins" "J01CE01,S01AA14" "Combinations of antibacterials" "Combinations of antibacterials" "bepe,pen,peni,peni g,penicillin,penicillin g,pg" "abbocillin,ayercillin,bencilpenicilina,benzopenicillin,benzylpenicilline,benzylpenicilling,benzylpenicillinum,bicillin,cillora,cilloral,cilopen,compocilling,cosmopen,dropcillin,freepenicilling,freepenicillinii,galofak,gelacillin,liquacillin,megacillin,pencilling,penicillin,penicilling,pentids,permapen,pfizerpen,pfizerpeng,pharmacillin,pradupen,specillineg,ursopen" 3.6 "g" ""
"PEN-S" "Benzylpenicillin screening test" "Beta-lactams/penicillins" "NA" "pen screen" "" ""
"BES" 10178705 "Besifloxacin" "Fluoroquinolones" "S01AE08" "" "besivance" "73606-6,73628-0,73651-2"
"BTL-S" "Beta-lactamase screening test" "Other" "NA" "beta-lactamase,betalactamase,bl screen,blt screen" "" ""
"BIA" 71339 "Biapenem" "Carbapenems" "J01DH05" "" "biapenern,bipenem,omegacin" 1.2 "g" "41665-1,41666-9,41667-7,41728-7"
"BCZ" 65807 "Bicyclomycin" "Other antibacterials" "NA" "bicozamycin" "aizumycin,bacfeed,bacteron,bicozamicina,bicozamycin,bicozamycine,bicozamycinum" ""
"BLM" 5360373 "Bleomycin" "Glycopeptides" "L01DC01" "" "ble,bleo" ""

Binary file not shown.

View File

@ -1 +1 @@
dbf340329f7547aba18ecaa09e990b79
82e205c8e726381a75ce3040f238f776

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -1,6 +1,6 @@
This knowledge base contains all context you must know about the AMR package for R. You are a GPT trained to be an assistant for the AMR package in R. You are an incredible R specialist, especially trained in this package and in the tidyverse.
First and foremost, you are trained on version 2.1.1.9194. Remember this whenever someone asks which AMR package version youre at.
First and foremost, you are trained on version 2.1.1.9195. Remember this whenever someone asks which AMR package version youre at.
Below are the contents of the file, the file, and all the files (documentation) in the package. Every file content is split using 100 hypens.
----------------------------------------------------------------------------------------------------
@ -732,7 +732,7 @@ THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/AMR-deprecated.Rd':
\alias{ab_selector}
\title{Deprecated Functions}
\format{
An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 494 rows and 14 columns.
An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 495 rows and 14 columns.
}
\usage{
ab_class(...)
@ -851,7 +851,7 @@ The \code{AMR} package is a \href{https://msberends.github.io/AMR/#copyright}{fr
This work was published in the Journal of Statistical Software (Volume 104(3); \doi{10.18637/jss.v104.i03}) and formed the basis of two PhD theses (\doi{10.33612/diss.177417131} and \doi{10.33612/diss.192486375}).
After installing this package, R knows \href{https://msberends.github.io/AMR/reference/microorganisms.html}{\strong{~79 000 microorganisms}} (updated June 2024) and all \href{https://msberends.github.io/AMR/reference/antimicrobials.html}{\strong{~610 antibiotic, antimycotic and antiviral drugs}} by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI and EUCAST are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). \strong{It was designed to work in any setting, including those with very limited resources}. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the public \href{https://www.rug.nl}{University of Groningen}, in collaboration with non-profit organisations \href{https://www.certe.nl}{Certe Medical Diagnostics and Advice Foundation} and \href{https://www.umcg.nl}{University Medical Center Groningen}.
After installing this package, R knows \href{https://msberends.github.io/AMR/reference/microorganisms.html}{\strong{~79 000 microorganisms}} (updated June 2024) and all \href{https://msberends.github.io/AMR/reference/antimicrobials.html}{\strong{~620 antibiotic, antimycotic and antiviral drugs}} by name and code (including ATC, EARS-Net, ASIARS-Net, PubChem, LOINC and SNOMED CT), and knows all about valid SIR and MIC values. The integral clinical breakpoint guidelines from CLSI and EUCAST are included, even with epidemiological cut-off (ECOFF) values. It supports and can read any data format, including WHONET data. This package works on Windows, macOS and Linux with all versions of R since R-3.0 (April 2013). \strong{It was designed to work in any setting, including those with very limited resources}. It was created for both routine data analysis and academic research at the Faculty of Medical Sciences of the public \href{https://www.rug.nl}{University of Groningen}, in collaboration with non-profit organisations \href{https://www.certe.nl}{Certe Medical Diagnostics and Advice Foundation} and \href{https://www.umcg.nl}{University Medical Center Groningen}.
The \code{AMR} package is available in English, Chinese, Czech, Danish, Dutch, Finnish, French, German, Greek, Italian, Japanese, Norwegian, Polish, Portuguese, Romanian, Russian, Spanish, Swedish, Turkish, and Ukrainian. Antimicrobial drug (group) names and colloquial microorganism names are provided in these languages.
}
@ -2176,11 +2176,13 @@ cephalosporins_4th(only_sir_columns = FALSE, return_all = TRUE, ...)
cephalosporins_5th(only_sir_columns = FALSE, return_all = TRUE, ...)
fluoroquinolones(only_sir_columns = FALSE, return_all = TRUE, ...)
fluoroquinolones(only_sir_columns = FALSE, only_treatable = TRUE,
return_all = TRUE, ...)
glycopeptides(only_sir_columns = FALSE, return_all = TRUE, ...)
isoxazolylpenicillins(only_sir_columns = FALSE, return_all = TRUE, ...)
isoxazolylpenicillins(only_sir_columns = FALSE, only_treatable = TRUE,
return_all = TRUE, ...)
lincosamides(only_sir_columns = FALSE, only_treatable = TRUE,
return_all = TRUE, ...)
@ -2202,13 +2204,15 @@ phenicols(only_sir_columns = FALSE, return_all = TRUE, ...)
polymyxins(only_sir_columns = FALSE, only_treatable = TRUE,
return_all = TRUE, ...)
quinolones(only_sir_columns = FALSE, return_all = TRUE, ...)
quinolones(only_sir_columns = FALSE, only_treatable = TRUE,
return_all = TRUE, ...)
rifamycins(only_sir_columns = FALSE, return_all = TRUE, ...)
streptogramins(only_sir_columns = FALSE, return_all = TRUE, ...)
tetracyclines(only_sir_columns = FALSE, return_all = TRUE, ...)
tetracyclines(only_sir_columns = FALSE, only_treatable = TRUE,
return_all = TRUE, ...)
trimethoprims(only_sir_columns = FALSE, return_all = TRUE, ...)
@ -2499,9 +2503,9 @@ THE PART HEREAFTER CONTAINS CONTENTS FROM FILE 'man/antimicrobials.Rd':
\name{antimicrobials}
\alias{antimicrobials}
\alias{antivirals}
\title{Data Sets with 614 Antimicrobial Drugs}
\title{Data Sets with 615 Antimicrobial Drugs}
\format{
\subsection{For the \link{antimicrobials} data set: a \link[tibble:tibble]{tibble} with 494 observations and 14 variables:}{
\subsection{For the \link{antimicrobials} data set: a \link[tibble:tibble]{tibble} with 495 observations and 14 variables:}{
\itemize{
\item \code{ab}\cr antimcrobial ID as used in this package (such as \code{AMC}), using the official EARS-Net (European Antimicrobial Resistance Surveillance Network) codes where available. \emph{\strong{This is a unique identifier.}}
\item \code{cid}\cr Compound ID as found in PubChem. \emph{\strong{This is a unique identifier.}}

Binary file not shown.

Binary file not shown.

View File

@ -1 +1 @@
eb00595a506d917ec1f00688c2cc41cf
9c53db03dcf9c98ef571fcc6c16d0a68

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,13 +1,13 @@
"mo" "fullname" "status" "kingdom" "phylum" "class" "order" "family" "genus" "species" "subspecies" "rank" "ref" "oxygen_tolerance" "source" "lpsn" "lpsn_parent" "lpsn_renamed_to" "mycobank" "mycobank_parent" "mycobank_renamed_to" "gbif" "gbif_parent" "gbif_renamed_to" "prevalence" "snomed"
"B_GRAMN" "(unknown Gram-negatives)" "unknown" "Bacteria" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown genus)" "(unknown species)" "(unknown subspecies)" "subspecies" "manually added" 2 ""
"B_GRAMP" "(unknown Gram-positives)" "unknown" "Bacteria" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown genus)" "(unknown species)" "(unknown subspecies)" "subspecies" "manually added" 2 ""
"B_ANAER-NEG" "(unknown anaerobic Gram-negatives)" "unknown" "Bacteria" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown genus)" "(unknown species)" "(unknown subspecies)" "subspecies" "manually added" 2 ""
"B_ANAER-POS" "(unknown anaerobic Gram-positives)" "unknown" "Bacteria" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown genus)" "(unknown species)" "(unknown subspecies)" "subspecies" "manually added" 2 ""
"B_ANAER" "(unknown anaerobic bacteria)" "unknown" "Bacteria" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown genus)" "(unknown species)" "(unknown subspecies)" "subspecies" "manually added" 2 ""
"F_FUNGUS" "(unknown fungus)" "unknown" "Fungi" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown genus)" "(unknown species)" "(unknown subspecies)" "subspecies" "manually added" 2 ""
"UNKNOWN" "(unknown name)" "unknown" "(unknown kingdom)" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown genus)" "(unknown species)" "(unknown subspecies)" "subspecies" "manually added" 2 ""
"P_PROTOZOAN" "(unknown protozoan)" "unknown" "Protozoa" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown genus)" "(unknown species)" "(unknown subspecies)" "subspecies" "manually added" 2 ""
"F_YEAST" "(unknown yeast)" "unknown" "Fungi" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown genus)" "(unknown species)" "(unknown subspecies)" "subspecies" "manually added" 2 ""
"B_GRAMN" "(unknown Gram-negatives)" "unknown" "Bacteria" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown genus)" "(unknown species)" "(unknown subspecies)" "(unknown rank)" "manually added" 2 ""
"B_GRAMP" "(unknown Gram-positives)" "unknown" "Bacteria" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown genus)" "(unknown species)" "(unknown subspecies)" "(unknown rank)" "manually added" 2 ""
"B_ANAER-NEG" "(unknown anaerobic Gram-negatives)" "unknown" "Bacteria" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown genus)" "(unknown species)" "(unknown subspecies)" "(unknown rank)" "manually added" 2 ""
"B_ANAER-POS" "(unknown anaerobic Gram-positives)" "unknown" "Bacteria" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown genus)" "(unknown species)" "(unknown subspecies)" "(unknown rank)" "manually added" 2 ""
"B_ANAER" "(unknown anaerobic bacteria)" "unknown" "Bacteria" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown genus)" "(unknown species)" "(unknown subspecies)" "(unknown rank)" "manually added" 2 ""
"F_FUNGUS" "(unknown fungus)" "unknown" "Fungi" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown genus)" "(unknown species)" "(unknown subspecies)" "(unknown rank)" "manually added" 2 ""
"UNKNOWN" "(unknown name)" "unknown" "(unknown kingdom)" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown genus)" "(unknown species)" "(unknown subspecies)" "(unknown rank)" "manually added" 2 ""
"P_PROTOZOAN" "(unknown protozoan)" "unknown" "Protozoa" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown genus)" "(unknown species)" "(unknown subspecies)" "(unknown rank)" "manually added" 2 ""
"F_YEAST" "(unknown yeast)" "unknown" "Fungi" "(unknown phylum)" "(unknown class)" "(unknown order)" "(unknown family)" "(unknown genus)" "(unknown species)" "(unknown subspecies)" "(unknown rank)" "manually added" 2 ""
"F_AABRN" "Aabaarnia" "unknown" "Fungi" "Ascomycota" "Lecanoromycetes" "Ostropales" "" "Aabaarnia" "" "" "genus" "manually added" "90490" "1279" 2 ""
"B_[FAM]_ABDTBCTR" "Abditibacteriaceae" "accepted" "Bacteria" "Abditibacteriota" "Abditibacteriia" "Abditibacteriales" "Abditibacteriaceae" "" "" "" "family" "Tahon et al., 2018" "LPSN" "4812" "4982" "10678443" "10853930" 2 ""
"B_[ORD]_ABDTBCTR" "Abditibacteriales" "accepted" "Bacteria" "Abditibacteriota" "Abditibacteriia" "Abditibacteriales" "" "" "" "" "order" "Tahon et al., 2018" "LPSN" "4982" "29679" "10853930" 2 ""

Binary file not shown.

View File

@ -789,6 +789,21 @@ antimicrobials[which(antimicrobials$ab == "CLI-S"), "abbreviations"][[1]] <- lis
# add all screenings
antimicrobials <- antimicrobials |>
bind_rows(
antimicrobials |>
filter(ab == "EFF") |>
mutate(ab = "BTL-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",

View File

@ -346,14 +346,14 @@ breakpoints_new$mo[breakpoints_new$mo == "B_STPHY" & breakpoints_new$ab == "NIT"
# determine rank again now that some changes were made on taxonomic level (genus -> species)
breakpoints_new <- breakpoints_new %>%
mutate(rank_index = case_when(
is.na(mo_rank(mo, keep_synonyms = TRUE)) ~ 6, # for UNKNOWN, B_GRAMN, B_ANAER, B_ANAER-NEG, 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,
mo_rank(mo, keep_synonyms = TRUE) == "genus" ~ 3,
mo_rank(mo, keep_synonyms = TRUE) == "family" ~ 4,
mo_rank(mo, keep_synonyms = TRUE) == "order" ~ 5,
TRUE ~ 6
mo != "UNKNOWN" ~ 6, # for B_ANAER, etc.
TRUE ~ 7
))
# WHONET adds one log2 level to the R breakpoint for their software, e.g. in AMC in Enterobacterales:

View File

@ -2099,6 +2099,12 @@ taxonomy$mo[duplicated(taxonomy$mo)]
any(duplicated(taxonomy$fullname))
taxonomy$fullname[duplicated(taxonomy$fullname)]
# Set unknown ranks -------------------------------------------------------------------------------
taxonomy$rank[which(taxonomy$fullname %like% "unknown")] <- "(unknown rank)"
# Some final checks -------------------------------------------------------------------------------
fix_old_mos <- function(dataset) {