Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Bulk RNA‑seq Differential Expression Pipeline (DESeq2)

This repository contains a fully modular, reproducible RNA‑seq analysis pipeline implemented in R.
It performs end‑to‑end processing of bulk RNA‑seq quantifications (Salmon) through differential expression analysis (DESeq2), quality control, visualization, and result reporting.

The pipeline is designed with clarity, reproducibility, and engineering discipline in mind:

  • No global variables
  • Each script runs independently
  • All intermediate objects saved as RDS
  • Config‑driven design
  • Helper functions for clean, reusable code

🧬 Pipeline Overview

The workflow includes:

1. Data Import & Preprocessing

  • Metadata validation
  • Import of Salmon quantifications using tximport
  • Gene‑level summarization via tx2gene
  • Filtering of samples based on user‑defined conditions

2. Differential Expression (DESeq2)

  • Filtering low‑count genes
  • Normalization
  • Model fitting
  • Wald test
  • Extraction of DEGs at multiple thresholds
  • Saving all results and normalized counts

3. Quality Control

  • Variance‑stabilizing transformation (VST)
  • Batch‑effect correction (limma)
  • Sample distance heatmap
  • Outlier detection (distance + correlation)
  • Cook’s distance boxplot

4. Dimensionality Reduction

  • PCA with customizable aesthetics
  • Sample labeling and grouping

5. Visualization

  • DEG heatmaps (padj < 0.1 and padj < 0.05)
  • Volcano plot with:
    • auto‑detected broken y‑axis
    • top‑N gene labeling
    • clean color coding

6. Reproducibility

  • All intermediate objects saved to data/processed/
  • All figures saved to results/figures/
  • All tables saved to results/tables/

About

Modular DESeq2 downstream pipeline — tximport, outlier detection, VST, PCA, volcano plots | Applied to APP/PS1 microglial bulk RNA-seq (BWH) | R

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages