MCMC.OTU-package: Bayesian analysis of multivariate counts data in DNA...

Description Details Author(s) References Examples

Description

This package enables MCMC-based generalized linear mixed model analysis of multivariate counts data, such as common in DNA metabarcoding and community ecology. The results are summarized and plotted using ggplot2 functions.

Details

Package: MCMC.OTU
Type: Package
Version: 1.0.10
Date: 2016-02-10
License: GPL-3

At the moment, the package handles experimental design with a single multilevel fixed factor or two fully crossed multilevel fixed factors. Any number of scalar (OTU-specific) random factors (i.e. blocking factors) are allowed. By default, it is assumed that variation in total counts per sample is not biologically relevant (refects sequencing or survey effort). See help for the core function mcmc.otu() for more details.

Author(s)

Mikhail V. Matz <matz@utexas.edu>

References

Elizabeth A. Green, Sarah W. Davies, Mikhail V. Matz, Monica Medina Quantifying cryptic Symbiodinium diversity within Orbicella faveolata and Orbicella franksi at the Flower Garden Banks, Gulf of Mexico. PeerJ 2014 2:e386 https://peerj.com/articles/386/

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Symbiodinium sp diversity in two coral species at two reefs (banks)
data(green.data)

# removing outliers
goods=purgeOutliers(
	data=green.data,
	count.columns=c(4:length(green.data[1,])),
	zero.cut=0.25 # remove this line for real analysis
)

# stacking the data table
gs=otuStack(
	data=goods,
	count.columns=c(4:length(goods[1,])),
	condition.columns=c(1:3)
	)

# fitting the model
mm=mcmc.otu(
	fixed="bank+species+bank:species",
	data=gs,
	nitt=3000,burnin=2000 # remove this line for real analysis!
	)

# selecting the OTUs that were modeled reliably
acpass=otuByAutocorr(mm,gs)

# calculating effect sizes and p-values:
ss=OTUsummary(mm,gs,summ.plot=FALSE)

# correcting for mutliple comparisons (FDR)
ss=padjustOTU(ss)

# getting significatly changing OTUs (FDR<0.05)
sigs=signifOTU(ss)

# plotting them
ss2=OTUsummary(mm,gs,otus=sigs)

# bar-whiskers graph of relative changes:
# ssr=OTUsummary(mm,gs,otus=signifOTU(ss),relative=TRUE)

# displaying effect sizes and p-values for significant OTUs
ss$otuWise[sigs]

MCMC.OTU documentation built on May 1, 2019, 10:55 p.m.