getTaxonomy: Get the taxonomy given OTU names and lineage information

View source: R/getTaxonomy.R

getTaxonomyR Documentation

Get the taxonomy given OTU names and lineage information

Description

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.

Usage

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")

hallucigenia-sparsa/seqtime documentation built on Jan. 9, 2023, 11:53 p.m.