-
Data set to interpret MIC and disk diffusion to RSI values. Included guidelines are CLSI (2011-2019) and EUCAST (2011-2019). Use as.rsi()
to transform MICs or disks measurements to RSI values.
+
Data set to interpret MIC and disk diffusion to R/SI values. Included guidelines are CLSI (2011-2019) and EUCAST (2011-2019). Use as.rsi()
to transform MICs or disks measurements to R/SI values.
rsi_translation
@@ -253,6 +253,9 @@
breakpoint_S
Lowest MIC value or highest number of millimeters that leads to "S"
breakpoint_R
Highest MIC value or lowest number of millimeters that leads to "R"
+
Details
+
+
The repository of this AMR
package contains a file comprising this exact data set: https://gitlab.com/msberends/AMR/blob/master/data-raw/rsi_translation.txt. This file allows for machine reading EUCAST and CLSI guidelines, which is almost impossible with the Excel and PDF files distributed by EUCAST and CLSI. This file is updated automatically.
Read more on our website!
@@ -264,6 +267,7 @@
Contents
diff --git a/index.md b/index.md
index 9ab00509..a63201bd 100644
--- a/index.md
+++ b/index.md
@@ -10,7 +10,7 @@
`AMR` is a free and open-source [R package](https://www.r-project.org) to simplify the analysis and prediction of Antimicrobial Resistance (AMR) and to work with microbial and antimicrobial data and properties, by using evidence-based methods. **Our aim is to provide a standard** for clean and reproducible antimicrobial resistance data analysis, that can therefore empower epidemiological analyses to continuously enable surveillance and treatment evaluation in any setting.
-After installing this package, R knows [**~70,000 distinct microbial species**](./reference/microorganisms.html) and all [**~550 antibiotic, antimycotic and antiviral drugs**](./reference/antibiotics.html) by name and code (including ATC and LOINC), and knows all about valid R/SI and MIC values. It supports any data format, including WHONET/EARS-Net data.
+After installing this package, R knows [**~70,000 distinct microbial species**](./reference/microorganisms.html) and all [**~550 antibiotic, antimycotic and antiviral drugs**](./reference/antibiotics.html) by name and code (including ATC, LOINC and SNOMED CT), and knows all about valid R/SI and MIC values. It supports any data format, including WHONET/EARS-Net data.
We created this package for both routine data analysis and academic research (as part of our PhD theses) at the Faculty of Medical Sciences of the University of Groningen, the Netherlands, and the Medical Microbiology & Infection Prevention (MMBI) department of the University Medical Center Groningen (UMCG). This R package is [actively maintained](./news) and is free software (see [Copyright](#copyright)).
@@ -48,36 +48,25 @@ This package can be used for:
* Getting properties for any antibiotic (like name, EARS-Net code, ATC code, PubChem code, defined daily dose or trade name) ([manual](./reference/ab_property.html))
* Plotting antimicrobial resistance ([tutorial](./articles/AMR.html))
* Applying EUCAST expert rules ([manual](./reference/eucast_rules.html))
+ * Getting SNOMED codes of a microorganism, or get its name associated with a SNOMED code ([manual](./reference/mo_property.html))
* Getting LOINC codes of an antibiotic, or get its name associated with a LOINC code ([manual](./reference/ab_property.html))
* Machine reading the EUCAST and CLSI guidelines from 2011-2019 to translate MIC values and disk diffusion diameters to R/SI ([link](https://gitlab.com/msberends/AMR/blob/master/data-raw/rsi_translation.txt))
-This package is ready-to-use for a professional environment by specialists in the following fields:
-
-Medical Microbiology
+This package is ready-to-use for specialists in many fields:
* Epidemiologists (both clinical microbiological and research)
- * Research Microbiologists
+ * (Research) Microbiologists
* Biomedical Researchers
* Research Pharmacologists
* Data Scientists / Data Analysts
-
-Veterinary Microbiology
-
+ * Statisticians
+ * Bioinformaticians
* Research Veterinarians
* Veterinary Epidemiologists
-
-Microbial Ecology
-
* Soil Microbiologists
* Extremophile Researchers
* Astrobiologists
-Developers
-
- * Package developers for R
- * Software developers
- * Web application / Shiny developers
-
### Get this package
#### Latest released version
@@ -143,8 +132,8 @@ The `AMR` package basically does four important things:
* Use `first_isolate()` to identify the first isolates of every patient [using guidelines from the CLSI](https://clsi.org/standards/products/microbiology/documents/m39/) (Clinical and Laboratory Standards Institute).
* You can also identify first *weighted* isolates of every patient, an adjusted version of the CLSI guideline. This takes into account key antibiotics of every strain and compares them.
* Use `mdro()` to determine which micro-organisms are multi-drug resistant organisms (MDRO). It supports a variety of international guidelines, such as the MDR-paper by Magiorakos *et al.* (2012, [PMID 21793988](https://www.ncbi.nlm.nih.gov/pubmed/?term=21793988)), the exceptional phenotype definitions of EUCAST and the WHO guideline on multi-drug resistant TB. It also supports the national guidelines of the Netherlands and Germany.
- * The [data set microorganisms](./reference/microorganisms.html) contains the complete taxonomic tree of ~70,000 microorganisms. Furthermore, some colloquial names and all Gram stains are available, which enables resistance analysis of e.g. different antibiotics per Gram stain. The package also contains functions to look up values in this data set like `mo_genus()`, `mo_family()`, `mo_gramstain()` or even `mo_phylum()`. As they use `as.mo()` internally, they also use the same intelligent rules for determination. For example, `mo_genus("MRSA")` and `mo_genus("S. aureus")` will both return `"Staphylococcus"`. They also come with support for German, Dutch, Spanish, Italian, French and Portuguese. These functions can be used to add new variables to your data.
- * The [data set antibiotics](./reference/antibiotics.html) contains ~450 antimicrobial drugs with their EARS-Net code, ATC code, PubChem compound ID, official name, common LIS codes and DDDs of both oral and parenteral administration. It also contains all (thousands of) trade names found in PubChem. Use functions like `ab_name()`, `ab_group()`, `ab_atc()` and `ab_tradenames()` to look up values. The `ab_*` functions use `as.ab()` internally so they support the same intelligent rules to guess the most probable result. For example, `ab_name("Fluclox")`, `ab_name("Floxapen")` and `ab_name("J01CF05")` will all return `"Flucloxacillin"`. These functions can again be used to add new variables to your data.
+ * The [data set microorganisms](./reference/microorganisms.html) contains the complete taxonomic tree of ~70,000 microorganisms. Furthermore, some colloquial names and all Gram stains are available, which enables resistance analysis of e.g. different antibiotics per Gram stain. The package also contains functions to look up values in this data set like `mo_genus()`, `mo_family()`, `mo_gramstain()` or even `mo_phylum()`. Use `mo_snomed()` to look up any SNOMED CT code associated with a microorganism. As all these function use `as.mo()` internally, they also use the same intelligent rules for determination. For example, `mo_genus("MRSA")` and `mo_genus("S. aureus")` will both return `"Staphylococcus"`. They also come with support for German, Dutch, Spanish, Italian, French and Portuguese. These functions can be used to add new variables to your data.
+ * The [data set antibiotics](./reference/antibiotics.html) contains ~450 antimicrobial drugs with their EARS-Net code, ATC code, PubChem compound ID, LOINC code, official name, common LIS codes and DDDs of both oral and parenteral administration. It also contains all (thousands of) trade names found in PubChem. Use functions like `ab_name()`, `ab_group()`, `ab_atc()`, `ab_loinc()` and `ab_tradenames()` to look up values. The `ab_*` functions use `as.ab()` internally so they support the same intelligent rules to guess the most probable result. For example, `ab_name("Fluclox")`, `ab_name("Floxapen")` and `ab_name("J01CF05")` will all return `"Flucloxacillin"`. These functions can again be used to add new variables to your data.
3. It **analyses the data** with convenient functions that use well-known methods.
diff --git a/man/as.mo.Rd b/man/as.mo.Rd
index 498b154e..76892729 100644
--- a/man/as.mo.Rd
+++ b/man/as.mo.Rd
@@ -175,10 +175,11 @@ as.mo("S aureus")
as.mo("Staphylococcus aureus")
as.mo("Staphylococcus aureus (MRSA)")
as.mo("Zthafilokkoockus oureuz") # handles incorrect spelling
-as.mo("MRSA") # Methicillin Resistant S. aureus
-as.mo("VISA") # Vancomycin Intermediate S. aureus
-as.mo("VRSA") # Vancomycin Resistant S. aureus
-as.mo(22242419) # Catalogue of Life ID
+as.mo("MRSA") # Methicillin Resistant S. aureus
+as.mo("VISA") # Vancomycin Intermediate S. aureus
+as.mo("VRSA") # Vancomycin Resistant S. aureus
+as.mo(22242419) # Catalogue of Life ID
+as.mo(115329001) # SNOMED CT code
# Dyslexia is no problem - these all work:
as.mo("Ureaplasma urealyticum")
diff --git a/man/example_isolates.Rd b/man/example_isolates.Rd
index 4eed7482..95d8d656 100644
--- a/man/example_isolates.Rd
+++ b/man/example_isolates.Rd
@@ -15,7 +15,7 @@
\item \code{gender}\cr gender of the patient
\item \code{patient_id}\cr ID of the patient
\item \code{mo}\cr ID of microorganism created with \code{\link[=as.mo]{as.mo()}}, see also \link{microorganisms}
-\item \code{PEN:RIF}\cr 40 different antibiotics with class \code{\link{rsi}} (see \code{\link[=as.rsi]{as.rsi()}}); these column names occur in \link{antibiotics} data set and can be translated with \code{\link[=ab_name]{ab_name()}}
+\item \code{PEN:RIF}\cr 40 different antibiotics with class \code{\link{rsi}} (see \code{\link[=as.rsi]{as.rsi()}}); these column names occur in the \link{antibiotics} data set and can be translated with \code{\link[=ab_name]{ab_name()}}
}}
\usage{
example_isolates
diff --git a/man/microorganisms.Rd b/man/microorganisms.Rd
index 946696d6..4c5db3fb 100755
--- a/man/microorganisms.Rd
+++ b/man/microorganisms.Rd
@@ -4,7 +4,7 @@
\name{microorganisms}
\alias{microorganisms}
\title{Data set with ~70,000 microorganisms}
-\format{A \code{\link{data.frame}} with 69,447 observations and 16 variables:
+\format{A \code{\link{data.frame}} with 69,447 observations and 17 variables:
\itemize{
\item \code{mo}\cr ID of microorganism as used by this package
\item \code{col_id}\cr Catalogue of Life ID
@@ -15,6 +15,7 @@
\item \code{species_id}\cr ID of the species as used by the Catalogue of Life
\item \code{source}\cr Either "CoL", "DSMZ" (see Source) or "manually added"
\item \code{prevalence}\cr Prevalence of the microorganism, see \code{\link[=as.mo]{as.mo()}}
+\item \code{snomed}\cr SNOMED code of the microorganism. Use \code{\link[=mo_snomed]{mo_snomed()}} to retrieve it quickly, see \code{\link[=mo_property]{mo_property()}}.
}}
\source{
Catalogue of Life: Annual Checklist (public online taxonomic database), \url{http://www.catalogueoflife.org} (check included annual version with \code{\link[=catalogue_of_life_version]{catalogue_of_life_version()}}).
diff --git a/man/mo_property.Rd b/man/mo_property.Rd
index 0cc06f71..10c42fdb 100644
--- a/man/mo_property.Rd
+++ b/man/mo_property.Rd
@@ -15,6 +15,7 @@
\alias{mo_kingdom}
\alias{mo_type}
\alias{mo_gramstain}
+\alias{mo_snomed}
\alias{mo_ref}
\alias{mo_authors}
\alias{mo_year}
@@ -51,6 +52,8 @@ mo_type(x, language = get_locale(), ...)
mo_gramstain(x, language = get_locale(), ...)
+mo_snomed(x, ...)
+
mo_ref(x, ...)
mo_authors(x, ...)
@@ -85,6 +88,7 @@ mo_property(x, property = "fullname", language = get_locale(), ...)
\item An \code{\link{integer}} in case of \code{\link[=mo_year]{mo_year()}}
\item A \code{\link{list}} in case of \code{\link[=mo_taxonomy]{mo_taxonomy()}} and \code{\link[=mo_info]{mo_info()}}
\item A named \code{\link{character}} in case of \code{\link[=mo_url]{mo_url()}}
+\item A \code{\link{double}} in case of \code{\link[=mo_snomed]{mo_snomed()}}
\item A \code{\link{character}} in all other cases
}
}
@@ -141,11 +145,12 @@ mo_subspecies("E. coli") # ""
# colloquial properties ----------------------------------------------------
mo_name("E. coli") # "Escherichia coli"
-mo_fullname("E. coli") # "Escherichia coli", same as mo_name()
+mo_fullname("E. coli") # "Escherichia coli" - same as mo_name()
mo_shortname("E. coli") # "E. coli"
# other properties ---------------------------------------------------------
mo_gramstain("E. coli") # "Gram-negative"
+mo_snomed("E. coli") # 112283007, 116395006, ... (SNOMED codes)
mo_type("E. coli") # "Bacteria" (equal to kingdom, but may be translated)
mo_rank("E. coli") # "species"
mo_url("E. coli") # get the direct url to the online database entry
diff --git a/man/rsi_translation.Rd b/man/rsi_translation.Rd
index 673e03e2..4e8fbe4a 100644
--- a/man/rsi_translation.Rd
+++ b/man/rsi_translation.Rd
@@ -3,7 +3,7 @@
\docType{data}
\name{rsi_translation}
\alias{rsi_translation}
-\title{Data set for RSI interpretation}
+\title{Data set for R/SI interpretation}
\format{A \code{\link{data.frame}} with 13,975 observations and 9 variables:
\itemize{
\item \code{guideline}\cr Name of the guideline
@@ -20,7 +20,10 @@
rsi_translation
}
\description{
-Data set to interpret MIC and disk diffusion to RSI values. Included guidelines are CLSI (2011-2019) and EUCAST (2011-2019). Use \code{\link[=as.rsi]{as.rsi()}} to transform MICs or disks measurements to RSI values.
+Data set to interpret MIC and disk diffusion to R/SI values. Included guidelines are CLSI (2011-2019) and EUCAST (2011-2019). Use \code{\link[=as.rsi]{as.rsi()}} to transform MICs or disks measurements to R/SI values.
+}
+\details{
+The repository of this \code{AMR} package contains a file comprising this exact data set: \link{https://gitlab.com/msberends/AMR/blob/master/data-raw/rsi_translation.txt}. This file \strong{allows for machine reading EUCAST and CLSI guidelines}, which is almost impossible with the Excel and PDF files distributed by EUCAST and CLSI. This file is updated automatically.
}
\section{Read more on our website!}{
diff --git a/tests/testthat/test-mo.R b/tests/testthat/test-mo.R
index a8488160..778577e0 100644
--- a/tests/testthat/test-mo.R
+++ b/tests/testthat/test-mo.R
@@ -38,6 +38,7 @@ test_that("as.mo works", {
expect_equal(as.character(as.mo("Escherichia coli")), "B_ESCHR_COLI")
expect_equal(as.character(as.mo("Escherichia coli")), "B_ESCHR_COLI")
expect_equal(as.character(as.mo(22242416)), "B_ESCHR_COLI")
+ expect_equal(as.character(as.mo(112283007)), "B_ESCHR_COLI")
expect_equal(as.character(as.mo("Escherichia species")), "B_ESCHR")
expect_equal(as.character(as.mo("Escherichia")), "B_ESCHR")
expect_equal(as.character(as.mo("Esch spp.")), "B_ESCHR")
@@ -240,7 +241,7 @@ test_that("as.mo works", {
expect_output(print(mo_uncertainties()))
# Salmonella (City) are all actually Salmonella enterica spp (City)
- expect_equal(mo_name(c("Salmonella Goettingen", "Salmonella Typhimurium", "Salmonella Group A")),
+ expect_equal(suppressWarnings(mo_name(c("Salmonella Goettingen", "Salmonella Typhimurium", "Salmonella Group A"))),
c("Salmonella enterica", "Salmonella typhimurium", "Salmonella"))
# no virusses
diff --git a/tests/testthat/test-mo_property.R b/tests/testthat/test-mo_property.R
index 1592e7fd..7d4a47f0 100644
--- a/tests/testthat/test-mo_property.R
+++ b/tests/testthat/test-mo_property.R
@@ -93,6 +93,9 @@ test_that("mo_property works", {
expect_identical(suppressWarnings(mo_ref("Chlamydia psittaci")), "Page, 1968")
expect_identical(mo_ref("Chlamydophila psittaci"), "Everett et al., 1999")
+ expect_equal(mo_snomed("Escherichia coli"),
+ c(112283007, 116395006, 116396007, 103429008, 83285000, 116394005, 407166006, 457914007))
+
# old codes must throw a warning in mo_* family
expect_warning(mo_name(c("B_ESCHR_COL", "B_STPHY_AUR")))