1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 00:02:38 +02:00

first inclusion of ITIS data

This commit is contained in:
2018-09-24 23:33:29 +02:00
parent df5d82fff3
commit 9c566585b0
29 changed files with 734 additions and 466 deletions

View File

@ -6,17 +6,13 @@
\alias{is.mo}
\alias{guess_mo}
\title{Transform to microorganism ID}
\source{
[1] Becker K \emph{et al.} \strong{Coagulase-Negative Staphylococci}. 2014. Clin Microbiol Rev. 27(4): 870926. \url{https://dx.doi.org/10.1128/CMR.00109-13}
[2] Lancefield RC \strong{A serological differentiation of human and other groups of hemolytic streptococci}. 1933. J Exp Med. 57(4): 57195. \url{https://dx.doi.org/10.1084/jem.57.4.571}
}
\usage{
as.mo(x, Becker = FALSE, Lancefield = FALSE)
as.mo(x, Becker = FALSE, Lancefield = FALSE, allow_uncertain = FALSE)
is.mo(x)
guess_mo(x, Becker = FALSE, Lancefield = FALSE)
guess_mo(x, Becker = FALSE, Lancefield = FALSE,
allow_uncertain = FALSE)
}
\arguments{
\item{x}{a character vector or a \code{data.frame} with one or two columns}
@ -25,31 +21,62 @@ guess_mo(x, Becker = FALSE, Lancefield = FALSE)
This excludes \emph{Staphylococcus aureus} at default, use \code{Becker = "all"} to also categorise \emph{S. aureus} as "CoPS".}
\item{Lancefield}{a logical to indicate whether beta-haemolytic \emph{Streptococci} should be categorised into Lancefield groups instead of their own species, according to Rebecca C. Lancefield [2]. These \emph{Streptococci} will be categorised in their first group, i.e. \emph{Streptococcus dysgalactiae} will be group C, although officially it was also categorised into groups G and L.
\item{Lancefield}{a logical to indicate whether beta-haemolytic \emph{Streptococci} should be categorised into Lancefield groups instead of their own species, according to Rebecca C. Lancefield [2]. These \emph{Streptococci} will be categorised in their first group, e.g. \emph{Streptococcus dysgalactiae} will be group C, although officially it was also categorised into groups G and L.
This excludes \emph{Enterococci} at default (who are in group D), use \code{Lancefield = "all"} to also categorise all \emph{Enterococci} as group D.}
\item{allow_uncertain}{a logical to indicate whether empty results should be checked for only a part of the input string. When results are found, a warning will be given about the uncertainty and the result.}
}
\value{
Character (vector) with class \code{"mo"}. Unknown values will return \code{NA}.
}
\description{
Use this function to determine a valid ID based on a genus (and species). Determination is done using Artificial Intelligence (AI), so the input can be almost anything: a full name (like \code{"Staphylococcus aureus"}), an abbreviated name (like \code{"S. aureus"}), an abbreviation known in the field (like \code{"MRSA"}), or just a genus. You could also \code{\link{select}} a genus and species column, zie Examples.
Use this function to determine a valid microorganism ID (\code{mo}). Determination is done using Artificial Intelligence (AI) and the complete taxonomic kingdoms \emph{Bacteria}, \emph{Fungi} and \emph{Protozoa} (see Source), so the input can be almost anything: a full name (like \code{"Staphylococcus aureus"}), an abbreviated name (like \code{"S. aureus"}), an abbreviation known in the field (like \code{"MRSA"}), or just a genus. You could also \code{\link{select}} a genus and species column, zie Examples.
}
\details{
\code{guess_mo} is an alias of \code{as.mo}.
A microbial ID (class: \code{mo}) typically looks like these examples:\cr
\preformatted{
Code Full name
--------------- --------------------------------------
B_KLBSL Klebsiella
B_KLBSL_PNE Klebsiella pneumoniae
B_KLBSL_PNE_RHI Klebsiella pneumoniae rhinoscleromatis
| | | |
| | | |
| | | ----> subspecies, a 3-4 letter acronym
| | ----> species, a 3-4 letter acronym
| ----> genus, a 5-7 letter acronym, mostly without vowels
----> taxonomic kingdom, either Bacteria (B), Fungi (F) or Protozoa (P)
}
Use the \code{\link{mo_property}} functions to get properties based on the returned code, see Examples.
Thus function uses Artificial Intelligence (AI) to help getting more logical results, based on type of input and known prevalence of human pathogens. For example:
This function uses Artificial Intelligence (AI) to help getting more logical results, based on type of input and known prevalence of human pathogens. For example:
\itemize{
\item{\code{"E. coli"} will return the ID of \emph{Escherichia coli} and not \emph{Entamoeba coli}, although the latter would alphabetically come first}
\item{\code{"H. influenzae"} will return the ID of \emph{Haemophilus influenzae} and not \emph{Haematobacter influenzae} for the same reason}
\item{Something like \code{"p aer"} will return the ID of \emph{Pseudomonas aeruginosa} and not \emph{Pasteurella aerogenes}}
\item{Something like \code{"stau"} or \code{"S aur"} will return the ID of \emph{Staphylococcus aureus} and not \emph{Staphylococcus auricularis}}
}
Moreover, this function also supports ID's based on only Gram stain, when the species is not known. \cr
For example, \code{"Gram negative rods"} and \code{"GNR"} will both return the ID of a Gram negative rod: \code{GNR}.
This means that looking up human non-pathogenic microorganisms takes a longer time compares to human pathogenic microorganisms.
\code{guess_mo} is an alias of \code{as.mo}.
}
\section{ITIS}{
\if{html}{\figure{itis_logo.jpg}{options: height=60px style=margin-bottom:5px} \cr}
This \code{AMR} package contains the \strong{complete microbial taxonomic data} from the publicly available Integrated Taxonomic Information System (ITIS, https://www.itis.gov). ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3]. The complete taxonomic kingdoms Bacteria, Fungi and Protozoa (from subkingdom to the subspecies level) are included in this package.
}
\section{Source}{
[1] Becker K \emph{et al.} \strong{Coagulase-Negative Staphylococci}. 2014. Clin Microbiol Rev. 27(4): 870926. \url{https://dx.doi.org/10.1128/CMR.00109-13}
[2] Lancefield RC \strong{A serological differentiation of human and other groups of hemolytic streptococci}. 1933. J Exp Med. 57(4): 57195. \url{https://dx.doi.org/10.1084/jem.57.4.571}
[3] Integrated Taxonomic Information System (ITIS). Retrieved September 2018. \url{http://www.itis.gov}
}
\examples{
# These examples all return "STAAUR", the ID of S. aureus:
as.mo("stau")
@ -61,22 +88,27 @@ as.mo("Staphylococcus aureus")
as.mo("MRSA") # Methicillin Resistant S. aureus
as.mo("VISA") # Vancomycin Intermediate S. aureus
as.mo("VRSA") # Vancomycin Resistant S. aureus
as.mo(369) # Search on TSN (Taxonomic Serial Number), a unique identifier
# for the Integrated Taxonomic Information System (ITIS)
as.mo("Streptococcus group A")
as.mo("GAS") # Group A Streptococci
as.mo("GBS") # Group B Streptococci
# guess_mo is an alias of as.mo and works the same
guess_mo("S. epidermidis") # will remain species: STAEPI
guess_mo("S. epidermidis", Becker = TRUE) # will not remain species: STACNS
guess_mo("S. epidermidis") # will remain species: B_STPHY_EPI
guess_mo("S. epidermidis", Becker = TRUE) # will not remain species: B_STPHY_CNS
guess_mo("S. pyogenes") # will remain species: STCPYO
guess_mo("S. pyogenes", Lancefield = TRUE) # will not remain species: STCGRA
guess_mo("S. pyogenes") # will remain species: B_STRPTC_PYO
guess_mo("S. pyogenes", Lancefield = TRUE) # will not remain species: B_STRPTC_GRA
# Use mo_* functions to get a specific property based on `mo`
Ecoli <- as.mo("E. coli") # returns `ESCCOL`
Ecoli <- as.mo("E. coli") # returns `B_ESCHR_COL`
mo_genus(Ecoli) # returns "Escherichia"
mo_gramstain(Ecoli) # returns "Negative rods"
mo_gramstain(Ecoli) # returns "Gram negative"
# but it uses as.mo internally too, so you could also just use:
mo_genus("E. coli") # returns "Escherichia"
\dontrun{
df$mo <- as.mo(df$microorganism_name)
@ -98,7 +130,8 @@ df <- df \%>\%
}
}
\seealso{
\code{\link{microorganisms}} for the dataframe that is being used to determine ID's.
\code{\link{microorganisms}} for the \code{data.frame} with ITIS content that is being used to determine ID's. \cr
The \code{\link{mo_property}} functions (like \code{\link{mo_genus}}, \code{\link{mo_gramstain}}) to get properties based on the returned code.
}
\keyword{Becker}
\keyword{Lancefield}

BIN
man/figures/itis_logo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -3,34 +3,41 @@
\docType{data}
\name{microorganisms}
\alias{microorganisms}
\title{Data set with human pathogenic microorganisms}
\format{A \code{\link{tibble}} with 2,642 observations and 14 variables:
\title{Data set with taxonomic data from ITIS}
\format{A \code{\link{data.frame}} with 18,831 observations and 15 variables:
\describe{
\item{\code{mo}}{ID of microorganism}
\item{\code{bactsys}}{Bactsyscode of microorganism}
\item{\code{genus}}{Genus name of microorganism, like \code{"Echerichia"}}
\item{\code{species}}{Species name of microorganism, like \code{"coli"}}
\item{\code{subspecies}}{Subspecies name of bio-/serovar of microorganism, like \code{"EHEC"}}
\item{\code{fullname}}{Full name, like \code{"Echerichia coli (EHEC)"}}
\item{\code{gramstain}}{Gram of microorganism, like \code{"Negative rods"}}
\item{\code{aerobic}}{Logical whether bacteria is aerobic}
\item{\code{tsn}}{Taxonomic Serial Number (TSN), as defined by ITIS}
\item{\code{genus}}{Taxonomic genus of the microorganism as found in ITIS, see Source}
\item{\code{species}}{Taxonomic species of the microorganism as found in ITIS, see Source}
\item{\code{subspecies}}{Taxonomic subspecies of the microorganism as found in ITIS, see Source}
\item{\code{fullname}}{Full name, like \code{"Echerichia coli"}}
\item{\code{family}}{Taxonomic family of the microorganism as found in ITIS, see Source}
\item{\code{order}}{Taxonomic order of the microorganism as found in ITIS, see Source}
\item{\code{class}}{Taxonomic class of the microorganism as found in ITIS, see Source}
\item{\code{phylum}}{Taxonomic phylum of the microorganism as found in ITIS, see Source}
\item{\code{type}}{Type of microorganism, like \code{"Bacteria"} and \code{"Fungus/yeast"}}
\item{\code{subkingdom}}{Taxonomic subkingdom of the microorganism as found in ITIS, see Source}
\item{\code{gramstain}}{Gram of microorganism, like \code{"Gram negative"}}
\item{\code{type}}{Type of microorganism, like \code{"Bacteria"} and \code{"Fungi"}}
\item{\code{prevalence}}{A rounded integer based on prevalence of the microorganism. Used internally by \code{\link{as.mo}}, otherwise quite meaningless.}
\item{\code{mo.old}}{The old ID for package versions 0.3.0 and lower.}
}}
\source{
Integrated Taxonomic Information System (ITIS) on-line database, \url{https://www.itis.gov}.
[3] Integrated Taxonomic Information System (ITIS) on-line database, \url{https://www.itis.gov}.
}
\usage{
microorganisms
}
\description{
A data set containing (potential) human pathogenic microorganisms. MO codes can be looked up using \code{\link{guess_mo}}.
A data set containing the complete microbial taxonomy of the kingdoms Bacteria, Fungi and Protozoa. MO codes can be looked up using \code{\link{as.mo}}.
}
\section{ITIS}{
\if{html}{\figure{itis_logo.jpg}{options: height=60px style=margin-bottom:5px} \cr}
This \code{AMR} package contains the \strong{complete microbial taxonomic data} from the publicly available Integrated Taxonomic Information System (ITIS, https://www.itis.gov). ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3]. The complete taxonomic kingdoms Bacteria, Fungi and Protozoa (from subkingdom to the subspecies level) are included in this package.
}
\seealso{
\code{\link{guess_mo}} \code{\link{antibiotics}} \code{\link{microorganisms.umcg}}
\code{\link{as.mo}} \code{\link{mo_property}} \code{\link{microorganisms.umcg}}
}
\keyword{datasets}

33
man/microorganisms.old.Rd Normal file
View File

@ -0,0 +1,33 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{microorganisms.old}
\alias{microorganisms.old}
\title{Data set with old taxonomic data from ITIS}
\format{A \code{\link{data.frame}} with 58 observations and 5 variables:
\describe{
\item{\code{tsn}}{Old Taxonomic Serial Number (TSN), as defined by ITIS}
\item{\code{name}}{Old taxonomic name of the microorganism as found in ITIS, see Source}
\item{\code{tsn_new}}{New Taxonomic Serial Number (TSN), as defined by ITIS}
\item{\code{authors}}{Authors responsible for renaming as found in ITIS, see Source}
\item{\code{year}}{Year in which the literature was published about the renaming as found in ITIS, see Source}
}}
\source{
[3] Integrated Taxonomic Information System (ITIS) on-line database, \url{https://www.itis.gov}.
}
\usage{
microorganisms.old
}
\description{
A data set containing old, previously valid, taxonomic names. This data set is used internally by \code{\link{as.mo}}.
}
\section{ITIS}{
\if{html}{\figure{itis_logo.jpg}{options: height=60px style=margin-bottom:5px} \cr}
This \code{AMR} package contains the \strong{complete microbial taxonomic data} from the publicly available Integrated Taxonomic Information System (ITIS, https://www.itis.gov). ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3]. The complete taxonomic kingdoms Bacteria, Fungi and Protozoa (from subkingdom to the subspecies level) are included in this package.
}
\seealso{
\code{\link{as.mo}} \code{\link{mo_property}} \code{\link{microorganisms}}
}
\keyword{datasets}

View File

@ -16,6 +16,6 @@ microorganisms.umcg
A data set containing all bacteria codes of UMCG MMB. These codes can be joined to data with an ID from \code{\link{microorganisms}$mo} (using \code{\link{left_join_microorganisms}}). GLIMS codes can also be translated to valid \code{MO}s with \code{\link{guess_mo}}.
}
\seealso{
\code{\link{guess_mo}} \code{\link{microorganisms}}
\code{\link{as.mo}} \code{\link{microorganisms}}
}
\keyword{datasets}

View File

@ -11,18 +11,12 @@
\alias{mo_order}
\alias{mo_class}
\alias{mo_phylum}
\alias{mo_subkingdom}
\alias{mo_type}
\alias{mo_TSN}
\alias{mo_gramstain}
\alias{mo_aerobic}
\alias{mo_taxonomy}
\title{Property of a microorganism}
\source{
[1] Becker K \emph{et al.} \strong{Coagulase-Negative Staphylococci}. 2014. Clin Microbiol Rev. 27(4): 870926. \url{https://dx.doi.org/10.1128/CMR.00109-13}
[2] Lancefield RC \strong{A serological differentiation of human and other groups of hemolytic streptococci}. 1933. J Exp Med. 57(4): 57195. \url{https://dx.doi.org/10.1084/jem.57.4.571}
[3] Integrated Taxonomic Information System (ITIS) on-line database, \url{https://www.itis.gov}.
}
\usage{
mo_fullname(x, Becker = FALSE, Lancefield = FALSE, language = NULL)
@ -42,11 +36,13 @@ mo_class(x)
mo_phylum(x)
mo_subkingdom(x)
mo_type(x, language = NULL)
mo_gramstain(x, language = NULL)
mo_TSN(x)
mo_aerobic(x)
mo_gramstain(x, language = NULL)
mo_property(x, property = "fullname", Becker = FALSE,
Lancefield = FALSE, language = NULL)
@ -60,11 +56,11 @@ mo_taxonomy(x)
This excludes \emph{Staphylococcus aureus} at default, use \code{Becker = "all"} to also categorise \emph{S. aureus} as "CoPS".}
\item{Lancefield}{a logical to indicate whether beta-haemolytic \emph{Streptococci} should be categorised into Lancefield groups instead of their own species, according to Rebecca C. Lancefield [2]. These \emph{Streptococci} will be categorised in their first group, i.e. \emph{Streptococcus dysgalactiae} will be group C, although officially it was also categorised into groups G and L.
\item{Lancefield}{a logical to indicate whether beta-haemolytic \emph{Streptococci} should be categorised into Lancefield groups instead of their own species, according to Rebecca C. Lancefield [2]. These \emph{Streptococci} will be categorised in their first group, e.g. \emph{Streptococcus dysgalactiae} will be group C, although officially it was also categorised into groups G and L.
This excludes \emph{Enterococci} at default (who are in group D), use \code{Lancefield = "all"} to also categorise all \emph{Enterococci} as group D.}
\item{language}{language of the returned text, defaults to the systems language. Either one of \code{"en"} (English), \code{"de"} (German), \code{"nl"} (Dutch), \code{"es"} (Spanish) or \code{"pt"} (Portuguese).}
\item{language}{language of the returned text, defaults to the systems language but can also be set with \code{\link{getOption}("AMR_locale")}. Either one of \code{"en"} (English), \code{"de"} (German), \code{"nl"} (Dutch), \code{"es"} (Spanish) or \code{"pt"} (Portuguese).}
\item{property}{one of the column names of one of the \code{\link{microorganisms}} data set, like \code{"mo"}, \code{"bactsys"}, \code{"family"}, \code{"genus"}, \code{"species"}, \code{"fullname"}, \code{"gramstain"} and \code{"aerobic"}}
}
@ -74,8 +70,24 @@ A logical (in case of \code{mo_aerobic}), a list (in case of \code{mo_taxonomy})
\description{
Use these functions to return a specific property of a microorganism from the \code{\link{microorganisms}} data set. All input values will be evaluated internally with \code{\link{as.mo}}.
}
\section{ITIS}{
\if{html}{\figure{itis_logo.jpg}{options: height=60px style=margin-bottom:5px} \cr}
This \code{AMR} package contains the \strong{complete microbial taxonomic data} from the publicly available Integrated Taxonomic Information System (ITIS, https://www.itis.gov). ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3]. The complete taxonomic kingdoms Bacteria, Fungi and Protozoa (from subkingdom to the subspecies level) are included in this package.
}
\section{Source}{
[1] Becker K \emph{et al.} \strong{Coagulase-Negative Staphylococci}. 2014. Clin Microbiol Rev. 27(4): 870926. \url{https://dx.doi.org/10.1128/CMR.00109-13}
[2] Lancefield RC \strong{A serological differentiation of human and other groups of hemolytic streptococci}. 1933. J Exp Med. 57(4): 57195. \url{https://dx.doi.org/10.1084/jem.57.4.571}
[3] Integrated Taxonomic Information System (ITIS). Retrieved September 2018. \url{http://www.itis.gov}
}
\examples{
# All properties
mo_subkingdom("E. coli") # "Negibacteria"
mo_phylum("E. coli") # "Proteobacteria"
mo_class("E. coli") # "Gammaproteobacteria"
mo_order("E. coli") # "Enterobacteriales"
@ -85,42 +97,30 @@ mo_species("E. coli") # "coli"
mo_subspecies("E. coli") # ""
mo_fullname("E. coli") # "Escherichia coli"
mo_shortname("E. coli") # "E. coli"
mo_gramstain("E. coli") # "Gram negative"
mo_TSN("E. coli") # 285
mo_type("E. coli") # "Bacteria"
mo_gramstain("E. coli") # "Negative rods"
mo_aerobic("E. coli") # TRUE
# Abbreviations known in the field
mo_genus("MRSA") # "Staphylococcus"
mo_species("MRSA") # "aureus"
mo_shortname("MRSA") # "S. aureus"
mo_gramstain("MRSA") # "Positive cocci"
mo_gramstain("MRSA") # "Gram positive"
mo_genus("VISA") # "Staphylococcus"
mo_species("VISA") # "aureus"
# Known subspecies
mo_genus("EHEC") # "Escherichia"
mo_species("EHEC") # "coli"
mo_subspecies("EHEC") # "EHEC"
mo_fullname("EHEC") # "Escherichia coli (EHEC)"
mo_shortname("EHEC") # "E. coli"
mo_genus("doylei") # "Campylobacter"
mo_species("doylei") # "jejuni"
mo_fullname("doylei") # "Campylobacter jejuni (doylei)"
mo_fullname("doylei") # "Campylobacter jejuni doylei"
mo_fullname("K. pneu rh") # "Klebsiella pneumoniae (rhinoscleromatis)"
mo_fullname("K. pneu rh") # "Klebsiella pneumoniae rhinoscleromatis"
mo_shortname("K. pneu rh") # "K. pneumoniae"
# Anaerobic bacteria
mo_genus("B. fragilis") # "Bacteroides"
mo_species("B. fragilis") # "fragilis"
mo_aerobic("B. fragilis") # FALSE
# Becker classification, see ?as.mo
mo_fullname("S. epi") # "Staphylococcus epidermidis"
mo_fullname("S. epi", Becker = TRUE) # "Coagulase Negative Staphylococcus (CoNS)"
@ -138,10 +138,9 @@ mo_shortname("S. pyo", Lancefield = TRUE) # "GAS"
mo_type("E. coli", language = "de") # "Bakterium"
mo_type("E. coli", language = "nl") # "Bacterie"
mo_type("E. coli", language = "es") # "Bakteria"
mo_gramstain("E. coli", language = "de") # "Negative Staebchen"
mo_gramstain("E. coli", language = "nl") # "Negatieve staven"
mo_gramstain("E. coli", language = "es") # "Bacilos negativos"
mo_gramstain("Giardia", language = "pt") # "Parasitas"
mo_gramstain("E. coli", language = "de") # "Gramnegativ"
mo_gramstain("E. coli", language = "nl") # "Gram-negatief"
mo_gramstain("E. coli", language = "es") # "Gram negativo"
mo_fullname("S. pyogenes",
Lancefield = TRUE,
@ -151,7 +150,7 @@ mo_fullname("S. pyogenes",
language = "nl") # "Streptococcus groep A"
# Complete taxonomy up to Phylum, returns a list
# Complete taxonomy up to Subkingdom, returns a list
mo_taxonomy("E. coli")
}
\seealso{