ZicoSeq is a permutation-based framework for differential abundance analysis of Zero-inflated Compositional Sequencing data such as microbiome data. Currently, it has the following components:
You can install the released version of ZicoSeq from GitHub with:
# install.packages("devtools")
# install.packages(c("matrixStats", "stats", "permute", "nlme", "vegan", "rmulti"))
devtools::install_github("chloelulu/ZicoSeq")
This is a basic example which shows you how to solve a common problem:
library(ZicoSeq)
#install.packages('GUniFrac')
library(GUniFrac) #This package loaded here is only used for citing the throat data
#> Loading required package: vegan
#> Loading required package: permute
#> Loading required package: lattice
#> This is vegan 2.5-6
#> Loading required package: ape
#> Loading required package: matrixStats
data(throat.otu.tab)
data(throat.meta)
comm <- t(throat.otu.tab)
meta.dat <- throat.meta
set.seed(123)
zico.obj <- ZicoSeq(meta.dat = meta.dat, comm = comm, grp.name = 'SmokingStatus', adj.name = 'Sex',
# Filtering criterion
prev.filter = 0.1, abund.filter = 10, min.prop = 0,
# Winsorization to replace outliers
is.winsor = TRUE, winsor.qt = 0.97,
# Posterior sampling
is.prior = TRUE, prior.dist = c('BetaMix'), post.method = c('sample'), post.sample.no = 25,
# Link functions
link.func = list(function (x) x^0.25, function (x) x^0.5, function (x) x^0.75), stats.combine.func = max,
# Permutation
perm.no = 99, strata = NULL,
# Multiple stage normalization
stage.no = 6, topK = NULL, stage.fdr = 0.75, stage.max.pct = 0.50,
# Tree-based FDR control and family-wise error rate control
is.fwer = FALSE, is.tree.fdr = FALSE, tree = NULL,
verbose = TRUE, return.comm = FALSE, return.perm.F = FALSE)
#> 678 features are filtered!
#> The data has 60 samples and 178 features will be tested!
#> Fitting beta mixture ...
#> Stage 1 .........
#> Stage 2 .........
#> Stage 3 .........
#> Stage 4 .........
#> Stage 5 .........
#> Stage 6 .........
#> Completed!
which(zico.obj$p.adj.fdr <= 0.1)
#> 3227 1371 4440 5496 2300 2831 2434 2893 1280 4363 1490 411 4703 3954 3538
#> 7 33 34 65 92 96 99 101 106 115 126 127 131 150 176
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.