Title: Microbiome Higher Criticism Analysis
Version: 1.0
Date: 2020-02-26
Author: Hyunwook Koh
Maintainer: Hyunwook Koh hyunwook.koh@stonybrook.edu
Description: This R package (MiHC v1.0) provides facilities for MiHC which tests the association between a microbial group (e.g., community or clade) composition and a host phenotype of interest. MiHC is a data-driven omnibus test taken in a search space spanned by tailoring the higher criticism test to incorporate phylogenetic information and/or modulate sparsity levels and including the Simes test for excessively high sparsity levels.
NeedsCompilation: No
Depends: R(>= 3.4.1)
Imports: cluster, compositions, permute, phyloseq
Suggests: knitr, rmarkdown
License: GPL-2
URL: https://github.com/hk1785/MiHC
If you have any problems for using this R package, please report in Issues (https://github.com/hk1785/MiHC/issues) or email Hyunwook Koh (hkoh@jhu.edu).
cluster
install.packages("cluster")
compositions
install.packages("compositions")
devtools
install.packages("devtools")
permute
install.packages("permute")
phyloseq
source("https://bioconductor.org/biocLite.R")
biocLite("phyloseq")
library(devtools)
install_github("hk1785/MiHC", force=T)
library(phyloseq)
URL: https://joey711.github.io/phyloseq/
This R package includes two core functions, MiHC and MiHC.plot. Please find the details below.
This function tests the association between a microbial group (e.g., community or clade) composition and a host phenotype of interest using MiHC.
MiHC(y, covs, otu.tab, tree, model, hs=c(1,3,5,7,9), W=TRUE, comp=FALSE, CLR=FALSE, opt.ncl=30, n.perm=5000)
hs - A vector of the candidate modulation schema for lower sparsity levels. Default is hc=c(1,3,5,7,9).
W - An indicator to consider weighted high criticism tests or not. Default is W=TRUE to consider weighted higher criticism tests.
$simes.pv - The p-value for the Simes test.
$ind.pvs - The p-values for the item-by-item unweighted and weighted higher criticism tests.
$ada.pvs - The p-values for the local (i.e., uHC(A) and wHC(A)) and global (i.e., MiHC) omnibus higher criticism tests.
Koh, H., Zhao, N. (2020). A powerful microbial group association test based on the higher criticism analysis for sparse microbial association signals. Microbiome 8(63):1:16.
Simes, R.J. (1986). An improved Bonferroni procedure for multiple tests of significance. Biometrika 73(3):751-754
Import requisite R packages
library(cluster)
library(compositions)
library(permute)
library(phyloseq)
library(MiHC)
Import example microbiome data
data(phy)
otu.tab <- otu_table(phy)
tree <- phy_tree(phy)
y <- sample_data(phy)$y
covs <- data.frame(matrix(NA, length(y), 2))
covs[,1] <- as.numeric(sample_data(phy)$x1)
covs[,2] <- as.factor(sample_data(phy)$x2)
Fit MiHC
set.seed(123)
out <- MiHC(y, covs=covs, otu.tab=otu.tab, tree=tree, model="binomial")
out
The Q-Q plots for the microbiome higher criticism analysis
MiHC.plot(MiHC.out, leg.loc="bottomright", pdf.filename=NULL)
The Q-Q plots between the expected and observed quantiles for the unweighted and weighted higher criticism tests. Blue dots represent individual OTUs and a red diagonal line represents no influential points; as such, the OTUs that fall along the diagonal line have no influence on the host phenotype while the OTUs that have larger deviations from the diagonal line are more influential on the host phenotype. Darker to lighter vertical lines represent more to less influential OTUs in rank order among the 10 most influential OTUs that correspond to the 10 largest deviations from the red diagonal line.
Import requisite R packages
library(cluster)
library(compositions)
library(permute)
library(phyloseq)
library(MiHC)
Import example microbiome data
data(phy)
otu.tab <- otu_table(phy)
tree <- phy_tree(phy)
y <- sample_data(phy)$y
covs <- data.frame(matrix(NA, length(y), 2))
covs[,1] <- as.numeric(sample_data(phy)$x1)
covs[,2] <- as.factor(sample_data(phy)$x2)
Fit MiHC
set.seed(123)
out <- MiHC(y, covs=covs, otu.tab=otu.tab, tree=tree, model="binomial")
out
Create a graph
MiHC.plot(out)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.