phenotype_susceptibility | R Documentation |
This is the main engine for determining antibiotic susceptibility based on a database of phenotypes for various taxa. To run this function, you'll need the database as well as a vector that specifies the susceptibility for each value of the phenotype.
phenotype_susceptibility(
lineage,
phenotype,
susceptibility,
db = whatbacteria::taxon_phenotypes
)
lineage |
A character vector of taxonomic assignments or lineages |
phenotype |
The name of the column in |
susceptibility |
A character vector specifying the susceptibility for
different values of the phenotype. The names should correspond to elements
in the column specified with |
db |
A data frame with columns named "taxon", "rank", and the column
name specified in |
This function operates much like antibiotic_susceptibility
, except
that it pulls phenotype values from the database instead of susceptibility
information. To subsequently determine susceptibility from phenotype, this
function uses the named vector provided in the susceptibility
argument.
As a reminder, the taxonomic ranks, in order from highest to lowest, are Kingdom, Phylum, Class, Order, Family, Genus, and Species. The ranks in the database must be capitalized, exactly as they are written here.
A vector of assigned susceptibility values, which should be either
"susceptible", "resistant", or NA
phenotype_susceptibility(
c("Bacteroidetes", "Firmicutes", "Firmicutes; Negativicutes"),
"gram_stain",
c("Gram-positive" = "susceptible", "Gram-negative" = "resistant"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.