README.md

R package: MiHC

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

Reference

Troubleshooting Tips

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

Prerequites

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

Installation

library(devtools)
install_github("hk1785/MiHC", force=T)

Data format

library(phyloseq)
URL: https://joey711.github.io/phyloseq/

Manual

This R package includes two core functions, MiHC and MiHC.plot. Please find the details below.

:mag: MiHC

Description

This function tests the association between a microbial group (e.g., community or clade) composition and a host phenotype of interest using MiHC.

Usage

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)

Arguments

Values

$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.

References

Example

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

:mag: MiHC.plot

Description

The Q-Q plots for the microbiome higher criticism analysis

Usage

MiHC.plot(MiHC.out, leg.loc="bottomright", pdf.filename=NULL)

Arguments

Values

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.

References

Example

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)


hk1785/MiHC documentation built on Dec. 21, 2024, 4:29 a.m.