mirror of
https://github.com/msberends/AMR.git
synced 2025-07-09 04:02:19 +02:00
speed improvement as.mo, freq title
This commit is contained in:
2
man/antibiotics.Rd
Executable file → Normal file
2
man/antibiotics.Rd
Executable file → Normal file
@ -4,7 +4,7 @@
|
||||
\name{antibiotics}
|
||||
\alias{antibiotics}
|
||||
\title{Data set with 423 antibiotics}
|
||||
\format{A \code{\link{tibble}} with 423 observations and 18 variables:
|
||||
\format{A \code{\link{data.frame}} with 423 observations and 18 variables:
|
||||
\describe{
|
||||
\item{\code{atc}}{ATC code, like \code{J01CR02}}
|
||||
\item{\code{certe}}{Certe code, like \code{amcl}}
|
||||
|
12
man/as.mo.Rd
12
man/as.mo.Rd
@ -54,7 +54,15 @@ A microbial ID from this package (class: \code{mo}) typically looks like these e
|
||||
|
||||
Use the \code{\link{mo_property}} functions to get properties based on the returned code, see Examples.
|
||||
|
||||
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:
|
||||
This function uses Artificial Intelligence (AI) to help getting fast and logical results. It tries to find matches in this order:
|
||||
\itemize{
|
||||
\item{Taxonomic kingdom: it first searches in bacteria, then fungi, then protozoa}
|
||||
\item{Human pathogenic prevalence: it first searches in more prevalent microorganisms, then less prevalent ones}
|
||||
\item{Valid MO codes and full names: it first searches in already valid MO code and genus/species combinations}
|
||||
\item{Breakdown of input values: from here it starts to breakdown input values to find possible matches}
|
||||
}
|
||||
|
||||
A couple of effects because of these rules
|
||||
\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}
|
||||
@ -70,7 +78,7 @@ This means that looking up human pathogenic microorganisms takes less time than
|
||||
\if{html}{\figure{itis_logo.jpg}{options: height=60px style=margin-bottom:5px} \cr}
|
||||
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}).
|
||||
|
||||
All (sub)species from the 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. This allows users to use authoritative taxonomic information for their data analysis on any microorganism, not only human pathogens.
|
||||
All (sub)species from the \strong{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. This \strong{allows users to use authoritative taxonomic information} for their data analysis on any microorganism, not only human pathogens. It also helps to \strong{quickly determine the Gram stain of bacteria}, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.
|
||||
|
||||
ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].
|
||||
}
|
||||
|
@ -10,12 +10,12 @@
|
||||
frequency_tbl(x, ..., sort.count = TRUE,
|
||||
nmax = getOption("max.print.freq"), na.rm = TRUE, row.names = TRUE,
|
||||
markdown = !interactive(), digits = 2, quote = FALSE,
|
||||
header = !markdown, na = "<NA>", sep = " ")
|
||||
header = !markdown, title = NULL, na = "<NA>", sep = " ")
|
||||
|
||||
freq(x, ..., sort.count = TRUE, nmax = getOption("max.print.freq"),
|
||||
na.rm = TRUE, row.names = TRUE, markdown = !interactive(),
|
||||
digits = 2, quote = FALSE, header = !markdown, na = "<NA>",
|
||||
sep = " ")
|
||||
digits = 2, quote = FALSE, header = !markdown, title = NULL,
|
||||
na = "<NA>", sep = " ")
|
||||
|
||||
top_freq(f, n)
|
||||
|
||||
@ -43,6 +43,8 @@ top_freq(f, n)
|
||||
|
||||
\item{header}{a logical value indicating whether an informative header should be printed}
|
||||
|
||||
\item{title}{text to show above frequency table, at default to tries to coerce from the variables passed to \code{x}}
|
||||
|
||||
\item{na}{a character string to should be used to show empty (\code{NA}) values (only useful when \code{na.rm = FALSE})}
|
||||
|
||||
\item{sep}{a character string to separate the terms when selecting multiple columns}
|
||||
|
@ -19,7 +19,7 @@
|
||||
\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{prevalence}}{An integer based on estimated prevalence of the microorganism in humans. Used internally by \code{\link{as.mo}}, otherwise quite meaningless. It has a value of 25 for manually added items and a value of 1000 for all unprevalent microorganisms whose genus was somewhere in the top 250 (with another species).}
|
||||
\item{\code{ref}}{Author(s) and year of concerning publication as found in ITIS, see Source}
|
||||
}}
|
||||
\source{
|
||||
@ -36,7 +36,7 @@ A data set containing the complete microbial taxonomy of the kingdoms Bacteria,
|
||||
\if{html}{\figure{itis_logo.jpg}{options: height=60px style=margin-bottom:5px} \cr}
|
||||
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}).
|
||||
|
||||
All (sub)species from the 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. This allows users to use authoritative taxonomic information for their data analysis on any microorganism, not only human pathogens.
|
||||
All (sub)species from the \strong{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. This \strong{allows users to use authoritative taxonomic information} for their data analysis on any microorganism, not only human pathogens. It also helps to \strong{quickly determine the Gram stain of bacteria}, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.
|
||||
|
||||
ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
\name{microorganisms.certe}
|
||||
\alias{microorganisms.certe}
|
||||
\title{Translation table for Certe}
|
||||
\format{A \code{\link{tibble}} with 2,665 observations and 2 variables:
|
||||
\format{A \code{\link{data.frame}} with 2,665 observations and 2 variables:
|
||||
\describe{
|
||||
\item{\code{certe}}{Code of microorganism according to Certe MMB}
|
||||
\item{\code{mo}}{Code of microorganism in \code{\link{microorganisms}}}
|
||||
|
@ -25,7 +25,7 @@ A data set containing old (previously valid or accepted) taxonomic names accordi
|
||||
\if{html}{\figure{itis_logo.jpg}{options: height=60px style=margin-bottom:5px} \cr}
|
||||
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}).
|
||||
|
||||
All (sub)species from the 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. This allows users to use authoritative taxonomic information for their data analysis on any microorganism, not only human pathogens.
|
||||
All (sub)species from the \strong{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. This \strong{allows users to use authoritative taxonomic information} for their data analysis on any microorganism, not only human pathogens. It also helps to \strong{quickly determine the Gram stain of bacteria}, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.
|
||||
|
||||
ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
\name{microorganisms.umcg}
|
||||
\alias{microorganisms.umcg}
|
||||
\title{Translation table for UMCG}
|
||||
\format{A \code{\link{tibble}} with 1,095 observations and 2 variables:
|
||||
\format{A \code{\link{data.frame}} with 1,095 observations and 2 variables:
|
||||
\describe{
|
||||
\item{\code{umcg}}{Code of microorganism according to UMCG MMB}
|
||||
\item{\code{certe}}{Code of microorganism according to Certe MMB}
|
||||
|
@ -71,7 +71,7 @@ Use these functions to return a specific property of a microorganism from the \c
|
||||
\if{html}{\figure{itis_logo.jpg}{options: height=60px style=margin-bottom:5px} \cr}
|
||||
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}).
|
||||
|
||||
All (sub)species from the 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. This allows users to use authoritative taxonomic information for their data analysis on any microorganism, not only human pathogens.
|
||||
All (sub)species from the \strong{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. This \strong{allows users to use authoritative taxonomic information} for their data analysis on any microorganism, not only human pathogens. It also helps to \strong{quickly determine the Gram stain of bacteria}, since all bacteria are classified into subkingdom Negibacteria or Posibacteria.
|
||||
|
||||
ITIS is a partnership of U.S., Canadian, and Mexican agencies and taxonomic specialists [3].
|
||||
}
|
||||
|
24
man/supplementary_data.Rd
Normal file
24
man/supplementary_data.Rd
Normal file
@ -0,0 +1,24 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/data.R
|
||||
\docType{data}
|
||||
\name{supplementary_data}
|
||||
\alias{supplementary_data}
|
||||
\alias{microorganismsDT}
|
||||
\alias{microorganisms.prevDT}
|
||||
\alias{microorganisms.unprevDT}
|
||||
\alias{microorganisms.oldDT}
|
||||
\title{Supplementary Data}
|
||||
\format{An object of class \code{data.table} (inherits from \code{data.frame}) with 18833 rows and 15 columns.}
|
||||
\usage{
|
||||
microorganismsDT
|
||||
|
||||
microorganisms.prevDT
|
||||
|
||||
microorganisms.unprevDT
|
||||
|
||||
microorganisms.oldDT
|
||||
}
|
||||
\description{
|
||||
These \code{\link{data.table}s} are transformed from the \code{\link{microorganisms}} and \code{\link{microorganisms}} data sets to improve speed of \code{\link{as.mo}}. They are meant for internal use only, and are only mentioned here for reference.
|
||||
}
|
||||
\keyword{datasets}
|
Reference in New Issue
Block a user