How hayatlab/cart_llms works
Purpose and entry points
This repository implements a CART nomination workflow: score candidate genes using expression, protein-atlas, clinical-trial, and differential-expression evidence, then use LLM prompts to prioritize candidates. The main executable entry points are Python scripts for model/prompt variants and R scripts/notebooks for evidence generation.
Evidence-generation layer
Expression and tissue-specific evidence are produced from GTEx and protein-expression sources. gtex_scoring.R and protein_exp.py appear to generate inputs used by downstream aggregation, with persisted outputs under reproduce/gtex_results/median_expression_results.csv and reproduce/protein_expression/protein_expression_results_with_tissues.csv.
Protein Atlas evidence is handled separately through HumanProteinAtlas.ipynb, Protein_Expression_Scoring.ipynb, and the reproduced score table reproduce/Protein_Atlas_results/gene_scores_skin.csv.
Differential expression and atlas analysis
de_scoring.R provides an R-based differential-expression scoring stage. Skin-focused exploratory/downstream analysis is represented by malignant_skin_atlas_downstream_v2.ipynb and Heatmap.ipynb, with materialized heatmap results at reproduce/heatmap_results/skin_results.csv.
Clinical-trial evidence
clinical_trials_scoring.ipynb derives a distinct clinical-trial signal, persisted as reproduce/clinical_trials/clinical_trial_scores.csv. This is an independent evidence boundary feeding the candidate-ranking process rather than an LLM-generated source.
Score aggregation and prompt preparation
Score_Aggregation.ipynb combines evidence streams into weighted gene-score datasets. Prompt-ready variants encode alternative weighting policies—balanced, equal, expression, heatmap, HPA, and clinical-trial emphasis—under reproduce/llm_prompt_prep/, including reproduce/llm_prompt_prep/gene_scores_expression_emphasis.csv.
The llm_prompt_prep/gene_scores_expression_emphasis.csv path is a working prompt-preparation input outside the reproducibility snapshot.
LLM nomination variants
The LLM stage has four parallel experimental modes: baseline (gemini_model.py, prompt_2_new.py), bulk review (gemini_model_bulk.py, prompt_2_new_bulk.py), no-base-context (gemini_model_no_base.py, prompt_2_new_no_base.py), and zero-shot (gemini_model_zero_shot.py, prompt_2_new_zero_shot.py). Corresponding visualization notebooks, such as llm_prompt1_visual.ipynb and llm_prompt1_visual_zero_shot.ipynb, inspect or compare model outputs.
multi_request.py is the likely orchestration boundary for issuing multiple LLM requests. The model scripts indicate an external Gemini service dependency; credentials, request configuration, and response persistence are not present in the supplied tree.
Reproducibility boundary
reproduce/ is the packaged data/artifact layer: it contains source-like input data, generated evidence scores, prompt-preparation CSVs, and environment definitions in reproduce/environment.yml and reproduce/updated_requirements.txt. The bulk expression input reproduce/bulk_review/gene_reads_v10_skin_sun_exposed_lower_leg.gct.gz supports the bulk-review branch.
Components 20
Evidence generation
Independent biological and clinical scoring streams.
- GTEx scoring
gtex_scoring.R - Protein expression scoring
protein_exp.py - Protein Atlas scoring
HumanProteinAtlas.ipynb - Differential expression
de_scoring.R - Clinical-trial scoring
clinical_trials_scoring.ipynb
Aggregation and analysis
Score combination and skin-focused downstream analysis.
- Skin atlas analysis
malignant_skin_atlas_downstream_v2.ipynb - Score aggregation · Combines evidence into weighted gene-score variants.
Score_Aggregation.ipynb
LLM nomination
Parallel Gemini prompting experiments.
- Multi-request orchestration · Issues multiple external LLM requests.
multi_request.py - Baseline nomination
gemini_model.py - Bulk-review nomination
gemini_model_bulk.py - Context ablations · No-base-context and zero-shot experiments.
gemini_model_no_base.py - Gemini service · External candidate-prioritization dependency.
- Nomination visualizations
llm_prompt1_visual.ipynb
Reproducibility artifacts
Packaged datasets and generated score tables.
- GTEx score table
reproduce/gtex_results/median_expression_results.csv - Protein tissue score table
reproduce/protein_expression/protein_expression_results_with_tissues.csv - Protein Atlas scores
reproduce/Protein_Atlas_results/gene_scores_skin.csv - Clinical-trial scores
reproduce/clinical_trials/clinical_trial_scores.csv - Skin heatmap results
reproduce/heatmap_results/skin_results.csv - Prompt-ready score variants · Balanced and emphasis-weighted candidate inputs.
reproduce/llm_prompt_prep/gene_scores_expression_emphasis.csv - Bulk expression input
reproduce/bulk_review/gene_reads_v10_skin_sun_exposed_lower_leg.gct.gz
Connections 24
- GTEx scoring → GTEx score table: produces
- Protein expression scoring → Protein tissue score table: produces
- Protein Atlas scoring → Protein Atlas scores: produces
- Clinical-trial scoring → Clinical-trial scores: produces
- Differential expression → Score aggregation: differential-expression evidence
- GTEx score table → Score aggregation: expression evidence
- Protein tissue score table → Score aggregation: protein evidence
- Protein Atlas scores → Score aggregation: atlas evidence
- Clinical-trial scores → Score aggregation: clinical evidence
- Skin atlas analysis → Skin heatmap results: materializes
- Skin heatmap results → Score aggregation: skin/heatmap evidence
- Score aggregation → Prompt-ready score variants: creates weighted variants
- Prompt-ready score variants → Baseline nomination: candidate input
- Prompt-ready score variants → Bulk-review nomination: candidate input
- Bulk expression input → Bulk-review nomination: bulk-review input
- Prompt-ready score variants → Context ablations: candidate input
- Multi-request orchestration → Baseline nomination: orchestrates requests
- Multi-request orchestration → Bulk-review nomination: orchestrates requests
- Multi-request orchestration → Context ablations: orchestrates requests
- Baseline nomination → Gemini service: prompts
- Bulk-review nomination → Gemini service: prompts
- Context ablations → Gemini service: prompts
- Baseline nomination → Nomination visualizations: outputs inspected
- Context ablations → Nomination visualizations: outputs compared