We designed and developed a new strategy, Generalized coRrelation analysis for Metabolome and Microbiome (GRaMM), for inter-correlation pairs discovery among metabolome and microbiome. GRaMM gives considerations to the different characteristics of omics data, the effect of covariates, and the balance of linear and nonlinear correlations, by integrating the classical linear regression, the newly reported maximum information coefficient (MIC), and the centered log-ratio transformation (CLR) algorithms.

4 functions of the package of gramm4R: Gramm ,naiveGramm, nlfitGramm ,preGramm

Install the latest version of this package by entering the following in R: if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install("gramm4R")

preGramm: A function to reproccess the input data of metabolome and microbiome. Missing values may be imputed and filled. Metabolome data and microbiomedata may be normalized and transformed by logarithm transformation and centered log-ratio (CLR) algorithm.


naiveGramm: A function to test the association among metabolites and microbes. Using linear (linear regression) or nonlinear (Maximal Information Coefficient) methods.


r: Matrix of correlation coefficients. p: Matrix of correlation p values. type: Matrix of correlation methods for computing (linear or nonlinear).

nlfitGramm : Plot, draw regression line and confidence interval, and show regression equation, R-square and P-value. The function includes the following models in the latest version: "line2P" (formula as: y=ax+b), "line3P" (y=ax^2+bx+c), "log2P" (y=aln(x)+b), "exp2P" (y=aexp(bx)),"exp3P" (y=aexp(bx)+c), "power2P" (y=ax^b), "power3P" (y=ax^b+c), and "S" (y=a/(1+exp((x-b)/c))).



Of each correlation pairs the figure who has the highest R-square among these models will be saved in a "pdf" file at working dirctory.

Gramm: A function of the entire strategy to get the association between metabolites and microbes, using linear or nonlinear methods, and plot the regression figures.


A file named "R value top 10 pairs.pdf" will be created automatically (corrlation coefficient top 10 pairs) .

Try the gramm4R package in your browser

Any scripts or data that you put into this service are public.

gramm4R documentation built on Nov. 8, 2020, 5:41 p.m.