Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aametwally/MetaLonDA
METAgenomic LONgitudinal Differential Abundance method
https://github.com/aametwally/MetaLonDA
differential-abundance-methods longitudinal-studies metagenomics microbiome negative-binomial-distribution smoothing-splines
Last synced: 11 days ago
JSON representation
METAgenomic LONgitudinal Differential Abundance method
- Host: GitHub
- URL: https://github.com/aametwally/MetaLonDA
- Owner: aametwally
- License: other
- Created: 2017-12-03T00:32:20.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-12-17T20:21:33.000Z (almost 5 years ago)
- Last Synced: 2023-11-20T15:10:18.872Z (12 months ago)
- Topics: differential-abundance-methods, longitudinal-studies, metagenomics, microbiome, negative-binomial-distribution, smoothing-splines
- Language: R
- Size: 23.2 MB
- Stars: 14
- Watchers: 3
- Forks: 6
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rm-omics - **MetaLonDA** - Metwally - [MetaLonDA: a flexible R package for identifying time intervals of differentially abundant features in metagenomic longitudinal studies](https://doi.org/10.1186/s40168-018-0402-y) - [vignette](https://cran.r-project.org/web/packages/MetaLonDA/vignettes/MetaLonDA.html) (Software packages and methods / Spline Modeling)
README
# What is MetaLonDA?
[![Build Status](https://travis-ci.org/aametwally/MetaLonDA.svg?branch=master)](https://travis-ci.org/aametwally/MetaLonDA)
[![Rdoc](https://www.rdocumentation.org/badges/version/MetaLonDA)](http://www.rdocumentation.org/packages/MetaLonDA)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/MetaLonDA)](https://cran.r-project.org/package=MetaLonDA)
[![](https://cranlogs.r-pkg.org/badges/grand-total/MetaLonDA)](https://cranlogs.r-pkg.org/badges/grand-total/MetaLonDA)
[![License](https://img.shields.io/badge/license-MIT-red.svg)](https://en.wikipedia.org/wiki/MIT_License)MetaLonDA (METAgenomic LONgitudinal Differential Abundance method) is a method that identifies the significant time intervals of microbial features in longitudinal studies. MetaLonDA has the ability to handle the inconsistencies and common challenges associated with human studies, such as variable sample collection times and uneven number of time points along the subjects’ longitudinal study. The method employs a negative binomial distribution in conjunction with a semi-parametric SS-ANOVA to model the read counts. Then, it performs the significance testing based on unit time intervals using permutation testing procedure.
## Publications:
* Ahmed A. Metwally, Jie Yang, Christian Ascoli, Yang Dai, Patricia W. Finn, and David L. Perkins. "MetaLonDA: a flexible R package for identifying time intervals of differentially abundant features in metagenomic longitudinal studies", Microbiome, 2018. [[paper](https://microbiomejournal.biomedcentral.com/articles/10.1186/s40168-018-0402-y)]
* Ahmed A. Metwally, Patricia W. Finn, Yang Dai, and David L. Perkins. "Detection of Differential Abundance Intervals in Longitudinal Metagenomic Data Using Negative Binomial Smoothing Spline ANOVA." ACM BCB, 2017. [[paper](https://dl.acm.org/citation.cfm?id=3107429)]
# Getting Started
This section details steps for installing and running MetaLonDA. If you experience difficulty installing or running the software, please contact (Ahmed Metwally: [email protected]).## Prerequisites
* R(>= 3.2.0)
## Installation
#### Install MetaLonDA from CRAN:
Install the latest released version from CRAN: https://cran.r-project.org/web/packages/MetaLonDA/index.html
```
install.packages("MetaLonDA")
```#### Install MetaLonDA from GitHub:
Download the latest development code of MetaLonDA from GitHub using devtools
```
library(devtools)
install_github("aametwally/MetaLonDA", ref = "master")
```
## Example:
```
library(MetaLonDA)## Load read counts of 8 features from 100 samples. Samples are from 2 groups, 5 subjects per group, and 10 time points per subject.
data(metalonda_test_data)
View(metalonda_test_data[,1:20])
``````
## Create Group, Time, and ID annotation vectors
n.group = 2
n.sample = 5
n.timepoints = 10
Group = factor(c(rep("A", n.sample*n.timepoints), rep("B",n.sample*n.timepoints)))
Time = rep(rep(1:n.timepoints, times = n.sample), 2)
ID = factor(rep(1:(2*n.sample), each = n.timepoints))## Define the prediction timeponits
points = seq(1, 10, length.out = 100)
```### Test one feature
```
## Identify significant time intervals of the 5th feature:
output.metalonda.f5 = metalonda(Count = metalonda_test_data[5,], Time = Time, Group = Group,
ID = ID, n.perm = 100, fit.method = "nbinomial", points = points,
text = rownames(metalonda_test_data)[5], parall = FALSE, pvalue.threshold = 0.05,
adjust.method = "BH", time.unit = "days", ylabel = "Normalized Count",
col = c("black", "green"), prefix = "Test_F5")
```In our example, we used 20 permutations just to showcase how MetaLonDA works. In real analysis, this number should be much higher. Three figures are generated after running the above snippet:
1. Figure shows the trajectory of the feature's count across different time points:
2. Figure shows fitted spline for each group:
3. In case there is a significant time interval, the following figure is generated to highlight the significant intervals.
### Test all features
```
## Identify significant time intervals for all features:
output.metalonda.all = metalondaAll(Count = metalonda_test_data, Time = Time, Group = Group,
ID = ID, n.perm = 100, fit.method = "nbinomial", num.intervals = 100,
parall = FALSE, pvalue.threshold = 0.05, adjust.method = "BH", time.unit = "hours",
norm.method = "none", prefix = "Test_metalondaALL", ylabel = "Read Counts",
col = c("black", "green"))
```After running the above snippet for testing all features in the count matrix, along with the 2-3 figures for each feature, MetaLonDA produces the following two summary files:
1. Figure illustrates time intervals of differentially abundant features between the two groups. Each line represents a range of the significant time interval of the corresponding feature.
2. Descriptive summary all signifcant time intervals of differentially abundant features.
### Bugs and Suggestions
MetaLonDA is under active research development. Please report any bugs/suggestions to Ahmed Metwally ([email protected]).