trait2gene¶
trait2gene is a Python package and CLI for end-to-end PoPS-style GWAS gene
prioritization. It standardizes config validation, resource resolution, MAGMA
handoff, feature preparation, PoPS execution, locus-level ranking, and report
generation behind one reproducible workflow.
Getting Started
Reference
- API Reference
- trait2gene.cli
- trait2gene.config.loader
- trait2gene.config.models
- trait2gene.engine.runner
- trait2gene.engine.plan
- trait2gene.examples.public_schizophrenia
- trait2gene.resources.resolver
- trait2gene.workflows.validate
- trait2gene.workflows.prepare
- trait2gene.workflows.magma_stage
- trait2gene.workflows.feature_stage
- trait2gene.workflows.pops_stage
- trait2gene.workflows.prioritize_stage
- trait2gene.workflows.report_stage
- trait2gene.workflows.doctor
Highlights¶
External MAGMA execution without redistributing MAGMA itself
Upstream-compatible PoPS wrapping with standardized intermediate outputs
Strict YAML configuration via Pydantic models
Locus prioritization and HTML reporting on top of PoPS outputs
Reproducible public example using real downloaded data
Real public example¶
The repository includes a full public schizophrenia walkthrough. It downloads
public inputs, writes a machine-local config, runs the pipeline using
precomputed MAGMA outputs, and verifies that trait2gene reproduces the public
upstream PoPS results.
python scripts/run_public_schizophrenia_example.py
Key artifacts:
real_runs/schizophrenia_public_example/results/reports/report.htmlreal_runs/schizophrenia_public_example/verification_summary.jsonreal_runs/schizophrenia_public_example/result_snapshot.json