knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
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 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) which(zico.obj$p.adj.fdr <= 0.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.