Skip to content

Latest commit

ย 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿงฌ TranscriptomeForge v1.0

Reproducible Bulk RNA-seq Analysis Pipeline for TCGA-BRCA

TranscriptomeForge is a modular and reproducible bulk RNA-seq analysis workflow built with R, Bioconductor, DESeq2, and Python/Streamlit.

The current implementation demonstrates an end-to-end transcriptomic analysis of TCGA Breast Invasive Carcinoma (TCGA-BRCA) samples, covering data acquisition, preprocessing, quality control, differential expression analysis, gene annotation, functional enrichment, visualization, automated HTML reporting, and interactive result exploration.


๐Ÿ”ฌ Project Overview

TranscriptomeForge follows this workflow:

TCGA-BRCA RNA-seq Data
          โ†“
Data Acquisition
          โ†“
Count Matrix Preparation
          โ†“
Low-count Gene Filtering
          โ†“
Variance-Stabilizing Transformation
          โ†“
Quality Control
 โ”œโ”€โ”€ Library Size
 โ”œโ”€โ”€ Principal Component Analysis
 โ””โ”€โ”€ Sample Correlation
          โ†“
DESeq2 Differential Expression
 โ”œโ”€โ”€ Upregulated Genes
 โ””โ”€โ”€ Downregulated Genes
          โ†“
Gene Annotation
          โ†“
Functional Enrichment
 โ”œโ”€โ”€ GO Biological Process
 โ”œโ”€โ”€ GO Cellular Component
 โ”œโ”€โ”€ GO Molecular Function
 โ””โ”€โ”€ KEGG Pathways
          โ†“
Biological Visualization
          โ†“
Automated HTML Report
          โ†“
Streamlit Dashboard

๐ŸŽฏ Objectives

TranscriptomeForge was developed to:

  • Build a reproducible bulk RNA-seq analysis workflow.
  • Retrieve and prepare TCGA RNA-seq data.
  • Perform systematic transcriptomic quality control.
  • Identify significantly differentially expressed genes.
  • Annotate Ensembl gene identifiers with gene symbols and Entrez IDs.
  • Perform GO and KEGG functional enrichment.
  • Generate publication-oriented visualizations.
  • Produce structured result tables.
  • Automatically generate an HTML analysis report.
  • Provide interactive result exploration through Streamlit.

๐Ÿงฌ Dataset

The demonstration analysis uses RNA-seq data from:

The Cancer Genome Atlas Breast Invasive Carcinoma (TCGA-BRCA)

Sample composition

Group Samples
Primary tumor 10
Solid-tissue normal 10
Total 20

Reference

  • Organism: Homo sapiens
  • Reference genome: GRCh38 / hg38
  • Data type: Gene Expression Quantification
  • Workflow: STAR - Counts

Large raw TCGA datasets and serialized intermediate objects are excluded from GitHub using .gitignore.


โš™๏ธ Pipeline Modules

Step Script Function
1 scripts/00_setup.R Project and package setup
2 scripts/01_download_tcga.R TCGA-BRCA data acquisition
3 scripts/02_prepare_data.R Count preparation and filtering
4 scripts/03_quality_control.R QC, PCA, VST, sample correlation
5 scripts/04_differential_expression.R DESeq2 differential expression
6 scripts/05_annotate_genes.R Gene annotation
7 scripts/05_visualization.R Heatmaps and gene-expression plots
8 scripts/06_enrichment_analysis.R GO and KEGG enrichment
9 scripts/07_generate_report.R Automated HTML reporting
10 app.py Interactive Streamlit dashboard

๐Ÿ“Š Major Results

Analysis Result
Genes before filtering 60,660
Genes retained after filtering 23,117
Genes removed 37,543
Retention percentage 38.11%
Upregulated genes 3,690
Downregulated genes 3,527
Not significant 15,900
Total significant DEGs 7,217
Gene symbols mapped 18,958
Entrez IDs mapped 18,958
Significant GO terms 1,502
Significant KEGG pathways 50

Differential-expression significance criteria:

Adjusted p-value < 0.05
|log2FoldChange| > 1

๐Ÿ“ˆ Quality Control

Quality-control analysis includes:

  • Library-size assessment
  • Detected-gene counts
  • Variance-stabilizing transformation
  • Principal component analysis
  • Sample-to-sample correlation

Library Sizes

Library Sizes

Principal Component Analysis

PCA

Sample Correlation Heatmap

Sample Correlation


๐Ÿงช Differential Expression Analysis

Differential expression was performed using DESeq2 for:

Tumor vs Normal

Volcano Plot

Volcano Plot

MA Plot

MA Plot

Representative result files:

results/differential_expression/TCGA_BRCA_all_DE_results.csv
results/differential_expression/TCGA_BRCA_upregulated_genes.csv
results/differential_expression/TCGA_BRCA_downregulated_genes.csv

๐Ÿงฌ Gene Annotation

Ensembl identifiers were cleaned and mapped using org.Hs.eg.db.

Annotation includes:

  • Ensembl ID
  • Gene symbol
  • Entrez ID
  • Gene name
  • log2 fold change
  • adjusted p-value
  • significance category

Representative annotated genes include:

  • CLEC3B
  • LYVE1
  • COL10A1
  • CD209
  • PDE2A
  • GDF10
  • HSPB7
  • MMP11

๐Ÿ”ฅ Top Differentially Expressed Genes

Top 40 DE Genes

The heatmap shows strong expression differences between tumor and normal samples for the most significant genes.


๐Ÿ“ฆ Representative Gene Expression

Representative genes include:

Upregulated

  • COL10A1
  • MMP11

Downregulated

  • CLEC3B
  • LYVE1
  • GDF10
  • HSPB7

Key Gene Expression


๐Ÿง  Functional Enrichment Analysis

Functional enrichment was performed separately for upregulated and downregulated genes using clusterProfiler.

Gene Ontology

Analysis Significant terms
GO BP upregulated 141
GO CC upregulated 43
GO MF upregulated 16
GO BP downregulated 1,062
GO CC downregulated 93
GO MF downregulated 147

KEGG

Analysis Significant pathways
KEGG upregulated 6
KEGG downregulated 44

๐Ÿ”ฌ GO Biological Process โ€” Upregulated Genes

Major enriched processes include:

  • Nuclear division
  • Chromosome segregation
  • Organelle fission
  • DNA replication
  • Cell-cycle checkpoint signaling
  • Meiotic cell-cycle processes

GO BP Upregulated


๐Ÿ”ฌ GO Biological Process โ€” Downregulated Genes

Major enriched processes include:

  • Angiogenesis
  • Blood circulation
  • Vascular development
  • Muscle-system processes
  • Chemotaxis
  • G protein-coupled receptor signaling

GO BP Downregulated


๐Ÿงฌ KEGG Pathways โ€” Upregulated Genes

Major pathways include:

  • Cell cycle
  • Fanconi anemia pathway
  • Viral carcinogenesis
  • Neutrophil extracellular trap formation
  • Systemic lupus erythematosus
  • Alcoholism

KEGG Upregulated

Some KEGG disease labels arise because they share genes involved in chromatin regulation, DNA damage, immune processes, and proliferation. They should not be interpreted as direct evidence of those diseases in the samples.


๐Ÿงฌ KEGG Pathways โ€” Downregulated Genes

Major pathways include:

  • PPAR signaling
  • cAMP signaling
  • Calcium signaling
  • Hormone signaling
  • Complement and coagulation cascades
  • Cytokine-cytokine receptor interaction
  • Retinol metabolism
  • Lipid metabolism

KEGG Downregulated


๐Ÿง  Biological Interpretation

The tumor samples showed strong transcriptional activation of biological programs related to:

  • cell-cycle progression,
  • chromosome segregation,
  • nuclear division,
  • DNA replication,
  • mitotic checkpoint regulation,
  • and DNA-damage responses.

Several highly upregulated genes, including COL10A1, MMP11, and related extracellular-matrix genes, are associated with tumor-stromal interactions and tissue remodeling.

Downregulated genes were enriched for angiogenesis, vascular development, blood circulation, lipid metabolism, hormone signaling, and immune-related pathways.

Because this implementation uses a relatively small subset of TCGA-BRCA samples, the findings should be interpreted as a reproducible workflow demonstration rather than a population-level clinical study.


๐Ÿ–ฅ๏ธ Streamlit Dashboard

TranscriptomeForge includes an interactive Streamlit dashboard with the following sections:

  • Overview
  • Quality Control
  • Differential Expression
  • Functional Enrichment
  • Key Gene Expression
  • Final HTML Report

Run the dashboard with:

streamlit run app.py

Then open:

http://localhost:8501

๐Ÿ“ Repository Structure

TranscriptomeForge/
โ”‚
โ”œโ”€โ”€ R/
โ”‚   โ”œโ”€โ”€ de_functions.R
โ”‚   โ”œโ”€โ”€ download_tcga.R
โ”‚   โ”œโ”€โ”€ enrichment_functions.R
โ”‚   โ”œโ”€โ”€ load_data.R
โ”‚   โ”œโ”€โ”€ plot_functions.R
โ”‚   โ”œโ”€โ”€ qc_functions.R
โ”‚   โ””โ”€โ”€ utils.R
โ”‚
โ”œโ”€โ”€ config/
โ”‚   โ””โ”€โ”€ config.yaml
โ”‚
โ”œโ”€โ”€ data/
โ”‚   โ”œโ”€โ”€ metadata/
โ”‚   โ”œโ”€โ”€ processed/
โ”‚   โ””โ”€โ”€ raw/
โ”‚
โ”œโ”€โ”€ reports/
โ”‚   โ””โ”€โ”€ TCGA_BRCA_report.Rmd
โ”‚
โ”œโ”€โ”€ results/
โ”‚   โ”œโ”€โ”€ differential_expression/
โ”‚   โ”œโ”€โ”€ enrichment/
โ”‚   โ”œโ”€โ”€ figures/
โ”‚   โ”œโ”€โ”€ qc/
โ”‚   โ””โ”€โ”€ tables/
โ”‚
โ”œโ”€โ”€ scripts/
โ”‚   โ”œโ”€โ”€ 00_setup.R
โ”‚   โ”œโ”€โ”€ 01_download_tcga.R
โ”‚   โ”œโ”€โ”€ 02_prepare_data.R
โ”‚   โ”œโ”€โ”€ 03_quality_control.R
โ”‚   โ”œโ”€โ”€ 04_differential_expression.R
โ”‚   โ”œโ”€โ”€ 05_annotate_genes.R
โ”‚   โ”œโ”€โ”€ 05_visualization.R
โ”‚   โ”œโ”€โ”€ 06_enrichment_analysis.R
โ”‚   โ””โ”€โ”€ 07_generate_report.R
โ”‚
โ”œโ”€โ”€ app.py
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ requirements_R.txt
โ”œโ”€โ”€ TranscriptomeForge.Rproj
โ”œโ”€โ”€ LICENSE
โ””โ”€โ”€ README.md

๐Ÿš€ Installation

Clone the repository:

git clone https://github.com/Pratik-2002-ux/TranscriptomeForge.git
cd TranscriptomeForge

Python dependencies

pip install -r requirements.txt

R dependencies

Required R and Bioconductor packages are listed in:

requirements_R.txt

Important packages include:

  • TCGAbiolinks
  • SummarizedExperiment
  • DESeq2
  • AnnotationDbi
  • org.Hs.eg.db
  • clusterProfiler
  • enrichplot
  • ggplot2
  • pheatmap
  • rmarkdown
  • knitr
  • yaml

โ–ถ๏ธ Running the Pipeline

Run the scripts sequentially inside R or RStudio:

source("scripts/00_setup.R")
source("scripts/01_download_tcga.R")
source("scripts/02_prepare_data.R")
source("scripts/03_quality_control.R")
source("scripts/04_differential_expression.R")
source("scripts/05_annotate_genes.R")
source("scripts/05_visualization.R")
source("scripts/06_enrichment_analysis.R")
source("scripts/07_generate_report.R")

source() is an R command and should not be pasted directly into a zsh/bash terminal.

Individual R scripts can also be executed from a system terminal using Rscript.

Example:

Rscript scripts/03_quality_control.R

๐Ÿ“‚ Outputs

Generated results are organized under:

results/
โ”œโ”€โ”€ differential_expression/
โ”œโ”€โ”€ enrichment/
โ”œโ”€โ”€ figures/
โ”œโ”€โ”€ qc/
โ””โ”€โ”€ tables/

The automated HTML report is generated locally at:

output/html/TCGA_BRCA_analysis_report.html

Generated HTML files are excluded from Git tracking.


๐Ÿงฐ Technology Stack

R / Bioconductor

  • TCGAbiolinks
  • DESeq2
  • SummarizedExperiment
  • AnnotationDbi
  • org.Hs.eg.db
  • clusterProfiler
  • enrichplot
  • ggplot2
  • pheatmap
  • rmarkdown
  • knitr

Python

  • Streamlit
  • pandas
  • Pillow

Biological Resources

  • TCGA
  • GDC
  • Gene Ontology
  • KEGG

Development

  • Git
  • GitHub
  • RStudio
  • VS Code

โ™ป๏ธ Reproducibility

TranscriptomeForge separates:

  • source code,
  • project configuration,
  • metadata,
  • intermediate data,
  • quality-control outputs,
  • statistical results,
  • figures,
  • reports,
  • and application components.

Large raw TCGA datasets and serialized intermediate R objects are excluded through .gitignore.

This keeps the repository lightweight while retaining the scripts, metadata, representative results, and documentation required to reproduce the workflow.


โš ๏ธ Scope and Limitations

The current implementation uses:

  • 10 tumor samples
  • 10 normal samples

This is intended as a reproducible portfolio and workflow demonstration.

The results should not be interpreted as definitive clinical conclusions.

Results may depend on:

  • sample selection,
  • filtering criteria,
  • differential-expression thresholds,
  • software versions,
  • annotation database versions,
  • and pathway database versions.

TranscriptomeForge is intended for research and educational use and is not intended for clinical diagnosis.


๐Ÿ”ฎ Future Development

Potential extensions include:

  • Complete TCGA-BRCA cohort analysis
  • Additional TCGA cancer types
  • Molecular subtype analysis
  • Gene Set Enrichment Analysis
  • Survival analysis
  • Immune-cell deconvolution
  • WGCNA
  • Pathway-activity scoring
  • Machine-learning classification
  • Multi-omics integration
  • Docker/container support
  • Nextflow or Snakemake integration
  • Automated testing
  • Cloud deployment

๐Ÿ‘ค Author

Pratik Ramchandra Chaudhari

M.Tech Biomedical Engineering
National Institute of Technology Rourkela

Bioinformatics โ€ข Computational Biology โ€ข Transcriptomics โ€ข Genomics โ€ข Biological Data Analysis


๐Ÿ“œ License

TranscriptomeForge is distributed under the MIT License.

See the LICENSE file for details.


โญ Citation

If you use TranscriptomeForge in academic or research work, please cite this GitHub repository.

A permanent software citation can be associated with a future versioned and archived release.


โœ… Project Status

TranscriptomeForge v1.0 โ€” Completed

From RNA-seq counts to reproducible biological interpretation.

About

Reproducible bulk RNA-seq analysis pipeline for TCGA-BRCA integrating DESeq2, gene annotation, GO/KEGG enrichment, automated reporting, and Streamlit visualization.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages