Learn R Programming

RAM (version 1.2.1.3)

LCA.OTU: Lowest Common Ancestor (LCA) OF EACH OTU

Description

This function consumes an OTU table and extract the LCA (lowest common ancestor) that each otu assigned to. See also tax.split.

Usage

LCA.OTU(otu, strip.format=FALSE, drop=TRUE)

Arguments

otu
the OTU table to be used.
strip.format
logical. Whether or not to remove the prefix of the taxonomy assignment at each rank. see
drop
logical. Whether or not drop taxonomic columns other than LCA.

Value

This function return a data frame same as the input OTU table, except the last column is the LCA of each otu, not the lineage. The taxonomy column can be kept, by using drop.

See Also

tax.split

Examples

Run this code
data(ITS1)
## Not run: 
# # compare the following 2 commands:
# # keep the rank prefix of the LCA column
# ITS1.LCA <- LCA.OTU(ITS1, strip.format=TRUE, drop=TRUE)
# # remove the rank prefix of the LCA column
# ITS1.LCA <- LCA.OTU(ITS1, strip.format=FALSE, drop=TRUE)
# ## End(Not run)

Run the code above in your browser using DataLab