Learn R Programming

RAM (version 1.2.1.3)

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 abundance. See also data.revamp

Value

This function returns a list containing outputs from adonis test.
  • If is.OTU is TRUE and ranks is not given: the output is a length one list named LCA_OTU.
  • If is.OTU is TRUE and ranks is 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.
  • If is.OTU is FALSE, the output is a length one list named Taxa.

See Also

adonis

Examples

Run this code
data(ITS1, meta)
## Not run: 
# # test OTUs
# data <- list(ITS1=ITS1, ITS2=ITS2)
# assist.ado(data=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=data, is.OTU=TRUE, 
#                   meta=meta, ranks=ranks,
#                   data.trans="log", dist="bray" )
# # test genera
# g1 <- tax.abund(otu1=ITS1, rank="g", drop.unclassified=TRUE)
# data <- list(g1=g1)
# assist.ado(data=data, is.OTU=FALSE, 
#            meta=meta, ranks=NULL,
#            data.trans="log", dist="bray" )
# ## End(Not run)

Run the code above in your browser using DataLab