feat(benchmarks): synthetic dataset template catalog (TASK 050) - #37
Merged
Conversation
Restructures genevector.benchmarks.synthetic into a unified catalog of named pathology templates. Adds three new builders (paracrine, niche, gradient) alongside the existing build_pathology, all sharing a v2.0 ground-truth schema with `phenotypes`, `genes`, and typed `pairs` collections. The new templates are smaller and more focused than build_pathology — each one cleanly exercises a specific spatial coupling mechanism: paracrine for ligand-receptor adjacency, niche for density-induced gene programs, gradient for 1D axial pathologies. Public API: list_templates() for discovery; build_*_dataset() per template; shared (adata, ground_truth) contract across all four. Documents each template in docs/synthetic_templates.md with parameter descriptions, biological intent, and rendered example layouts. Breaking: ground_truth schema bumped from v1.0 to v2.0. TASK 029 spatial eval updated to consume new schema. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
genevector.benchmarks.syntheticinto a unified catalog of named pathology templates:pathology(migrated),paracrine,niche,gradient.phenotypes/genes/pairscollections (typed pairkinds and generoles).genevector.benchmarks.spatial.evalto consume the new schema.docs/synthetic_templates.md(+ 4 rendered example layouts underdocs/_images/) and an RST stub wired into the Sphinx toctree.Templates
build_paracrine_datasetbuild_niche_datasetbuild_gradient_datasetbuild_pathologylist_templates()discovers all four; shared(adata, ground_truth)contract across the catalog.Breaking change
ground_truthschema bumped v1.0 → v2.0. The auxiliary keysadded_gene_namesandt_subtypesare removed; both are reconstructible fromgt[\"genes\"]andgt[\"phenotypes\"]. The TASK 029 spatial eval code is updated in this PR.Test plan
pytest tests/test_benchmarks_synthetic_templates.py -v(11 new tests)pytest tests/test_benchmarks_synthetic_overlay.py -v(10, all under v2.0)pytest tests/test_benchmarks_synthetic_layout.py -v(3, untouched)pytest tests/test_benchmarks_spatial_eval.py -v(5 pass, 2 pre-existing xfails)docs/_images/template_*.png)Out of scope / minor deviations from spec
added_gene_names/t_subtypes(not in the v2.0 spec; reconstructible).docs/source/synthetic_templates.rst(a brief stub that links to the canonical markdown). The markdown atdocs/synthetic_templates.mdremains the full reference per spec.🤖 Generated with Claude Code