Description Usage Arguments Value Author(s) References See Also Examples
The function is a wrapper of TreeFDR
with a pre-defined test based on F-statistic and residual permutation.
1 2 |
otu.tab |
a data matrix, rows are the features and columns are the samples. |
tree |
an object of "phylo" class. The tree of OTUs. |
meta.dat |
a data frame containing the variables specified by |
grp.name |
a character string indicating the variable of major interest. Can be categorical or numerical. |
adj.name |
a character vector indicating the variables to be adjusted. Can be categorical or numerical. |
raw.count |
a logical value indicating whether |
B |
the number of permutations. The default is 100 since the permutation test is very fast. |
... |
further arguments such as covariates to be passed to |
p.adj |
TreeFDR adjusted p-values. |
p.unadj |
raw p-values. |
z.adj |
moderated z-values. The scale may be different from the raw z-values. |
z.unadj |
raw z-values. |
k, rho |
the estimates of the hyperparameters. The values indicate the informativeness of the prior structure. |
Jun Chen
Jun Chen, et al. (2017). A fast and effective permutation-based framework for differential abundance analysis of microbiome data. To be submitted.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | require(StructFDR)
# Generate data
data(throat.parameter)
data.obj <- SimulateData(nCases = 50, nControls = 50, nOTU = 400, nCluster = 20,
depth = 10000, p.est = throat.parameter$p.est, theta = throat.parameter$theta,
scene = 'S2', signal.strength = 4)
meta.dat <- data.frame(group = factor(data.obj$y), sex = sample(gl(2, 50)))
beta.true <- data.obj$beta.true
# Call TreeFDR
tree.fdr.obj <- MicrobiomeSeqTreeFDR(data.obj$X, data.obj$tree, meta.dat, 'group', 'sex', B = 20)
tree.p.adj <- tree.fdr.obj$p.adj
# Empirical power and FDR
(tree.emp.pwr <- sum(tree.p.adj <= 0.05 & beta.true != 0) / sum(beta.true != 0))
(tree.emp.fdr <- sum(tree.p.adj <= 0.05 & beta.true == 0) / sum(tree.p.adj <= 0.05))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.