otuCollap | R Documentation |
The function will collapse a structured OTU table at given taxonomic level.
otuCollap(otutab, taxto, siteInCol = TRUE, taxhead = "taxonomy",
pattern = ";", collap = ";")
otutab |
A OTU table of microbial community, which must contain a taxonomic column (if siteInCol) or row (if site in rows). The otu table can be given in numeric counts or in relative abundance. |
taxto |
numeric, collapse the otutable at the taxonomic level which start position (index) from the left of taxonomy. For example, in "Archaea; Euryarchaeota; Methanomicrobia; Methanomicrobiales; Methanoregulaceae", the indices of "Euryarchaeota" and "Methanomicrobiales" are 2 and 4, respectively. |
siteInCol |
Logical, if "TRUE", the OTU table contains samples in columns and taxa in rows. The function will decide whether to transpose the otu table based on this parameter. |
taxhead |
Character, specify the header of taxonomy. By default we assume your taxonomic column is entitled "taxonomy". |
pattern |
Character, specify the separation of taxonomy. By default, the taxonomy is separated by semicolon (";"). |
collap |
Character, tell the function about the separation for the hierarchical order in the output. |
This function will directly collapse the otu table according to numeric position of structured taxonony. This function can also collapse data with structured format like the example OTU table.
The function will return a collapsed OTU table.
Sizhong Yang <yanglzu@163.com>
otuReport
data(otuqiime)
dim(otuqiime)
result <- otuCollap(otutab = otuqiime, taxto = 2, siteInCol = TRUE,
taxhead = "taxonomy", pattern = ";")
dim(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.