Learn R Programming

RAM (version 1.2.0)

assist.ado: Perform ADONIS Analysis for OTU Tables Or Taxonomic Abundance Matrix

Description

This function simplifies ADONIS analysis by abstracting away some of the complexity and returning a list of useful measures.

Usage

assist.ado(data, meta, is.OTU=TRUE, ranks=NULL,           
           data.trans=NULL, dist=NULL, meta.strata=NULL, 
           perm=1000, top=NULL, mode="number")

Arguments

data
an OTU table or a taxonomy abundance matrix.
is.OTU
logical. If the data is an OTU table, set is.OTU TRUE; otherwise, set it as FALSE.
meta
the metadata table to be used (must have same samples as data.
ranks
optional. If ranks is not provided, will test for OTUs, otherwise, will test on taxa at defined ranks. If data is a taxonomic abundance matrix, ranks can be NULL
data.trans
optional. Transform the data using method from the function decostand
dist
optional. the name of any method used in vegdist to calculate pairwise distances. See also adonis and vegdist
meta.strata
optional. A metadata variable within which to constrain permutations. See also adonis
perm
a numeric number of replicate permutations used for the hypothesis test used in adonis.
top
optional. Select the top taxa or OTUs. See also data.revamp
mode
a character vector, one of "percent" or "number". If number, then top groups will be selected based on total sequence count. If percent, then top groups will be selected based on relative ab

Value

  • This function returns a list containing outputs from adonis test.
    • Ifis.OTUisTRUEandranksis not given: the output is a length one list namedLCA_OTU.
    • Ifis.OTUisTRUEandranksis given: the output is a list with a length same as the number of taxonomic ranks provided. Each member of the list is named after the rank it processed at.
    • Ifis.OTUisFALSE, the output is a length one list namedTaxa.

See Also

adonis

Examples

Run this code
data(ITS1, meta)
# test OTUs
data <- list(ITS1=ITS1, ITS2=ITS2)
assist.ado(data, is.OTU=TRUE,meta=meta, ranks=NULL, 
           data.trans="log", dist=NULL)

# test taxa at different ranks
ranks <- c("p", "c", "o", "f", "g")
ado <- assist.ado(data, is.OTU=TRUE, meta=meta, ranks=ranks, 
           data.trans="log", dist="bray" )

# test genera
g1 <- tax.abund(data, rank="g", drop.unclassified=TRUE)
data <- list(g1=g1)
assist.ado(data, is.OTU=FALSE, meta=meta, ranks=NULL, 
           data.trans="log", dist="bray" )

Run the code above in your browser using DataLab