somiya-khan01/tcga_dashboard_cancer_analysis
𧬠TCGA Breast Cancer RNA-Seq Dashboard
Interactive Streamlit dashboard for exploring DESeq2 differential expression results from TCGA-BRCA data.
β‘ Quickstart
# 1. Clone / copy your project folder
cd tcga_dashboard
# 2. Create and activate a virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Mac / Linux
# venv\Scripts\activate # Windows
# 3. Install dependencies
pip install -r requirements.txt
# 4. Launch the dashboard
streamlit run app.pyThe app opens automatically at http://localhost:8501
π Required Input Files
Upload these three CSV files via the sidebar in the app.
1. deseq2_results.csv β DESeq2 output
Export from R with:
write.csv(as.data.frame(res_ordered), "deseq2_results.csv", quote = FALSE)Expected columns (DESeq2 standard output):
The first column becomes gene after import. Make sure row names are gene IDs.2. normalized_counts.csv β Normalized count matrix
Export from R with:
norm_counts <- counts(dds, normalized = TRUE)
write.csv(norm_counts, "normalized_counts.csv", quote = FALSE)Expected format:
- Rows = genes (row names are gene IDs)
- Columns = sample IDs (must match metadata index)
3. sample_metadata.csv β Sample condition labels
Export from R with:
write.csv(sample_info, "sample_metadata.csv", quote = FALSE)Expected format:
- Row names = sample IDs (must match counts matrix column names)
- `condition` column =
"Tumor"or"Normal"
π₯οΈ Dashboard Sections
π οΈ Dependencies
π§ Troubleshooting
Heatmap shows no genes β Gene IDs in DESeq2 results and counts matrix must match exactly (both Ensembl IDs, or both gene symbols).
PCA shows "No matching samples" β Column names in normalized_counts.csv must exactly match row names in sample_metadata.csv.
Slow performance on large counts matrices β Pre-filter to the top 5,000 most variable genes before export, or subsample columns to the 100 samples analyzed.
Dashboard built with Streamlit Β· Plotly Β· scikit-learn
