Skip to content

hk1785/aMiAD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

R package: aMiAD

Title: Adaptive Microbiome α-diversity-based Association Analysis (aMiAD)

Version: 2.0

Date: 2018-10-21

Author: Hyunwook Koh

Maintainer: Hyunwook Koh hkoh7@jhu.edu

Description: This sofware package provides facilities for the implementation of aMiAD which tests the association between microbial diversity and a host trait of interest. For the host trait of interest, a continuous (e.g., BMI) or a binary (e.g., disease status, treatment/placebo) trait can be handled. aMiAD is a non-parametric method which does not require any full distributional assumption on microbial diversity to be satisfied.

NeedsCompilation: No

Depends: R(>= 3.2.3)

License: GPL-2

URL: https://github.com/hk1785/aMiAD

Reference

Troubleshooting Tips

If you have any problems for using this R package, please report in Issues (https://github.com/hk1785/aMiAD/issues) or email Hyunwook Koh (hkoh@jhu.edu).

  • Tip 1. Depending on your pre-installed R libraries, this R package can require you to install additional R packages such as "gh", "usethis", "cli", etc using the command: install.packages("package_name").
  • Tip 2. Please make sure if you have the most recent package version.

Prerequites

devtools

install.packages("devtools")

phyloseq

source("https://bioconductor.org/biocLite.R")
biocLite("phyloseq")

picante

install.packages("picante")

entropart

install.packages("entropart")

vegan

install.packages("vegan")

Installation

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

Data format

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

Manual

🔍 Alpha.Diversity

Description

This function creates α-diversity metrics.

Usage

Alpha.Diversity(phylo, metrics=c("Observed","Shannon","Simpson","PD","PE","PQE"), Normalize=TRUE)

Arguments

  • phylo - A microbiome data in phyloseq format.
  • metrics - A vector of α-diversity metrics to be created. 'Observed', 'Shannon' (Shannon, 1948), 'Simpson' (Simpson, 1949), 'PD' (Faith, 1992), 'Chao1' (Chao, 1984), 'ACE' (Chao and Lee, 1992), 'PQE' (Rao, 1982; Warwick and Clarke, 1995) and 'PE' (Allen et al., 2009) are available α-diversity metrics. Default is c("Observed", "Shannon", "Simpson", "PD", "PE", "PQE").
  • Normalize - If TRUE (default), diversity is not affected by the height of the tree. If FALSE, it is proportional to the height of the tree.

References

  • Koh H. An adaptive microbiome α-diversity-based association analysis method. Sci Rep 2018; 8(18026)
  • Allen B, Kon M, Bar-Yam Y. A new phylogenetic diversity measure generalizing the Shannon index and its application to phyllostomid bats. Am Nat 2009; 174(2): 236-43.
  • Chao A. Non-parametric estimation of the number of classes in a population. Scand J Stat 1984; 11: 265-70.
  • Chao A, Lee S. Estimating the number of classes via sample coverage. J Am Stat Assoc 1992; 87: 210-17.
  • Faith DP. Conservation evaluation and phylogenetic diversity. Biol Conserv 1992; 61: 1-10.
  • Rao CR. Diversity and dissimilarity coefficients: a unified approach. Theor Popul Biol 1982; 21(1): 24-43.
  • Shannon CE. A mathematical theory of communication. Bell Syst Tech J 1948; 27: 379-423 and 623-56.
  • Simpson EH. Measurement of diversity. Nature 1949; 163(688).
  • Warwick RM, Clarke KR. New 'biodiversity' measures reveal a decrease in taxonomic distinctness with increasing stress. Mar Ecol Prog Ser 1995; 129(1): 301-5.

Examples

Import requisite R packages

library(aMiAD)
library(phyloseq)
library(picante)
library(entropart)
library(vegan)

Import example microbiome data

data(sim.biom)

Rarefy the microbiome data using the function rarefy_even_depth in phyloseq to control varying total reads per sample. This implementation is recommended.

set.seed(100)
rare.biom <- rarefy_even_depth(sim.biom, rngseed=TRUE)

Create α-diversity metrics

Alpha.Diversity(sim.biom, Normalize=FALSE)

🔍 aMiAD

Description

This function tests the association bettwen microbial diversity in a community and a host trait of interest with or without covariate adjustments (e.g., age and gender). For the host traits of interest, continuous (e.g., BMI) or binary (e.g., disease status, treatment/placebo) traits can be handled. aMiAD is a non-parametric method which does not require any distributional assumption to be satisfied.

Usage

aMiAD(alpha, Y, cov=NULL, model=c("gaussian","binomial"), n.perm=5000)

Arguments

  • alpha - A matrix for α-diversity metrics. Format: rows are samples and columns are α-diversity metrics.
  • Y - A numeric vector for continuous or binary traits of interest.
  • cov - A matrix (or vector) for covariate adjustment(s). Format: rows are samples and columns are covariate variables. Default is Null.
  • model - "gaussian" is for a continuous trait and "binomial" is for a binary trait.
  • n.perm - The number of permutations. Default is 5000.

Values

$ItembyItem.out - Item-by-item α-diversity-based association analyses.

$aMiAD.out - aMiAD. 'p-value' and 'aMiDivES' are the p-value and microbial diversity effect score estimated by aMiAD.
*Hypothesis testing - 'p-value < 0.05' indicates that microbial diversity is significantly associated with a host trait of interest. *Effect score estimation - 'aMiDivES' represents the effect direction and size of the microbial diversity on a host trait. 'aMiDivES > 0' and 'aMiDivES < 0'indicate positive and negative associations, respectively (e.g., if a binary trait is coded as 0 for the non-diseased population and 1 for the diseased population and 'aMiDivES < 0', aMiAD estimates that the diseased population has lower microbial diversity than the non-diseased population.)

References

  • Koh H. An adaptive microbiome α-diversity-based association analysis method. Sci Rep 2018; 8(18026)

Examples

Import requisite R packages

library(aMiAD)
library(phyloseq)
library(picante)
library(entropart)
library(vegan)

Import example microbiome data

data(sim.biom)

Rarefy the microbiome data using the function rarefy_even_depth in phyloseq to control varying total reads per sample. This implementation is recommended.

set.seed(100)
rare.biom <- rarefy_even_depth(sim.biom, rngseed=TRUE)

Create α-diversity metrics

alpha <- Alpha.Diversity(sim.biom, Normalize=FALSE)

Import a binary trait and covariate adjustments

y <- sample_data(sim.biom)$y
x1 <- sample_data(sim.biom)$x1
x2 <- sample_data(sim.biom)$x2

Run aMiAD

fit <- aMiAD(alpha, y, cov=cbind(x1,x2), model="binomial")

Plot aMiAD

aMiAD.plot(fit, filename="Figure1.pdf", fig.title="")

About

Adaptive Microbiome α-diversity-based Association Analysis (aMiAD)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages