antibiotic_susceptibility: Evaluate susceptibility based on antibiotic-specific...

antibiotic_susceptibilityR Documentation

Evaluate susceptibility based on antibiotic-specific annotations

Description

This is the main engine for determining antibiotic susceptibility based on a database of antibiotic-specific annotations for various taxa.

Usage

antibiotic_susceptibility(lineage, antibiotic, db = taxon_susceptibility)

Arguments

lineage

A character vector of taxonomic assignments or lineages

antibiotic

The name of the antibiotic or antibiotic class in db

db

A data frame with columns named "taxon", "rank", "antibiotic", and "value"

Details

To determine susceptibility, the database is first filtered to include only rows relevant to the antibiotic of interest. Then, the filtered database is split into ranks. The susceptibility values are determined for each rank by matching taxa from the rank-specific database to the vector of lineages. If a lineage matches to multiple taxa of different ranks, the value of the taxon with the lowest rank is selected.

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.

Value

A vector of assigned susceptibility values, which should be either "susceptible", "resistant", or NA

Examples

antibiotic_susceptibility(
  c("Enterococcus faecalis", "Lactobacillus", "Lactobacillus delbrueckii"),
  "vancomycin")

tuv292/abx_idx documentation built on Jan. 12, 2023, 12:48 a.m.