-
Notifications
You must be signed in to change notification settings - Fork 12
Part 2 Gene Expression
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 --stages encoding --dry-run
SAMPLES=K562 STAGES=encoding sbatch slurm/run_pipeline_cpu.slurm
# -> 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_repro/checkpoints \
--gene_list batch_output/K562/links/GeneList.txt \
--fold 1 --output_dir EPInformer_models/K562_repro_RNA_prm --epochs 50
# all 12 folds via SLURM (f3 is the default)
CELL=K562 EXPR_TYPE=RNA PRETRAINED_DIR=results/seqencoder/K562_repro/checkpoints \
OUTPUT_DIR=EPInformer_models/K562_repro_RNA_prm \
sbatch slurm/train_epinformer_12fold.slurm
# CAGE instead of RNA: EXPR_TYPE=CAGE ...The direct command is a one-fold inspection run. Keep RNA, CAGE, and each model variant in separate output directories; pooled evaluation intentionally rejects multiple prediction files per fold.
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/K562_repro_RNA_prmTargets (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 | — | — | — | — |
evaluate.py writes a pooled evaluation summary and scatter plot to the prediction directory.