extractTaxLevel {bugsigdbr} | R Documentation |
Functionality for extracting specific taxonomic levels (such as genus and species) from a microbe signature containing taxonomic clades in MetaPhlAn format.
extractTaxLevel( sig, tax.id.type = c("metaphlan", "taxname"), tax.level = "mixed", exact.tax.level = TRUE )
sig |
character. Microbe signature containing taxonomic clades in MetaPhlAn format. |
tax.id.type |
Character. Taxonomic ID type of the returned microbe
sets.
Either |
tax.level |
character. Either |
exact.tax.level |
logical. Should only the exact taxonomic level
specified by |
a character vector storing taxonomic clades restricted to chosen taxonomic level(s).
BugSigDB: https://bugsigdb.org
ord <- "k__Bacteria|p__Firmicutes|c__Bacilli|o__Lactobacillales" sig <- c("f__Lactobacillaceae|g__Lactobacillus", "f__Aerococcaceae|g__Abiotrophia|s__Abiotrophia defectiva", "f__Lactobacillaceae|g__Limosilactobacillus|s__Limosilactobacillus mucosae") sig <- paste(ord, sig, sep = "|") sig <- extractTaxLevel(sig, tax.level = "genus") sig <- extractTaxLevel(sig, tax.level = "genus", exact.tax.level = FALSE) sig <- extractTaxLevel(sig, tax.id.type = "taxname", tax.level = "genus", exact.tax.level = FALSE)