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

(v1.4.0.9020) mo_is_intrinsic_resistant

This commit is contained in:
2020-11-16 11:03:24 +01:00
parent 9666b78ea7
commit 05fb213a7c
24 changed files with 228 additions and 144 deletions

View File

@ -85,7 +85,7 @@ if (require("dplyr")) {
# get bug/drug combinations for only macrolides in Gram-positives:
example_isolates \%>\%
filter(is_gram_positive()) \%>\%
filter(mo_is_gram_positive()) \%>\%
select(mo, macrolides()) \%>\%
bug_drug_combinations() \%>\%
format()

View File

@ -212,8 +212,9 @@ as.mo("S. pyogenes") # will remain species: B_STRPT_PYGN
as.mo("S. pyogenes", Lancefield = TRUE) # will not remain species: B_STRPT_GRPA
# All mo_* functions use as.mo() internally too (see ?mo_property):
mo_genus("E. coli") # returns "Escherichia"
mo_gramstain("E. coli") # returns "Gram negative"
mo_genus("E. coli") # returns "Escherichia"
mo_gramstain("E. coli") # returns "Gram negative"
mo_is_intrinsic_resistant("E. coli", "vanco") # returns TRUE
}
}
\seealso{

View File

@ -16,8 +16,9 @@
\alias{mo_domain}
\alias{mo_type}
\alias{mo_gramstain}
\alias{is_gram_negative}
\alias{is_gram_positive}
\alias{mo_is_gram_negative}
\alias{mo_is_gram_positive}
\alias{mo_is_intrinsic_resistant}
\alias{mo_snomed}
\alias{mo_ref}
\alias{mo_authors}
@ -57,9 +58,11 @@ mo_type(x, language = get_locale(), ...)
mo_gramstain(x, language = get_locale(), ...)
is_gram_negative(x, language = get_locale(), ...)
mo_is_gram_negative(x, language = get_locale(), ...)
is_gram_positive(x, language = get_locale(), ...)
mo_is_gram_positive(x, language = get_locale(), ...)
mo_is_intrinsic_resistant(x, ab, language = get_locale(), ...)
mo_snomed(x, language = get_locale(), ...)
@ -88,6 +91,8 @@ mo_property(x, property = "fullname", language = get_locale(), ...)
\item{...}{other parameters passed on to \code{\link[=as.mo]{as.mo()}}, such as 'allow_uncertain' and 'ignore_pattern'}
\item{ab}{any (vector of) text that can be coerced to a valid antibiotic code with \code{\link[=as.ab]{as.ab()}}}
\item{open}{browse the URL using \code{\link[utils:browseURL]{utils::browseURL()}}}
\item{property}{one of the column names of the \link{microorganisms} data set or \code{"shortname"}}
@ -116,7 +121,9 @@ The short name - \code{\link[=mo_shortname]{mo_shortname()}} - almost always ret
Since the top-level of the taxonomy is sometimes referred to as 'kingdom' and sometimes as 'domain', the functions \code{\link[=mo_kingdom]{mo_kingdom()}} and \code{\link[=mo_domain]{mo_domain()}} return the exact same results.
The Gram stain - \code{\link[=mo_gramstain]{mo_gramstain()}} - will be determined based on the taxonomic kingdom and phylum. According to Cavalier-Smith (2002, \href{https://pubmed.ncbi.nlm.nih.gov/11837318}{PMID 11837318}), who defined subkingdoms Negibacteria and Posibacteria, only these phyla are Posibacteria: Actinobacteria, Chloroflexi, Firmicutes and Tenericutes. These bacteria are considered Gram-positive - all other bacteria are considered Gram-negative. Species outside the kingdom of Bacteria will return a value \code{NA}. Functions \code{\link[=is_gram_negative]{is_gram_negative()}} and \code{\link[=is_gram_positive]{is_gram_positive()}} always return \code{TRUE} or \code{FALSE} (except when the input is \code{NA} or the MO code is \code{UNKNOWN}), thus always return \code{FALSE} for species outside the taxonomic kingdom of Bacteria.
The Gram stain - \code{\link[=mo_gramstain]{mo_gramstain()}} - will be determined based on the taxonomic kingdom and phylum. According to Cavalier-Smith (2002, \href{https://pubmed.ncbi.nlm.nih.gov/11837318}{PMID 11837318}), who defined subkingdoms Negibacteria and Posibacteria, only these phyla are Posibacteria: Actinobacteria, Chloroflexi, Firmicutes and Tenericutes. These bacteria are considered Gram-positive - all other bacteria are considered Gram-negative. Species outside the kingdom of Bacteria will return a value \code{NA}. Functions \code{\link[=mo_is_gram_negative]{mo_is_gram_negative()}} and \code{\link[=mo_is_gram_positive]{mo_is_gram_positive()}} always return \code{TRUE} or \code{FALSE} (except when the input is \code{NA} or the MO code is \code{UNKNOWN}), thus always return \code{FALSE} for species outside the taxonomic kingdom of Bacteria.
Intrinsic resistance - \code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}} - will be determined based on the \link{intrinsic_resistant} data set, which is based on \href{https://www.eucast.org/expert_rules_and_intrinsic_resistance/}{'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.2} from 2020. The \code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}} can be vectorised over parameters \code{x} (input for microorganisms) and over \code{ab} (input for antibiotics).
All output will be \link{translate}d where possible.
@ -258,13 +265,19 @@ mo_fullname("S. pyogenes",
Lancefield = TRUE,
language = "nl") # "Streptococcus groep A"
# gram stains can be used as a filter
if (require("dplyr")) {
example_isolates \%>\%
filter(is_gram_positive())
}
# other --------------------------------------------------------------------
# gram stains and intrinsic resistance can also be used as a filter in dplyr verbs
if (require("dplyr")) {
example_isolates \%>\%
filter(mo_is_gram_positive())
example_isolates \%>\%
filter(mo_is_intrinsic_resistant(ab = "vanco"))
}
# get a list with the complete taxonomy (from kingdom to subspecies)
mo_taxonomy("E. coli")
# get a list with the taxonomy, the authors, Gram-stain and URL to the online database