The lineage information is provided in form of a matrix, which contains for each OTU identifier the taxonomic levels from column 2 to 8 (domain, phylum, class, order, family, genus, species) and the entire lineage in column 9. The lineage in column 9 is optional. Alternatively, OTU identifiers can also be stored as column names. In this case, taxonomic levels are assumed to range from column 1 to 7. To differentiate between these two formats, set useRownames to false or true.

getTaxonomy(selected = c(), lineages, level = "class",
  useRownames = FALSE)

Arguments

selected

a character vector of selected OTU identifiers

lineages

a lineage table

level

the taxonomic level (domain, phylum, class, order, family, genus or species)

useRownames

match OTU identifiers to row names instead of the first column (in this case, taxonomic levels are assumed to range from column 1 to 7)

Value

the taxonomy of the OTUs

Examples

data(david_stoolA_otus) data(david_stool_lineages) sorted=sort(apply(david_stoolA_otus,1,sum),decreasing=TRUE)[1:10] getTaxonomy(names(sorted),david_stool_lineages,level="family")
#> [1] Ruminococcaceae Bacteroidaceae Erysipelotrichaceae #> [4] Bacteroidaceae Ruminococcaceae none #> [7] Lachnospiraceae Bifidobacteriaceae Lachnospiraceae #> [10] Lachnospiraceae #> 152 Levels: A29 ACK-M1 AKIW874 Acetobacteraceae ... none