Functionality for restricting microbe signatures to specific taxonomic levels such as genus and species.

restrictTaxLevel(df, tax.level = "mixed", exact.tax.level = TRUE, min.size = 1)

Arguments

df

data.frame storing BugSigDB data. Typically obtained via importBugSigDB.

tax.level

character. Either "mixed" or any subset of c("kingdom", "phylum", "class", "order", "family", "genus", "species", "strain"). This full vector is equivalent to "mixed".

exact.tax.level

logical. Should only the exact taxonomic level specified by tax.level be returned? Defaults to TRUE. If FALSE, a more general tax.level is extracted for microbes given at a more specific taxonomic level.

min.size

integer. Minimum signature size. Defaults to 1, which will filter out empty signatures. Use min.size = 0 to keep empty signatures.

Value

a data.frame with microbe signature columns restricted to chosen taxonomic level(s).

References

BugSigDB: https://bugsigdb.org

See also

importBugSigDB

Examples

 df <- importBugSigDB()
#> Using cached version from 2024-10-30 16:00:33
 df <- restrictTaxLevel(df, tax.level = "genus")