1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 16:42:10 +02:00

authors from ITIS, diff for freq

This commit is contained in:
2018-10-01 11:39:43 +02:00
parent 92c9cc2608
commit 3119a221e5
17 changed files with 280 additions and 141 deletions

View File

@ -7,12 +7,13 @@
\alias{guess_mo}
\title{Transform to microorganism ID}
\usage{
as.mo(x, Becker = FALSE, Lancefield = FALSE, allow_uncertain = FALSE)
as.mo(x, Becker = FALSE, Lancefield = FALSE, allow_uncertain = FALSE,
reference_df = NULL)
is.mo(x)
guess_mo(x, Becker = FALSE, Lancefield = FALSE,
allow_uncertain = FALSE)
allow_uncertain = FALSE, reference_df = NULL)
}
\arguments{
\item{x}{a character vector or a \code{data.frame} with one or two columns}
@ -26,6 +27,8 @@ guess_mo(x, Becker = FALSE, Lancefield = FALSE,
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.}
\item{reference_df}{a \code{data.frame} to use for extra reference when translating \code{x} to a valid \code{mo}. The first column can be any microbial name, code or ID (used in your analysis or organisation), the second column must be a valid \code{mo} as found in the \code{\link{microorganisms}} data set.}
}
\value{
Character (vector) with class \code{"mo"}. Unknown values will return \code{NA}.
@ -34,7 +37,7 @@ Character (vector) with class \code{"mo"}. Unknown values will return \code{NA}.
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{
A microbial ID (class: \code{mo}) typically looks like these examples:\cr
A microbial ID from this package (class: \code{mo}) typically looks like these examples:\cr
\preformatted{
Code Full name
--------------- --------------------------------------
@ -58,14 +61,18 @@ This function uses Artificial Intelligence (AI) to help getting more logical res
\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}}
}
This means that looking up human non-pathogenic microorganisms takes a longer time compares to human pathogenic microorganisms.
This means that looking up human pathogenic microorganisms takes less time than looking up human \strong{non}-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} (with seven taxonomic ranks - from subkingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, \url{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 are included in this package, as well as all previously accepted names known to ITIS.
This package contains the \strong{complete microbial taxonomic data} (with all seven taxonomic ranks - from subkingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, \url{https://www.itis.gov}).
The complete taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available too. This allows users to use authoritative taxonomic information for their data analyses on any microorganisms, not only human pathogens.
ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].
}
\section{Source}{
@ -78,7 +85,7 @@ This \code{AMR} package contains the \strong{complete microbial taxonomic data}
}
\examples{
# These examples all return "STAAUR", the ID of S. aureus:
# These examples all return "B_STPHY_AUR", the ID of S. aureus:
as.mo("stau")
as.mo("STAU")
as.mo("staaur")

View File

@ -4,7 +4,6 @@
\alias{freq}
\alias{frequency_tbl}
\alias{top_freq}
\alias{diff.frequency_tbl}
\alias{print.frequency_tbl}
\title{Frequency table}
\usage{
@ -18,8 +17,6 @@ freq(x, ..., sort.count = TRUE, nmax = getOption("max.print.freq"),
top_freq(f, n)
\method{diff}{frequency_tbl}(x, y, ...)
\method{print}{frequency_tbl}(x, nmax = getOption("max.print.freq",
default = 15), ...)
}

View File

@ -4,7 +4,7 @@
\name{microorganisms}
\alias{microorganisms}
\title{Data set with taxonomic data from ITIS}
\format{A \code{\link{data.frame}} with 18,831 observations and 15 variables:
\format{A \code{\link{data.frame}} with 18,833 observations and 16 variables:
\describe{
\item{\code{mo}}{ID of microorganism}
\item{\code{tsn}}{Taxonomic Serial Number (TSN), as defined by ITIS}
@ -20,7 +20,8 @@
\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.}
\item{\code{authors}}{Author(s) that published this taxonomic name as found in ITIS, see Source}
\item{\code{year}}{Year in which the author(s) published this taxonomic name as found in ITIS, see Source}
}}
\source{
[3] Integrated Taxonomic Information System (ITIS) on-line database, \url{https://www.itis.gov}.
@ -34,7 +35,11 @@ A data set containing the complete microbial taxonomy of the kingdoms Bacteria,
\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} (with seven taxonomic ranks - from subkingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, \url{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 are included in this package, as well as all previously accepted names known to ITIS.
This package contains the \strong{complete microbial taxonomic data} (with all seven taxonomic ranks - from subkingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, \url{https://www.itis.gov}).
The complete taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available too. This allows users to use authoritative taxonomic information for their data analyses on any microorganisms, not only human pathogens.
ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].
}
\seealso{

View File

@ -24,7 +24,11 @@ A data set containing old (previously valid or accepted) taxonomic names accordi
\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} (with seven taxonomic ranks - from subkingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, \url{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 are included in this package, as well as all previously accepted names known to ITIS.
This package contains the \strong{complete microbial taxonomic data} (with all seven taxonomic ranks - from subkingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, \url{https://www.itis.gov}).
The complete taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available too. This allows users to use authoritative taxonomic information for their data analyses on any microorganisms, not only human pathogens.
ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].
}
\seealso{

View File

@ -12,56 +12,55 @@
\alias{mo_class}
\alias{mo_phylum}
\alias{mo_subkingdom}
\alias{mo_authors}
\alias{mo_year}
\alias{mo_type}
\alias{mo_TSN}
\alias{mo_gramstain}
\alias{mo_taxonomy}
\title{Property of a microorganism}
\usage{
mo_fullname(x, Becker = FALSE, Lancefield = FALSE, language = NULL)
mo_fullname(x, language = NULL, ...)
mo_shortname(x, Becker = FALSE, Lancefield = FALSE, language = NULL)
mo_shortname(x, language = NULL, ...)
mo_subspecies(x, Becker = FALSE, Lancefield = FALSE, language = NULL)
mo_subspecies(x, language = NULL, ...)
mo_species(x, Becker = FALSE, Lancefield = FALSE, language = NULL)
mo_species(x, language = NULL, ...)
mo_genus(x, language = NULL)
mo_genus(x, language = NULL, ...)
mo_family(x)
mo_family(x, ...)
mo_order(x)
mo_order(x, ...)
mo_class(x)
mo_class(x, ...)
mo_phylum(x)
mo_phylum(x, ...)
mo_subkingdom(x)
mo_subkingdom(x, ...)
mo_type(x, language = NULL)
mo_authors(x, ...)
mo_TSN(x)
mo_year(x, ...)
mo_gramstain(x, language = NULL)
mo_type(x, language = NULL, ...)
mo_property(x, property = "fullname", Becker = FALSE,
Lancefield = FALSE, language = NULL)
mo_TSN(x, ...)
mo_taxonomy(x)
mo_gramstain(x, language = NULL, ...)
mo_property(x, property = "fullname", language = NULL, ...)
mo_taxonomy(x, ...)
}
\arguments{
\item{x}{any (vector of) text that can be coerced to a valid microorganism code with \code{\link{as.mo}}}
\item{Becker}{a logical to indicate whether \emph{Staphylococci} should be categorised into Coagulase Negative \emph{Staphylococci} ("CoNS") and Coagulase Positive \emph{Staphylococci} ("CoPS") instead of their own species, according to Karsten Becker \emph{et al.} [1].
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, 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 English (\code{"en"}) and 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{...}{other parameters passed on to \code{/link{as.mo}}}
\item{property}{one of the column names of one of the \code{\link{microorganisms}} data set or \code{"shortname"}}
}
\value{
@ -73,7 +72,11 @@ Use these functions to return a specific property of a microorganism from the \c
\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} (with seven taxonomic ranks - from subkingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, \url{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 are included in this package, as well as all previously accepted names known to ITIS.
This package contains the \strong{complete microbial taxonomic data} (with all seven taxonomic ranks - from subkingdom to subspecies) from the publicly available Integrated Taxonomic Information System (ITIS, \url{https://www.itis.gov}).
The complete taxonomic kingdoms Bacteria, Fungi and Protozoa are included in this package, as well as all previously accepted names known to ITIS. Furthermore, the responsible authors and year of publication are available too. This allows users to use authoritative taxonomic information for their data analyses on any microorganisms, not only human pathogens.
ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].
}
\section{Source}{
@ -86,7 +89,7 @@ This \code{AMR} package contains the \strong{complete microbial taxonomic data}
}
\examples{
# All properties
# All properties of Escherichia coli
mo_subkingdom("E. coli") # "Negibacteria"
mo_phylum("E. coli") # "Proteobacteria"
mo_class("E. coli") # "Gammaproteobacteria"
@ -100,6 +103,8 @@ mo_shortname("E. coli") # "E. coli"
mo_gramstain("E. coli") # "Gram negative"
mo_TSN("E. coli") # 285
mo_type("E. coli") # "Bacteria"
mo_authors("E. coli") # "Castellani and Chalmers"
mo_year("E. coli") # 1919
# Abbreviations known in the field