A reproducible RNA-seq analysis workflow demonstrating differential expression analysis, publication-ready visualizations, and structured result reporting.
| PCA | Volcano plot |
|---|---|
![]() |
![]() |
| Sample distances | Top DEGs |
|---|---|
![]() |
![]() |
This is the same structure a research team would receive for a focused comparison:
| You get | Where to look |
|---|---|
| QC and filtering summary | results/tables/qc_summary.csv |
| Full and significant DEG tables | results/tables/ |
| Normalized counts | results/tables/normalized_counts.csv |
| Figures as PNG and PDF | results/plots/ |
| Short interpretation report | reports/summary_report.md |
| Scripts to rerun every step | scripts/ |
In this example, 749 of 16,139 filtered genes passed the significance thresholds: 411 up and 338 down in treated samples.
- RNA-seq differential expression workflow
- PCA, heatmap, and volcano plot generation
- Organized result tables and figures
- Short analysis report structure
- Reproducible scripting practice
- PCA plot:
results/plots/pca.png - Sample distance heatmap:
results/plots/sample_distance_heatmap.png - Top DEG heatmap:
results/plots/top_deg_heatmap.png - Volcano plot:
results/plots/volcano.png - Differential expression results table:
results/tables/deg_results.csv - Short analysis report:
reports/summary_report.md
The project is designed as a clean proof-of-work repository for an end-to-end RNA-seq DEG workflow: raw count data, metadata, QC, DESeq2 analysis, PCA, heatmaps, volcano plot, DEG tables, and a short interpretation report.
This project uses the Bioconductor airway experiment package. The dataset contains RNA-seq read counts from human airway smooth muscle cell lines treated with dexamethasone and matched untreated controls.
Primary analysis contrast:
dexamethasone treated vs untreated
The DESeq2 design controls for cell line:
design = ~ cell + dex| Output | Description |
|---|---|
data/raw/airway_counts.csv |
Raw gene count matrix exported from the airway package |
data/raw/airway_metadata.csv |
Sample metadata |
data/processed/airway_counts_filtered.csv |
Count matrix after low-count filtering |
results/tables/qc_summary.csv |
Sample and filtering summary |
results/tables/deg_results.csv |
Full DESeq2 result table |
results/tables/significant_deg_results.csv |
DEGs with padj < 0.05 and abs(log2FoldChange) >= 1 |
results/tables/normalized_counts.csv |
DESeq2-normalized counts |
results/plots/pca.png |
PCA plot using variance-stabilized expression |
results/plots/sample_distance_heatmap.png |
Sample clustering heatmap |
results/plots/top_deg_heatmap.png |
Heatmap of top 40 DE genes |
results/plots/volcano.png |
Volcano plot |
reports/summary_report.md |
Short client-facing interpretation report |
PDF versions of the plots are also written for publication workflows.
- R 4.4+ recommended
- Internet access for first-time package installation
- R packages:
- CRAN:
ggplot2,ggrepel,pheatmap,dplyr,readr,tibble,RColorBrewer - Bioconductor:
DESeq2,airway,SummarizedExperiment,AnnotationDbi,org.Hs.eg.db,apeglm
- CRAN:
The setup script installs missing packages automatically. To use conda instead:
conda env create -f environment.yml
conda activate rna-seq-workflowOn Windows, see INSTALL_WINDOWS.md if Rscript is not found.
From the project root:
Rscript run_analysis.RIndividual steps can also be run in order:
Rscript scripts/00_setup.R
Rscript scripts/01_download_or_prepare_data.R
Rscript scripts/02_qc.R
Rscript scripts/03_deseq2_deg.R
Rscript scripts/04_make_plots.R
Rscript scripts/05_write_report.R- Import raw count data and sample metadata from Bioconductor
airway. - Filter low-count genes: keep genes with count >= 10 in at least 4 samples.
- Fit DESeq2 with
~ cell + dex. - Shrink log2 fold changes with
apeglm. - Mark significant DEGs using:
padj < 0.05 and abs(log2FoldChange) >= 1
- Use variance-stabilized values for PCA and heatmaps.
- Export clean CSV tables, PNG/PDF plots, and a short report.
- DESeq2 expects raw count data and performs its own normalization through size factors.
- PCA and heatmaps use variance-stabilized expression values because RNA-seq count variance depends on the mean.
- The airway dataset is a compact public example suitable for proving the workflow, not a substitute for project-specific experimental design review.
- This repository is for research support and does not provide clinical diagnosis, treatment decisions, or patient-specific interpretation.



