Skip to content

grp-bork/microbial_load_predictor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microbial load predictor (MLP)

R function to predict the fecal microbial load (total microbial cell count per gram or cell density) based on the taxonomic profile of the human gut microbiome. The prediction model was trained and constructed based on paired data of fecal metagenomes and fecal microbial load in the GALAXY and MetaCardis projects. Please also see the website for more information on this tool https://microbiome-tools.embl.de/mlp/.

Requirements

  • R 4.3.1+
  • vegan
  • tidyverse

Input file

Species-level taxonomic profiles prepared by the following taxonomic profilers (the default output) are supported. Example files from these profilers are available in the test_data folder.

How to start

  • On terminal
git clone https://git.embl.de/grp-bork/microbial-load-predictor.git
  • On R (inside the downloaded folder)
devtools::install()
library("MLP")

Predicting microbial load

load <- MLP(input, "motus25", "metacardis", "load")

Transforming relative microbiome profile (RMP) to quantitative microbiome profile (QMP)

qmp <- MLP(input, "motus25", "metacardis", "qmp")

Quantitative (absolute) abundance = relative abundance * predicted microbial load

Example code using test data

The test data comes from Franzosa EA et al., 2018 including Crohn's disease and ulcerative colitis patients as well as control individuals.
Gut microbiome structure and metabolic activity in inflammatory bowel disease

library(tidyverse)

# read input file (mOTUs v2.5)
input <- read.delim("test_data/Franzosa_2018_IBD.motus25.tsv", header = T, row.names = 1, check.names = F) 

# transpose the data
input <- data.frame(t(input), check.names = F)

# predict microbial loads with the MetaCardis model
load <- MLP(input, "motus25", "metacardis", "load")

# transform relative microbiome profile (RMP) to quantitative microbiome profile (QMP)
qmp <- MLP(input, "motus25", "metacardis", "qmp")

# plot predicted microbial loads (ggplot2 is required)
md <- read.delim("test_data/Franzosa_2018_IBD.metadata.tsv", header = T, row.names = 1, check.names = F)
df <- data.frame(md, load = load$load)
ggplot(df, aes(x = Disease, y = log10(load), fill = Disease)) +
  theme_bw() +
  geom_boxplot()

About

R package to predict microbial loads

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages