Skip to content

CTMARGREITER/NGSChar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Anaerobic Digestion Char Addition NGS Code

Overview

This repository contains the NGS 16S rRNA amplicon data analysis pipeline for investigating the effects of bio-based gasification char addition on anaerobic digestion reactor microbiomes.

Repository Structure

NGS_Reactors/
├── data/
│   ├── V1/               # Trial 1 data
│   └── V2/               # Trial 2 data (exemplary workflow)
│       ├── raw/          # Raw NGS output from Mothur
│       └── processed/    # Processed R data objects
├── scripts/              # Analysis R Markdown files
│   ├── data.Rmd          # Data preparation
│   ├── adapt-phase.Rmd   # Adaptation phase analysis
│   ├── char-phase.Rmd    # Char addition phase analysis
│   ├── heat-tree.Rmd     # Taxonomic visualizations
│   └── lefse.Rmd         # LEfSe analysis
├── src/                  # Helper functions
│   ├── data.R            # Data import and processing
│   ├── tax.R             # Taxonomy preparation
│   └── lefse_prep.R      # LEfSe data preparation
├── results/              # Output wertables
├── renv.lock             # Package versions
└── FAPROTAX.txt          # Functional annotation database

Experimental Design

Two trials (V1, V2) with anaerobic digestion reactors:

  • Char reactors (R1, R2, R6): With bio-based gasification char
  • Control reactors (R3, R4, R5): Without char

Analytical Workflow

All analyses are exemplified using Trial 2 (V2) data.

1. Data Preparation (scripts/data.Rmd)

  • Imports sample metadata and raw Mothur NGS output
  • Validates and reorders data (Mothur changes sample order)
  • Splits into adaptation and char phases
  • Output: data/V2/processed/trial.RData

2. Statistical Analyses

Adaptation Phase (adapt-phase.Rmd):

  • Core biome identification
  • PERMANOVA and ANOSIM to verify reactor similarity

Char Phase (char-phase.Rmd):

  • Core biome analysis
  • Community composition tests (PERMANOVA, ANOSIM)
  • PCA ordinations with environmental variable fitting
  • Archaea and Bacteria specific analyses (boxplots, heatmaps)

Additional Analyses:

  • heat-tree.Rmd: Taxonomic tree visualizations
  • lefse.Rmd: Differential abundance analysis

Installation

Prerequisites

  • R ≥ 4.5.1
  • RStudio

Setup with renv

# Install renv
install.packages("renv")

# Restore all project packages
renv::restore()

All required packages (including Bioconductor packages like vegan, lefser, ggplot2, etc.) are automatically installed from renv.lock.

Usage

Execute scripts in order for Trial 2:

rmarkdown::render("scripts/data.Rmd")
rmarkdown::render("scripts/adapt-phase.Rmd")
rmarkdown::render("scripts/char-phase.Rmd")
rmarkdown::render("scripts/heat-tree.Rmd")
rmarkdown::render("scripts/lefse.Rmd")

For Trial 1 (V1): Modify file paths in data.Rmd to point to data/V1/ directory.

Helper Functions

src/data.R: Core functions for data import, validation, and core biome filtering

src/lefse_prep.R: Data preparation for LEfSe analysis

src/tax.R: Taxonomy formatting and string preparation

Authors

Christian Margreiter & Jakob Klotz

About

Bio-Based Gasification Chars Recycling in Anaerobic Digestion

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages