MicrobiomeSeqTreeFDR {StructFDR}R Documentation

False Discovery Rate (FDR) Control Integrating Prior Tree Structure for Microbiome Data Based on F-test and Residual Permutation.

Description

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

Usage

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

Xiao, J., Cao, H., Chen, J. (2017). False discovery rate control incorporating phylogenetic tree increases detection power in microbiome-wide multiple testing. Bioinformatics, 33(18), 2873-2881.

See Also

TreeFDR

Examples

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


[Package StructFDR version 1.4 Index]