TF-EAGER is the TF-centered windowed training and inference path for GRN edge scoring. It builds one evidence graph per TF subgraph sample, scores all candidate genes in that subgraph jointly, and exports per-edge predictions plus flattened evidence for evaluation.
-
Expression preprocessing:
- expression is transformed with
arcsinhbefore coexpression is computed - after a TF subgraph is selected, expression is z-score normalized across genes for each cell inside that subgraph
- expression is transformed with
-
Candidate subgraph construction:
- start from coexpression neighbors using
abs(corr) >= corr_threshold - add motif/accessibility rescue genes when enabled
- add low-coexpression background genes so the TF subgraph also contains reliable negative candidates
- cap the subgraph by random sampling from the candidate pool
- gold edges do not control which genes enter the TF subgraph
- start from coexpression neighbors using
-
Labeling:
- positives come from the allowed split subset only
- globally positive TF-gene pairs outside the allowed subset are excluded from negative assignment to avoid leakage
- non-positives are classified as:
reliable_negativeprobable_negativeambiguous
-
Split policy:
- source TF must be in
TFs.csv - source TF must be present in the expression universe
- target gene must be present in the expression universe
- current integrated configs use
node_split_mode: expressionwithtarget_gene_policy: audit
- source TF must be in
-
Train/val/test traversal:
- train uses bootstrap TF subgraph samples
- val/test currently build one TF subgraph sample per TF
- val/test still pass through the same candidate labeling and sampling path, so they do not simply dump every raw candidate neighbor
candidates.expression_transform: currentlyarcsinhcandidates.corr_threshold: coexpression thresholdcandidates.train_window_neighbors: TF subgraph size cap, commonly200candidates.train_subgraph_bootstraps: TF bootstrap count, commonly:50for the mESC integrated run5for the multicontext run
candidates.rescue_motifcandidates.rescue_accessibilitynegative_ratiosplit.node_split_modesplit.target_gene_policy
scripts/build_tf_eager_windows.py writes JSONL records with:
source_tfcontextgenesevidence_graph
The evidence_graph carries:
- expression evidence
- motif evidence
- accessibility evidence
- linkage evidence
sample_weight=1.0: positive or reliable negativesample_weight=0.5: probable negativesample_weight=0.0: ambiguous, ignored by the loss
Reliable negatives are modality-aware:
- multi-omics: low coexpression + low accessibility + low/no motif
- incomplete datasets with accessibility only: low coexpression + low accessibility
- expression-only datasets: low coexpression and not positive in gold
Single-context:
python scripts/build_tf_eager_windows.py --config conf/mESC_tf500_tf_eager_train.yml
python scripts/train_tf_eager.py --config conf/mESC_tf500_tf_eager_train.yml
python scripts/infer_tf_eager.py --config conf/mESC_tf500_tf_eager_train.ymlIntegrated single-context workflow:
python scripts/run_integrated_tf_eager_workflow.py --config conf/mESC_tf500_tf_eager_integrated.ymlIntegrated multicontext workflow:
python scripts/run_multicontext_tf_eager_workflow.py \
--config conf/multicontext_tf_eager/all_datacontext_contexts.ymlTo force recomputation from a specific context onward while reusing earlier artifacts:
python scripts/run_multicontext_tf_eager_workflow.py \
--config conf/multicontext_tf_eager/all_datacontext_contexts.yml \
--force-recompute \
--start-from hESCSingle-context integrated workflow:
- optional multimodal acquisition
- split manifest construction
- train window build
- TF-EAGER training
- test window build
- inference
- evaluation
Multicontext workflow:
- per-context optional multimodal acquisition
- per-context split manifest construction
- per-context train/val/test window build
- combine and shuffle train windows across contexts
- combine validation windows across contexts
- train one shared TF-EAGER model
- run test inference/evaluation per context
When multimodal_manifest is provided, TF-EAGER consumes:
motif_hitspromoter_accessibility- manifest QC metadata
Acquisition failures in motif scanning do not have to abort the full workflow:
timeouts from bedtools getfasta or fimo are downgraded into motif acquisition
failure states so the run can continue without motif support.
- conf/mESC/mESC_tf_eager_integrated.yml
- conf/mESC_tf500_tf_eager_integrated.yml
- conf/multicontext_tf_eager/all_datacontext_contexts.yml
Inference writes:
test_scored_edges.csvtest_network.csvtest_flat_evidence.jsonl
Evaluation is run with scripts/eval_grn_agent.py against the split manifest
and held-out subset.