mo_rank mo_url, added Tremellales
@ -1,6 +1,6 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 0.5.0.9018
|
Version: 0.5.0.9018
|
||||||
Date: 2019-02-21
|
Date: 2019-02-22
|
||||||
Title: Antimicrobial Resistance Analysis
|
Title: Antimicrobial Resistance Analysis
|
||||||
Authors@R: c(
|
Authors@R: c(
|
||||||
person(
|
person(
|
||||||
|
@ -120,6 +120,7 @@ export(mo_kingdom)
|
|||||||
export(mo_order)
|
export(mo_order)
|
||||||
export(mo_phylum)
|
export(mo_phylum)
|
||||||
export(mo_property)
|
export(mo_property)
|
||||||
|
export(mo_rank)
|
||||||
export(mo_ref)
|
export(mo_ref)
|
||||||
export(mo_renamed)
|
export(mo_renamed)
|
||||||
export(mo_shortname)
|
export(mo_shortname)
|
||||||
@ -268,5 +269,6 @@ importFrom(stats,mad)
|
|||||||
importFrom(stats,pchisq)
|
importFrom(stats,pchisq)
|
||||||
importFrom(stats,predict)
|
importFrom(stats,predict)
|
||||||
importFrom(stats,sd)
|
importFrom(stats,sd)
|
||||||
|
importFrom(utils,browseURL)
|
||||||
importFrom(utils,browseVignettes)
|
importFrom(utils,browseVignettes)
|
||||||
importFrom(utils,installed.packages)
|
importFrom(utils,installed.packages)
|
||||||
|
2
NEWS.md
@ -20,6 +20,8 @@ We've got a new website: [https://msberends.gitlab.io/AMR](https://msberends.git
|
|||||||
|
|
||||||
This data is updated annually - check the included version with `catalogue_of_life_version()`.
|
This data is updated annually - check the included version with `catalogue_of_life_version()`.
|
||||||
* Due to this change, some `mo` codes changed (e.g. *Streptococcus* changed from `B_STRPTC` to `B_STRPT`). A translation table is used internally to support older microorganism IDs, so users will not notice this difference.
|
* Due to this change, some `mo` codes changed (e.g. *Streptococcus* changed from `B_STRPTC` to `B_STRPT`). A translation table is used internally to support older microorganism IDs, so users will not notice this difference.
|
||||||
|
* New function `mo_rank()` for the taxonomic rank (genus, species, infraspecies, etc.)
|
||||||
|
* New function `mo_url()` to get the URL to the Catalogue of Life
|
||||||
* Support for data from [WHONET](https://whonet.org/) and [EARS-Net](https://ecdc.europa.eu/en/about-us/partnerships-and-networks/disease-and-laboratory-networks/ears-net) (European Antimicrobial Resistance Surveillance Network):
|
* Support for data from [WHONET](https://whonet.org/) and [EARS-Net](https://ecdc.europa.eu/en/about-us/partnerships-and-networks/disease-and-laboratory-networks/ears-net) (European Antimicrobial Resistance Surveillance Network):
|
||||||
* Exported files from WHONET can be read and used in this package. For functions like `first_isolate()` and `eucast_rules()`, all parameters will be filled in automatically.
|
* Exported files from WHONET can be read and used in this package. For functions like `first_isolate()` and `eucast_rules()`, all parameters will be filled in automatically.
|
||||||
* This package now knows all antibiotic abbrevations by EARS-Net (which are also being used by WHONET) - the `antibiotics` data set now contains a column `ears_net`.
|
* This package now knows all antibiotic abbrevations by EARS-Net (which are also being used by WHONET) - the `antibiotics` data set now contains a column `ears_net`.
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#' Included are:
|
#' Included are:
|
||||||
#' \itemize{
|
#' \itemize{
|
||||||
#' \item{All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses}
|
#' \item{All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses}
|
||||||
#' \item{All ~3,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales and Schizosaccharomycetales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant (sub)species are covered (like all species of \emph{Aspergillus}, \emph{Candida}, \emph{Pneumocystis}, \emph{Saccharomyces} and \emph{Trichophyton}).}
|
#' \item{All ~3,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of \emph{Aspergillus}, \emph{Candida}, \emph{Cryptococcus}, \emph{Histplasma}, \emph{Pneumocystis}, \emph{Saccharomyces} and \emph{Trichophyton}).}
|
||||||
#' \item{All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed}
|
#' \item{All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed}
|
||||||
#' \item{The complete taxonomic tree of all included (sub)species: from kingdom to subspecies}
|
#' \item{The complete taxonomic tree of all included (sub)species: from kingdom to subspecies}
|
||||||
#' \item{The responsible author(s) and year of scientific publication}
|
#' \item{The responsible author(s) and year of scientific publication}
|
||||||
|
7
R/data.R
@ -134,7 +134,7 @@
|
|||||||
#'
|
#'
|
||||||
#' A data set containing the microbial taxonomy of six kingdoms from the Catalogue of Life. MO codes can be looked up using \code{\link{as.mo}}.
|
#' A data set containing the microbial taxonomy of six kingdoms from the Catalogue of Life. MO codes can be looked up using \code{\link{as.mo}}.
|
||||||
#' @inheritSection catalogue_of_life Catalogue of Life
|
#' @inheritSection catalogue_of_life Catalogue of Life
|
||||||
#' @format A \code{\link{data.frame}} with 56,672 observations and 14 variables:
|
#' @format A \code{\link{data.frame}} with 57,158 observations and 14 variables:
|
||||||
#' \describe{
|
#' \describe{
|
||||||
#' \item{\code{mo}}{ID of microorganism as used by this package}
|
#' \item{\code{mo}}{ID of microorganism as used by this package}
|
||||||
#' \item{\code{col_id}}{Catalogue of Life ID}
|
#' \item{\code{col_id}}{Catalogue of Life ID}
|
||||||
@ -163,6 +163,7 @@
|
|||||||
"microorganisms"
|
"microorganisms"
|
||||||
|
|
||||||
catalogue_of_life <- list(
|
catalogue_of_life <- list(
|
||||||
|
year = 2018,
|
||||||
version = "Catalogue of Life: 2018 Annual Checklist",
|
version = "Catalogue of Life: 2018 Annual Checklist",
|
||||||
url = "http://www.catalogueoflife.org/annual-checklist/2018"
|
url = "http://www.catalogueoflife.org/annual-checklist/2018"
|
||||||
)
|
)
|
||||||
@ -175,6 +176,8 @@ catalogue_of_life <- list(
|
|||||||
catalogue_of_life_version <- function() {
|
catalogue_of_life_version <- function() {
|
||||||
list(version = catalogue_of_life$version,
|
list(version = catalogue_of_life$version,
|
||||||
url = catalogue_of_life$url,
|
url = catalogue_of_life$url,
|
||||||
|
# annual release always somewhere in March
|
||||||
|
is_latest_annual_release = Sys.Date() < as.Date(paste0(catalogue_of_life$year + 1, "-04-01")),
|
||||||
no_of_species = nrow(AMR::microorganisms),
|
no_of_species = nrow(AMR::microorganisms),
|
||||||
no_of_synonyms = nrow(AMR::microorganisms.old))
|
no_of_synonyms = nrow(AMR::microorganisms.old))
|
||||||
}
|
}
|
||||||
@ -183,7 +186,7 @@ catalogue_of_life_version <- function() {
|
|||||||
#'
|
#'
|
||||||
#' A data set containing old (previously valid or accepted) taxonomic names according to the Catalogue of Life. This data set is used internally by \code{\link{as.mo}}.
|
#' A data set containing old (previously valid or accepted) taxonomic names according to the Catalogue of Life. This data set is used internally by \code{\link{as.mo}}.
|
||||||
#' @inheritSection catalogue_of_life Catalogue of Life
|
#' @inheritSection catalogue_of_life Catalogue of Life
|
||||||
#' @format A \code{\link{data.frame}} with 14,506 observations and 4 variables:
|
#' @format A \code{\link{data.frame}} with 14,487 observations and 4 variables:
|
||||||
#' \describe{
|
#' \describe{
|
||||||
#' \item{\code{col_id}}{Catalogue of Life ID}
|
#' \item{\code{col_id}}{Catalogue of Life ID}
|
||||||
#' \item{\code{tsn_new}}{New Catalogue of Life ID}
|
#' \item{\code{tsn_new}}{New Catalogue of Life ID}
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#' @param property one of the column names of one of the \code{\link{microorganisms}} data set or \code{"shortname"}
|
#' @param property one of the column names of one of the \code{\link{microorganisms}} data set or \code{"shortname"}
|
||||||
#' @param language language of the returned text, defaults to system language (see \code{\link{get_locale}}) and can also be set with \code{\link{getOption}("AMR_locale")}. Use \code{language = NULL} or \code{language = ""} to prevent translation.
|
#' @param language language of the returned text, defaults to system language (see \code{\link{get_locale}}) and can also be set with \code{\link{getOption}("AMR_locale")}. Use \code{language = NULL} or \code{language = ""} to prevent translation.
|
||||||
#' @param ... other parameters passed on to \code{\link{as.mo}}
|
#' @param ... other parameters passed on to \code{\link{as.mo}}
|
||||||
|
#' @param open browse the URL using \code{\link[utils]{browseURL}}
|
||||||
#' @details All functions will return the most recently known taxonomic property according to the Catalogue of Life, except for \code{mo_ref}, \code{mo_authors} and \code{mo_year}. This leads to the following results:
|
#' @details All functions will return the most recently known taxonomic property according to the Catalogue of Life, except for \code{mo_ref}, \code{mo_authors} and \code{mo_year}. This leads to the following results:
|
||||||
#' \itemize{
|
#' \itemize{
|
||||||
#' \item{\code{mo_fullname("Chlamydia psittaci")} will return \code{"Chlamydophila psittaci"} (with a warning about the renaming)}
|
#' \item{\code{mo_fullname("Chlamydia psittaci")} will return \code{"Chlamydophila psittaci"} (with a warning about the renaming)}
|
||||||
@ -44,14 +45,14 @@
|
|||||||
#' @return \itemize{
|
#' @return \itemize{
|
||||||
#' \item{An \code{integer} in case of \code{mo_year}}
|
#' \item{An \code{integer} in case of \code{mo_year}}
|
||||||
#' \item{A \code{list} in case of \code{mo_taxonomy}}
|
#' \item{A \code{list} in case of \code{mo_taxonomy}}
|
||||||
|
#' \item{A named \code{character} in case of \code{mo_url}}
|
||||||
#' \item{A \code{character} in all other cases}
|
#' \item{A \code{character} in all other cases}
|
||||||
#' }
|
#' }
|
||||||
#' @export
|
#' @export
|
||||||
#' @seealso \code{\link{microorganisms}}
|
#' @seealso \code{\link{microorganisms}}
|
||||||
#' @inheritSection AMR Read more on our website!
|
#' @inheritSection AMR Read more on our website!
|
||||||
#' @examples
|
#' @examples
|
||||||
#' # All properties of Escherichia coli
|
#' ## taxonomic tree
|
||||||
#' ## taxonomic properties
|
|
||||||
#' mo_kingdom("E. coli") # "Bacteria"
|
#' mo_kingdom("E. coli") # "Bacteria"
|
||||||
#' mo_phylum("E. coli") # "Proteobacteria"
|
#' mo_phylum("E. coli") # "Proteobacteria"
|
||||||
#' mo_class("E. coli") # "Gammaproteobacteria"
|
#' mo_class("E. coli") # "Gammaproteobacteria"
|
||||||
@ -68,10 +69,12 @@
|
|||||||
#' ## other properties
|
#' ## other properties
|
||||||
#' mo_gramstain("E. coli") # "Gram negative"
|
#' mo_gramstain("E. coli") # "Gram negative"
|
||||||
#' mo_type("E. coli") # "Bacteria" (equal to kingdom)
|
#' mo_type("E. coli") # "Bacteria" (equal to kingdom)
|
||||||
|
#' mo_rank("E. coli") # "species"
|
||||||
|
#' mo_url("E. coli") # get the direct url to the Catalogue of Life
|
||||||
#'
|
#'
|
||||||
#' ## scientific reference
|
#' ## scientific reference
|
||||||
#' mo_ref("E. coli") # "Castellani and Chalmers, 1919"
|
#' mo_ref("E. coli") # "Castellani et al., 1919"
|
||||||
#' mo_authors("E. coli") # "Castellani and Chalmers"
|
#' mo_authors("E. coli") # "Castellani et al."
|
||||||
#' mo_year("E. coli") # 1919
|
#' mo_year("E. coli") # 1919
|
||||||
#'
|
#'
|
||||||
#'
|
#'
|
||||||
@ -107,7 +110,7 @@
|
|||||||
#' mo_shortname("S. pyo", Lancefield = TRUE) # "GAS" ('Group A streptococci')
|
#' mo_shortname("S. pyo", Lancefield = TRUE) # "GAS" ('Group A streptococci')
|
||||||
#'
|
#'
|
||||||
#'
|
#'
|
||||||
#' # Language support for German, Dutch, Spanish, Portuguese, Italian and French
|
#' # language support for German, Dutch, Spanish, Portuguese, Italian and French
|
||||||
#' mo_gramstain("E. coli", language = "de") # "Gramnegativ"
|
#' mo_gramstain("E. coli", language = "de") # "Gramnegativ"
|
||||||
#' mo_gramstain("E. coli", language = "nl") # "Gram-negatief"
|
#' mo_gramstain("E. coli", language = "nl") # "Gram-negatief"
|
||||||
#' mo_gramstain("E. coli", language = "es") # "Gram negativo"
|
#' mo_gramstain("E. coli", language = "es") # "Gram negativo"
|
||||||
@ -125,7 +128,7 @@
|
|||||||
#' language = "nl") # "Streptococcus groep A"
|
#' language = "nl") # "Streptococcus groep A"
|
||||||
#'
|
#'
|
||||||
#'
|
#'
|
||||||
#' # Get a list with the complete taxonomy (kingdom to subspecies)
|
#' # get a list with the complete taxonomy (kingdom to subspecies)
|
||||||
#' mo_taxonomy("E. coli")
|
#' mo_taxonomy("E. coli")
|
||||||
mo_fullname <- function(x, language = get_locale(), ...) {
|
mo_fullname <- function(x, language = get_locale(), ...) {
|
||||||
x <- mo_validate(x = x, property = "fullname", ...)
|
x <- mo_validate(x = x, property = "fullname", ...)
|
||||||
@ -259,9 +262,9 @@ mo_ref <- function(x, ...) {
|
|||||||
#' @export
|
#' @export
|
||||||
mo_authors <- function(x, ...) {
|
mo_authors <- function(x, ...) {
|
||||||
x <- mo_validate(x = x, property = "ref", ...)
|
x <- mo_validate(x = x, property = "ref", ...)
|
||||||
# remove last 4 digits and presumably the comma and space that preceed them
|
# remove last 4 digits and presumably the comma and space that preceeds them
|
||||||
x[!is.na(x)] <- gsub(",? ?[0-9]{4}", "", x[!is.na(x)])
|
x[!is.na(x)] <- gsub(",? ?[0-9]{4}", "", x[!is.na(x)])
|
||||||
x
|
suppressWarnings(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
@ -270,7 +273,13 @@ mo_year <- function(x, ...) {
|
|||||||
x <- mo_validate(x = x, property = "ref", ...)
|
x <- mo_validate(x = x, property = "ref", ...)
|
||||||
# get last 4 digits
|
# get last 4 digits
|
||||||
x[!is.na(x)] <- gsub(".*([0-9]{4})$", "\\1", x[!is.na(x)])
|
x[!is.na(x)] <- gsub(".*([0-9]{4})$", "\\1", x[!is.na(x)])
|
||||||
as.integer(x)
|
suppressWarnings(as.integer(x))
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname mo_property
|
||||||
|
#' @export
|
||||||
|
mo_rank <- function(x, ...) {
|
||||||
|
mo_validate(x = x, property = "rank", ...)
|
||||||
}
|
}
|
||||||
|
|
||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
@ -288,10 +297,18 @@ mo_taxonomy <- function(x, ...) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
|
#' @importFrom utils browseURL
|
||||||
#' @export
|
#' @export
|
||||||
mo_url <- function(x, ...) {
|
mo_url <- function(x, open = FALSE, ...) {
|
||||||
u <- mo_validate(x = x, property = "species_id", ...)
|
u <- mo_validate(x = x, property = "species_id", ...)
|
||||||
u[u != ""] <- paste0(catalogue_of_life$url, "/details/species/id/", u)
|
u[u != ""] <- paste0(catalogue_of_life$url, "/details/species/id/", u)
|
||||||
|
names(u) <- mo_fullname(x = x, ... = ...)
|
||||||
|
if (open == TRUE) {
|
||||||
|
if (length(u) > 1) {
|
||||||
|
warning("only the first URL will be opened, as `browseURL` only suports one string.")
|
||||||
|
}
|
||||||
|
browseURL(u[1L])
|
||||||
|
}
|
||||||
u
|
u
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@
|
|||||||
<h1>How to conduct AMR analysis</h1>
|
<h1>How to conduct AMR analysis</h1>
|
||||||
<h4 class="author">Matthijs S. Berends</h4>
|
<h4 class="author">Matthijs S. Berends</h4>
|
||||||
|
|
||||||
<h4 class="date">21 February 2019</h4>
|
<h4 class="date">22 February 2019</h4>
|
||||||
|
|
||||||
|
|
||||||
<div class="hidden name"><code>AMR.Rmd</code></div>
|
<div class="hidden name"><code>AMR.Rmd</code></div>
|
||||||
@ -201,7 +201,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p><strong>Note:</strong> values on this page will change with every website update since they are based on randomly created values and the page was written in <a href="https://rmarkdown.rstudio.com/">RMarkdown</a>. However, the methodology remains unchanged. This page was generated on 21 February 2019.</p>
|
<p><strong>Note:</strong> values on this page will change with every website update since they are based on randomly created values and the page was written in <a href="https://rmarkdown.rstudio.com/">RMarkdown</a>. However, the methodology remains unchanged. This page was generated on 22 February 2019.</p>
|
||||||
<div id="introduction" class="section level1">
|
<div id="introduction" class="section level1">
|
||||||
<h1 class="hasAnchor">
|
<h1 class="hasAnchor">
|
||||||
<a href="#introduction" class="anchor"></a>Introduction</h1>
|
<a href="#introduction" class="anchor"></a>Introduction</h1>
|
||||||
@ -217,21 +217,21 @@
|
|||||||
</tr></thead>
|
</tr></thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="center">2019-02-21</td>
|
<td align="center">2019-02-22</td>
|
||||||
<td align="center">abcd</td>
|
<td align="center">abcd</td>
|
||||||
<td align="center">Escherichia coli</td>
|
<td align="center">Escherichia coli</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td align="center">2019-02-21</td>
|
<td align="center">2019-02-22</td>
|
||||||
<td align="center">abcd</td>
|
<td align="center">abcd</td>
|
||||||
<td align="center">Escherichia coli</td>
|
<td align="center">Escherichia coli</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">R</td>
|
<td align="center">R</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="center">2019-02-21</td>
|
<td align="center">2019-02-22</td>
|
||||||
<td align="center">efgh</td>
|
<td align="center">efgh</td>
|
||||||
<td align="center">Escherichia coli</td>
|
<td align="center">Escherichia coli</td>
|
||||||
<td align="center">R</td>
|
<td align="center">R</td>
|
||||||
@ -327,65 +327,65 @@
|
|||||||
</tr></thead>
|
</tr></thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="center">2010-03-19</td>
|
<td align="center">2014-11-25</td>
|
||||||
<td align="center">Z1</td>
|
<td align="center">O2</td>
|
||||||
<td align="center">Hospital A</td>
|
<td align="center">Hospital D</td>
|
||||||
<td align="center">Escherichia coli</td>
|
<td align="center">Escherichia coli</td>
|
||||||
<td align="center">R</td>
|
<td align="center">R</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">R</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">F</td>
|
<td align="center">F</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td align="center">2012-12-24</td>
|
<td align="center">2016-11-18</td>
|
||||||
<td align="center">Z8</td>
|
<td align="center">I10</td>
|
||||||
<td align="center">Hospital A</td>
|
<td align="center">Hospital B</td>
|
||||||
<td align="center">Klebsiella pneumoniae</td>
|
<td align="center">Escherichia coli</td>
|
||||||
<td align="center">R</td>
|
<td align="center">R</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
|
<td align="center">R</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">M</td>
|
||||||
<td align="center">F</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="center">2013-12-12</td>
|
<td align="center">2014-08-15</td>
|
||||||
<td align="center">Z1</td>
|
<td align="center">G9</td>
|
||||||
<td align="center">Hospital A</td>
|
<td align="center">Hospital D</td>
|
||||||
<td align="center">Staphylococcus aureus</td>
|
<td align="center">Staphylococcus aureus</td>
|
||||||
<td align="center">R</td>
|
<td align="center">R</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
|
<td align="center">M</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td align="center">2017-07-26</td>
|
||||||
|
<td align="center">S2</td>
|
||||||
|
<td align="center">Hospital B</td>
|
||||||
|
<td align="center">Staphylococcus aureus</td>
|
||||||
|
<td align="center">S</td>
|
||||||
|
<td align="center">R</td>
|
||||||
|
<td align="center">S</td>
|
||||||
|
<td align="center">S</td>
|
||||||
<td align="center">F</td>
|
<td align="center">F</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
|
||||||
<td align="center">2014-08-13</td>
|
|
||||||
<td align="center">J4</td>
|
|
||||||
<td align="center">Hospital A</td>
|
|
||||||
<td align="center">Escherichia coli</td>
|
|
||||||
<td align="center">S</td>
|
|
||||||
<td align="center">S</td>
|
|
||||||
<td align="center">S</td>
|
|
||||||
<td align="center">S</td>
|
|
||||||
<td align="center">M</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="center">2012-04-09</td>
|
<td align="center">2017-01-25</td>
|
||||||
<td align="center">F5</td>
|
<td align="center">H5</td>
|
||||||
<td align="center">Hospital A</td>
|
<td align="center">Hospital C</td>
|
||||||
<td align="center">Escherichia coli</td>
|
<td align="center">Escherichia coli</td>
|
||||||
<td align="center">S</td>
|
<td align="center">R</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">M</td>
|
<td align="center">M</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td align="center">2010-08-11</td>
|
<td align="center">2017-03-12</td>
|
||||||
<td align="center">N1</td>
|
<td align="center">B9</td>
|
||||||
<td align="center">Hospital A</td>
|
<td align="center">Hospital C</td>
|
||||||
<td align="center">Klebsiella pneumoniae</td>
|
<td align="center">Escherichia coli</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
@ -411,8 +411,8 @@
|
|||||||
#>
|
#>
|
||||||
#> Item Count Percent Cum. Count Cum. Percent
|
#> Item Count Percent Cum. Count Cum. Percent
|
||||||
#> --- ----- ------- -------- ----------- -------------
|
#> --- ----- ------- -------- ----------- -------------
|
||||||
#> 1 M 10,436 52.2% 10,436 52.2%
|
#> 1 M 10,377 51.9% 10,377 51.9%
|
||||||
#> 2 F 9,564 47.8% 20,000 100.0%</code></pre>
|
#> 2 F 9,623 48.1% 20,000 100.0%</code></pre>
|
||||||
<p>So, we can draw at least two conclusions immediately. From a data scientist perspective, the data looks clean: only values <code>M</code> and <code>F</code>. From a researcher perspective: there are slightly more men. Nothing we didn’t already know.</p>
|
<p>So, we can draw at least two conclusions immediately. From a data scientist perspective, the data looks clean: only values <code>M</code> and <code>F</code>. From a researcher perspective: there are slightly more men. Nothing we didn’t already know.</p>
|
||||||
<p>The data is already quite clean, but we still need to transform some variables. The <code>bacteria</code> column now consists of text, and we want to add more variables based on microbial IDs later on. So, we will transform this column to valid IDs. The <code><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate()</a></code> function of the <code>dplyr</code> package makes this really easy:</p>
|
<p>The data is already quite clean, but we still need to transform some variables. The <code>bacteria</code> column now consists of text, and we want to add more variables based on microbial IDs later on. So, we will transform this column to valid IDs. The <code><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate()</a></code> function of the <code>dplyr</code> package makes this really easy:</p>
|
||||||
<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb12-1" title="1">data <-<span class="st"> </span>data <span class="op">%>%</span></a>
|
<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb12-1" title="1">data <-<span class="st"> </span>data <span class="op">%>%</span></a>
|
||||||
@ -443,10 +443,10 @@
|
|||||||
<a class="sourceLine" id="cb14-19" title="19"><span class="co">#> Kingella kingae (no changes)</span></a>
|
<a class="sourceLine" id="cb14-19" title="19"><span class="co">#> Kingella kingae (no changes)</span></a>
|
||||||
<a class="sourceLine" id="cb14-20" title="20"><span class="co">#> </span></a>
|
<a class="sourceLine" id="cb14-20" title="20"><span class="co">#> </span></a>
|
||||||
<a class="sourceLine" id="cb14-21" title="21"><span class="co">#> EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes (v3.1, 2016)</span></a>
|
<a class="sourceLine" id="cb14-21" title="21"><span class="co">#> EUCAST Expert Rules, Intrinsic Resistance and Exceptional Phenotypes (v3.1, 2016)</span></a>
|
||||||
<a class="sourceLine" id="cb14-22" title="22"><span class="co">#> Table 1: Intrinsic resistance in Enterobacteriaceae (1333 changes)</span></a>
|
<a class="sourceLine" id="cb14-22" title="22"><span class="co">#> Table 1: Intrinsic resistance in Enterobacteriaceae (1284 changes)</span></a>
|
||||||
<a class="sourceLine" id="cb14-23" title="23"><span class="co">#> Table 2: Intrinsic resistance in non-fermentative Gram-negative bacteria (no changes)</span></a>
|
<a class="sourceLine" id="cb14-23" title="23"><span class="co">#> Table 2: Intrinsic resistance in non-fermentative Gram-negative bacteria (no changes)</span></a>
|
||||||
<a class="sourceLine" id="cb14-24" title="24"><span class="co">#> Table 3: Intrinsic resistance in other Gram-negative bacteria (no changes)</span></a>
|
<a class="sourceLine" id="cb14-24" title="24"><span class="co">#> Table 3: Intrinsic resistance in other Gram-negative bacteria (no changes)</span></a>
|
||||||
<a class="sourceLine" id="cb14-25" title="25"><span class="co">#> Table 4: Intrinsic resistance in Gram-positive bacteria (2733 changes)</span></a>
|
<a class="sourceLine" id="cb14-25" title="25"><span class="co">#> Table 4: Intrinsic resistance in Gram-positive bacteria (2790 changes)</span></a>
|
||||||
<a class="sourceLine" id="cb14-26" title="26"><span class="co">#> Table 8: Interpretive rules for B-lactam agents and Gram-positive cocci (no changes)</span></a>
|
<a class="sourceLine" id="cb14-26" title="26"><span class="co">#> Table 8: Interpretive rules for B-lactam agents and Gram-positive cocci (no changes)</span></a>
|
||||||
<a class="sourceLine" id="cb14-27" title="27"><span class="co">#> Table 9: Interpretive rules for B-lactam agents and Gram-negative rods (no changes)</span></a>
|
<a class="sourceLine" id="cb14-27" title="27"><span class="co">#> Table 9: Interpretive rules for B-lactam agents and Gram-negative rods (no changes)</span></a>
|
||||||
<a class="sourceLine" id="cb14-28" title="28"><span class="co">#> Table 10: Interpretive rules for B-lactam agents and other Gram-negative bacteria (no changes)</span></a>
|
<a class="sourceLine" id="cb14-28" title="28"><span class="co">#> Table 10: Interpretive rules for B-lactam agents and other Gram-negative bacteria (no changes)</span></a>
|
||||||
@ -462,9 +462,9 @@
|
|||||||
<a class="sourceLine" id="cb14-38" title="38"><span class="co">#> Non-EUCAST: piperacillin/tazobactam = S where piperacillin = S (no changes)</span></a>
|
<a class="sourceLine" id="cb14-38" title="38"><span class="co">#> Non-EUCAST: piperacillin/tazobactam = S where piperacillin = S (no changes)</span></a>
|
||||||
<a class="sourceLine" id="cb14-39" title="39"><span class="co">#> Non-EUCAST: trimethoprim/sulfa = S where trimethoprim = S (no changes)</span></a>
|
<a class="sourceLine" id="cb14-39" title="39"><span class="co">#> Non-EUCAST: trimethoprim/sulfa = S where trimethoprim = S (no changes)</span></a>
|
||||||
<a class="sourceLine" id="cb14-40" title="40"><span class="co">#> </span></a>
|
<a class="sourceLine" id="cb14-40" title="40"><span class="co">#> </span></a>
|
||||||
<a class="sourceLine" id="cb14-41" title="41"><span class="co">#> => EUCAST rules affected 7,452 out of 20,000 rows</span></a>
|
<a class="sourceLine" id="cb14-41" title="41"><span class="co">#> => EUCAST rules affected 7,321 out of 20,000 rows</span></a>
|
||||||
<a class="sourceLine" id="cb14-42" title="42"><span class="co">#> -> added 0 test results</span></a>
|
<a class="sourceLine" id="cb14-42" title="42"><span class="co">#> -> added 0 test results</span></a>
|
||||||
<a class="sourceLine" id="cb14-43" title="43"><span class="co">#> -> changed 4,066 test results (0 to S; 0 to I; 4,066 to R)</span></a></code></pre></div>
|
<a class="sourceLine" id="cb14-43" title="43"><span class="co">#> -> changed 4,074 test results (0 to S; 0 to I; 4,074 to R)</span></a></code></pre></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="adding-new-variables" class="section level1">
|
<div id="adding-new-variables" class="section level1">
|
||||||
<h1 class="hasAnchor">
|
<h1 class="hasAnchor">
|
||||||
@ -489,8 +489,8 @@
|
|||||||
<a class="sourceLine" id="cb16-3" title="3"><span class="co">#> </span><span class="al">NOTE</span><span class="co">: Using column `bacteria` as input for `col_mo`.</span></a>
|
<a class="sourceLine" id="cb16-3" title="3"><span class="co">#> </span><span class="al">NOTE</span><span class="co">: Using column `bacteria` as input for `col_mo`.</span></a>
|
||||||
<a class="sourceLine" id="cb16-4" title="4"><span class="co">#> </span><span class="al">NOTE</span><span class="co">: Using column `date` as input for `col_date`.</span></a>
|
<a class="sourceLine" id="cb16-4" title="4"><span class="co">#> </span><span class="al">NOTE</span><span class="co">: Using column `date` as input for `col_date`.</span></a>
|
||||||
<a class="sourceLine" id="cb16-5" title="5"><span class="co">#> </span><span class="al">NOTE</span><span class="co">: Using column `patient_id` as input for `col_patient_id`.</span></a>
|
<a class="sourceLine" id="cb16-5" title="5"><span class="co">#> </span><span class="al">NOTE</span><span class="co">: Using column `patient_id` as input for `col_patient_id`.</span></a>
|
||||||
<a class="sourceLine" id="cb16-6" title="6"><span class="co">#> => Found 5,692 first isolates (28.5% of total)</span></a></code></pre></div>
|
<a class="sourceLine" id="cb16-6" title="6"><span class="co">#> => Found 5,680 first isolates (28.4% of total)</span></a></code></pre></div>
|
||||||
<p>So only 28.5% is suitable for resistance analysis! We can now filter on it with the <code><a href="https://dplyr.tidyverse.org/reference/filter.html">filter()</a></code> function, also from the <code>dplyr</code> package:</p>
|
<p>So only 28.4% is suitable for resistance analysis! We can now filter on it with the <code><a href="https://dplyr.tidyverse.org/reference/filter.html">filter()</a></code> function, also from the <code>dplyr</code> package:</p>
|
||||||
<div class="sourceCode" id="cb17"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb17-1" title="1">data_1st <-<span class="st"> </span>data <span class="op">%>%</span><span class="st"> </span></a>
|
<div class="sourceCode" id="cb17"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb17-1" title="1">data_1st <-<span class="st"> </span>data <span class="op">%>%</span><span class="st"> </span></a>
|
||||||
<a class="sourceLine" id="cb17-2" title="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(first <span class="op">==</span><span class="st"> </span><span class="ot">TRUE</span>)</a></code></pre></div>
|
<a class="sourceLine" id="cb17-2" title="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(first <span class="op">==</span><span class="st"> </span><span class="ot">TRUE</span>)</a></code></pre></div>
|
||||||
<p>For future use, the above two syntaxes can be shortened with the <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code> function:</p>
|
<p>For future use, the above two syntaxes can be shortened with the <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code> function:</p>
|
||||||
@ -516,32 +516,32 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="center">1</td>
|
<td align="center">1</td>
|
||||||
<td align="center">2010-01-14</td>
|
<td align="center">2010-01-10</td>
|
||||||
<td align="center">O6</td>
|
<td align="center">X9</td>
|
||||||
<td align="center">B_ESCHR_COL</td>
|
<td align="center">B_ESCHR_COL</td>
|
||||||
<td align="center">R</td>
|
<td align="center">R</td>
|
||||||
<td align="center">I</td>
|
<td align="center">S</td>
|
||||||
<td align="center">R</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">TRUE</td>
|
<td align="center">TRUE</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td align="center">2</td>
|
<td align="center">2</td>
|
||||||
<td align="center">2010-02-22</td>
|
<td align="center">2010-04-18</td>
|
||||||
<td align="center">O6</td>
|
<td align="center">X9</td>
|
||||||
<td align="center">B_ESCHR_COL</td>
|
<td align="center">B_ESCHR_COL</td>
|
||||||
<td align="center">S</td>
|
<td align="center">R</td>
|
||||||
<td align="center">S</td>
|
<td align="center">I</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">FALSE</td>
|
<td align="center">FALSE</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="center">3</td>
|
<td align="center">3</td>
|
||||||
<td align="center">2010-04-01</td>
|
<td align="center">2010-07-02</td>
|
||||||
<td align="center">O6</td>
|
<td align="center">X9</td>
|
||||||
<td align="center">B_ESCHR_COL</td>
|
<td align="center">B_ESCHR_COL</td>
|
||||||
<td align="center">S</td>
|
<td align="center">R</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
@ -549,21 +549,21 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td align="center">4</td>
|
<td align="center">4</td>
|
||||||
<td align="center">2010-04-25</td>
|
<td align="center">2010-09-21</td>
|
||||||
<td align="center">O6</td>
|
<td align="center">X9</td>
|
||||||
<td align="center">B_ESCHR_COL</td>
|
<td align="center">B_ESCHR_COL</td>
|
||||||
|
<td align="center">R</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">R</td>
|
||||||
<td align="center">S</td>
|
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">FALSE</td>
|
<td align="center">FALSE</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="center">5</td>
|
<td align="center">5</td>
|
||||||
<td align="center">2010-05-09</td>
|
<td align="center">2010-09-22</td>
|
||||||
<td align="center">O6</td>
|
<td align="center">X9</td>
|
||||||
<td align="center">B_ESCHR_COL</td>
|
<td align="center">B_ESCHR_COL</td>
|
||||||
<td align="center">S</td>
|
<td align="center">R</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
@ -571,21 +571,21 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td align="center">6</td>
|
<td align="center">6</td>
|
||||||
<td align="center">2010-05-29</td>
|
<td align="center">2010-10-06</td>
|
||||||
<td align="center">O6</td>
|
<td align="center">X9</td>
|
||||||
<td align="center">B_ESCHR_COL</td>
|
<td align="center">B_ESCHR_COL</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">I</td>
|
<td align="center">S</td>
|
||||||
<td align="center">R</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">FALSE</td>
|
<td align="center">FALSE</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="center">7</td>
|
<td align="center">7</td>
|
||||||
<td align="center">2010-06-27</td>
|
<td align="center">2010-10-14</td>
|
||||||
<td align="center">O6</td>
|
<td align="center">X9</td>
|
||||||
<td align="center">B_ESCHR_COL</td>
|
<td align="center">B_ESCHR_COL</td>
|
||||||
<td align="center">S</td>
|
<td align="center">R</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
@ -593,19 +593,19 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td align="center">8</td>
|
<td align="center">8</td>
|
||||||
<td align="center">2010-06-27</td>
|
<td align="center">2011-01-09</td>
|
||||||
<td align="center">O6</td>
|
<td align="center">X9</td>
|
||||||
<td align="center">B_ESCHR_COL</td>
|
<td align="center">B_ESCHR_COL</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
|
<td align="center">I</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">R</td>
|
||||||
<td align="center">S</td>
|
|
||||||
<td align="center">FALSE</td>
|
<td align="center">FALSE</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="center">9</td>
|
<td align="center">9</td>
|
||||||
<td align="center">2011-02-01</td>
|
<td align="center">2011-03-31</td>
|
||||||
<td align="center">O6</td>
|
<td align="center">X9</td>
|
||||||
<td align="center">B_ESCHR_COL</td>
|
<td align="center">B_ESCHR_COL</td>
|
||||||
<td align="center">R</td>
|
<td align="center">R</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
@ -615,12 +615,12 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td align="center">10</td>
|
<td align="center">10</td>
|
||||||
<td align="center">2011-03-20</td>
|
<td align="center">2011-03-31</td>
|
||||||
<td align="center">O6</td>
|
<td align="center">X9</td>
|
||||||
<td align="center">B_ESCHR_COL</td>
|
<td align="center">B_ESCHR_COL</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">R</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">FALSE</td>
|
<td align="center">FALSE</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -637,7 +637,7 @@
|
|||||||
<a class="sourceLine" id="cb19-7" title="7"><span class="co">#> </span><span class="al">NOTE</span><span class="co">: Using column `patient_id` as input for `col_patient_id`.</span></a>
|
<a class="sourceLine" id="cb19-7" title="7"><span class="co">#> </span><span class="al">NOTE</span><span class="co">: Using column `patient_id` as input for `col_patient_id`.</span></a>
|
||||||
<a class="sourceLine" id="cb19-8" title="8"><span class="co">#> </span><span class="al">NOTE</span><span class="co">: Using column `keyab` as input for `col_keyantibiotics`. Use col_keyantibiotics = FALSE to prevent this.</span></a>
|
<a class="sourceLine" id="cb19-8" title="8"><span class="co">#> </span><span class="al">NOTE</span><span class="co">: Using column `keyab` as input for `col_keyantibiotics`. Use col_keyantibiotics = FALSE to prevent this.</span></a>
|
||||||
<a class="sourceLine" id="cb19-9" title="9"><span class="co">#> [Criterion] Inclusion based on key antibiotics, ignoring I.</span></a>
|
<a class="sourceLine" id="cb19-9" title="9"><span class="co">#> [Criterion] Inclusion based on key antibiotics, ignoring I.</span></a>
|
||||||
<a class="sourceLine" id="cb19-10" title="10"><span class="co">#> => Found 15,851 first weighted isolates (79.3% of total)</span></a></code></pre></div>
|
<a class="sourceLine" id="cb19-10" title="10"><span class="co">#> => Found 15,854 first weighted isolates (79.3% of total)</span></a></code></pre></div>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead><tr class="header">
|
<thead><tr class="header">
|
||||||
<th align="center">isolate</th>
|
<th align="center">isolate</th>
|
||||||
@ -654,34 +654,34 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="center">1</td>
|
<td align="center">1</td>
|
||||||
<td align="center">2010-01-14</td>
|
<td align="center">2010-01-10</td>
|
||||||
<td align="center">O6</td>
|
<td align="center">X9</td>
|
||||||
<td align="center">B_ESCHR_COL</td>
|
<td align="center">B_ESCHR_COL</td>
|
||||||
<td align="center">R</td>
|
<td align="center">R</td>
|
||||||
<td align="center">I</td>
|
<td align="center">S</td>
|
||||||
<td align="center">R</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">TRUE</td>
|
<td align="center">TRUE</td>
|
||||||
<td align="center">TRUE</td>
|
<td align="center">TRUE</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td align="center">2</td>
|
<td align="center">2</td>
|
||||||
<td align="center">2010-02-22</td>
|
<td align="center">2010-04-18</td>
|
||||||
<td align="center">O6</td>
|
<td align="center">X9</td>
|
||||||
<td align="center">B_ESCHR_COL</td>
|
<td align="center">B_ESCHR_COL</td>
|
||||||
<td align="center">S</td>
|
<td align="center">R</td>
|
||||||
<td align="center">S</td>
|
<td align="center">I</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">FALSE</td>
|
<td align="center">FALSE</td>
|
||||||
<td align="center">TRUE</td>
|
<td align="center">FALSE</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="center">3</td>
|
<td align="center">3</td>
|
||||||
<td align="center">2010-04-01</td>
|
<td align="center">2010-07-02</td>
|
||||||
<td align="center">O6</td>
|
<td align="center">X9</td>
|
||||||
<td align="center">B_ESCHR_COL</td>
|
<td align="center">B_ESCHR_COL</td>
|
||||||
<td align="center">S</td>
|
<td align="center">R</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
@ -690,44 +690,32 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td align="center">4</td>
|
<td align="center">4</td>
|
||||||
<td align="center">2010-04-25</td>
|
<td align="center">2010-09-21</td>
|
||||||
<td align="center">O6</td>
|
<td align="center">X9</td>
|
||||||
<td align="center">B_ESCHR_COL</td>
|
<td align="center">B_ESCHR_COL</td>
|
||||||
|
<td align="center">R</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
|
||||||
<td align="center">S</td>
|
|
||||||
<td align="center">S</td>
|
|
||||||
<td align="center">FALSE</td>
|
|
||||||
<td align="center">FALSE</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="odd">
|
|
||||||
<td align="center">5</td>
|
|
||||||
<td align="center">2010-05-09</td>
|
|
||||||
<td align="center">O6</td>
|
|
||||||
<td align="center">B_ESCHR_COL</td>
|
|
||||||
<td align="center">S</td>
|
|
||||||
<td align="center">S</td>
|
|
||||||
<td align="center">S</td>
|
|
||||||
<td align="center">S</td>
|
|
||||||
<td align="center">FALSE</td>
|
|
||||||
<td align="center">FALSE</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="even">
|
|
||||||
<td align="center">6</td>
|
|
||||||
<td align="center">2010-05-29</td>
|
|
||||||
<td align="center">O6</td>
|
|
||||||
<td align="center">B_ESCHR_COL</td>
|
|
||||||
<td align="center">S</td>
|
|
||||||
<td align="center">I</td>
|
|
||||||
<td align="center">R</td>
|
<td align="center">R</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">FALSE</td>
|
<td align="center">FALSE</td>
|
||||||
<td align="center">TRUE</td>
|
<td align="center">TRUE</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="center">7</td>
|
<td align="center">5</td>
|
||||||
<td align="center">2010-06-27</td>
|
<td align="center">2010-09-22</td>
|
||||||
<td align="center">O6</td>
|
<td align="center">X9</td>
|
||||||
|
<td align="center">B_ESCHR_COL</td>
|
||||||
|
<td align="center">R</td>
|
||||||
|
<td align="center">S</td>
|
||||||
|
<td align="center">S</td>
|
||||||
|
<td align="center">S</td>
|
||||||
|
<td align="center">FALSE</td>
|
||||||
|
<td align="center">TRUE</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td align="center">6</td>
|
||||||
|
<td align="center">2010-10-06</td>
|
||||||
|
<td align="center">X9</td>
|
||||||
<td align="center">B_ESCHR_COL</td>
|
<td align="center">B_ESCHR_COL</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
@ -736,22 +724,34 @@
|
|||||||
<td align="center">FALSE</td>
|
<td align="center">FALSE</td>
|
||||||
<td align="center">TRUE</td>
|
<td align="center">TRUE</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr class="odd">
|
||||||
|
<td align="center">7</td>
|
||||||
|
<td align="center">2010-10-14</td>
|
||||||
|
<td align="center">X9</td>
|
||||||
|
<td align="center">B_ESCHR_COL</td>
|
||||||
|
<td align="center">R</td>
|
||||||
|
<td align="center">S</td>
|
||||||
|
<td align="center">S</td>
|
||||||
|
<td align="center">S</td>
|
||||||
|
<td align="center">FALSE</td>
|
||||||
|
<td align="center">TRUE</td>
|
||||||
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td align="center">8</td>
|
<td align="center">8</td>
|
||||||
<td align="center">2010-06-27</td>
|
<td align="center">2011-01-09</td>
|
||||||
<td align="center">O6</td>
|
<td align="center">X9</td>
|
||||||
<td align="center">B_ESCHR_COL</td>
|
<td align="center">B_ESCHR_COL</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
|
<td align="center">I</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">R</td>
|
||||||
<td align="center">S</td>
|
|
||||||
<td align="center">FALSE</td>
|
|
||||||
<td align="center">FALSE</td>
|
<td align="center">FALSE</td>
|
||||||
|
<td align="center">TRUE</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="center">9</td>
|
<td align="center">9</td>
|
||||||
<td align="center">2011-02-01</td>
|
<td align="center">2011-03-31</td>
|
||||||
<td align="center">O6</td>
|
<td align="center">X9</td>
|
||||||
<td align="center">B_ESCHR_COL</td>
|
<td align="center">B_ESCHR_COL</td>
|
||||||
<td align="center">R</td>
|
<td align="center">R</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
@ -762,23 +762,23 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td align="center">10</td>
|
<td align="center">10</td>
|
||||||
<td align="center">2011-03-20</td>
|
<td align="center">2011-03-31</td>
|
||||||
<td align="center">O6</td>
|
<td align="center">X9</td>
|
||||||
<td align="center">B_ESCHR_COL</td>
|
<td align="center">B_ESCHR_COL</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">R</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">FALSE</td>
|
<td align="center">FALSE</td>
|
||||||
<td align="center">TRUE</td>
|
<td align="center">TRUE</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<p>Instead of 2, now 6 isolates are flagged. In total, 79.3% of all isolates are marked ‘first weighted’ - 50.8% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.</p>
|
<p>Instead of 2, now 8 isolates are flagged. In total, 79.3% of all isolates are marked ‘first weighted’ - 50.9% more than when using the CLSI guideline. In real life, this novel algorithm will yield 5-10% more isolates than the classic CLSI guideline.</p>
|
||||||
<p>As with <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code>, there’s a shortcut for this new algorithm too:</p>
|
<p>As with <code><a href="../reference/first_isolate.html">filter_first_isolate()</a></code>, there’s a shortcut for this new algorithm too:</p>
|
||||||
<div class="sourceCode" id="cb20"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb20-1" title="1">data_1st <-<span class="st"> </span>data <span class="op">%>%</span><span class="st"> </span></a>
|
<div class="sourceCode" id="cb20"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb20-1" title="1">data_1st <-<span class="st"> </span>data <span class="op">%>%</span><span class="st"> </span></a>
|
||||||
<a class="sourceLine" id="cb20-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/first_isolate.html">filter_first_weighted_isolate</a></span>()</a></code></pre></div>
|
<a class="sourceLine" id="cb20-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/first_isolate.html">filter_first_weighted_isolate</a></span>()</a></code></pre></div>
|
||||||
<p>So we end up with 15,851 isolates for analysis.</p>
|
<p>So we end up with 15,854 isolates for analysis.</p>
|
||||||
<p>We can remove unneeded columns:</p>
|
<p>We can remove unneeded columns:</p>
|
||||||
<div class="sourceCode" id="cb21"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb21-1" title="1">data_1st <-<span class="st"> </span>data_1st <span class="op">%>%</span><span class="st"> </span></a>
|
<div class="sourceCode" id="cb21"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb21-1" title="1">data_1st <-<span class="st"> </span>data_1st <span class="op">%>%</span><span class="st"> </span></a>
|
||||||
<a class="sourceLine" id="cb21-2" title="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span>(<span class="op">-</span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(first, keyab))</a></code></pre></div>
|
<a class="sourceLine" id="cb21-2" title="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span>(<span class="op">-</span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(first, keyab))</a></code></pre></div>
|
||||||
@ -803,10 +803,58 @@
|
|||||||
</tr></thead>
|
</tr></thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td>3</td>
|
<td>2</td>
|
||||||
<td align="center">2013-12-12</td>
|
<td align="center">2016-11-18</td>
|
||||||
<td align="center">Z1</td>
|
<td align="center">I10</td>
|
||||||
<td align="center">Hospital A</td>
|
<td align="center">Hospital B</td>
|
||||||
|
<td align="center">B_ESCHR_COL</td>
|
||||||
|
<td align="center">R</td>
|
||||||
|
<td align="center">S</td>
|
||||||
|
<td align="center">R</td>
|
||||||
|
<td align="center">S</td>
|
||||||
|
<td align="center">M</td>
|
||||||
|
<td align="center">Gram negative</td>
|
||||||
|
<td align="center">Escherichia</td>
|
||||||
|
<td align="center">coli</td>
|
||||||
|
<td align="center">TRUE</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td>5</td>
|
||||||
|
<td align="center">2017-01-25</td>
|
||||||
|
<td align="center">H5</td>
|
||||||
|
<td align="center">Hospital C</td>
|
||||||
|
<td align="center">B_ESCHR_COL</td>
|
||||||
|
<td align="center">R</td>
|
||||||
|
<td align="center">S</td>
|
||||||
|
<td align="center">S</td>
|
||||||
|
<td align="center">S</td>
|
||||||
|
<td align="center">M</td>
|
||||||
|
<td align="center">Gram negative</td>
|
||||||
|
<td align="center">Escherichia</td>
|
||||||
|
<td align="center">coli</td>
|
||||||
|
<td align="center">TRUE</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="odd">
|
||||||
|
<td>6</td>
|
||||||
|
<td align="center">2017-03-12</td>
|
||||||
|
<td align="center">B9</td>
|
||||||
|
<td align="center">Hospital C</td>
|
||||||
|
<td align="center">B_ESCHR_COL</td>
|
||||||
|
<td align="center">S</td>
|
||||||
|
<td align="center">S</td>
|
||||||
|
<td align="center">S</td>
|
||||||
|
<td align="center">S</td>
|
||||||
|
<td align="center">M</td>
|
||||||
|
<td align="center">Gram negative</td>
|
||||||
|
<td align="center">Escherichia</td>
|
||||||
|
<td align="center">coli</td>
|
||||||
|
<td align="center">TRUE</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td>7</td>
|
||||||
|
<td align="center">2015-08-12</td>
|
||||||
|
<td align="center">Y4</td>
|
||||||
|
<td align="center">Hospital B</td>
|
||||||
<td align="center">B_STPHY_AUR</td>
|
<td align="center">B_STPHY_AUR</td>
|
||||||
<td align="center">R</td>
|
<td align="center">R</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
@ -818,26 +866,10 @@
|
|||||||
<td align="center">aureus</td>
|
<td align="center">aureus</td>
|
||||||
<td align="center">TRUE</td>
|
<td align="center">TRUE</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
|
||||||
<td>4</td>
|
|
||||||
<td align="center">2014-08-13</td>
|
|
||||||
<td align="center">J4</td>
|
|
||||||
<td align="center">Hospital A</td>
|
|
||||||
<td align="center">B_ESCHR_COL</td>
|
|
||||||
<td align="center">S</td>
|
|
||||||
<td align="center">S</td>
|
|
||||||
<td align="center">S</td>
|
|
||||||
<td align="center">S</td>
|
|
||||||
<td align="center">M</td>
|
|
||||||
<td align="center">Gram negative</td>
|
|
||||||
<td align="center">Escherichia</td>
|
|
||||||
<td align="center">coli</td>
|
|
||||||
<td align="center">TRUE</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td>5</td>
|
<td>9</td>
|
||||||
<td align="center">2012-04-09</td>
|
<td align="center">2016-01-24</td>
|
||||||
<td align="center">F5</td>
|
<td align="center">L10</td>
|
||||||
<td align="center">Hospital A</td>
|
<td align="center">Hospital A</td>
|
||||||
<td align="center">B_ESCHR_COL</td>
|
<td align="center">B_ESCHR_COL</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
@ -851,44 +883,12 @@
|
|||||||
<td align="center">TRUE</td>
|
<td align="center">TRUE</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td>6</td>
|
<td>12</td>
|
||||||
<td align="center">2010-08-11</td>
|
<td align="center">2013-09-11</td>
|
||||||
<td align="center">N1</td>
|
<td align="center">H6</td>
|
||||||
<td align="center">Hospital A</td>
|
<td align="center">Hospital B</td>
|
||||||
<td align="center">B_KLBSL_PNE</td>
|
|
||||||
<td align="center">R</td>
|
|
||||||
<td align="center">S</td>
|
|
||||||
<td align="center">S</td>
|
|
||||||
<td align="center">S</td>
|
|
||||||
<td align="center">M</td>
|
|
||||||
<td align="center">Gram negative</td>
|
|
||||||
<td align="center">Klebsiella</td>
|
|
||||||
<td align="center">pneumoniae</td>
|
|
||||||
<td align="center">TRUE</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="odd">
|
|
||||||
<td>7</td>
|
|
||||||
<td align="center">2010-02-25</td>
|
|
||||||
<td align="center">E9</td>
|
|
||||||
<td align="center">Hospital A</td>
|
|
||||||
<td align="center">B_KLBSL_PNE</td>
|
|
||||||
<td align="center">R</td>
|
|
||||||
<td align="center">R</td>
|
|
||||||
<td align="center">S</td>
|
|
||||||
<td align="center">S</td>
|
|
||||||
<td align="center">M</td>
|
|
||||||
<td align="center">Gram negative</td>
|
|
||||||
<td align="center">Klebsiella</td>
|
|
||||||
<td align="center">pneumoniae</td>
|
|
||||||
<td align="center">TRUE</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="even">
|
|
||||||
<td>8</td>
|
|
||||||
<td align="center">2013-04-09</td>
|
|
||||||
<td align="center">N1</td>
|
|
||||||
<td align="center">Hospital A</td>
|
|
||||||
<td align="center">B_STPHY_AUR</td>
|
<td align="center">B_STPHY_AUR</td>
|
||||||
<td align="center">I</td>
|
<td align="center">S</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
<td align="center">R</td>
|
<td align="center">R</td>
|
||||||
<td align="center">S</td>
|
<td align="center">S</td>
|
||||||
@ -915,9 +915,9 @@
|
|||||||
<div class="sourceCode" id="cb23"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb23-1" title="1"><span class="kw"><a href="../reference/freq.html">freq</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/paste">paste</a></span>(data_1st<span class="op">$</span>genus, data_1st<span class="op">$</span>species))</a></code></pre></div>
|
<div class="sourceCode" id="cb23"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb23-1" title="1"><span class="kw"><a href="../reference/freq.html">freq</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/paste">paste</a></span>(data_1st<span class="op">$</span>genus, data_1st<span class="op">$</span>species))</a></code></pre></div>
|
||||||
<p>Or can be used like the <code>dplyr</code> way, which is easier readable:</p>
|
<p>Or can be used like the <code>dplyr</code> way, which is easier readable:</p>
|
||||||
<div class="sourceCode" id="cb24"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb24-1" title="1">data_1st <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(genus, species)</a></code></pre></div>
|
<div class="sourceCode" id="cb24"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb24-1" title="1">data_1st <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/freq.html">freq</a></span>(genus, species)</a></code></pre></div>
|
||||||
<p><strong>Frequency table of <code>genus</code> and <code>species</code> from a <code>data.frame</code> (15,851 x 13)</strong></p>
|
<p><strong>Frequency table of <code>genus</code> and <code>species</code> from a <code>data.frame</code> (15,854 x 13)</strong></p>
|
||||||
<p>Columns: 2<br>
|
<p>Columns: 2<br>
|
||||||
Length: 15,851 (of which NA: 0 = 0.00%)<br>
|
Length: 15,854 (of which NA: 0 = 0.00%)<br>
|
||||||
Unique: 4</p>
|
Unique: 4</p>
|
||||||
<p>Shortest: 16<br>
|
<p>Shortest: 16<br>
|
||||||
Longest: 24</p>
|
Longest: 24</p>
|
||||||
@ -934,33 +934,33 @@ Longest: 24</p>
|
|||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="left">1</td>
|
<td align="left">1</td>
|
||||||
<td align="left">Escherichia coli</td>
|
<td align="left">Escherichia coli</td>
|
||||||
<td align="right">7,853</td>
|
<td align="right">7,918</td>
|
||||||
<td align="right">49.5%</td>
|
<td align="right">49.9%</td>
|
||||||
<td align="right">7,853</td>
|
<td align="right">7,918</td>
|
||||||
<td align="right">49.5%</td>
|
<td align="right">49.9%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td align="left">2</td>
|
<td align="left">2</td>
|
||||||
<td align="left">Staphylococcus aureus</td>
|
<td align="left">Staphylococcus aureus</td>
|
||||||
<td align="right">3,943</td>
|
<td align="right">3,930</td>
|
||||||
<td align="right">24.9%</td>
|
<td align="right">24.8%</td>
|
||||||
<td align="right">11,796</td>
|
<td align="right">11,848</td>
|
||||||
<td align="right">74.4%</td>
|
<td align="right">74.7%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="left">3</td>
|
<td align="left">3</td>
|
||||||
<td align="left">Streptococcus pneumoniae</td>
|
<td align="left">Streptococcus pneumoniae</td>
|
||||||
<td align="right">2,432</td>
|
<td align="right">2,498</td>
|
||||||
<td align="right">15.3%</td>
|
<td align="right">15.8%</td>
|
||||||
<td align="right">14,228</td>
|
<td align="right">14,346</td>
|
||||||
<td align="right">89.8%</td>
|
<td align="right">90.5%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td align="left">4</td>
|
<td align="left">4</td>
|
||||||
<td align="left">Klebsiella pneumoniae</td>
|
<td align="left">Klebsiella pneumoniae</td>
|
||||||
<td align="right">1,623</td>
|
<td align="right">1,508</td>
|
||||||
<td align="right">10.2%</td>
|
<td align="right">9.5%</td>
|
||||||
<td align="right">15,851</td>
|
<td align="right">15,854</td>
|
||||||
<td align="right">100.0%</td>
|
<td align="right">100.0%</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -971,7 +971,7 @@ Longest: 24</p>
|
|||||||
<a href="#resistance-percentages" class="anchor"></a>Resistance percentages</h2>
|
<a href="#resistance-percentages" class="anchor"></a>Resistance percentages</h2>
|
||||||
<p>The functions <code>portion_R</code>, <code>portion_RI</code>, <code>portion_I</code>, <code>portion_IS</code> and <code>portion_S</code> can be used to determine the portion of a specific antimicrobial outcome. They can be used on their own:</p>
|
<p>The functions <code>portion_R</code>, <code>portion_RI</code>, <code>portion_I</code>, <code>portion_IS</code> and <code>portion_S</code> can be used to determine the portion of a specific antimicrobial outcome. They can be used on their own:</p>
|
||||||
<div class="sourceCode" id="cb25"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb25-1" title="1">data_1st <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/portion.html">portion_IR</a></span>(amox)</a>
|
<div class="sourceCode" id="cb25"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb25-1" title="1">data_1st <span class="op">%>%</span><span class="st"> </span><span class="kw"><a href="../reference/portion.html">portion_IR</a></span>(amox)</a>
|
||||||
<a class="sourceLine" id="cb25-2" title="2"><span class="co">#> [1] 0.4764368</span></a></code></pre></div>
|
<a class="sourceLine" id="cb25-2" title="2"><span class="co">#> [1] 0.4726883</span></a></code></pre></div>
|
||||||
<p>Or can be used in conjuction with <code><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by()</a></code> and <code><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarise()</a></code>, both from the <code>dplyr</code> package:</p>
|
<p>Or can be used in conjuction with <code><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by()</a></code> and <code><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarise()</a></code>, both from the <code>dplyr</code> package:</p>
|
||||||
<div class="sourceCode" id="cb26"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb26-1" title="1">data_1st <span class="op">%>%</span><span class="st"> </span></a>
|
<div class="sourceCode" id="cb26"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb26-1" title="1">data_1st <span class="op">%>%</span><span class="st"> </span></a>
|
||||||
<a class="sourceLine" id="cb26-2" title="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span>(hospital) <span class="op">%>%</span><span class="st"> </span></a>
|
<a class="sourceLine" id="cb26-2" title="2"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span>(hospital) <span class="op">%>%</span><span class="st"> </span></a>
|
||||||
@ -984,19 +984,19 @@ Longest: 24</p>
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="center">Hospital A</td>
|
<td align="center">Hospital A</td>
|
||||||
<td align="center">0.4722165</td>
|
<td align="center">0.4737395</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td align="center">Hospital B</td>
|
<td align="center">Hospital B</td>
|
||||||
<td align="center">0.4788707</td>
|
<td align="center">0.4763709</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="center">Hospital C</td>
|
<td align="center">Hospital C</td>
|
||||||
<td align="center">0.4670535</td>
|
<td align="center">0.4739257</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td align="center">Hospital D</td>
|
<td align="center">Hospital D</td>
|
||||||
<td align="center">0.4859994</td>
|
<td align="center">0.4636854</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -1014,23 +1014,23 @@ Longest: 24</p>
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="center">Hospital A</td>
|
<td align="center">Hospital A</td>
|
||||||
<td align="center">0.4722165</td>
|
<td align="center">0.4737395</td>
|
||||||
<td align="center">4841</td>
|
<td align="center">4760</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td align="center">Hospital B</td>
|
<td align="center">Hospital B</td>
|
||||||
<td align="center">0.4788707</td>
|
<td align="center">0.4763709</td>
|
||||||
<td align="center">5490</td>
|
<td align="center">5544</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="center">Hospital C</td>
|
<td align="center">Hospital C</td>
|
||||||
<td align="center">0.4670535</td>
|
<td align="center">0.4739257</td>
|
||||||
<td align="center">2413</td>
|
<td align="center">2397</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td align="center">Hospital D</td>
|
<td align="center">Hospital D</td>
|
||||||
<td align="center">0.4859994</td>
|
<td align="center">0.4636854</td>
|
||||||
<td align="center">3107</td>
|
<td align="center">3153</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -1050,27 +1050,27 @@ Longest: 24</p>
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="center">Escherichia</td>
|
<td align="center">Escherichia</td>
|
||||||
<td align="center">0.7324589</td>
|
<td align="center">0.7350341</td>
|
||||||
<td align="center">0.9016936</td>
|
<td align="center">0.9051528</td>
|
||||||
<td align="center">0.9759328</td>
|
<td align="center">0.9761303</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td align="center">Klebsiella</td>
|
<td align="center">Klebsiella</td>
|
||||||
<td align="center">0.7221195</td>
|
<td align="center">0.7274536</td>
|
||||||
<td align="center">0.9081947</td>
|
<td align="center">0.9177719</td>
|
||||||
<td align="center">0.9821319</td>
|
<td align="center">0.9781167</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td align="center">Staphylococcus</td>
|
<td align="center">Staphylococcus</td>
|
||||||
<td align="center">0.7420746</td>
|
<td align="center">0.7432570</td>
|
||||||
<td align="center">0.9163074</td>
|
<td align="center">0.9216285</td>
|
||||||
<td align="center">0.9792037</td>
|
<td align="center">0.9788804</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td align="center">Streptococcus</td>
|
<td align="center">Streptococcus</td>
|
||||||
<td align="center">0.7203947</td>
|
<td align="center">0.7273819</td>
|
||||||
<td align="center">0.0000000</td>
|
<td align="center">0.0000000</td>
|
||||||
<td align="center">0.7203947</td>
|
<td align="center">0.7273819</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
@ -192,7 +192,7 @@
|
|||||||
<h1>How to apply EUCAST rules</h1>
|
<h1>How to apply EUCAST rules</h1>
|
||||||
<h4 class="author">Matthijs S. Berends</h4>
|
<h4 class="author">Matthijs S. Berends</h4>
|
||||||
|
|
||||||
<h4 class="date">21 February 2019</h4>
|
<h4 class="date">22 February 2019</h4>
|
||||||
|
|
||||||
|
|
||||||
<div class="hidden name"><code>EUCAST.Rmd</code></div>
|
<div class="hidden name"><code>EUCAST.Rmd</code></div>
|
||||||
|
@ -192,7 +192,7 @@
|
|||||||
<h1>How to use the <em>G</em>-test</h1>
|
<h1>How to use the <em>G</em>-test</h1>
|
||||||
<h4 class="author">Matthijs S. Berends</h4>
|
<h4 class="author">Matthijs S. Berends</h4>
|
||||||
|
|
||||||
<h4 class="date">21 February 2019</h4>
|
<h4 class="date">22 February 2019</h4>
|
||||||
|
|
||||||
|
|
||||||
<div class="hidden name"><code>G_test.Rmd</code></div>
|
<div class="hidden name"><code>G_test.Rmd</code></div>
|
||||||
|
@ -192,7 +192,7 @@
|
|||||||
<h1>How to work with WHONET data</h1>
|
<h1>How to work with WHONET data</h1>
|
||||||
<h4 class="author">Matthijs S. Berends</h4>
|
<h4 class="author">Matthijs S. Berends</h4>
|
||||||
|
|
||||||
<h4 class="date">21 February 2019</h4>
|
<h4 class="date">22 February 2019</h4>
|
||||||
|
|
||||||
|
|
||||||
<div class="hidden name"><code>WHONET.Rmd</code></div>
|
<div class="hidden name"><code>WHONET.Rmd</code></div>
|
||||||
|
@ -192,7 +192,7 @@
|
|||||||
<h1>How to get properties of an antibiotic</h1>
|
<h1>How to get properties of an antibiotic</h1>
|
||||||
<h4 class="author">Matthijs S. Berends</h4>
|
<h4 class="author">Matthijs S. Berends</h4>
|
||||||
|
|
||||||
<h4 class="date">21 February 2019</h4>
|
<h4 class="date">22 February 2019</h4>
|
||||||
|
|
||||||
|
|
||||||
<div class="hidden name"><code>atc_property.Rmd</code></div>
|
<div class="hidden name"><code>atc_property.Rmd</code></div>
|
||||||
|
@ -192,7 +192,7 @@
|
|||||||
<h1>Benchmarks</h1>
|
<h1>Benchmarks</h1>
|
||||||
<h4 class="author">Matthijs S. Berends</h4>
|
<h4 class="author">Matthijs S. Berends</h4>
|
||||||
|
|
||||||
<h4 class="date">21 February 2019</h4>
|
<h4 class="date">22 February 2019</h4>
|
||||||
|
|
||||||
|
|
||||||
<div class="hidden name"><code>benchmarks.Rmd</code></div>
|
<div class="hidden name"><code>benchmarks.Rmd</code></div>
|
||||||
@ -214,29 +214,18 @@
|
|||||||
<a class="sourceLine" id="cb2-5" title="5"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"S. aureus"</span>),</a>
|
<a class="sourceLine" id="cb2-5" title="5"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"S. aureus"</span>),</a>
|
||||||
<a class="sourceLine" id="cb2-6" title="6"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"STAAUR"</span>),</a>
|
<a class="sourceLine" id="cb2-6" title="6"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"STAAUR"</span>),</a>
|
||||||
<a class="sourceLine" id="cb2-7" title="7"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"Staphylococcus aureus"</span>),</a>
|
<a class="sourceLine" id="cb2-7" title="7"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"Staphylococcus aureus"</span>),</a>
|
||||||
<a class="sourceLine" id="cb2-8" title="8"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"B_STPHY_AUR"</span>),</a>
|
<a class="sourceLine" id="cb2-8" title="8"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
||||||
<a class="sourceLine" id="cb2-9" title="9"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
<a class="sourceLine" id="cb2-9" title="9"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(S.aureus, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a>
|
||||||
<a class="sourceLine" id="cb2-10" title="10"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(S.aureus, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">2</span>)</a>
|
<a class="sourceLine" id="cb2-10" title="10"><span class="co">#> Unit: milliseconds</span></a>
|
||||||
<a class="sourceLine" id="cb2-11" title="11"><span class="co">#> Unit: milliseconds</span></a>
|
<a class="sourceLine" id="cb2-11" title="11"><span class="co">#> expr min lq mean median uq max neval</span></a>
|
||||||
<a class="sourceLine" id="cb2-12" title="12"><span class="co">#> expr min lq mean median uq max</span></a>
|
<a class="sourceLine" id="cb2-12" title="12"><span class="co">#> as.mo("sau") 42.9 43.2 43.9 44.0 44.2 45.1 10</span></a>
|
||||||
<a class="sourceLine" id="cb2-13" title="13"><span class="co">#> as.mo("sau") 100.00 100.00 110.00 100.00 100.00 160.00</span></a>
|
<a class="sourceLine" id="cb2-13" title="13"><span class="co">#> as.mo("stau") 86.8 87.0 88.9 87.3 88.2 101.0 10</span></a>
|
||||||
<a class="sourceLine" id="cb2-14" title="14"><span class="co">#> as.mo("stau") 140.00 140.00 170.00 160.00 190.00 200.00</span></a>
|
<a class="sourceLine" id="cb2-14" title="14"><span class="co">#> as.mo("staaur") 42.6 43.6 51.5 43.8 44.5 82.8 10</span></a>
|
||||||
<a class="sourceLine" id="cb2-15" title="15"><span class="co">#> as.mo("staaur") 99.00 100.00 100.00 100.00 100.00 110.00</span></a>
|
<a class="sourceLine" id="cb2-15" title="15"><span class="co">#> as.mo("S. aureus") 23.2 23.3 31.0 23.5 23.6 61.8 10</span></a>
|
||||||
<a class="sourceLine" id="cb2-16" title="16"><span class="co">#> as.mo("S. aureus") 64.00 64.00 65.00 65.00 66.00 67.00</span></a>
|
<a class="sourceLine" id="cb2-16" title="16"><span class="co">#> as.mo("S. aureus") 23.1 23.3 26.4 23.7 24.4 51.2 10</span></a>
|
||||||
<a class="sourceLine" id="cb2-17" title="17"><span class="co">#> as.mo("S. aureus") 65.00 65.00 70.00 66.00 66.00 110.00</span></a>
|
<a class="sourceLine" id="cb2-17" title="17"><span class="co">#> as.mo("STAAUR") 42.8 43.4 44.5 44.3 44.5 47.8 10</span></a>
|
||||||
<a class="sourceLine" id="cb2-18" title="18"><span class="co">#> as.mo("STAAUR") 97.00 98.00 100.00 100.00 100.00 100.00</span></a>
|
<a class="sourceLine" id="cb2-18" title="18"><span class="co">#> as.mo("Staphylococcus aureus") 14.3 14.5 20.4 14.8 16.0 64.6 10</span></a></code></pre></div>
|
||||||
<a class="sourceLine" id="cb2-19" title="19"><span class="co">#> as.mo("Staphylococcus aureus") 35.00 35.00 36.00 36.00 37.00 38.00</span></a>
|
<p>In the table above, all measurements are shown in milliseconds (thousands of seconds). A value of 10 milliseconds means it can determine 100 input values per second. It case of 50 milliseconds, this is only 20 input values per second. The more an input value resembles a full name, the faster the result will be found.</p>
|
||||||
<a class="sourceLine" id="cb2-20" title="20"><span class="co">#> as.mo("B_STPHY_AUR") 0.34 0.47 0.52 0.48 0.56 0.89</span></a>
|
|
||||||
<a class="sourceLine" id="cb2-21" title="21"><span class="co">#> neval</span></a>
|
|
||||||
<a class="sourceLine" id="cb2-22" title="22"><span class="co">#> 10</span></a>
|
|
||||||
<a class="sourceLine" id="cb2-23" title="23"><span class="co">#> 10</span></a>
|
|
||||||
<a class="sourceLine" id="cb2-24" title="24"><span class="co">#> 10</span></a>
|
|
||||||
<a class="sourceLine" id="cb2-25" title="25"><span class="co">#> 10</span></a>
|
|
||||||
<a class="sourceLine" id="cb2-26" title="26"><span class="co">#> 10</span></a>
|
|
||||||
<a class="sourceLine" id="cb2-27" title="27"><span class="co">#> 10</span></a>
|
|
||||||
<a class="sourceLine" id="cb2-28" title="28"><span class="co">#> 10</span></a>
|
|
||||||
<a class="sourceLine" id="cb2-29" title="29"><span class="co">#> 10</span></a></code></pre></div>
|
|
||||||
<p>In the table above, all measurements are shown in milliseconds (thousands of seconds). A value of 10 milliseconds means it can determine 100 input values per second. It case of 50 milliseconds, this is only 20 input values per second. The more an input value resembles a full name, the faster the result will be found. In case of <code><a href="../reference/as.mo.html">as.mo("B_STPHY_AUR")</a></code>, the input is already a valid MO code, so it only almost takes no time at all (476 millionths of a second).</p>
|
|
||||||
<p>To achieve this speed, the <code>as.mo</code> function also takes into account the prevalence of human pathogenic microorganisms. The downside is of course that less prevalent microorganisms will be determined less fast. See this example for the ID of <em>Mycoplasma leonicaptivi</em> (<code>B_MYCPL_LEO</code>), a bug probably never found before in humans:</p>
|
<p>To achieve this speed, the <code>as.mo</code> function also takes into account the prevalence of human pathogenic microorganisms. The downside is of course that less prevalent microorganisms will be determined less fast. See this example for the ID of <em>Mycoplasma leonicaptivi</em> (<code>B_MYCPL_LEO</code>), a bug probably never found before in humans:</p>
|
||||||
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1">M.leonicaptivi <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"myle"</span>),</a>
|
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1">M.leonicaptivi <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"myle"</span>),</a>
|
||||||
<a class="sourceLine" id="cb3-2" title="2"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"mycleo"</span>),</a>
|
<a class="sourceLine" id="cb3-2" title="2"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"mycleo"</span>),</a>
|
||||||
@ -244,134 +233,127 @@
|
|||||||
<a class="sourceLine" id="cb3-4" title="4"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"M. leonicaptivi"</span>),</a>
|
<a class="sourceLine" id="cb3-4" title="4"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"M. leonicaptivi"</span>),</a>
|
||||||
<a class="sourceLine" id="cb3-5" title="5"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"MYCLEO"</span>),</a>
|
<a class="sourceLine" id="cb3-5" title="5"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"MYCLEO"</span>),</a>
|
||||||
<a class="sourceLine" id="cb3-6" title="6"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"Mycoplasma leonicaptivi"</span>),</a>
|
<a class="sourceLine" id="cb3-6" title="6"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"Mycoplasma leonicaptivi"</span>),</a>
|
||||||
<a class="sourceLine" id="cb3-7" title="7"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"B_MYCPL_LEO"</span>),</a>
|
<a class="sourceLine" id="cb3-7" title="7"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
||||||
<a class="sourceLine" id="cb3-8" title="8"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
<a class="sourceLine" id="cb3-8" title="8"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(M.leonicaptivi, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a>
|
||||||
<a class="sourceLine" id="cb3-9" title="9"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(M.leonicaptivi, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">2</span>)</a>
|
<a class="sourceLine" id="cb3-9" title="9"><span class="co">#> Unit: milliseconds</span></a>
|
||||||
<a class="sourceLine" id="cb3-10" title="10"><span class="co">#> Unit: milliseconds</span></a>
|
<a class="sourceLine" id="cb3-10" title="10"><span class="co">#> expr min lq mean median uq max neval</span></a>
|
||||||
<a class="sourceLine" id="cb3-11" title="11"><span class="co">#> expr min lq mean median uq max</span></a>
|
<a class="sourceLine" id="cb3-11" title="11"><span class="co">#> as.mo("myle") 141 142 162 142 142 299 10</span></a>
|
||||||
<a class="sourceLine" id="cb3-12" title="12"><span class="co">#> as.mo("myle") 210.00 220.00 240.0 230.00 260.00 310</span></a>
|
<a class="sourceLine" id="cb3-12" title="12"><span class="co">#> as.mo("mycleo") 479 481 520 525 530 634 10</span></a>
|
||||||
<a class="sourceLine" id="cb3-13" title="13"><span class="co">#> as.mo("mycleo") 610.00 630.00 680.0 680.00 720.00 770</span></a>
|
<a class="sourceLine" id="cb3-13" title="13"><span class="co">#> as.mo("M. leonicaptivi") 241 242 273 263 281 382 10</span></a>
|
||||||
<a class="sourceLine" id="cb3-14" title="14"><span class="co">#> as.mo("M. leonicaptivi") 370.00 370.00 390.0 390.00 410.00 410</span></a>
|
<a class="sourceLine" id="cb3-14" title="14"><span class="co">#> as.mo("M. leonicaptivi") 239 241 268 282 283 299 10</span></a>
|
||||||
<a class="sourceLine" id="cb3-15" title="15"><span class="co">#> as.mo("M. leonicaptivi") 350.00 350.00 390.0 390.00 410.00 480</span></a>
|
<a class="sourceLine" id="cb3-15" title="15"><span class="co">#> as.mo("MYCLEO") 487 520 525 524 528 601 10</span></a>
|
||||||
<a class="sourceLine" id="cb3-16" title="16"><span class="co">#> as.mo("MYCLEO") 630.00 650.00 680.0 670.00 680.00 880</span></a>
|
<a class="sourceLine" id="cb3-16" title="16"><span class="co">#> as.mo("Mycoplasma leonicaptivi") 152 156 183 174 200 261 10</span></a></code></pre></div>
|
||||||
<a class="sourceLine" id="cb3-17" title="17"><span class="co">#> as.mo("Mycoplasma leonicaptivi") 250.00 250.00 260.0 250.00 260.00 290</span></a>
|
<p>That takes 7.3 times as much time on average! A value of 100 milliseconds means it can only determine ~10 different input values per second. We can conclude that looking up arbitrary codes of less prevalent microorganisms is the worst way to go, in terms of calculation performance.</p>
|
||||||
<a class="sourceLine" id="cb3-18" title="18"><span class="co">#> as.mo("B_MYCPL_LEO") 0.35 0.43 5.6 0.69 0.75 50</span></a>
|
<p>In the figure below, we compare <em>Escherichia coli</em> (which is very common) with <em>Prevotella brevis</em> (which is moderately common) and with <em>Mycoplasma leonicaptivi</em> (which is very uncommon):</p>
|
||||||
<a class="sourceLine" id="cb3-19" title="19"><span class="co">#> neval</span></a>
|
|
||||||
<a class="sourceLine" id="cb3-20" title="20"><span class="co">#> 10</span></a>
|
|
||||||
<a class="sourceLine" id="cb3-21" title="21"><span class="co">#> 10</span></a>
|
|
||||||
<a class="sourceLine" id="cb3-22" title="22"><span class="co">#> 10</span></a>
|
|
||||||
<a class="sourceLine" id="cb3-23" title="23"><span class="co">#> 10</span></a>
|
|
||||||
<a class="sourceLine" id="cb3-24" title="24"><span class="co">#> 10</span></a>
|
|
||||||
<a class="sourceLine" id="cb3-25" title="25"><span class="co">#> 10</span></a>
|
|
||||||
<a class="sourceLine" id="cb3-26" title="26"><span class="co">#> 10</span></a></code></pre></div>
|
|
||||||
<p>That takes 4.7 times as much time on average! A value of 100 milliseconds means it can only determine ~10 different input values per second. We can conclude that looking up arbitrary codes of less prevalent microorganisms is the worst way to go, in terms of calculation performance:</p>
|
|
||||||
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/graphics/topics/par">par</a></span>(<span class="dt">mar =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">5</span>, <span class="dv">16</span>, <span class="dv">4</span>, <span class="dv">2</span>)) <span class="co"># set more space for left margin text (16)</span></a>
|
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/graphics/topics/par">par</a></span>(<span class="dt">mar =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">5</span>, <span class="dv">16</span>, <span class="dv">4</span>, <span class="dv">2</span>)) <span class="co"># set more space for left margin text (16)</span></a>
|
||||||
<a class="sourceLine" id="cb4-2" title="2"></a>
|
<a class="sourceLine" id="cb4-2" title="2"></a>
|
||||||
<a class="sourceLine" id="cb4-3" title="3"><span class="co"># highest value on y axis</span></a>
|
<a class="sourceLine" id="cb4-3" title="3"><span class="kw"><a href="https://www.rdocumentation.org/packages/graphics/topics/boxplot">boxplot</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"M. leonicaptivi"</span>),</a>
|
||||||
<a class="sourceLine" id="cb4-4" title="4">max_y_axis <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/Extremes">max</a></span>(S.aureus<span class="op">$</span>time, M.leonicaptivi<span class="op">$</span>time, <span class="dt">na.rm =</span> <span class="ot">TRUE</span>) <span class="op">/</span><span class="st"> </span><span class="fl">1e6</span></a>
|
<a class="sourceLine" id="cb4-4" title="4"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"Mycoplasma leonicaptivi"</span>),</a>
|
||||||
<a class="sourceLine" id="cb4-5" title="5"></a>
|
<a class="sourceLine" id="cb4-5" title="5"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"P. brevis"</span>),</a>
|
||||||
<a class="sourceLine" id="cb4-6" title="6"><span class="kw"><a href="https://www.rdocumentation.org/packages/graphics/topics/boxplot">boxplot</a></span>(S.aureus, <span class="dt">horizontal =</span> <span class="ot">TRUE</span>, <span class="dt">las =</span> <span class="dv">1</span>, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">log =</span> <span class="ot">FALSE</span>, <span class="dt">xlab =</span> <span class="st">""</span>, <span class="dt">ylim =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">0</span>, max_y_axis),</a>
|
<a class="sourceLine" id="cb4-6" title="6"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"Prevotella brevis"</span>),</a>
|
||||||
<a class="sourceLine" id="cb4-7" title="7"> <span class="dt">main =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/expression">expression</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/paste">paste</a></span>(<span class="st">"Benchmark of "</span>, <span class="kw"><a href="https://www.rdocumentation.org/packages/grDevices/topics/plotmath">italic</a></span>(<span class="st">"Staphylococcus aureus"</span>))))</a></code></pre></div>
|
<a class="sourceLine" id="cb4-7" title="7"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"E. coli"</span>),</a>
|
||||||
|
<a class="sourceLine" id="cb4-8" title="8"> <span class="kw"><a href="../reference/as.mo.html">as.mo</a></span>(<span class="st">"Escherichia coli"</span>),</a>
|
||||||
|
<a class="sourceLine" id="cb4-9" title="9"> <span class="dt">times =</span> <span class="dv">50</span>),</a>
|
||||||
|
<a class="sourceLine" id="cb4-10" title="10"> <span class="dt">horizontal =</span> <span class="ot">TRUE</span>, <span class="dt">las =</span> <span class="dv">1</span>, <span class="dt">unit =</span> <span class="st">"s"</span>, <span class="dt">log =</span> <span class="ot">FALSE</span>,</a>
|
||||||
|
<a class="sourceLine" id="cb4-11" title="11"> <span class="dt">xlab =</span> <span class="st">""</span>, <span class="dt">ylab =</span> <span class="st">"Time in seconds"</span>,</a>
|
||||||
|
<a class="sourceLine" id="cb4-12" title="12"> <span class="dt">main =</span> <span class="st">"Benchmarks per prevalence"</span>)</a></code></pre></div>
|
||||||
<p><img src="benchmarks_files/figure-html/unnamed-chunk-5-1.png" width="720"></p>
|
<p><img src="benchmarks_files/figure-html/unnamed-chunk-5-1.png" width="720"></p>
|
||||||
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/graphics/topics/boxplot">boxplot</a></span>(M.leonicaptivi, <span class="dt">horizontal =</span> <span class="ot">TRUE</span>, <span class="dt">las =</span> <span class="dv">1</span>, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">log =</span> <span class="ot">FALSE</span>, <span class="dt">xlab =</span> <span class="st">""</span>, <span class="dt">ylim =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">0</span>, max_y_axis),</a>
|
<p>Uncommon microorganisms take a lot more time than common microorganisms. To relieve this pitfall and further improve performance, two important calculations take almost no time at all: <strong>repetitive results</strong> and <strong>already precalculated results</strong>.</p>
|
||||||
<a class="sourceLine" id="cb5-2" title="2"> <span class="dt">main =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/expression">expression</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/paste">paste</a></span>(<span class="st">"Benchmark of "</span>, <span class="kw"><a href="https://www.rdocumentation.org/packages/grDevices/topics/plotmath">italic</a></span>(<span class="st">"Mycoplasma leonicaptivi"</span>))))</a></code></pre></div>
|
|
||||||
<p><img src="benchmarks_files/figure-html/unnamed-chunk-5-2.png" width="720"></p>
|
|
||||||
<p>To relieve this pitfall and further improve performance, two important calculations take almost no time at all: <strong>repetitive results</strong> and <strong>already precalculated results</strong>.</p>
|
|
||||||
<div id="repetitive-results" class="section level3">
|
<div id="repetitive-results" class="section level3">
|
||||||
<h3 class="hasAnchor">
|
<h3 class="hasAnchor">
|
||||||
<a href="#repetitive-results" class="anchor"></a>Repetitive results</h3>
|
<a href="#repetitive-results" class="anchor"></a>Repetitive results</h3>
|
||||||
<p>Repetitive results mean that unique values are present more than once. Unique values will only be calculated once by <code><a href="../reference/as.mo.html">as.mo()</a></code>. We will use <code><a href="../reference/mo_property.html">mo_fullname()</a></code> for this test - a helper function that returns the full microbial name (genus, species and possibly subspecies) which uses <code><a href="../reference/as.mo.html">as.mo()</a></code> internally.</p>
|
<p>Repetitive results mean that unique values are present more than once. Unique values will only be calculated once by <code><a href="../reference/as.mo.html">as.mo()</a></code>. We will use <code><a href="../reference/mo_property.html">mo_fullname()</a></code> for this test - a helper function that returns the full microbial name (genus, species and possibly subspecies) which uses <code><a href="../reference/as.mo.html">as.mo()</a></code> internally.</p>
|
||||||
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(dplyr)</a>
|
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(dplyr)</a>
|
||||||
<a class="sourceLine" id="cb6-2" title="2"><span class="co"># take 500,000 random MO codes from the septic_patients data set</span></a>
|
<a class="sourceLine" id="cb5-2" title="2"><span class="co"># take 500,000 random MO codes from the septic_patients data set</span></a>
|
||||||
<a class="sourceLine" id="cb6-3" title="3">x =<span class="st"> </span>septic_patients <span class="op">%>%</span></a>
|
<a class="sourceLine" id="cb5-3" title="3">x =<span class="st"> </span>septic_patients <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb6-4" title="4"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/sample.html">sample_n</a></span>(<span class="dv">500000</span>, <span class="dt">replace =</span> <span class="ot">TRUE</span>) <span class="op">%>%</span></a>
|
<a class="sourceLine" id="cb5-4" title="4"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/sample.html">sample_n</a></span>(<span class="dv">500000</span>, <span class="dt">replace =</span> <span class="ot">TRUE</span>) <span class="op">%>%</span></a>
|
||||||
<a class="sourceLine" id="cb6-5" title="5"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/pull.html">pull</a></span>(mo)</a>
|
<a class="sourceLine" id="cb5-5" title="5"><span class="st"> </span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/pull.html">pull</a></span>(mo)</a>
|
||||||
<a class="sourceLine" id="cb6-6" title="6"> </a>
|
<a class="sourceLine" id="cb5-6" title="6"> </a>
|
||||||
<a class="sourceLine" id="cb6-7" title="7"><span class="co"># got the right length?</span></a>
|
<a class="sourceLine" id="cb5-7" title="7"><span class="co"># got the right length?</span></a>
|
||||||
<a class="sourceLine" id="cb6-8" title="8"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/length">length</a></span>(x)</a>
|
<a class="sourceLine" id="cb5-8" title="8"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/length">length</a></span>(x)</a>
|
||||||
<a class="sourceLine" id="cb6-9" title="9"><span class="co">#> [1] 500000</span></a>
|
<a class="sourceLine" id="cb5-9" title="9"><span class="co">#> [1] 500000</span></a>
|
||||||
<a class="sourceLine" id="cb6-10" title="10"></a>
|
<a class="sourceLine" id="cb5-10" title="10"></a>
|
||||||
<a class="sourceLine" id="cb6-11" title="11"><span class="co"># and how many unique values do we have?</span></a>
|
<a class="sourceLine" id="cb5-11" title="11"><span class="co"># and how many unique values do we have?</span></a>
|
||||||
<a class="sourceLine" id="cb6-12" title="12"><span class="kw"><a href="https://dplyr.tidyverse.org/reference/n_distinct.html">n_distinct</a></span>(x)</a>
|
<a class="sourceLine" id="cb5-12" title="12"><span class="kw"><a href="https://dplyr.tidyverse.org/reference/n_distinct.html">n_distinct</a></span>(x)</a>
|
||||||
<a class="sourceLine" id="cb6-13" title="13"><span class="co">#> [1] 95</span></a>
|
<a class="sourceLine" id="cb5-13" title="13"><span class="co">#> [1] 95</span></a>
|
||||||
<a class="sourceLine" id="cb6-14" title="14"></a>
|
<a class="sourceLine" id="cb5-14" title="14"></a>
|
||||||
<a class="sourceLine" id="cb6-15" title="15"><span class="co"># now let's see:</span></a>
|
<a class="sourceLine" id="cb5-15" title="15"><span class="co"># now let's see:</span></a>
|
||||||
<a class="sourceLine" id="cb6-16" title="16">run_it <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(x),</a>
|
<a class="sourceLine" id="cb5-16" title="16">run_it <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(x),</a>
|
||||||
<a class="sourceLine" id="cb6-17" title="17"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
<a class="sourceLine" id="cb5-17" title="17"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
||||||
<a class="sourceLine" id="cb6-18" title="18"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a>
|
<a class="sourceLine" id="cb5-18" title="18"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a>
|
||||||
<a class="sourceLine" id="cb6-19" title="19"><span class="co">#> Unit: milliseconds</span></a>
|
<a class="sourceLine" id="cb5-19" title="19"><span class="co">#> Unit: milliseconds</span></a>
|
||||||
<a class="sourceLine" id="cb6-20" title="20"><span class="co">#> expr min lq mean median uq max neval</span></a>
|
<a class="sourceLine" id="cb5-20" title="20"><span class="co">#> expr min lq mean median uq max neval</span></a>
|
||||||
<a class="sourceLine" id="cb6-21" title="21"><span class="co">#> mo_fullname(x) 487 499 527 535 538 573 10</span></a></code></pre></div>
|
<a class="sourceLine" id="cb5-21" title="21"><span class="co">#> mo_fullname(x) 400 405 463 441 533 558 10</span></a></code></pre></div>
|
||||||
<p>So transforming 500,000 values (!) of 95 unique values only takes 0.54 seconds (535 ms). You only lose time on your unique input values.</p>
|
<p>So transforming 500,000 values (!) of 95 unique values only takes 0.44 seconds (441 ms). You only lose time on your unique input values.</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="precalculated-results" class="section level3">
|
<div id="precalculated-results" class="section level3">
|
||||||
<h3 class="hasAnchor">
|
<h3 class="hasAnchor">
|
||||||
<a href="#precalculated-results" class="anchor"></a>Precalculated results</h3>
|
<a href="#precalculated-results" class="anchor"></a>Precalculated results</h3>
|
||||||
<p>What about precalculated results? If the input is an already precalculated result of a helper function like <code><a href="../reference/mo_property.html">mo_fullname()</a></code>, it almost doesn’t take any time at all (see ‘C’ below):</p>
|
<p>What about precalculated results? If the input is an already precalculated result of a helper function like <code><a href="../reference/mo_property.html">mo_fullname()</a></code>, it almost doesn’t take any time at all (see ‘C’ below):</p>
|
||||||
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" title="1">run_it <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="dt">A =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"B_STPHY_AUR"</span>),</a>
|
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" title="1">run_it <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="dt">A =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"B_STPHY_AUR"</span>),</a>
|
||||||
<a class="sourceLine" id="cb7-2" title="2"> <span class="dt">B =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"S. aureus"</span>),</a>
|
<a class="sourceLine" id="cb6-2" title="2"> <span class="dt">B =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"S. aureus"</span>),</a>
|
||||||
|
<a class="sourceLine" id="cb6-3" title="3"> <span class="dt">C =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"Staphylococcus aureus"</span>),</a>
|
||||||
|
<a class="sourceLine" id="cb6-4" title="4"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
||||||
|
<a class="sourceLine" id="cb6-5" title="5"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a>
|
||||||
|
<a class="sourceLine" id="cb6-6" title="6"><span class="co">#> Unit: milliseconds</span></a>
|
||||||
|
<a class="sourceLine" id="cb6-7" title="7"><span class="co">#> expr min lq mean median uq max neval</span></a>
|
||||||
|
<a class="sourceLine" id="cb6-8" title="8"><span class="co">#> A 39.000 39.80 40.000 40.100 40.300 41.100 10</span></a>
|
||||||
|
<a class="sourceLine" id="cb6-9" title="9"><span class="co">#> B 24.400 24.70 25.000 24.900 25.200 25.600 10</span></a>
|
||||||
|
<a class="sourceLine" id="cb6-10" title="10"><span class="co">#> C 0.294 0.39 0.422 0.401 0.505 0.535 10</span></a></code></pre></div>
|
||||||
|
<p>So going from <code><a href="../reference/mo_property.html">mo_fullname("Staphylococcus aureus")</a></code> to <code>"Staphylococcus aureus"</code> takes 0.0004 seconds - it doesn’t even start calculating <em>if the result would be the same as the expected resulting value</em>. That goes for all helper functions:</p>
|
||||||
|
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" title="1">run_it <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="dt">A =</span> <span class="kw"><a href="../reference/mo_property.html">mo_species</a></span>(<span class="st">"aureus"</span>),</a>
|
||||||
|
<a class="sourceLine" id="cb7-2" title="2"> <span class="dt">B =</span> <span class="kw"><a href="../reference/mo_property.html">mo_genus</a></span>(<span class="st">"Staphylococcus"</span>),</a>
|
||||||
<a class="sourceLine" id="cb7-3" title="3"> <span class="dt">C =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"Staphylococcus aureus"</span>),</a>
|
<a class="sourceLine" id="cb7-3" title="3"> <span class="dt">C =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"Staphylococcus aureus"</span>),</a>
|
||||||
<a class="sourceLine" id="cb7-4" title="4"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
<a class="sourceLine" id="cb7-4" title="4"> <span class="dt">D =</span> <span class="kw"><a href="../reference/mo_property.html">mo_family</a></span>(<span class="st">"Staphylococcaceae"</span>),</a>
|
||||||
<a class="sourceLine" id="cb7-5" title="5"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a>
|
<a class="sourceLine" id="cb7-5" title="5"> <span class="dt">E =</span> <span class="kw"><a href="../reference/mo_property.html">mo_order</a></span>(<span class="st">"Bacillales"</span>),</a>
|
||||||
<a class="sourceLine" id="cb7-6" title="6"><span class="co">#> Unit: milliseconds</span></a>
|
<a class="sourceLine" id="cb7-6" title="6"> <span class="dt">F =</span> <span class="kw"><a href="../reference/mo_property.html">mo_class</a></span>(<span class="st">"Bacilli"</span>),</a>
|
||||||
<a class="sourceLine" id="cb7-7" title="7"><span class="co">#> expr min lq mean median uq max neval</span></a>
|
<a class="sourceLine" id="cb7-7" title="7"> <span class="dt">G =</span> <span class="kw"><a href="../reference/mo_property.html">mo_phylum</a></span>(<span class="st">"Firmicutes"</span>),</a>
|
||||||
<a class="sourceLine" id="cb7-8" title="8"><span class="co">#> A 65.500 66.100 66.200 66.300 66.500 66.700 10</span></a>
|
<a class="sourceLine" id="cb7-8" title="8"> <span class="dt">H =</span> <span class="kw"><a href="../reference/mo_property.html">mo_kingdom</a></span>(<span class="st">"Bacteria"</span>),</a>
|
||||||
<a class="sourceLine" id="cb7-9" title="9"><span class="co">#> B 61.000 61.200 61.900 61.700 62.300 64.500 10</span></a>
|
<a class="sourceLine" id="cb7-9" title="9"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
||||||
<a class="sourceLine" id="cb7-10" title="10"><span class="co">#> C 0.329 0.335 0.461 0.527 0.551 0.556 10</span></a></code></pre></div>
|
<a class="sourceLine" id="cb7-10" title="10"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a>
|
||||||
<p>So going from <code><a href="../reference/mo_property.html">mo_fullname("Staphylococcus aureus")</a></code> to <code>"Staphylococcus aureus"</code> takes 0.0005 seconds - it doesn’t even start calculating <em>if the result would be the same as the expected resulting value</em>. That goes for all helper functions:</p>
|
<a class="sourceLine" id="cb7-11" title="11"><span class="co">#> Unit: milliseconds</span></a>
|
||||||
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" title="1">run_it <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="dt">A =</span> <span class="kw"><a href="../reference/mo_property.html">mo_species</a></span>(<span class="st">"aureus"</span>),</a>
|
<a class="sourceLine" id="cb7-12" title="12"><span class="co">#> expr min lq mean median uq max neval</span></a>
|
||||||
<a class="sourceLine" id="cb8-2" title="2"> <span class="dt">B =</span> <span class="kw"><a href="../reference/mo_property.html">mo_genus</a></span>(<span class="st">"Staphylococcus"</span>),</a>
|
<a class="sourceLine" id="cb7-13" title="13"><span class="co">#> A 0.298 0.327 0.398 0.400 0.452 0.535 10</span></a>
|
||||||
<a class="sourceLine" id="cb8-3" title="3"> <span class="dt">C =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"Staphylococcus aureus"</span>),</a>
|
<a class="sourceLine" id="cb7-14" title="14"><span class="co">#> B 0.251 0.287 0.339 0.344 0.377 0.436 10</span></a>
|
||||||
<a class="sourceLine" id="cb8-4" title="4"> <span class="dt">D =</span> <span class="kw"><a href="../reference/mo_property.html">mo_family</a></span>(<span class="st">"Staphylococcaceae"</span>),</a>
|
<a class="sourceLine" id="cb7-15" title="15"><span class="co">#> C 0.293 0.403 0.451 0.487 0.500 0.537 10</span></a>
|
||||||
<a class="sourceLine" id="cb8-5" title="5"> <span class="dt">E =</span> <span class="kw"><a href="../reference/mo_property.html">mo_order</a></span>(<span class="st">"Bacillales"</span>),</a>
|
<a class="sourceLine" id="cb7-16" title="16"><span class="co">#> D 0.250 0.262 0.300 0.277 0.336 0.395 10</span></a>
|
||||||
<a class="sourceLine" id="cb8-6" title="6"> <span class="dt">F =</span> <span class="kw"><a href="../reference/mo_property.html">mo_class</a></span>(<span class="st">"Bacilli"</span>),</a>
|
<a class="sourceLine" id="cb7-17" title="17"><span class="co">#> E 0.249 0.261 0.306 0.313 0.344 0.384 10</span></a>
|
||||||
<a class="sourceLine" id="cb8-7" title="7"> <span class="dt">G =</span> <span class="kw"><a href="../reference/mo_property.html">mo_phylum</a></span>(<span class="st">"Firmicutes"</span>),</a>
|
<a class="sourceLine" id="cb7-18" title="18"><span class="co">#> F 0.273 0.283 0.325 0.326 0.338 0.420 10</span></a>
|
||||||
<a class="sourceLine" id="cb8-8" title="8"> <span class="dt">H =</span> <span class="kw"><a href="../reference/mo_property.html">mo_kingdom</a></span>(<span class="st">"Bacteria"</span>),</a>
|
<a class="sourceLine" id="cb7-19" title="19"><span class="co">#> G 0.238 0.293 0.312 0.325 0.342 0.356 10</span></a>
|
||||||
<a class="sourceLine" id="cb8-9" title="9"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
<a class="sourceLine" id="cb7-20" title="20"><span class="co">#> H 0.250 0.262 0.304 0.316 0.337 0.358 10</span></a></code></pre></div>
|
||||||
<a class="sourceLine" id="cb8-10" title="10"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">3</span>)</a>
|
|
||||||
<a class="sourceLine" id="cb8-11" title="11"><span class="co">#> Unit: milliseconds</span></a>
|
|
||||||
<a class="sourceLine" id="cb8-12" title="12"><span class="co">#> expr min lq mean median uq max neval</span></a>
|
|
||||||
<a class="sourceLine" id="cb8-13" title="13"><span class="co">#> A 0.288 0.372 0.440 0.418 0.481 0.662 10</span></a>
|
|
||||||
<a class="sourceLine" id="cb8-14" title="14"><span class="co">#> B 0.281 0.294 0.364 0.369 0.411 0.461 10</span></a>
|
|
||||||
<a class="sourceLine" id="cb8-15" title="15"><span class="co">#> C 0.390 0.493 0.563 0.550 0.645 0.731 10</span></a>
|
|
||||||
<a class="sourceLine" id="cb8-16" title="16"><span class="co">#> D 0.244 0.269 0.733 0.337 0.347 4.420 10</span></a>
|
|
||||||
<a class="sourceLine" id="cb8-17" title="17"><span class="co">#> E 0.283 0.344 0.368 0.363 0.410 0.434 10</span></a>
|
|
||||||
<a class="sourceLine" id="cb8-18" title="18"><span class="co">#> F 0.250 0.319 0.343 0.339 0.354 0.492 10</span></a>
|
|
||||||
<a class="sourceLine" id="cb8-19" title="19"><span class="co">#> G 0.286 0.329 0.363 0.340 0.392 0.496 10</span></a>
|
|
||||||
<a class="sourceLine" id="cb8-20" title="20"><span class="co">#> H 0.292 0.305 0.365 0.359 0.421 0.459 10</span></a></code></pre></div>
|
|
||||||
<p>Of course, when running <code><a href="../reference/mo_property.html">mo_phylum("Firmicutes")</a></code> the function has zero knowledge about the actual microorganism, namely <em>S. aureus</em>. But since the result would be <code>"Firmicutes"</code> too, there is no point in calculating the result. And because this package ‘knows’ all phyla of all known bacteria (according to the Catalogue of Life), it can just return the initial value immediately.</p>
|
<p>Of course, when running <code><a href="../reference/mo_property.html">mo_phylum("Firmicutes")</a></code> the function has zero knowledge about the actual microorganism, namely <em>S. aureus</em>. But since the result would be <code>"Firmicutes"</code> too, there is no point in calculating the result. And because this package ‘knows’ all phyla of all known bacteria (according to the Catalogue of Life), it can just return the initial value immediately.</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="results-in-other-languages" class="section level3">
|
<div id="results-in-other-languages" class="section level3">
|
||||||
<h3 class="hasAnchor">
|
<h3 class="hasAnchor">
|
||||||
<a href="#results-in-other-languages" class="anchor"></a>Results in other languages</h3>
|
<a href="#results-in-other-languages" class="anchor"></a>Results in other languages</h3>
|
||||||
<p>When the system language is non-English and supported by this <code>AMR</code> package, some functions will have a translated result. This almost does’t take extra time:</p>
|
<p>When the system language is non-English and supported by this <code>AMR</code> package, some functions will have a translated result. This almost does’t take extra time:</p>
|
||||||
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" title="1"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"en"</span>) <span class="co"># or just mo_fullname("CoNS") on an English system</span></a>
|
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" title="1"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"en"</span>) <span class="co"># or just mo_fullname("CoNS") on an English system</span></a>
|
||||||
<a class="sourceLine" id="cb9-2" title="2"><span class="co">#> [1] "Coagulase Negative Staphylococcus (CoNS)"</span></a>
|
<a class="sourceLine" id="cb8-2" title="2"><span class="co">#> [1] "Coagulase Negative Staphylococcus (CoNS)"</span></a>
|
||||||
<a class="sourceLine" id="cb9-3" title="3"></a>
|
<a class="sourceLine" id="cb8-3" title="3"></a>
|
||||||
<a class="sourceLine" id="cb9-4" title="4"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"es"</span>) <span class="co"># or just mo_fullname("CoNS") on a Spanish system</span></a>
|
<a class="sourceLine" id="cb8-4" title="4"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"es"</span>) <span class="co"># or just mo_fullname("CoNS") on a Spanish system</span></a>
|
||||||
<a class="sourceLine" id="cb9-5" title="5"><span class="co">#> [1] "Staphylococcus coagulasa negativo (CoNS)"</span></a>
|
<a class="sourceLine" id="cb8-5" title="5"><span class="co">#> [1] "Staphylococcus coagulasa negativo (CoNS)"</span></a>
|
||||||
<a class="sourceLine" id="cb9-6" title="6"></a>
|
<a class="sourceLine" id="cb8-6" title="6"></a>
|
||||||
<a class="sourceLine" id="cb9-7" title="7"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"nl"</span>) <span class="co"># or just mo_fullname("CoNS") on a Dutch system</span></a>
|
<a class="sourceLine" id="cb8-7" title="7"><span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"nl"</span>) <span class="co"># or just mo_fullname("CoNS") on a Dutch system</span></a>
|
||||||
<a class="sourceLine" id="cb9-8" title="8"><span class="co">#> [1] "Coagulase-negatieve Staphylococcus (CNS)"</span></a>
|
<a class="sourceLine" id="cb8-8" title="8"><span class="co">#> [1] "Coagulase-negatieve Staphylococcus (CNS)"</span></a>
|
||||||
<a class="sourceLine" id="cb9-9" title="9"></a>
|
<a class="sourceLine" id="cb8-9" title="9"></a>
|
||||||
<a class="sourceLine" id="cb9-10" title="10">run_it <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="dt">en =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"en"</span>),</a>
|
<a class="sourceLine" id="cb8-10" title="10">run_it <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/microbenchmark/topics/microbenchmark">microbenchmark</a></span>(<span class="dt">en =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"en"</span>),</a>
|
||||||
<a class="sourceLine" id="cb9-11" title="11"> <span class="dt">de =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"de"</span>),</a>
|
<a class="sourceLine" id="cb8-11" title="11"> <span class="dt">de =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"de"</span>),</a>
|
||||||
<a class="sourceLine" id="cb9-12" title="12"> <span class="dt">nl =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"nl"</span>),</a>
|
<a class="sourceLine" id="cb8-12" title="12"> <span class="dt">nl =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"nl"</span>),</a>
|
||||||
<a class="sourceLine" id="cb9-13" title="13"> <span class="dt">es =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"es"</span>),</a>
|
<a class="sourceLine" id="cb8-13" title="13"> <span class="dt">es =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"es"</span>),</a>
|
||||||
<a class="sourceLine" id="cb9-14" title="14"> <span class="dt">it =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"it"</span>),</a>
|
<a class="sourceLine" id="cb8-14" title="14"> <span class="dt">it =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"it"</span>),</a>
|
||||||
<a class="sourceLine" id="cb9-15" title="15"> <span class="dt">fr =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"fr"</span>),</a>
|
<a class="sourceLine" id="cb8-15" title="15"> <span class="dt">fr =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"fr"</span>),</a>
|
||||||
<a class="sourceLine" id="cb9-16" title="16"> <span class="dt">pt =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"pt"</span>),</a>
|
<a class="sourceLine" id="cb8-16" title="16"> <span class="dt">pt =</span> <span class="kw"><a href="../reference/mo_property.html">mo_fullname</a></span>(<span class="st">"CoNS"</span>, <span class="dt">language =</span> <span class="st">"pt"</span>),</a>
|
||||||
<a class="sourceLine" id="cb9-17" title="17"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
<a class="sourceLine" id="cb8-17" title="17"> <span class="dt">times =</span> <span class="dv">10</span>)</a>
|
||||||
<a class="sourceLine" id="cb9-18" title="18"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">4</span>)</a>
|
<a class="sourceLine" id="cb8-18" title="18"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/print">print</a></span>(run_it, <span class="dt">unit =</span> <span class="st">"ms"</span>, <span class="dt">signif =</span> <span class="dv">4</span>)</a>
|
||||||
<a class="sourceLine" id="cb9-19" title="19"><span class="co">#> Unit: milliseconds</span></a>
|
<a class="sourceLine" id="cb8-19" title="19"><span class="co">#> Unit: milliseconds</span></a>
|
||||||
<a class="sourceLine" id="cb9-20" title="20"><span class="co">#> expr min lq mean median uq max neval</span></a>
|
<a class="sourceLine" id="cb8-20" title="20"><span class="co">#> expr min lq mean median uq max neval</span></a>
|
||||||
<a class="sourceLine" id="cb9-21" title="21"><span class="co">#> en 24.41 25.27 26.34 25.41 26.92 30.60 10</span></a>
|
<a class="sourceLine" id="cb8-21" title="21"><span class="co">#> en 10.78 11.11 11.15 11.14 11.30 11.41 10</span></a>
|
||||||
<a class="sourceLine" id="cb9-22" title="22"><span class="co">#> de 35.53 35.76 36.76 35.98 37.20 41.19 10</span></a>
|
<a class="sourceLine" id="cb8-22" title="22"><span class="co">#> de 19.60 19.65 23.24 19.76 20.61 52.47 10</span></a>
|
||||||
<a class="sourceLine" id="cb9-23" title="23"><span class="co">#> nl 34.51 35.55 39.93 35.60 40.15 69.76 10</span></a>
|
<a class="sourceLine" id="cb8-23" title="23"><span class="co">#> nl 19.14 19.71 19.75 19.72 19.87 20.22 10</span></a>
|
||||||
<a class="sourceLine" id="cb9-24" title="24"><span class="co">#> es 34.36 35.98 44.29 37.46 39.98 73.16 10</span></a>
|
<a class="sourceLine" id="cb8-24" title="24"><span class="co">#> es 19.64 19.73 28.36 20.60 25.91 64.67 10</span></a>
|
||||||
<a class="sourceLine" id="cb9-25" title="25"><span class="co">#> it 35.78 36.22 37.44 36.75 38.70 40.78 10</span></a>
|
<a class="sourceLine" id="cb8-25" title="25"><span class="co">#> it 19.33 19.49 23.13 19.68 19.97 52.72 10</span></a>
|
||||||
<a class="sourceLine" id="cb9-26" title="26"><span class="co">#> fr 35.45 35.71 36.09 35.79 36.15 37.93 10</span></a>
|
<a class="sourceLine" id="cb8-26" title="26"><span class="co">#> fr 19.43 19.54 20.08 19.72 20.60 21.46 10</span></a>
|
||||||
<a class="sourceLine" id="cb9-27" title="27"><span class="co">#> pt 35.10 35.44 44.61 35.76 39.68 77.27 10</span></a></code></pre></div>
|
<a class="sourceLine" id="cb8-27" title="27"><span class="co">#> pt 19.34 19.66 23.15 19.80 20.48 52.40 10</span></a></code></pre></div>
|
||||||
<p>Currently supported are German, Dutch, Spanish, Italian, French and Portuguese.</p>
|
<p>Currently supported are German, Dutch, Spanish, Italian, French and Portuguese.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 29 KiB |
@ -192,7 +192,7 @@
|
|||||||
<h1>How to create frequency tables</h1>
|
<h1>How to create frequency tables</h1>
|
||||||
<h4 class="author">Matthijs S. Berends</h4>
|
<h4 class="author">Matthijs S. Berends</h4>
|
||||||
|
|
||||||
<h4 class="date">21 February 2019</h4>
|
<h4 class="date">22 February 2019</h4>
|
||||||
|
|
||||||
|
|
||||||
<div class="hidden name"><code>freq.Rmd</code></div>
|
<div class="hidden name"><code>freq.Rmd</code></div>
|
||||||
|
@ -192,7 +192,7 @@
|
|||||||
<h1>How to get properties of a microorganism</h1>
|
<h1>How to get properties of a microorganism</h1>
|
||||||
<h4 class="author">Matthijs S. Berends</h4>
|
<h4 class="author">Matthijs S. Berends</h4>
|
||||||
|
|
||||||
<h4 class="date">21 February 2019</h4>
|
<h4 class="date">22 February 2019</h4>
|
||||||
|
|
||||||
|
|
||||||
<div class="hidden name"><code>mo_property.Rmd</code></div>
|
<div class="hidden name"><code>mo_property.Rmd</code></div>
|
||||||
|
@ -192,7 +192,7 @@
|
|||||||
<h1>How to predict antimicrobial resistance</h1>
|
<h1>How to predict antimicrobial resistance</h1>
|
||||||
<h4 class="author">Matthijs S. Berends</h4>
|
<h4 class="author">Matthijs S. Berends</h4>
|
||||||
|
|
||||||
<h4 class="date">21 February 2019</h4>
|
<h4 class="date">22 February 2019</h4>
|
||||||
|
|
||||||
|
|
||||||
<div class="hidden name"><code>resistance_predict.Rmd</code></div>
|
<div class="hidden name"><code>resistance_predict.Rmd</code></div>
|
||||||
|
@ -250,7 +250,7 @@
|
|||||||
<p>This package is available <a href="https://cran.r-project.org/package=AMR">on the official R network (CRAN)</a>, which has a peer-reviewed submission process. Install this package in R with:</p>
|
<p>This package is available <a href="https://cran.r-project.org/package=AMR">on the official R network (CRAN)</a>, which has a peer-reviewed submission process. Install this package in R with:</p>
|
||||||
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/install.packages">install.packages</a></span>(<span class="st">"AMR"</span>)</a></code></pre></div>
|
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/install.packages">install.packages</a></span>(<span class="st">"AMR"</span>)</a></code></pre></div>
|
||||||
<p>It will be downloaded and installed automatically. For RStudio, click on the menu <em>Tools</em> > <em>Install Packages…</em> and then type in “AMR” and press <kbd>Install</kbd>.</p>
|
<p>It will be downloaded and installed automatically. For RStudio, click on the menu <em>Tools</em> > <em>Install Packages…</em> and then type in “AMR” and press <kbd>Install</kbd>.</p>
|
||||||
<p><em>Note:</em> Not all functions on this website may be available in this latest release. To use all functions and data sets mentioned on this website, install the latest development version.</p>
|
<p><strong>Note:</strong> Not all functions on this website may be available in this latest release. To use all functions and data sets mentioned on this website, install the latest development version.</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="latest-development-version" class="section level4">
|
<div id="latest-development-version" class="section level4">
|
||||||
<h4 class="hasAnchor">
|
<h4 class="hasAnchor">
|
||||||
@ -277,8 +277,8 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li><p>All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses</p></li>
|
<li><p>All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses</p></li>
|
||||||
<li>
|
<li>
|
||||||
<p>All ~3,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales and Schizosaccharomycetales.</p>
|
<p>All ~3,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales.</p>
|
||||||
<p>The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant (sub)species are covered (like all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>).</p>
|
<p>The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Cryptococcus</em>, <em>Histoplasma</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>).</p>
|
||||||
</li>
|
</li>
|
||||||
<li><p>All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed</p></li>
|
<li><p>All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed</p></li>
|
||||||
<li><p>The responsible author(s) and year of scientific publication</p></li>
|
<li><p>The responsible author(s) and year of scientific publication</p></li>
|
||||||
@ -312,7 +312,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<p>It <strong>cleanses existing data</strong> by providing new <em>classes</em> for microoganisms, antibiotics and antimicrobial results (both S/I/R and MIC). By installing this package, you teach R everything about microbiology that is needed for analysis. These functions all use artificial intelligence to guess results that you would expect:</p>
|
<p>It <strong>cleanses existing data</strong> by providing new <em>classes</em> for microoganisms, antibiotics and antimicrobial results (both S/I/R and MIC). By installing this package, you teach R everything about microbiology that is needed for analysis. These functions all use artificial intelligence to guess results that you would expect:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Use <code><a href="reference/as.mo.html">as.mo()</a></code> to get an ID of a microorganism. The IDs are human readable for the trained eye - the ID of <em>Klebsiella pneumoniae</em> is “B_KLBSL_PNE” (B stands for Bacteria) and the ID of <em>S. aureus</em> is “B_STPHY_AUR”. The function takes almost any text as input that looks like the name or code of a microorganism like “E. coli”, “esco” or “esccol” and tries to find expected results using artificial intelligence (AI) on the included ITIS data set, consisting of almost 20,000 microorganisms. It is <em>very</em> fast, please see our <a href="./articles/benchmarks.html">benchmarks</a>. Moreover, it can group <em>Staphylococci</em> into coagulase negative and positive (CoNS and CoPS, see <a href="./reference/as.mo.html#source">source</a>) and can categorise <em>Streptococci</em> into Lancefield groups (like beta-haemolytic <em>Streptococcus</em> Group B, <a href="./reference/as.mo.html#source">source</a>).</li>
|
<li>Use <code><a href="reference/as.mo.html">as.mo()</a></code> to get an ID of a microorganism. The IDs are human readable for the trained eye - the ID of <em>Klebsiella pneumoniae</em> is “B_KLBSL_PNE” (B stands for Bacteria) and the ID of <em>S. aureus</em> is “B_STPHY_AUR”. The function takes almost any text as input that looks like the name or code of a microorganism like “E. coli”, “esco” or “esccol” and tries to find expected results using artificial intelligence on the included Catalogue of Life data set, consisting of almost 60,000 microorganisms. It only takes milliseconds to find results, please see our <a href="./articles/benchmarks.html">benchmarks</a>. Moreover, it can group <em>Staphylococci</em> into coagulase negative and positive (CoNS and CoPS, see <a href="./reference/as.mo.html#source">source</a>) and can categorise <em>Streptococci</em> into Lancefield groups (like beta-haemolytic <em>Streptococcus</em> Group B, <a href="./reference/as.mo.html#source">source</a>).</li>
|
||||||
<li>Use <code><a href="reference/as.rsi.html">as.rsi()</a></code> to transform values to valid antimicrobial results. It produces just S, I or R based on your input and warns about invalid values. Even values like “<=0.002; S” (combined MIC/RSI) will result in “S”.</li>
|
<li>Use <code><a href="reference/as.rsi.html">as.rsi()</a></code> to transform values to valid antimicrobial results. It produces just S, I or R based on your input and warns about invalid values. Even values like “<=0.002; S” (combined MIC/RSI) will result in “S”.</li>
|
||||||
<li>Use <code><a href="reference/as.mic.html">as.mic()</a></code> to cleanse your MIC values. It produces a so-called factor (called <em>ordinal</em> in SPSS) with valid MIC values as levels. A value like “<=0.002; S” (combined MIC/RSI) will result in “<=0.002”.</li>
|
<li>Use <code><a href="reference/as.mic.html">as.mic()</a></code> to cleanse your MIC values. It produces a so-called factor (called <em>ordinal</em> in SPSS) with valid MIC values as levels. A value like “<=0.002; S” (combined MIC/RSI) will result in “<=0.002”.</li>
|
||||||
<li>Use <code><a href="reference/as.atc.html">as.atc()</a></code> to get the ATC code of an antibiotic as defined by the WHO. This package contains a database with most LIS codes, official names, DDDs and even trade names of antibiotics. For example, the values “Furabid”, “Furadantin”, “nitro” all return the ATC code of Nitrofurantoine.</li>
|
<li>Use <code><a href="reference/as.atc.html">as.atc()</a></code> to get the ATC code of an antibiotic as defined by the WHO. This package contains a database with most LIS codes, official names, DDDs and even trade names of antibiotics. For example, the values “Furabid”, “Furadantin”, “nitro” all return the ATC code of Nitrofurantoine.</li>
|
||||||
@ -328,7 +328,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>Use <code><a href="reference/mdro.html">mdro()</a></code> (abbreviation of Multi Drug Resistant Organisms) to check your isolates for exceptional resistance with country-specific guidelines or EUCAST rules. Currently, national guidelines for Germany and the Netherlands are supported.</li>
|
<li>Use <code><a href="reference/mdro.html">mdro()</a></code> (abbreviation of Multi Drug Resistant Organisms) to check your isolates for exceptional resistance with country-specific guidelines or EUCAST rules. Currently, national guidelines for Germany and the Netherlands are supported.</li>
|
||||||
<li>The <a href="./reference/microorganisms.html">data set <code>microorganisms</code></a> contains the complete taxonomic tree of almost 20,000 microorganisms (bacteria, fungi/yeasts and protozoa). Furthermore, the colloquial name and Gram stain 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 <code><a href="reference/mo_property.html">mo_genus()</a></code>, <code><a href="reference/mo_property.html">mo_family()</a></code>, <code><a href="reference/mo_property.html">mo_gramstain()</a></code> or even <code><a href="reference/mo_property.html">mo_phylum()</a></code>. As they use <code><a href="reference/as.mo.html">as.mo()</a></code> internally, they also use artificial intelligence. For example, <code><a href="reference/mo_property.html">mo_genus("MRSA")</a></code> and <code><a href="reference/mo_property.html">mo_genus("S. aureus")</a></code> will both return <code>"Staphylococcus"</code>. 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.</li>
|
<li>The <a href="./reference/microorganisms.html">data set <code>microorganisms</code></a> contains the complete taxonomic tree of almost 60,000 microorganisms. Furthermore, the colloquial name and Gram stain 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 <code><a href="reference/mo_property.html">mo_genus()</a></code>, <code><a href="reference/mo_property.html">mo_family()</a></code>, <code><a href="reference/mo_property.html">mo_gramstain()</a></code> or even <code><a href="reference/mo_property.html">mo_phylum()</a></code>. As they use <code><a href="reference/as.mo.html">as.mo()</a></code> internally, they also use artificial intelligence. For example, <code><a href="reference/mo_property.html">mo_genus("MRSA")</a></code> and <code><a href="reference/mo_property.html">mo_genus("S. aureus")</a></code> will both return <code>"Staphylococcus"</code>. 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.</li>
|
||||||
<li>The <a href="./reference/antibiotics.html">data set <code>antibiotics</code></a> contains almost 500 antimicrobial drugs with their ATC code, EARS-Net code, common LIS codes, official name, trivial name and DDD of both oral and parenteral administration. It also contains hundreds of trade names. Use functions like <code><a href="reference/atc_property.html">atc_name()</a></code> and <code><a href="reference/atc_property.html">atc_tradenames()</a></code> to look up values. The <code>atc_*</code> functions use <code><a href="reference/as.atc.html">as.atc()</a></code> internally so they support AI to guess your expected result. For example, <code><a href="reference/atc_property.html">atc_name("Fluclox")</a></code>, <code><a href="reference/atc_property.html">atc_name("Floxapen")</a></code> and <code><a href="reference/atc_property.html">atc_name("J01CF05")</a></code> will all return <code>"Flucloxacillin"</code>. These functions can again be used to add new variables to your data.</li>
|
<li>The <a href="./reference/antibiotics.html">data set <code>antibiotics</code></a> contains almost 500 antimicrobial drugs with their ATC code, EARS-Net code, common LIS codes, official name, trivial name and DDD of both oral and parenteral administration. It also contains hundreds of trade names. Use functions like <code><a href="reference/atc_property.html">atc_name()</a></code> and <code><a href="reference/atc_property.html">atc_tradenames()</a></code> to look up values. The <code>atc_*</code> functions use <code><a href="reference/as.atc.html">as.atc()</a></code> internally so they support AI to guess your expected result. For example, <code><a href="reference/atc_property.html">atc_name("Fluclox")</a></code>, <code><a href="reference/atc_property.html">atc_name("Floxapen")</a></code> and <code><a href="reference/atc_property.html">atc_name("J01CF05")</a></code> will all return <code>"Flucloxacillin"</code>. These functions can again be used to add new variables to your data.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
@ -256,13 +256,14 @@
|
|||||||
<p>All ~3,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales and Schizosaccharomycetales.</p>
|
<p>All ~3,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales and Schizosaccharomycetales.</p>
|
||||||
The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant (sub)species are covered (like all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>).</li>
|
The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant (sub)species are covered (like all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>).</li>
|
||||||
<li>All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed</li>
|
<li>All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed</li>
|
||||||
<li><p>The responsible author(s) and year of scientific publication</p></li>
|
<li>
|
||||||
</ul>
|
<p>The responsible author(s) and year of scientific publication</p>
|
||||||
This data is updated annually - check the included version with <code><a href="../reference/catalogue_of_life_version.html">catalogue_of_life_version()</a></code>.
|
This data is updated annually - check the included version with <code><a href="../reference/catalogue_of_life_version.html">catalogue_of_life_version()</a></code>.</li>
|
||||||
<ul>
|
|
||||||
<li>Due to this change, some <code>mo</code> codes changed (e.g. <em>Streptococcus</em> changed from <code>B_STRPTC</code> to <code>B_STRPT</code>). A translation table is used internally to support older microorganism IDs, so users will not notice this difference.</li>
|
<li>Due to this change, some <code>mo</code> codes changed (e.g. <em>Streptococcus</em> changed from <code>B_STRPTC</code> to <code>B_STRPT</code>). A translation table is used internally to support older microorganism IDs, so users will not notice this difference.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
<li>New function <code><a href="../reference/mo_property.html">mo_rank()</a></code> for the taxonomic rank (genus, species, infraspecies, etc.)</li>
|
||||||
|
<li>New function <code><a href="../reference/mo_property.html">mo_url()</a></code> to get the URL to the Catalogue of Life</li>
|
||||||
<li>Support for data from <a href="https://whonet.org/">WHONET</a> and <a href="https://ecdc.europa.eu/en/about-us/partnerships-and-networks/disease-and-laboratory-networks/ears-net">EARS-Net</a> (European Antimicrobial Resistance Surveillance Network):
|
<li>Support for data from <a href="https://whonet.org/">WHONET</a> and <a href="https://ecdc.europa.eu/en/about-us/partnerships-and-networks/disease-and-laboratory-networks/ears-net">EARS-Net</a> (European Antimicrobial Resistance Surveillance Network):
|
||||||
<ul>
|
<ul>
|
||||||
<li>Exported files from WHONET can be read and used in this package. For functions like <code><a href="../reference/first_isolate.html">first_isolate()</a></code> and <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code>, all parameters will be filled in automatically.</li>
|
<li>Exported files from WHONET can be read and used in this package. For functions like <code><a href="../reference/first_isolate.html">first_isolate()</a></code> and <code><a href="../reference/eucast_rules.html">eucast_rules()</a></code>, all parameters will be filled in automatically.</li>
|
||||||
|
@ -344,7 +344,7 @@ When using <code>allow_uncertain = TRUE</code> (which is the default setting), i
|
|||||||
This package contains the complete taxonomic tree of almost all microorganisms from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). This data is updated annually - check the included version with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version</a></code>.</p>
|
This package contains the complete taxonomic tree of almost all microorganisms from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). This data is updated annually - check the included version with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version</a></code>.</p>
|
||||||
<p>Included are:</p><ul>
|
<p>Included are:</p><ul>
|
||||||
<li><p>All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses</p></li>
|
<li><p>All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses</p></li>
|
||||||
<li><p>All ~3,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales and Schizosaccharomycetales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant (sub)species are covered (like all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>).</p></li>
|
<li><p>All ~3,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Cryptococcus</em>, <em>Histplasma</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>).</p></li>
|
||||||
<li><p>All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed</p></li>
|
<li><p>All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed</p></li>
|
||||||
<li><p>The complete taxonomic tree of all included (sub)species: from kingdom to subspecies</p></li>
|
<li><p>The complete taxonomic tree of all included (sub)species: from kingdom to subspecies</p></li>
|
||||||
<li><p>The responsible author(s) and year of scientific publication</p></li>
|
<li><p>The responsible author(s) and year of scientific publication</p></li>
|
||||||
|
@ -249,7 +249,7 @@
|
|||||||
This package contains the complete taxonomic tree of almost all microorganisms from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). This data is updated annually - check the included version with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version</a></code>.</p>
|
This package contains the complete taxonomic tree of almost all microorganisms from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). This data is updated annually - check the included version with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version</a></code>.</p>
|
||||||
<p>Included are:</p><ul>
|
<p>Included are:</p><ul>
|
||||||
<li><p>All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses</p></li>
|
<li><p>All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses</p></li>
|
||||||
<li><p>All ~3,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales and Schizosaccharomycetales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant (sub)species are covered (like all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>).</p></li>
|
<li><p>All ~3,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Cryptococcus</em>, <em>Histplasma</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>).</p></li>
|
||||||
<li><p>All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed</p></li>
|
<li><p>All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed</p></li>
|
||||||
<li><p>The complete taxonomic tree of all included (sub)species: from kingdom to subspecies</p></li>
|
<li><p>The complete taxonomic tree of all included (sub)species: from kingdom to subspecies</p></li>
|
||||||
<li><p>The responsible author(s) and year of scientific publication</p></li>
|
<li><p>The responsible author(s) and year of scientific publication</p></li>
|
||||||
|
@ -250,7 +250,7 @@
|
|||||||
This package contains the complete taxonomic tree of almost all microorganisms from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). This data is updated annually - check the included version with <code>catalogue_of_life_version</code>.</p>
|
This package contains the complete taxonomic tree of almost all microorganisms from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). This data is updated annually - check the included version with <code>catalogue_of_life_version</code>.</p>
|
||||||
<p>Included are:</p><ul>
|
<p>Included are:</p><ul>
|
||||||
<li><p>All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses</p></li>
|
<li><p>All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses</p></li>
|
||||||
<li><p>All ~3,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales and Schizosaccharomycetales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant (sub)species are covered (like all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>).</p></li>
|
<li><p>All ~3,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Cryptococcus</em>, <em>Histplasma</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>).</p></li>
|
||||||
<li><p>All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed</p></li>
|
<li><p>All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed</p></li>
|
||||||
<li><p>The complete taxonomic tree of all included (sub)species: from kingdom to subspecies</p></li>
|
<li><p>The complete taxonomic tree of all included (sub)species: from kingdom to subspecies</p></li>
|
||||||
<li><p>The responsible author(s) and year of scientific publication</p></li>
|
<li><p>The responsible author(s) and year of scientific publication</p></li>
|
||||||
|
@ -355,7 +355,7 @@
|
|||||||
</tr><tr>
|
</tr><tr>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<p><code><a href="mo_property.html">mo_fullname()</a></code> <code><a href="mo_property.html">mo_shortname()</a></code> <code><a href="mo_property.html">mo_subspecies()</a></code> <code><a href="mo_property.html">mo_species()</a></code> <code><a href="mo_property.html">mo_genus()</a></code> <code><a href="mo_property.html">mo_family()</a></code> <code><a href="mo_property.html">mo_order()</a></code> <code><a href="mo_property.html">mo_class()</a></code> <code><a href="mo_property.html">mo_phylum()</a></code> <code><a href="mo_property.html">mo_kingdom()</a></code> <code><a href="mo_property.html">mo_type()</a></code> <code><a href="mo_property.html">mo_gramstain()</a></code> <code><a href="mo_property.html">mo_ref()</a></code> <code><a href="mo_property.html">mo_authors()</a></code> <code><a href="mo_property.html">mo_year()</a></code> <code><a href="mo_property.html">mo_taxonomy()</a></code> <code><a href="mo_property.html">mo_url()</a></code> <code><a href="mo_property.html">mo_property()</a></code> </p>
|
<p><code><a href="mo_property.html">mo_fullname()</a></code> <code><a href="mo_property.html">mo_shortname()</a></code> <code><a href="mo_property.html">mo_subspecies()</a></code> <code><a href="mo_property.html">mo_species()</a></code> <code><a href="mo_property.html">mo_genus()</a></code> <code><a href="mo_property.html">mo_family()</a></code> <code><a href="mo_property.html">mo_order()</a></code> <code><a href="mo_property.html">mo_class()</a></code> <code><a href="mo_property.html">mo_phylum()</a></code> <code><a href="mo_property.html">mo_kingdom()</a></code> <code><a href="mo_property.html">mo_type()</a></code> <code><a href="mo_property.html">mo_gramstain()</a></code> <code><a href="mo_property.html">mo_ref()</a></code> <code><a href="mo_property.html">mo_authors()</a></code> <code><a href="mo_property.html">mo_year()</a></code> <code><a href="mo_property.html">mo_rank()</a></code> <code><a href="mo_property.html">mo_taxonomy()</a></code> <code><a href="mo_property.html">mo_url()</a></code> <code><a href="mo_property.html">mo_property()</a></code> </p>
|
||||||
</td>
|
</td>
|
||||||
<td><p>Property of a microorganism</p></td>
|
<td><p>Property of a microorganism</p></td>
|
||||||
</tr><tr>
|
</tr><tr>
|
||||||
|
@ -257,7 +257,7 @@
|
|||||||
This package contains the complete taxonomic tree of almost all microorganisms from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). This data is updated annually - check the included version with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version</a></code>.</p>
|
This package contains the complete taxonomic tree of almost all microorganisms from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). This data is updated annually - check the included version with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version</a></code>.</p>
|
||||||
<p>Included are:</p><ul>
|
<p>Included are:</p><ul>
|
||||||
<li><p>All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses</p></li>
|
<li><p>All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses</p></li>
|
||||||
<li><p>All ~3,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales and Schizosaccharomycetales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant (sub)species are covered (like all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>).</p></li>
|
<li><p>All ~3,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Cryptococcus</em>, <em>Histplasma</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>).</p></li>
|
||||||
<li><p>All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed</p></li>
|
<li><p>All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed</p></li>
|
||||||
<li><p>The complete taxonomic tree of all included (sub)species: from kingdom to subspecies</p></li>
|
<li><p>The complete taxonomic tree of all included (sub)species: from kingdom to subspecies</p></li>
|
||||||
<li><p>The responsible author(s) and year of scientific publication</p></li>
|
<li><p>The responsible author(s) and year of scientific publication</p></li>
|
||||||
|
@ -245,7 +245,7 @@
|
|||||||
|
|
||||||
<h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
|
<h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
|
||||||
|
|
||||||
<p>A <code><a href='https://www.rdocumentation.org/packages/base/topics/data.frame'>data.frame</a></code> with 56,672 observations and 14 variables:</p><dl class='dl-horizontal'>
|
<p>A <code><a href='https://www.rdocumentation.org/packages/base/topics/data.frame'>data.frame</a></code> with 57,158 observations and 14 variables:</p><dl class='dl-horizontal'>
|
||||||
<dt><code>mo</code></dt><dd><p>ID of microorganism as used by this package</p></dd>
|
<dt><code>mo</code></dt><dd><p>ID of microorganism as used by this package</p></dd>
|
||||||
<dt><code>col_id</code></dt><dd><p>Catalogue of Life ID</p></dd>
|
<dt><code>col_id</code></dt><dd><p>Catalogue of Life ID</p></dd>
|
||||||
<dt><code>fullname</code></dt><dd><p>Full name, like <code>"Echerichia coli"</code></p></dd>
|
<dt><code>fullname</code></dt><dd><p>Full name, like <code>"Echerichia coli"</code></p></dd>
|
||||||
@ -281,7 +281,7 @@
|
|||||||
This package contains the complete taxonomic tree of almost all microorganisms from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). This data is updated annually - check the included version with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version</a></code>.</p>
|
This package contains the complete taxonomic tree of almost all microorganisms from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). This data is updated annually - check the included version with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version</a></code>.</p>
|
||||||
<p>Included are:</p><ul>
|
<p>Included are:</p><ul>
|
||||||
<li><p>All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses</p></li>
|
<li><p>All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses</p></li>
|
||||||
<li><p>All ~3,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales and Schizosaccharomycetales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant (sub)species are covered (like all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>).</p></li>
|
<li><p>All ~3,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Cryptococcus</em>, <em>Histplasma</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>).</p></li>
|
||||||
<li><p>All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed</p></li>
|
<li><p>All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed</p></li>
|
||||||
<li><p>The complete taxonomic tree of all included (sub)species: from kingdom to subspecies</p></li>
|
<li><p>The complete taxonomic tree of all included (sub)species: from kingdom to subspecies</p></li>
|
||||||
<li><p>The responsible author(s) and year of scientific publication</p></li>
|
<li><p>The responsible author(s) and year of scientific publication</p></li>
|
||||||
|
@ -245,7 +245,7 @@
|
|||||||
|
|
||||||
<h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
|
<h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
|
||||||
|
|
||||||
<p>A <code><a href='https://www.rdocumentation.org/packages/base/topics/data.frame'>data.frame</a></code> with 14,506 observations and 4 variables:</p><dl class='dl-horizontal'>
|
<p>A <code><a href='https://www.rdocumentation.org/packages/base/topics/data.frame'>data.frame</a></code> with 14,487 observations and 4 variables:</p><dl class='dl-horizontal'>
|
||||||
<dt><code>col_id</code></dt><dd><p>Catalogue of Life ID</p></dd>
|
<dt><code>col_id</code></dt><dd><p>Catalogue of Life ID</p></dd>
|
||||||
<dt><code>tsn_new</code></dt><dd><p>New Catalogue of Life ID</p></dd>
|
<dt><code>tsn_new</code></dt><dd><p>New Catalogue of Life ID</p></dd>
|
||||||
<dt><code>fullname</code></dt><dd><p>Old taxonomic name of the microorganism</p></dd>
|
<dt><code>fullname</code></dt><dd><p>Old taxonomic name of the microorganism</p></dd>
|
||||||
@ -263,7 +263,7 @@
|
|||||||
This package contains the complete taxonomic tree of almost all microorganisms from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). This data is updated annually - check the included version with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version</a></code>.</p>
|
This package contains the complete taxonomic tree of almost all microorganisms from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). This data is updated annually - check the included version with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version</a></code>.</p>
|
||||||
<p>Included are:</p><ul>
|
<p>Included are:</p><ul>
|
||||||
<li><p>All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses</p></li>
|
<li><p>All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses</p></li>
|
||||||
<li><p>All ~3,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales and Schizosaccharomycetales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant (sub)species are covered (like all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>).</p></li>
|
<li><p>All ~3,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Cryptococcus</em>, <em>Histplasma</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>).</p></li>
|
||||||
<li><p>All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed</p></li>
|
<li><p>All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed</p></li>
|
||||||
<li><p>The complete taxonomic tree of all included (sub)species: from kingdom to subspecies</p></li>
|
<li><p>The complete taxonomic tree of all included (sub)species: from kingdom to subspecies</p></li>
|
||||||
<li><p>The responsible author(s) and year of scientific publication</p></li>
|
<li><p>The responsible author(s) and year of scientific publication</p></li>
|
||||||
|
@ -271,9 +271,11 @@
|
|||||||
|
|
||||||
<span class='fu'>mo_year</span>(<span class='no'>x</span>, <span class='no'>...</span>)
|
<span class='fu'>mo_year</span>(<span class='no'>x</span>, <span class='no'>...</span>)
|
||||||
|
|
||||||
|
<span class='fu'>mo_rank</span>(<span class='no'>x</span>, <span class='no'>...</span>)
|
||||||
|
|
||||||
<span class='fu'>mo_taxonomy</span>(<span class='no'>x</span>, <span class='no'>...</span>)
|
<span class='fu'>mo_taxonomy</span>(<span class='no'>x</span>, <span class='no'>...</span>)
|
||||||
|
|
||||||
<span class='fu'>mo_url</span>(<span class='no'>x</span>, <span class='no'>...</span>)
|
<span class='fu'>mo_url</span>(<span class='no'>x</span>, <span class='kw'>open</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='no'>...</span>)
|
||||||
|
|
||||||
<span class='fu'>mo_property</span>(<span class='no'>x</span>, <span class='kw'>property</span> <span class='kw'>=</span> <span class='st'>"fullname"</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='fu'><a href='get_locale.html'>get_locale</a></span>(), <span class='no'>...</span>)</pre>
|
<span class='fu'>mo_property</span>(<span class='no'>x</span>, <span class='kw'>property</span> <span class='kw'>=</span> <span class='st'>"fullname"</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='fu'><a href='get_locale.html'>get_locale</a></span>(), <span class='no'>...</span>)</pre>
|
||||||
|
|
||||||
@ -292,6 +294,10 @@
|
|||||||
<th>...</th>
|
<th>...</th>
|
||||||
<td><p>other parameters passed on to <code><a href='as.mo.html'>as.mo</a></code></p></td>
|
<td><p>other parameters passed on to <code><a href='as.mo.html'>as.mo</a></code></p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>open</th>
|
||||||
|
<td><p>browse the URL using <code><a href='https://www.rdocumentation.org/packages/utils/topics/browseURL'>browseURL</a></code></p></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>property</th>
|
<th>property</th>
|
||||||
<td><p>one of the column names of one of the <code><a href='microorganisms.html'>microorganisms</a></code> data set or <code>"shortname"</code></p></td>
|
<td><p>one of the column names of one of the <code><a href='microorganisms.html'>microorganisms</a></code> data set or <code>"shortname"</code></p></td>
|
||||||
@ -304,6 +310,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li><p>An <code>integer</code> in case of <code>mo_year</code></p></li>
|
<li><p>An <code>integer</code> in case of <code>mo_year</code></p></li>
|
||||||
<li><p>A <code>list</code> in case of <code>mo_taxonomy</code></p></li>
|
<li><p>A <code>list</code> in case of <code>mo_taxonomy</code></p></li>
|
||||||
|
<li><p>A named <code>character</code> in case of <code>mo_url</code></p></li>
|
||||||
<li><p>A <code>character</code> in all other cases</p></li>
|
<li><p>A <code>character</code> in all other cases</p></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -330,7 +337,7 @@
|
|||||||
This package contains the complete taxonomic tree of almost all microorganisms from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). This data is updated annually - check the included version with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version</a></code>.</p>
|
This package contains the complete taxonomic tree of almost all microorganisms from the authoritative and comprehensive Catalogue of Life (<a href='http://www.catalogueoflife.org'>http://www.catalogueoflife.org</a>). This data is updated annually - check the included version with <code><a href='catalogue_of_life_version.html'>catalogue_of_life_version</a></code>.</p>
|
||||||
<p>Included are:</p><ul>
|
<p>Included are:</p><ul>
|
||||||
<li><p>All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses</p></li>
|
<li><p>All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses</p></li>
|
||||||
<li><p>All ~3,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales and Schizosaccharomycetales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant (sub)species are covered (like all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>).</p></li>
|
<li><p>All ~3,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of <em>Aspergillus</em>, <em>Candida</em>, <em>Cryptococcus</em>, <em>Histplasma</em>, <em>Pneumocystis</em>, <em>Saccharomyces</em> and <em>Trichophyton</em>).</p></li>
|
||||||
<li><p>All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed</p></li>
|
<li><p>All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed</p></li>
|
||||||
<li><p>The complete taxonomic tree of all included (sub)species: from kingdom to subspecies</p></li>
|
<li><p>The complete taxonomic tree of all included (sub)species: from kingdom to subspecies</p></li>
|
||||||
<li><p>The responsible author(s) and year of scientific publication</p></li>
|
<li><p>The responsible author(s) and year of scientific publication</p></li>
|
||||||
@ -357,8 +364,7 @@ This package contains the complete taxonomic tree of almost all microorganisms f
|
|||||||
|
|
||||||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||||||
<pre class="examples"><span class='co'># NOT RUN {</span>
|
<pre class="examples"><span class='co'># NOT RUN {</span>
|
||||||
<span class='co'># All properties of Escherichia coli</span>
|
<span class='co'>## taxonomic tree</span>
|
||||||
<span class='co'>## taxonomic properties</span>
|
|
||||||
<span class='fu'>mo_kingdom</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Bacteria"</span>
|
<span class='fu'>mo_kingdom</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Bacteria"</span>
|
||||||
<span class='fu'>mo_phylum</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Proteobacteria"</span>
|
<span class='fu'>mo_phylum</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Proteobacteria"</span>
|
||||||
<span class='fu'>mo_class</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Gammaproteobacteria"</span>
|
<span class='fu'>mo_class</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Gammaproteobacteria"</span>
|
||||||
@ -375,10 +381,12 @@ This package contains the complete taxonomic tree of almost all microorganisms f
|
|||||||
<span class='co'>## other properties</span>
|
<span class='co'>## other properties</span>
|
||||||
<span class='fu'>mo_gramstain</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Gram negative"</span>
|
<span class='fu'>mo_gramstain</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Gram negative"</span>
|
||||||
<span class='fu'>mo_type</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Bacteria" (equal to kingdom)</span>
|
<span class='fu'>mo_type</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Bacteria" (equal to kingdom)</span>
|
||||||
|
<span class='fu'>mo_rank</span>(<span class='st'>"E. coli"</span>) <span class='co'># "species"</span>
|
||||||
|
<span class='fu'>mo_url</span>(<span class='st'>"E. coli"</span>) <span class='co'># get the direct url to the Catalogue of Life</span>
|
||||||
|
|
||||||
<span class='co'>## scientific reference</span>
|
<span class='co'>## scientific reference</span>
|
||||||
<span class='fu'>mo_ref</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Castellani and Chalmers, 1919"</span>
|
<span class='fu'>mo_ref</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Castellani et al., 1919"</span>
|
||||||
<span class='fu'>mo_authors</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Castellani and Chalmers"</span>
|
<span class='fu'>mo_authors</span>(<span class='st'>"E. coli"</span>) <span class='co'># "Castellani et al."</span>
|
||||||
<span class='fu'>mo_year</span>(<span class='st'>"E. coli"</span>) <span class='co'># 1919</span>
|
<span class='fu'>mo_year</span>(<span class='st'>"E. coli"</span>) <span class='co'># 1919</span>
|
||||||
|
|
||||||
|
|
||||||
@ -414,7 +422,7 @@ This package contains the complete taxonomic tree of almost all microorganisms f
|
|||||||
<span class='fu'>mo_shortname</span>(<span class='st'>"S. pyo"</span>, <span class='kw'>Lancefield</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># "GAS" ('Group A streptococci')</span>
|
<span class='fu'>mo_shortname</span>(<span class='st'>"S. pyo"</span>, <span class='kw'>Lancefield</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># "GAS" ('Group A streptococci')</span>
|
||||||
|
|
||||||
|
|
||||||
<span class='co'># Language support for German, Dutch, Spanish, Portuguese, Italian and French</span>
|
<span class='co'># language support for German, Dutch, Spanish, Portuguese, Italian and French</span>
|
||||||
<span class='fu'>mo_gramstain</span>(<span class='st'>"E. coli"</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='st'>"de"</span>) <span class='co'># "Gramnegativ"</span>
|
<span class='fu'>mo_gramstain</span>(<span class='st'>"E. coli"</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='st'>"de"</span>) <span class='co'># "Gramnegativ"</span>
|
||||||
<span class='fu'>mo_gramstain</span>(<span class='st'>"E. coli"</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='st'>"nl"</span>) <span class='co'># "Gram-negatief"</span>
|
<span class='fu'>mo_gramstain</span>(<span class='st'>"E. coli"</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='st'>"nl"</span>) <span class='co'># "Gram-negatief"</span>
|
||||||
<span class='fu'>mo_gramstain</span>(<span class='st'>"E. coli"</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='st'>"es"</span>) <span class='co'># "Gram negativo"</span>
|
<span class='fu'>mo_gramstain</span>(<span class='st'>"E. coli"</span>, <span class='kw'>language</span> <span class='kw'>=</span> <span class='st'>"es"</span>) <span class='co'># "Gram negativo"</span>
|
||||||
@ -432,7 +440,7 @@ This package contains the complete taxonomic tree of almost all microorganisms f
|
|||||||
<span class='kw'>language</span> <span class='kw'>=</span> <span class='st'>"nl"</span>) <span class='co'># "Streptococcus groep A"</span>
|
<span class='kw'>language</span> <span class='kw'>=</span> <span class='st'>"nl"</span>) <span class='co'># "Streptococcus groep A"</span>
|
||||||
|
|
||||||
|
|
||||||
<span class='co'># Get a list with the complete taxonomy (kingdom to subspecies)</span>
|
<span class='co'># get a list with the complete taxonomy (kingdom to subspecies)</span>
|
||||||
<span class='fu'>mo_taxonomy</span>(<span class='st'>"E. coli"</span>)
|
<span class='fu'>mo_taxonomy</span>(<span class='st'>"E. coli"</span>)
|
||||||
<span class='co'># }</span></pre>
|
<span class='co'># }</span></pre>
|
||||||
</div>
|
</div>
|
||||||
|
6
index.md
@ -66,7 +66,7 @@ install.packages("AMR")
|
|||||||
|
|
||||||
It will be downloaded and installed automatically. For RStudio, click on the menu *Tools* > *Install Packages...* and then type in "AMR" and press <kbd>Install</kbd>.
|
It will be downloaded and installed automatically. For RStudio, click on the menu *Tools* > *Install Packages...* and then type in "AMR" and press <kbd>Install</kbd>.
|
||||||
|
|
||||||
*Note:* Not all functions on this website may be available in this latest release. To use all functions and data sets mentioned on this website, install the latest development version.
|
**Note:** Not all functions on this website may be available in this latest release. To use all functions and data sets mentioned on this website, install the latest development version.
|
||||||
|
|
||||||
#### Latest development version
|
#### Latest development version
|
||||||
|
|
||||||
@ -92,9 +92,9 @@ Included are:
|
|||||||
|
|
||||||
* All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses
|
* All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses
|
||||||
|
|
||||||
* All ~3,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales and Schizosaccharomycetales.
|
* All ~3,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales.
|
||||||
|
|
||||||
The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant (sub)species are covered (like all species of *Aspergillus*, *Candida*, *Pneumocystis*, *Saccharomyces* and *Trichophyton*).
|
The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of *Aspergillus*, *Candida*, *Cryptococcus*, *Histoplasma*, *Pneumocystis*, *Saccharomyces* and *Trichophyton*).
|
||||||
|
|
||||||
* All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed
|
* All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ This package contains the complete taxonomic tree of almost all microorganisms f
|
|||||||
Included are:
|
Included are:
|
||||||
\itemize{
|
\itemize{
|
||||||
\item{All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses}
|
\item{All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses}
|
||||||
\item{All ~3,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales and Schizosaccharomycetales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant (sub)species are covered (like all species of \emph{Aspergillus}, \emph{Candida}, \emph{Pneumocystis}, \emph{Saccharomyces} and \emph{Trichophyton}).}
|
\item{All ~3,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of \emph{Aspergillus}, \emph{Candida}, \emph{Cryptococcus}, \emph{Histplasma}, \emph{Pneumocystis}, \emph{Saccharomyces} and \emph{Trichophyton}).}
|
||||||
\item{All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed}
|
\item{All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed}
|
||||||
\item{The complete taxonomic tree of all included (sub)species: from kingdom to subspecies}
|
\item{The complete taxonomic tree of all included (sub)species: from kingdom to subspecies}
|
||||||
\item{The responsible author(s) and year of scientific publication}
|
\item{The responsible author(s) and year of scientific publication}
|
||||||
|
@ -14,7 +14,7 @@ This package contains the complete taxonomic tree of almost all microorganisms f
|
|||||||
Included are:
|
Included are:
|
||||||
\itemize{
|
\itemize{
|
||||||
\item{All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses}
|
\item{All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses}
|
||||||
\item{All ~3,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales and Schizosaccharomycetales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant (sub)species are covered (like all species of \emph{Aspergillus}, \emph{Candida}, \emph{Pneumocystis}, \emph{Saccharomyces} and \emph{Trichophyton}).}
|
\item{All ~3,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of \emph{Aspergillus}, \emph{Candida}, \emph{Cryptococcus}, \emph{Histplasma}, \emph{Pneumocystis}, \emph{Saccharomyces} and \emph{Trichophyton}).}
|
||||||
\item{All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed}
|
\item{All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed}
|
||||||
\item{The complete taxonomic tree of all included (sub)species: from kingdom to subspecies}
|
\item{The complete taxonomic tree of all included (sub)species: from kingdom to subspecies}
|
||||||
\item{The responsible author(s) and year of scientific publication}
|
\item{The responsible author(s) and year of scientific publication}
|
||||||
|
@ -17,7 +17,7 @@ This package contains the complete taxonomic tree of almost all microorganisms f
|
|||||||
Included are:
|
Included are:
|
||||||
\itemize{
|
\itemize{
|
||||||
\item{All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses}
|
\item{All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses}
|
||||||
\item{All ~3,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales and Schizosaccharomycetales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant (sub)species are covered (like all species of \emph{Aspergillus}, \emph{Candida}, \emph{Pneumocystis}, \emph{Saccharomyces} and \emph{Trichophyton}).}
|
\item{All ~3,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of \emph{Aspergillus}, \emph{Candida}, \emph{Cryptococcus}, \emph{Histplasma}, \emph{Pneumocystis}, \emph{Saccharomyces} and \emph{Trichophyton}).}
|
||||||
\item{All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed}
|
\item{All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed}
|
||||||
\item{The complete taxonomic tree of all included (sub)species: from kingdom to subspecies}
|
\item{The complete taxonomic tree of all included (sub)species: from kingdom to subspecies}
|
||||||
\item{The responsible author(s) and year of scientific publication}
|
\item{The responsible author(s) and year of scientific publication}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
\name{microorganisms}
|
\name{microorganisms}
|
||||||
\alias{microorganisms}
|
\alias{microorganisms}
|
||||||
\title{Data set with ~60,000 microorganisms}
|
\title{Data set with ~60,000 microorganisms}
|
||||||
\format{A \code{\link{data.frame}} with 56,672 observations and 14 variables:
|
\format{A \code{\link{data.frame}} with 57,158 observations and 14 variables:
|
||||||
\describe{
|
\describe{
|
||||||
\item{\code{mo}}{ID of microorganism as used by this package}
|
\item{\code{mo}}{ID of microorganism as used by this package}
|
||||||
\item{\code{col_id}}{Catalogue of Life ID}
|
\item{\code{col_id}}{Catalogue of Life ID}
|
||||||
@ -46,7 +46,7 @@ This package contains the complete taxonomic tree of almost all microorganisms f
|
|||||||
Included are:
|
Included are:
|
||||||
\itemize{
|
\itemize{
|
||||||
\item{All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses}
|
\item{All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses}
|
||||||
\item{All ~3,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales and Schizosaccharomycetales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant (sub)species are covered (like all species of \emph{Aspergillus}, \emph{Candida}, \emph{Pneumocystis}, \emph{Saccharomyces} and \emph{Trichophyton}).}
|
\item{All ~3,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of \emph{Aspergillus}, \emph{Candida}, \emph{Cryptococcus}, \emph{Histplasma}, \emph{Pneumocystis}, \emph{Saccharomyces} and \emph{Trichophyton}).}
|
||||||
\item{All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed}
|
\item{All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed}
|
||||||
\item{The complete taxonomic tree of all included (sub)species: from kingdom to subspecies}
|
\item{The complete taxonomic tree of all included (sub)species: from kingdom to subspecies}
|
||||||
\item{The responsible author(s) and year of scientific publication}
|
\item{The responsible author(s) and year of scientific publication}
|
||||||
|
@ -23,7 +23,7 @@ This package contains the complete taxonomic tree of almost all microorganisms f
|
|||||||
Included are:
|
Included are:
|
||||||
\itemize{
|
\itemize{
|
||||||
\item{All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses}
|
\item{All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses}
|
||||||
\item{All ~3,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales and Schizosaccharomycetales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant (sub)species are covered (like all species of \emph{Aspergillus}, \emph{Candida}, \emph{Pneumocystis}, \emph{Saccharomyces} and \emph{Trichophyton}).}
|
\item{All ~3,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of \emph{Aspergillus}, \emph{Candida}, \emph{Cryptococcus}, \emph{Histplasma}, \emph{Pneumocystis}, \emph{Saccharomyces} and \emph{Trichophyton}).}
|
||||||
\item{All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed}
|
\item{All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed}
|
||||||
\item{The complete taxonomic tree of all included (sub)species: from kingdom to subspecies}
|
\item{The complete taxonomic tree of all included (sub)species: from kingdom to subspecies}
|
||||||
\item{The responsible author(s) and year of scientific publication}
|
\item{The responsible author(s) and year of scientific publication}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
\name{microorganisms.old}
|
\name{microorganisms.old}
|
||||||
\alias{microorganisms.old}
|
\alias{microorganisms.old}
|
||||||
\title{Data set with previously accepted taxonomic names}
|
\title{Data set with previously accepted taxonomic names}
|
||||||
\format{A \code{\link{data.frame}} with 14,506 observations and 4 variables:
|
\format{A \code{\link{data.frame}} with 14,487 observations and 4 variables:
|
||||||
\describe{
|
\describe{
|
||||||
\item{\code{col_id}}{Catalogue of Life ID}
|
\item{\code{col_id}}{Catalogue of Life ID}
|
||||||
\item{\code{tsn_new}}{New Catalogue of Life ID}
|
\item{\code{tsn_new}}{New Catalogue of Life ID}
|
||||||
@ -28,7 +28,7 @@ This package contains the complete taxonomic tree of almost all microorganisms f
|
|||||||
Included are:
|
Included are:
|
||||||
\itemize{
|
\itemize{
|
||||||
\item{All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses}
|
\item{All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses}
|
||||||
\item{All ~3,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales and Schizosaccharomycetales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant (sub)species are covered (like all species of \emph{Aspergillus}, \emph{Candida}, \emph{Pneumocystis}, \emph{Saccharomyces} and \emph{Trichophyton}).}
|
\item{All ~3,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of \emph{Aspergillus}, \emph{Candida}, \emph{Cryptococcus}, \emph{Histplasma}, \emph{Pneumocystis}, \emph{Saccharomyces} and \emph{Trichophyton}).}
|
||||||
\item{All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed}
|
\item{All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed}
|
||||||
\item{The complete taxonomic tree of all included (sub)species: from kingdom to subspecies}
|
\item{The complete taxonomic tree of all included (sub)species: from kingdom to subspecies}
|
||||||
\item{The responsible author(s) and year of scientific publication}
|
\item{The responsible author(s) and year of scientific publication}
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
\alias{mo_ref}
|
\alias{mo_ref}
|
||||||
\alias{mo_authors}
|
\alias{mo_authors}
|
||||||
\alias{mo_year}
|
\alias{mo_year}
|
||||||
|
\alias{mo_rank}
|
||||||
\alias{mo_taxonomy}
|
\alias{mo_taxonomy}
|
||||||
\alias{mo_url}
|
\alias{mo_url}
|
||||||
\title{Property of a microorganism}
|
\title{Property of a microorganism}
|
||||||
@ -51,9 +52,11 @@ mo_authors(x, ...)
|
|||||||
|
|
||||||
mo_year(x, ...)
|
mo_year(x, ...)
|
||||||
|
|
||||||
|
mo_rank(x, ...)
|
||||||
|
|
||||||
mo_taxonomy(x, ...)
|
mo_taxonomy(x, ...)
|
||||||
|
|
||||||
mo_url(x, ...)
|
mo_url(x, open = FALSE, ...)
|
||||||
|
|
||||||
mo_property(x, property = "fullname", language = get_locale(), ...)
|
mo_property(x, property = "fullname", language = get_locale(), ...)
|
||||||
}
|
}
|
||||||
@ -64,12 +67,15 @@ mo_property(x, property = "fullname", language = get_locale(), ...)
|
|||||||
|
|
||||||
\item{...}{other parameters passed on to \code{\link{as.mo}}}
|
\item{...}{other parameters passed on to \code{\link{as.mo}}}
|
||||||
|
|
||||||
|
\item{open}{browse the URL using \code{\link[utils]{browseURL}}}
|
||||||
|
|
||||||
\item{property}{one of the column names of one of the \code{\link{microorganisms}} data set or \code{"shortname"}}
|
\item{property}{one of the column names of one of the \code{\link{microorganisms}} data set or \code{"shortname"}}
|
||||||
}
|
}
|
||||||
\value{
|
\value{
|
||||||
\itemize{
|
\itemize{
|
||||||
\item{An \code{integer} in case of \code{mo_year}}
|
\item{An \code{integer} in case of \code{mo_year}}
|
||||||
\item{A \code{list} in case of \code{mo_taxonomy}}
|
\item{A \code{list} in case of \code{mo_taxonomy}}
|
||||||
|
\item{A named \code{character} in case of \code{mo_url}}
|
||||||
\item{A \code{character} in all other cases}
|
\item{A \code{character} in all other cases}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -101,7 +107,7 @@ This package contains the complete taxonomic tree of almost all microorganisms f
|
|||||||
Included are:
|
Included are:
|
||||||
\itemize{
|
\itemize{
|
||||||
\item{All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses}
|
\item{All ~55,000 (sub)species from the kingdoms of Archaea, Bacteria, Protozoa and Viruses}
|
||||||
\item{All ~3,000 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales and Schizosaccharomycetales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant (sub)species are covered (like all species of \emph{Aspergillus}, \emph{Candida}, \emph{Pneumocystis}, \emph{Saccharomyces} and \emph{Trichophyton}).}
|
\item{All ~3,500 (sub)species from these orders of the kingdom of Fungi: Eurotiales, Onygenales, Pneumocystales, Saccharomycetales, Schizosaccharomycetales and Tremellales. The kingdom of Fungi is a very large taxon with almost 300,000 different (sub)species, of which most are not microbial (but rather macroscopic, like mushrooms). Because of this, not all fungi fit the scope of this package and including everything would tremendously slow down our algorithms too. By only including the aforementioned taxonomic orders, the most relevant fungi are covered (like all species of \emph{Aspergillus}, \emph{Candida}, \emph{Cryptococcus}, \emph{Histplasma}, \emph{Pneumocystis}, \emph{Saccharomyces} and \emph{Trichophyton}).}
|
||||||
\item{All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed}
|
\item{All ~15,000 previously accepted names of included (sub)species that have been taxonomically renamed}
|
||||||
\item{The complete taxonomic tree of all included (sub)species: from kingdom to subspecies}
|
\item{The complete taxonomic tree of all included (sub)species: from kingdom to subspecies}
|
||||||
\item{The responsible author(s) and year of scientific publication}
|
\item{The responsible author(s) and year of scientific publication}
|
||||||
@ -127,8 +133,7 @@ On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://
|
|||||||
}
|
}
|
||||||
|
|
||||||
\examples{
|
\examples{
|
||||||
# All properties of Escherichia coli
|
## taxonomic tree
|
||||||
## taxonomic properties
|
|
||||||
mo_kingdom("E. coli") # "Bacteria"
|
mo_kingdom("E. coli") # "Bacteria"
|
||||||
mo_phylum("E. coli") # "Proteobacteria"
|
mo_phylum("E. coli") # "Proteobacteria"
|
||||||
mo_class("E. coli") # "Gammaproteobacteria"
|
mo_class("E. coli") # "Gammaproteobacteria"
|
||||||
@ -145,10 +150,12 @@ mo_shortname("E. coli") # "E. coli"
|
|||||||
## other properties
|
## other properties
|
||||||
mo_gramstain("E. coli") # "Gram negative"
|
mo_gramstain("E. coli") # "Gram negative"
|
||||||
mo_type("E. coli") # "Bacteria" (equal to kingdom)
|
mo_type("E. coli") # "Bacteria" (equal to kingdom)
|
||||||
|
mo_rank("E. coli") # "species"
|
||||||
|
mo_url("E. coli") # get the direct url to the Catalogue of Life
|
||||||
|
|
||||||
## scientific reference
|
## scientific reference
|
||||||
mo_ref("E. coli") # "Castellani and Chalmers, 1919"
|
mo_ref("E. coli") # "Castellani et al., 1919"
|
||||||
mo_authors("E. coli") # "Castellani and Chalmers"
|
mo_authors("E. coli") # "Castellani et al."
|
||||||
mo_year("E. coli") # 1919
|
mo_year("E. coli") # 1919
|
||||||
|
|
||||||
|
|
||||||
@ -184,7 +191,7 @@ mo_shortname("S. pyo") # "S. pyogenes"
|
|||||||
mo_shortname("S. pyo", Lancefield = TRUE) # "GAS" ('Group A streptococci')
|
mo_shortname("S. pyo", Lancefield = TRUE) # "GAS" ('Group A streptococci')
|
||||||
|
|
||||||
|
|
||||||
# Language support for German, Dutch, Spanish, Portuguese, Italian and French
|
# language support for German, Dutch, Spanish, Portuguese, Italian and French
|
||||||
mo_gramstain("E. coli", language = "de") # "Gramnegativ"
|
mo_gramstain("E. coli", language = "de") # "Gramnegativ"
|
||||||
mo_gramstain("E. coli", language = "nl") # "Gram-negatief"
|
mo_gramstain("E. coli", language = "nl") # "Gram-negatief"
|
||||||
mo_gramstain("E. coli", language = "es") # "Gram negativo"
|
mo_gramstain("E. coli", language = "es") # "Gram negativo"
|
||||||
@ -202,7 +209,7 @@ mo_fullname("S. pyogenes",
|
|||||||
language = "nl") # "Streptococcus groep A"
|
language = "nl") # "Streptococcus groep A"
|
||||||
|
|
||||||
|
|
||||||
# Get a list with the complete taxonomy (kingdom to subspecies)
|
# get a list with the complete taxonomy (kingdom to subspecies)
|
||||||
mo_taxonomy("E. coli")
|
mo_taxonomy("E. coli")
|
||||||
}
|
}
|
||||||
\seealso{
|
\seealso{
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
# Data retrieved from Encyclopaedia of Life:
|
# Data retrieved from Encyclopaedia of Life:
|
||||||
# https://opendata.eol.org/dataset/catalogue-of-life/
|
# https://opendata.eol.org/dataset/catalogue-of-life/
|
||||||
|
|
||||||
# unzip and extract taxon.tab, then:
|
# unzip and extract taxon.tab (around 1.5 GB), then:
|
||||||
taxon <- data.table::fread("taxon.tab")
|
taxon <- data.table::fread("Downloads/taxon.tab")
|
||||||
# result is over 3.7M rows:
|
# result is over 3.7M rows:
|
||||||
library(dplyr)
|
library(dplyr)
|
||||||
library(AMR)
|
library(AMR)
|
||||||
@ -29,25 +29,45 @@ MOs <- taxon %>%
|
|||||||
!taxonRank %in% c("kingdom", "phylum", "superfamily", "class", "order", "family"),
|
!taxonRank %in% c("kingdom", "phylum", "superfamily", "class", "order", "family"),
|
||||||
# not all fungi: Aspergillus, Candida, Trichphyton and Pneumocystis are the most important,
|
# not all fungi: Aspergillus, Candida, Trichphyton and Pneumocystis are the most important,
|
||||||
# so only keep these orders from the fungi:
|
# so only keep these orders from the fungi:
|
||||||
!(kingdom == "Fungi" & !order %in% c("Eurotiales", "Saccharomycetales", "Schizosaccharomycetales", "Onygenales", "Pneumocystales"))) %>%
|
!(kingdom == "Fungi" & !order %in% c("Eurotiales", "Saccharomycetales", "Schizosaccharomycetales", "Tremellales", "Onygenales", "Pneumocystales"))) %>%
|
||||||
# remove text if it contains 'Not assigned' like phylum in viruses
|
# remove text if it contains 'Not assigned' like phylum in viruses
|
||||||
mutate_all(funs(gsub("Not assigned", "", .))) %>%
|
mutate_all(funs(gsub("Not assigned", "", .))) %>%
|
||||||
# only latest ref, not original authors
|
# Transform 'Smith, Jones, 2011' to 'Smith et al., 2011':
|
||||||
mutate(scientificNameAuthorship = trimws(gsub(".*[)] ", "", scientificNameAuthorship)),
|
mutate(authors2 = iconv(scientificNameAuthorship, from = "UTF-8", to = "ASCII//TRANSLIT"),
|
||||||
scientificNameAuthorship = ifelse(grepl(" emend[. ]", scientificNameAuthorship, ignore.case = TRUE),
|
# remove leading and trailing brackets
|
||||||
gsub("(.*)emend[. ]+(.*)", "\\2", scientificNameAuthorship, ignore.case = TRUE),
|
authors2 = gsub("^[(](.*)[)]$", "\\1", authors2),
|
||||||
scientificNameAuthorship),
|
# only take part after brackets if there's a name
|
||||||
scientificNameAuthorship = gsub(".", "", scientificNameAuthorship, fixed = TRUE),
|
authors2 = ifelse(grepl(".*[)] [a-zA-Z]+.*", authors2),
|
||||||
scientificNameAuthorship = gsub(",? et al", " et al.", scientificNameAuthorship, fixed = FALSE, ignore.case = TRUE),
|
gsub(".*[)] (.*)", "\\1", authors2),
|
||||||
scientificNameAuthorship = gsub("[()]", "", scientificNameAuthorship),
|
authors2),
|
||||||
# year always preceded by comma
|
# get year from last 4 digits
|
||||||
scientificNameAuthorship = gsub(" ([0-9]{4})$", ", \\1", scientificNameAuthorship),
|
lastyear = as.integer(gsub(".*([0-9]{4})$", "\\1", authors2)),
|
||||||
scientificNameAuthorship = gsub(",,", ",", scientificNameAuthorship, fixed = TRUE),
|
# can never be later than now
|
||||||
# only first author with *et al.*
|
lastyear = ifelse(lastyear > as.integer(format(Sys.Date(), "%Y")),
|
||||||
scientificNameAuthorship = gsub(",.*,", " et al.,", scientificNameAuthorship),
|
NA,
|
||||||
scientificNameAuthorship = gsub(" (and|&) .*,", " et al.,", scientificNameAuthorship),
|
lastyear),
|
||||||
scientificNameAuthorship = gsub(", [^0-9]+", ", ", scientificNameAuthorship),
|
# get authors without last year
|
||||||
scientificNameAuthorship = gsub(", $", "", scientificNameAuthorship)
|
authors = gsub("(.*)[0-9]{4}$", "\\1", authors2),
|
||||||
|
# remove nonsense characters from names
|
||||||
|
authors = gsub("[^a-zA-Z,'& -]", "", authors),
|
||||||
|
# remove trailing and leading spaces
|
||||||
|
authors = trimws(authors),
|
||||||
|
# only keep first author and replace all others by 'et al'
|
||||||
|
authors = gsub("(,| and| &| ex| emend\\.?) .*", " et al.", authors),
|
||||||
|
# et al. always with ending dot
|
||||||
|
authors = gsub(" et al\\.?", " et al.", authors),
|
||||||
|
authors = gsub(" ?,$", "", authors),
|
||||||
|
# don't start with 'sensu' or 'ehrenb'
|
||||||
|
authors = gsub("^(sensu|Ehrenb.?) ", "", authors, ignore.case = TRUE),
|
||||||
|
# no initials, only surname
|
||||||
|
authors = gsub("^([A-Z]+ )+", "", authors, ignore.case = FALSE),
|
||||||
|
# combine author and year if year is available
|
||||||
|
ref = ifelse(!is.na(lastyear),
|
||||||
|
paste0(authors, ", ", lastyear),
|
||||||
|
authors),
|
||||||
|
# fix beginning and ending
|
||||||
|
ref = gsub(", $", "", ref),
|
||||||
|
ref = gsub("^, ", "", ref)
|
||||||
)
|
)
|
||||||
|
|
||||||
# remove non-ASCII characters (not allowed by CRAN)
|
# remove non-ASCII characters (not allowed by CRAN)
|
||||||
@ -58,7 +78,7 @@ MOs <- MOs %>%
|
|||||||
# split old taxonomic names - they refer to a new `taxonID` with `acceptedNameUsageID`
|
# split old taxonomic names - they refer to a new `taxonID` with `acceptedNameUsageID`
|
||||||
MOs.old <- MOs %>%
|
MOs.old <- MOs %>%
|
||||||
filter(!is.na(acceptedNameUsageID),
|
filter(!is.na(acceptedNameUsageID),
|
||||||
scientificNameAuthorship != "") %>%
|
ref != "") %>%
|
||||||
transmute(col_id = taxonID,
|
transmute(col_id = taxonID,
|
||||||
col_id_new = acceptedNameUsageID,
|
col_id_new = acceptedNameUsageID,
|
||||||
fullname =
|
fullname =
|
||||||
@ -66,9 +86,9 @@ MOs.old <- MOs %>%
|
|||||||
gsub("(.*)[(].*", "\\1",
|
gsub("(.*)[(].*", "\\1",
|
||||||
stringr::str_replace(
|
stringr::str_replace(
|
||||||
string = scientificName,
|
string = scientificName,
|
||||||
pattern = stringr::fixed(scientificNameAuthorship),
|
pattern = stringr::fixed(ref),
|
||||||
replacement = ""))),
|
replacement = ""))),
|
||||||
ref = scientificNameAuthorship) %>%
|
ref = ref) %>%
|
||||||
filter(!is.na(fullname)) %>%
|
filter(!is.na(fullname)) %>%
|
||||||
distinct(fullname, .keep_all = TRUE) %>%
|
distinct(fullname, .keep_all = TRUE) %>%
|
||||||
arrange(col_id)
|
arrange(col_id)
|
||||||
@ -88,7 +108,7 @@ MOs <- MOs %>%
|
|||||||
species = specificEpithet,
|
species = specificEpithet,
|
||||||
subspecies = infraspecificEpithet,
|
subspecies = infraspecificEpithet,
|
||||||
rank = taxonRank,
|
rank = taxonRank,
|
||||||
ref = scientificNameAuthorship,
|
ref = ref,
|
||||||
species_id = gsub(".*/([a-f0-9]+)", "\\1", furtherInformationURL)) %>%
|
species_id = gsub(".*/([a-f0-9]+)", "\\1", furtherInformationURL)) %>%
|
||||||
distinct(fullname, .keep_all = TRUE) %>%
|
distinct(fullname, .keep_all = TRUE) %>%
|
||||||
filter(!grepl("unassigned", fullname, ignore.case = TRUE))
|
filter(!grepl("unassigned", fullname, ignore.case = TRUE))
|
||||||
@ -254,6 +274,7 @@ class(MOs$mo) <- "mo"
|
|||||||
|
|
||||||
saveRDS(MOs, "microorganisms.rds")
|
saveRDS(MOs, "microorganisms.rds")
|
||||||
saveRDS(MOs.old, "microorganisms.old.rds")
|
saveRDS(MOs.old, "microorganisms.old.rds")
|
||||||
|
|
||||||
# on the server:
|
# on the server:
|
||||||
# usethis::use_data(microorganisms, overwrite = TRUE)
|
# usethis::use_data(microorganisms, overwrite = TRUE)
|
||||||
# usethis::use_data(microorganisms.old, overwrite = TRUE)
|
# usethis::use_data(microorganisms.old, overwrite = TRUE)
|
||||||
|
@ -48,12 +48,11 @@ S.aureus <- microbenchmark(as.mo("sau"),
|
|||||||
as.mo("S. aureus"),
|
as.mo("S. aureus"),
|
||||||
as.mo("STAAUR"),
|
as.mo("STAAUR"),
|
||||||
as.mo("Staphylococcus aureus"),
|
as.mo("Staphylococcus aureus"),
|
||||||
as.mo("B_STPHY_AUR"),
|
|
||||||
times = 10)
|
times = 10)
|
||||||
print(S.aureus, unit = "ms", signif = 2)
|
print(S.aureus, unit = "ms", signif = 3)
|
||||||
```
|
```
|
||||||
|
|
||||||
In the table above, all measurements are shown in milliseconds (thousands of seconds). A value of 10 milliseconds means it can determine 100 input values per second. It case of 50 milliseconds, this is only 20 input values per second. The more an input value resembles a full name, the faster the result will be found. In case of `as.mo("B_STPHY_AUR")`, the input is already a valid MO code, so it only almost takes no time at all (`r as.integer(S.aureus %>% filter(expr == 'as.mo("B_STPHY_AUR")') %>% pull(time) %>% median(na.rm = TRUE) / 1000)` millionths of a second).
|
In the table above, all measurements are shown in milliseconds (thousands of seconds). A value of 10 milliseconds means it can determine 100 input values per second. It case of 50 milliseconds, this is only 20 input values per second. The more an input value resembles a full name, the faster the result will be found.
|
||||||
|
|
||||||
To achieve this speed, the `as.mo` function also takes into account the prevalence of human pathogenic microorganisms. The downside is of course that less prevalent microorganisms will be determined less fast. See this example for the ID of *Mycoplasma leonicaptivi* (`B_MYCPL_LEO`), a bug probably never found before in humans:
|
To achieve this speed, the `as.mo` function also takes into account the prevalence of human pathogenic microorganisms. The downside is of course that less prevalent microorganisms will be determined less fast. See this example for the ID of *Mycoplasma leonicaptivi* (`B_MYCPL_LEO`), a bug probably never found before in humans:
|
||||||
|
|
||||||
@ -64,26 +63,30 @@ M.leonicaptivi <- microbenchmark(as.mo("myle"),
|
|||||||
as.mo("M. leonicaptivi"),
|
as.mo("M. leonicaptivi"),
|
||||||
as.mo("MYCLEO"),
|
as.mo("MYCLEO"),
|
||||||
as.mo("Mycoplasma leonicaptivi"),
|
as.mo("Mycoplasma leonicaptivi"),
|
||||||
as.mo("B_MYCPL_LEO"),
|
|
||||||
times = 10)
|
times = 10)
|
||||||
print(M.leonicaptivi, unit = "ms", signif = 2)
|
print(M.leonicaptivi, unit = "ms", signif = 3)
|
||||||
```
|
```
|
||||||
|
|
||||||
That takes `r round(mean(M.leonicaptivi$time, na.rm = TRUE) / mean(S.aureus$time, na.rm = TRUE), 1)` times as much time on average! A value of 100 milliseconds means it can only determine ~10 different input values per second. We can conclude that looking up arbitrary codes of less prevalent microorganisms is the worst way to go, in terms of calculation performance:
|
That takes `r round(mean(M.leonicaptivi$time, na.rm = TRUE) / mean(S.aureus$time, na.rm = TRUE), 1)` times as much time on average! A value of 100 milliseconds means it can only determine ~10 different input values per second. We can conclude that looking up arbitrary codes of less prevalent microorganisms is the worst way to go, in terms of calculation performance.
|
||||||
|
|
||||||
|
In the figure below, we compare *Escherichia coli* (which is very common) with *Prevotella brevis* (which is moderately common) and with *Mycoplasma leonicaptivi* (which is very uncommon):
|
||||||
|
|
||||||
```{r}
|
```{r}
|
||||||
par(mar = c(5, 16, 4, 2)) # set more space for left margin text (16)
|
par(mar = c(5, 16, 4, 2)) # set more space for left margin text (16)
|
||||||
|
|
||||||
# highest value on y axis
|
boxplot(microbenchmark(as.mo("M. leonicaptivi"),
|
||||||
max_y_axis <- max(S.aureus$time, M.leonicaptivi$time, na.rm = TRUE) / 1e6
|
as.mo("Mycoplasma leonicaptivi"),
|
||||||
|
as.mo("P. brevis"),
|
||||||
boxplot(S.aureus, horizontal = TRUE, las = 1, unit = "ms", log = FALSE, xlab = "", ylim = c(0, max_y_axis),
|
as.mo("Prevotella brevis"),
|
||||||
main = expression(paste("Benchmark of ", italic("Staphylococcus aureus"))))
|
as.mo("E. coli"),
|
||||||
boxplot(M.leonicaptivi, horizontal = TRUE, las = 1, unit = "ms", log = FALSE, xlab = "", ylim = c(0, max_y_axis),
|
as.mo("Escherichia coli"),
|
||||||
main = expression(paste("Benchmark of ", italic("Mycoplasma leonicaptivi"))))
|
times = 50),
|
||||||
|
horizontal = TRUE, las = 1, unit = "s", log = FALSE,
|
||||||
|
xlab = "", ylab = "Time in seconds",
|
||||||
|
main = "Benchmarks per prevalence")
|
||||||
```
|
```
|
||||||
|
|
||||||
To relieve this pitfall and further improve performance, two important calculations take almost no time at all: **repetitive results** and **already precalculated results**.
|
Uncommon microorganisms take a lot more time than common microorganisms. To relieve this pitfall and further improve performance, two important calculations take almost no time at all: **repetitive results** and **already precalculated results**.
|
||||||
|
|
||||||
### Repetitive results
|
### Repetitive results
|
||||||
|
|
||||||
|