This project provides a pipeline for analyzing microbiota data from the OGB (Oat-Gut-Brain) project. It includes alpha diversity, beta diversity, differential abundance analysis, and visualization of results.
The pipeline is implemented as a Quarto website for interactive exploration of results. It processes metagenomic data (after upstream preprocessing) to characterize microbial communities and compare sample groups.
.
├── code/
│ ├── _quarto.yml
│ ├── data.R
│ ├── funct.R
│ ├── main.R
│ └── ...
├── output/ # Rendered HTML reports
├── preprocessing/
│ ├── README.md # Raw read QC → MetaPhlAn (and optional HUMAnN)
│ ├── raw_reads/ # Puhti / taxprofiler / HUMAnN scripts
│ └── remove_columns_metaphlan_db_meta4_combined_reports.R
└── README.md
code/_quarto.yml— Quarto website configurationcode/main.R— runs the analysis pipelinecode/data.R— loads and formats datacode/funct.R— analysis functionspreprocessing/README.md— raw read preprocessing (taxprofiler, MetaPhlAn4)preprocessing/remove_columns_metaphlan_db_meta4_combined_reports.R— cleans MetaPhlAn tables for this repo
[ENA raw FASTQ]
→ taxprofiler (fastp, BBduk, human removal) → MetaPhlAn4 profiles
→ optional HUMAnN3 on host-depleted reads
→ remove_columns_metaphlan_*.R
→ code/data.R + Quarto (output/)
Upstream steps and scripts: preprocessing/README.md.
- R (version 4.0 or higher)
- Quarto (version 1.0 or higher)
- Required R packages (see
code/main.R)
-
Clone this repository:
git clone https://github.com/openresearchlabs/OGB_project.git cd OGB_project -
Install required R packages:
install.packages(c("package_name")) # replace with packages from main.R
-
Install Quarto: https://quarto.org/docs/get-started/
-
Open the project in RStudio or your preferred R environment.
-
Adjust
code/_quarto.ymlif you need different analysis parameters. -
Run the main script:
source("code/main.R") -
View results by opening
output/index.htmlin a browser.
code/data.R— data loading and formattingcode/funct.R— add or change analysis functionscode/_quarto.yml— report structure and contentpreprocessing/— upstream metagenomics before this pipeline
-
Memory: increase the R memory limit if needed:
memory.limit(size=8000)
-
Missing packages:
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install(c("package1", "package2", "package3"))
-
Quarto render fails: check the R console, and confirm Quarto is installed and on your
PATH.
For other issues, open an issue on the GitHub repository.