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

added mo_shortname

This commit is contained in:
2018-09-05 10:51:46 +02:00
parent 790bd1622d
commit e39a9a8b05
8 changed files with 88 additions and 12 deletions

View File

@ -33,7 +33,7 @@ guess_mo(x, Becker = FALSE, Lancefield = FALSE)
Character (vector) with class \code{"mo"}. Unknown values will return \code{NA}.
}
\description{
Use this function to determine a valid ID based on a genus (and species). This input can be a full name (like \code{"Staphylococcus aureus"}), an abbreviated name (like \code{"S. aureus"}), or just a genus. You could also \code{\link{select}} a genus and species column, zie Examples.
Use this function to determine a valid ID based on a genus (and species). Determination is done using Artificial Intelligence (AI), so the input can be almost anything: a full name (like \code{"Staphylococcus aureus"}), an abbreviated name (like \code{"S. aureus"}), an abbreviation known in the field (like \code{"MRSA"}), or just a genus. You could also \code{\link{select}} a genus and species column, zie Examples.
}
\details{
\code{guess_mo} is an alias of \code{as.mo}.
@ -44,6 +44,7 @@ Some exceptions have been built in to get more logical results, based on prevale
\itemize{
\item{\code{"E. coli"} will return the ID of \emph{Escherichia coli} and not \emph{Entamoeba coli}, although the latter would alphabetically come first}
\item{\code{"H. influenzae"} will return the ID of \emph{Haemophilus influenzae} and not \emph{Haematobacter influenzae}}
\item{Something like \code{"s pyo"} will return the ID of \emph{Streptococcus pyogenes} and not \emph{Actinomyes pyogenes}}
\item{Something like \code{"p aer"} will return the ID of \emph{Pseudomonas aeruginosa} and not \emph{Pasteurella aerogenes}}
\item{Something like \code{"stau"} or \code{"staaur"} will return the ID of \emph{Staphylococcus aureus} and not \emph{Staphylococcus auricularis}}
}
@ -62,6 +63,10 @@ as.mo("MRSA") # Methicillin Resistant S. aureus
as.mo("VISA") # Vancomycin Intermediate S. aureus
as.mo("VRSA") # Vancomycin Resistant S. aureus
as.mo("Streptococcus group A")
as.mo("GAS") # Group A Streptococci
as.mo("GBS") # Group B Streptococci
# guess_mo is an alias of as.mo and works the same
guess_mo("S. epidermidis") # will remain species: STAEPI
guess_mo("S. epidermidis", Becker = TRUE) # will not remain species: STACNS

View File

@ -7,6 +7,7 @@
\alias{mo_species}
\alias{mo_subspecies}
\alias{mo_fullname}
\alias{mo_shortname}
\alias{mo_type}
\alias{mo_gramstain}
\alias{mo_aerobic}
@ -30,6 +31,8 @@ mo_subspecies(x, Becker = FALSE, Lancefield = FALSE)
mo_fullname(x, Becker = FALSE, Lancefield = FALSE)
mo_shortname(x, Becker = FALSE, Lancefield = FALSE)
mo_type(x, language = "en")
mo_gramstain(x, language = "en")
@ -61,6 +64,7 @@ mo_genus("E. coli") # "Escherichia"
mo_species("E. coli") # "coli"
mo_subspecies("E. coli") # <NA>
mo_fullname("E. coli") # "Escherichia coli"
mo_shortname("E. coli") # "E. coli"
mo_type("E. coli") # "Bacteria"
mo_gramstain("E. coli") # "Negative rods"
mo_aerobic("E. coli") # TRUE
@ -77,6 +81,7 @@ mo_gramstain("E. coli", "nl") # "Negatieve staven"
# Abbreviations known in the field
mo_genus("MRSA") # "Staphylococcus"
mo_species("MRSA") # "aureus"
mo_shortname("MRSA") # "S. aureus"
mo_gramstain("MRSA") # "Positive cocci"
mo_genus("VISA") # "Staphylococcus"
@ -88,12 +93,14 @@ mo_genus("EHEC") # "Escherichia"
mo_species("EHEC") # "coli"
mo_subspecies("EHEC") # "EHEC"
mo_fullname("EHEC") # "Escherichia coli (EHEC)"
mo_shortname("EHEC") # "E. coli"
mo_genus("doylei") # "Campylobacter"
mo_species("doylei") # "jejuni"
mo_fullname("doylei") # "Campylobacter jejuni (doylei)"
mo_fullname("K. pneu rh") # "Klebsiella pneumoniae (rhinoscleromatis)"
mo_shortname("K. pneu rh") # "K. pneumoniae"
# Anaerobic bacteria
@ -103,12 +110,16 @@ mo_aerobic("B. fragilis") # FALSE
# Becker classification, see ?as.mo
mo_fullname("S. epidermidis") # "Staphylococcus epidermidis"
mo_fullname("S. epidermidis", Becker = TRUE) # "Coagulase Negative Staphylococcus (CoNS)"
mo_fullname("S. epidermidis") # "Staphylococcus epidermidis"
mo_fullname("S. epidermidis", Becker = TRUE) # "Coagulase Negative Staphylococcus (CoNS)"
mo_shortname("S. epidermidis") # "S. epidermidis"
mo_shortname("S. epidermidis", Becker = TRUE) # "CoNS"
# Lancefield classification, see ?as.mo
mo_fullname("S. pyogenes") # "Streptococcus pyogenes"
mo_fullname("S. pyogenes", Lancefield = TRUE) # "Streptococcus group A"
mo_fullname("S. pyogenes") # "Streptococcus pyogenes"
mo_fullname("S. pyogenes", Lancefield = TRUE) # "Streptococcus group A"
mo_shortname("S. pyogenes") # "S. pyogenes"
mo_shortname("S. pyogenes", Lancefield = TRUE) # "GAS"
}
\seealso{
\code{\link{microorganisms}}