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

Description Usage Arguments Value Note Author(s) See Also Examples

Description

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

Usage

1
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.

Note

tax.split returns the same OTU table with classification at a given taxonomic rank, which can be missing if an otu was not classified a that that taxonomic level. LCA.OTU, guaranteed that all OTUs will be preserved in the returned data table and provide the LCA for each OTU, although only higher taxonomic ranks were available.

Author(s)

Wen Chen

See Also

tax.split

Examples

1
2
3
4
5
6
7
8
9
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)

Example output

Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.4-4
Loading required package: ggplot2
sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied

RAM documentation built on May 2, 2019, 3:04 p.m.