Skip to content

Training And Running Predictions

After the 1000 Genomes dataset is available, you can train neural genotype models or run classical SNP-based superpopulation prediction.

Run the commands below in order for the neural path. Use the classical SNP section when you want a VCF/SNP baseline instead of AlphaGenome neural tensors.

Neural Genotype Models

Prepare or validate the processed tensor cache:

genomics genotype split configs/predictors/genotype_based/genes_1000_all_3ontologies.yaml

Train a model:

genomics genotype train configs/predictors/genotype_based/genes_1000_all_3ontologies.yaml

Evaluate a saved checkpoint:

genomics genotype evaluate \
  configs/predictors/genotype_based/genes_1000_all_3ontologies.yaml \
  --checkpoint best_accuracy \
  --split val

Run final held-out test evaluation after model selection:

genomics genotype test \
  configs/predictors/genotype_based/genes_1000_all_3ontologies.yaml \
  --checkpoint best_accuracy

Enabling DITA

DITA is the aligned tensor representation for indel-aware neural models. Enable it when you want to address coordinate shifts caused by indels in dense AlphaGenome tracks.

Set these fields in the genotype config:

dataset_input:
  tensor_layout: "haplotype_channels"
  alignment_mapping: "bcftools_chain"
  feature_mode: "signals_and_masks"
  indel_include_valid_mask: true
  indel_include_snp_mask: true

Validate required artifacts before training:

genomics audit-data \
  --dataset-id 1kg_high_coverage \
  --check-bcftools-chain \
  --sample-limit 3 \
  --fail-on-missing

If artifacts exist in a separate tree, preview syncing them with:

genomics genotype sync-bcftools-artifacts \
  --source-dir /path/to/consensus_dataset \
  --target-dir /path/to/canonical_dataset \
  --link-mode hardlink

Add --apply only after reviewing the preview.

Classical SNP Superpopulation Path

If you do not need AlphaGenome neural tensors, run the integrated SNP ancestry pipeline:

genomics snp-ancestry run --config configs/predictors/snp_ancestry/default.yaml

For FROGAncestryCalc likelihood comparisons, use the third-party tool directly:

cd third_party/FROGAncestryCalc
python3 tools/vcf_to_frog.py sample.vcf.gz tools/aisnps_55_list.txt input/sample_data.txt
./run.sh

More Details

Topic Read More
Genotype model inputs, caches, and outputs Genotype Predictor
Why DITA exists and what masks mean Dynamic Indel Tensor Alignment
Split policy, preprocessing, stability, and leakage Preprocessing And Leakage
SNP ancestry math and outputs SNP Ancestry
FROGAncestryCalc and native/third-party tools Native And Third-Party
All CLI flags CLI Reference