README.md

GEEMiHC

Type: Package

Title: Detecting sparse microbial association signals from longitudinal microbiome data based on generalized estimating equations

Version: 1.0

Author: Han Sun

Maintainer: Han Sun sunh529@mails.ccnu.edu.cn; Xingpeng Jiang xpjiang@mail.ccnu.edu.cn

Imports: phyloseq, cluster, compositions, permute, PGEE, vegan, ape, dirmult, aSPU, MiSPU, devtools

Description: GEEMiHC is used for detecting sparse microbial association signals between microbiome and a host phenotype from longitudinal microbiome data.

License: GPL-2

Encoding: UTF-8

LazyData: true

URL: https://github.com/xpjiang-ccnu/GEEMiHC

Introduction

This R package, GEEMiHC, can be used for detecting sparse microbial association signals adaptively from longitudinal microbiome data. It can be applied to datasets with diverse types of outcomes to study the association between diverse types of host phenotype and microbiome, such BMI (Gaussian distribution), disease status (Binomial distribution) or number of tumors (Poisson distribution). Considering cross-sectional data as a special case of longitudinal data, it can be also applied to cross-sectional data, in which case the results will be consistent with MiHC.

Installation

phyloseq:

BiocManager::install("phyloseq")

cluster:

install.packages("cluster")

compositions:

install.packages("compositions")

permute:

install.packages("permute")

PGEE:

install.packages("PGEE")

vegan:

install.packages("vegan")

ape:

install.packages("ape")

dirmult:

install.packages("dirmult")

aSPU:

install.packages("aSPU")

MiSPU:

install.packages("MiSPU")

devtools:

install.packages("devtools")

You may install GEEMiHC from GitHub using the following code:

devtools::install_github("xpjiang-ccnu/GEEMiHC", force=T)

Usage

GEEMiHC(y, id, covs, otu.tab, tree, model, Gamma=c(1,3,5,7,9), Lamda=matrix(c(1, rep(0, 8), rep(1/3, 3), rep(0, 6), rep(1/5, 5), rep(0, 4), rep(1/7, 7), rep(0, 2), rep(1/9, 9)), 5, 9, byrow = T), comp=FALSE, CLR=FALSE, opt.ncl=30, n.perm=5000)

Arguments

Values

$rank.order - rank order for significant factors.

$simes.pv.GEE.AR - The p-value for the Simes test of GEEMiHC with autoregressive structure.

$simes.pv.GEE.EX - The p-value for the Simes test of GEEMiHC with exchange structure.

$simes.pv.GEE.IN - The p-value for the Simes test of GEEMiHC with independence structure.

$ind.pvs.GEEMiHC.AR - The p-values for the item-by-item unweighted and weighted higher criticism tests of GEEMiHC with autoregressive structure.

$ind.pvs.GEEMiHC.EX - The p-values for the item-by-item unweighted and weighted higher criticism tests of GEEMiHC with exchange structure.

$ind.pvs.GEEMiHC.IN - The p-values for the item-by-item unweighted and weighted higher criticism tests of GEEMiHC with independence structure.

$ada.pvs - The p-values for global omnibus higher criticism tests of three GEEMiHC with different structure and aGEEMiHC.

Example

Import requisite R packages:

library(cluster)
library(permute)
library(phyloseq)
library(PGEE)  
library(GEEMiHC)  

Import example microbiome data:

data(CD_longitudinal)
otu.tab <- CD_longitudinal@otu_table
tree <- CD_longitudinal@phy_tree
y <- sample_data(CD_longitudinal)$label
covs <- data.frame(matrix(NA, length(y), 2))
covs[,1] <- as.numeric(sample_data(CD_longitudinal)$age)
covs[,2] <- as.factor(sample_data(CD_longitudinal)$smoker)
id <- sample_data(CD_longitudinal)$id

Fit GEEMiHC:

set.seed(123)
out <- GEEMiHC(y, id, covs=covs, otu.tab=otu.tab, tree=tree, model="binomial", n.perm=5000)
out

References

The function for generating simulated OTU count data

SimulateOTU

Description

We generate the OTUs count data simulated based on the Dirichlet-multinomial model according to real data.

Usage

SimulateOTU(data, nSam, parameters, mu, size)

Arguments

Values

$OTU - OTU counts table simulated based on real data.

Example

library(dirmult) 
data("throat.otu.tab", package = "MiSPU")
nOTU = 100
otu_sum <- apply(throat.otu.tab, 2, sum)
throat.otu.tab.100 <- throat.otu.tab[, order(otu_sum, decreasing = T)[1:nOTU]]
parameters <- dirmult(throat.otu.tab.100)
otu.tab <- SimulateOTU(throat.otu.tab.100, nSam = 50, parameters, mu = 1000, size = 25)

References

Statement

Our code mainly refers to R packages, MiHC, MiSPU and MiATDS.



xpjiang-ccnu/GEEMiHC documentation built on May 15, 2023, 7:01 a.m.