Digital patient generation and drug response prediction through TCGA–DepMap integration.
A computational oncology pipeline that bridges the gap between patient transcriptomes (TCGA-LUAD) and cell-line drug screening data (DepMap) using CVAE-generated virtual patients and multi-level similarity scoring.
Cell-line drug sensitivity data from DepMap/CCLE covers 578+ compounds but lacks direct clinical relevance — cell lines don't represent individual patient biology. This pipeline answers:
Which cell line drug response data can we trust for a given patient subtype?
| Metric | Value |
|---|---|
| Virtual patients generated | 400 (100 per stage, CVAE) |
| Feature genes selected | ~3,500 (ANOVA + driver + pathway) |
| Compounds reinterpreted | 578 |
| Patient–cell line pairs scored | 10,000 |
| High-confidence matches (>0.8) | ~1,800 |
| Original vs Generated | Stage-Conditioned Latent Space |
|---|---|
![]() |
![]() |
Left: expression distribution overlap between real and virtual patients (0.7–0.8 intentional — avoids overfitting). Right: PCA of CVAE latent space showing stage-specific clustering.
| Patient–Cell Line Similarity Matrix | Stage-Specific Similarity Networks |
|---|---|
![]() |
![]() |
Left: 10 virtual patients × 25 LUAD cell lines integrated similarity scores. Right: High-confidence (>0.8) patient–cell line pairs, stratified by cancer stage.
Q75 similarity score by cancer stage. Bubble size = number of matched virtual patients. Lines with large bubbles across multiple stages serve as broadly representative experimental models.
TCGA-LUAD DepMap/CCLE
───────── ───────────
[01] Data processing [03] Cell line preparation
↓ ↓
[02] Feature selection ───────→ Common gene space
↓
[CVAE] Virtual patient [04] Multi-level similarity
generation (Python) ──→ S = 0.2·Global + 0.3·Pathway + 0.5·Target
↓
[05] Drug response integration (578 compounds)
↓
[06] Network analysis & top cell lines
| Step | Script | Description |
|---|---|---|
| 01 | R/01_tcga_data_processing.R |
Download TCGA-LUAD, Ensembl→symbol mapping, MAD filter, log2 |
| 02 | R/02_feature_selection.R |
ANOVA 3000 + Stage I vs IV 500 + driver 38 + Hallmark pathways |
| CVAE | python/cvae_train.py |
Conditional VAE: encoder/decoder [1024→512→256→50], 400 virtual patients |
| 03 | R/03_depmap_preparation.R |
LUAD cell lines, HVG 5000, 3-tier gene selection |
| 04 | R/04_similarity_analysis.R |
Spearman + GSVA/Pearson + cosine → integrated score [0,1] |
| 05 | R/05_drug_response.R |
Drug sensitivity cutoffs, per-cell-line reports, weighted response |
| 06 | R/06_network_analysis.R |
Similarity networks (>0.8), stage-specific analysis, top 20 dotplot |
| Level | Method | Weight | Rationale |
|---|---|---|---|
| S_global | Spearman correlation (full genes) | 0.2 | Overall transcriptomic similarity |
| S_pathway | GSVA enrichment → Pearson | 0.3 | Pathway-level biological correspondence |
| S_target | Cosine similarity (C6 gene sets) | 0.5 | Drug-actionable target concordance |
tcga-depmap-drug-profiler/
├── R/
│ ├── 01_tcga_data_processing.R
│ ├── 02_feature_selection.R
│ ├── 03_depmap_preparation.R
│ ├── 04_similarity_analysis.R
│ ├── 05_drug_response.R
│ └── 06_network_analysis.R
├── python/
│ ├── cvae_train.py
│ ├── run_pipeline.py
│ └── requirements.txt
├── report/
│ ├── project_overview.Rmd
│ └── digipat_styles.css
├── config.yaml
└── figures/ # Key output figures (committed)
├── Original_vs_Generated.png
├── Stage_PCAplot.png
├── Latent_PCAplot.png
├── Ten_patient_cellline_similarity_matrix.png
├── stage_specific_similarity_networks.png
├── top20_celllines_dotplot.png
└── cellline_stage_similarity_stats.csv
# 1. Install R dependencies
Rscript -e "install.packages(c('tidyverse','yaml','matrixStats','umap','pheatmap','msigdbr','GSVA','igraph','ggraph','kableExtra'))"
Rscript -e "BiocManager::install(c('TCGAbiolinks','SummarizedExperiment','org.Hs.eg.db'))"
# 2. Install Python dependencies
pip install -r python/requirements.txt
# 3. Run full pipeline
python python/run_pipeline.py
# Or run individual steps
Rscript R/01_tcga_data_processing.R
Rscript R/02_feature_selection.R
python python/cvae_train.py --epochs 300 --n-per-stage 100
Rscript R/04_similarity_analysis.RAll parameters are centralized in config.yaml:
- TCGA filtering: min sample %, TPM threshold, MAD quantile
- Feature selection: number of ANOVA/extreme genes
- DepMap: HVG count, expression cutoff
- Similarity weights: global/pathway/target ratios
- CVAE: latent dim, epochs, beta, patients per stage
- Network: similarity threshold, max edges
| Source | Description | Access |
|---|---|---|
| TCGA-LUAD | Lung adenocarcinoma RNA-seq (STAR counts + TPM) | Public (GDC API) |
| DepMap | Cell line expression + drug sensitivity | Public (download) |
| MSigDB | Hallmark (H) + oncogenic (C6) gene sets | Public (msigdbr) |
- R ≥ 4.3 with Bioconductor
- Python ≥ 3.9 with PyTorch ≥ 2.0
- ~16 GB RAM recommended for GSVA computation
MIT




