data.revamp: Transform OTU Table

Description Usage Arguments Value Author(s) Examples

Description

This function consumes and transforms either an OTU table or a taxonomy abundance matrix. If an OTU table was provided, it will be either transposed without the "taxonomy" column, but each otuID will be renames with it's LCA classification appended; or being transformed to be taxonomic abundance matrix at the ranks set by ranks. If a taxonomic abundance matrix is provided, it will be kept the same with proper data transformation as defined by stand.method option.

Usage

1
2
data.revamp(data, is.OTU=TRUE, ranks=NULL, stand.method=NULL,
            top=NULL, mode="number")

Arguments

data

an OTU table or a taxonomic abundance matrix.

is.OTU

logical. If an OTU table was provided, is.OTU should be set as TRUE; otherwise, it should be set as FALSE.

ranks

optional. If no ranks was provided, the OTU table will be processed by LCA.OTU and then transposed with sampleIDs being row names and otuIDs being column names. If ranks was provided, the OTU table will be processed by tax.abund at each given taxonomic ranks. See also RAM.rank.formatting. The unclassified taxon groups are removed.

stand.method

optional. Transform the output using method from the function decostand

top

optional. Select the top taxa or OTUs.

mode

a character vector, one of "percent" or "number". If number, then top many groups will be selected. If percent, then all groups with relative abundance in at least one sample above top will be selected.

Value

The value returned by this function is a list, so for convenience, any nested lists have been given descriptive items names to make accessing its elements simple (see Examples).

Author(s)

Wen Chen

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(ITS1, ITS2, meta)
data.new <- data.revamp(data=list(ITS1=ITS1), is.OTU=TRUE,
                        ranks=c("f", "g"), stand.method="log")
## Not run: 
data.new <- data.revamp(data=list(ITS1=ITS1), is.OTU=TRUE,
                        ranks=NULL, stand.method="log")
data.new <- data.revamp(data=list(ITS1=ITS1, ITS2=ITS2),
           is.OTU=TRUE, ranks=c("f", "g"), stand.method="total")
names(data.new)

## End(Not run)

Example output

Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.5-7
Loading required package: ggplot2
Registered S3 method overwritten by 'ade4':
  method       from  
  summary.dist labdsv
[1] "ITS1_family" "ITS1_genus"  "ITS2_family" "ITS2_genus" 

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