MicrobiomeSeqTreeFDR: False Discovery Rate (FDR) Control Integrating Prior Tree...

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

Description

The function is a wrapper of TreeFDR with a pre-defined test based on F-statistic and residual permutation.

Usage

1
2
MicrobiomeSeqTreeFDR (otu.tab, tree, meta.dat, grp.name, adj.name = NULL, 
raw.count = FALSE, B = 100, ...)

Arguments

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 and adj.name.

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 X are raw counts. If raw counts are supplied, internal normalization/transformation (GMPR/sqrt) will be performed. The default is FALSE. The user should be responsible for selecting the appropriate normalization/transformation methods.

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 TreeFDR

Value

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.

Author(s)

Jun Chen

References

Jun Chen, et al. (2017). A fast and effective permutation-based framework for differential abundance analysis of microbiome data. To be submitted.

See Also

TreeFDR

Examples

 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)) 

StructFDR documentation built on May 2, 2019, 9:44 a.m.