-
Notifications
You must be signed in to change notification settings - Fork 12
Part 2 Gene Expression
JasonLinjc edited this page Jul 14, 2026
·
3 revisions
Do this second. EPInformer_v2 predicts RNA / CAGE from a gene's promoter + its ABC-nominated
enhancers, reusing the frozen Part 1 encoder as the sequence backbone.
python run_pipeline.py --config config/config.yaml --samples K562,GM12878 --stages encoding
# -> batch_output/{cell}/encoding/{cell}_samples.h5
# (promoter + enhancer one-hot sequence, and activity / dhs / distance / contact features)python train_EPInformer.py --model_type EPInformer-v2 --cell K562 --expr_type RNA \
--n_enh_feats 3 --use_prm_signal \
--h5_path batch_output/K562/encoding/K562_samples.h5 \
--expr_csv data/GM12878_K562_18377_gene_expr_fromXpresso_with_sequence_strand.csv \
--split_csv data/leave_chrom_out_crossvalidation_split_18377genes.csv \
--use_pretrained_encoder --pretrained_encoder_dir results/seqencoder/K562/checkpoints \
--output_dir EPInformer_models/K562 --epochs 50
# all 12 folds via SLURM (f3 is the default): CELL=K562 sbatch slurm/train_epinformer_12fold.slurm
# CAGE instead of RNA: EXPR_TYPE=CAGE ...The shipped config = --n_enh_feats 3 (distance + activity + Hi-C contact) + --use_prm_signal
(promoter activity), with the encoder frozen. In the feature ablation:
- f1 = distance only
- f2 = + activity
- f3 = + Hi-C contact
Activity dominates; Hi-C is ~inert; the promoter signal adds up to +0.03 (cell-dependent), so it is
bundled into f3 by default. --no_freeze_encoder fine-tunes the encoder end-to-end (optional,
doesn't reliably help).
python evaluate.py expression --pred_dir EPInformer_models/K562Targets (pooled out-of-fold Pearson R):
| K562 | GM12878 | HepG2 | HUVEC | NHEK | H1 | |
|---|---|---|---|---|---|---|
| RNA | 0.856 | 0.860 | 0.845 | 0.839 | 0.828 | 0.781 |
| CAGE | 0.867 | 0.890 | — | — | — | — |
Open visualize_results.ipynb for density scatters, per-fold R, and the cross-cell table.