group.indicators: Plot Indicator Taxon Groups for Metadata Trends

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

This function conumes one or two OTU tables, along with a metadata facotr, and creates a barplot showing the relative abundance of all groups which are statistical indicators of that factor.

Usage

1
2
3
4
5
6
7
group.indicators(data, is.OTU=TRUE, meta, factor, rank,
                thresholds = c(A = 0.85,
                               B = 0.8,
                               stat = 0.8,
                               p.value = 0.05),
                 cex.x=NULL, file = NULL, ext = NULL, 
                 height = 12, width = 12)

Arguments

data

a list of OTUs or taxonomic abundance matrices. see also RAM.input.formatting

is.OTU

logical. Whether the input data are OTU tables.

meta

the metadata table to be used.

factor

a named character vector (of length 1) giving the name of the column in meta to be used when performing the analysis (see RAM.factors).

rank

the taxonomic rank to use (see ?RAM.rank.formatting for formatting details). if rank is NULL, will use otus as indicators which are annotated by the lca assigned to the otus, otherwise will use taxon names as indicators at the given taxonomic rank.

thresholds

a character vector of length 4 specifying the thresholds for the A, B, stat, and p values (see Details).

cex.x

optional. The size of x axis names.

file

the file path where the image should be created (see ?RAM.plotting).

ext

the file type to be used; one of "pdf", "png", "tiff", "bmp", "jpg", or "svg".

height

the height of the image to be created (in inches).

width

the width of the image to be created (in inches).

Details

This function uses indicspecies::multipatt to determine the indicators. After this analysis is performed, there will likely be some species determined to be 'significant,' but to varying degrees. To control how many groups are selected, you can adjust the thresholds argument. It consists of four components: (quotations taken from vignette("indicspeciesTutorial"), see References):

A

the specificity of the indicator; 'the probability that the surveyed site belongs to the target site group given the fact that the species has been found'

B

the fidelity of the indicator; 'the probability of finding the species in sites belonging to the site group'

stat

the association strength for the combinations.

p.value

'the degree of statistical significance of the association'

Only the species with A, B, and stat values above, and p.value below those given in thresholds will be kept.

Value

This function returns a stacked barplot and a vector of identified indicators, including the ones in the plot and the ones being excluded from the plot.

Author(s)

Wen Chen and Joshua Simpson.

References

De Caceres, M., Legendre, P. (2009). Associations between species and groups of sites: indices and statistical inference. Ecology, URL http://sites.google.com/site/miqueldecaceres/

See Also

multipatt

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
data(ITS1, ITS2, meta)
## Not run: 
# inputs are OTU tables
group.indicators(data=list(ITS1=ITS1, ITS2=ITS2), is.OTU=TRUE, 
                 meta, factor = c(Province="Province"),
                 rank="g")
group.indicators(data=list(ITS1=ITS1), is.OTU=TRUE, meta,
                     factor = c(Province="Province"),
                     rank=NULL)
group.indicators(data=list(ITS1=ITS1), is.OTU=TRUE, meta,
                     factor = c(Province="Province"),
                     rank=NULL)
# inputs are taxonomic abundance matrices
g1 <- tax.abund(ITS1, rank="g")
g2 <- tax.abund(ITS2, rank="g")
group.indicators(data=list(g1=g1, g2=g2), is.OTU=FALSE, meta,
                     factor = c(Province="Province"),
                     rank="g")

## End(Not run)

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