Goal
Generate a per-region Allen Brain ISH expression-energy heatmap for every
neuroscience hypothesis whose
domain_tags include
neuroscience,
alzheimers, or
neurodegeneration. Persist as a registered figure artifact
so the Atlas wiki and
/hypothesis/<id> page render the same image, and the
Skeptic can refute regional claims with the real ISH data.
Why this matters
The 19 King-of-the-Hill domains run nightly tournaments where regional
specificity is a key axis the LLM judge weighs. Today that judgment is based
on text alone; rendering the actual ISH heatmap (and feeding the per-region
energy vector to the judge) replaces "I think this gene is expressed in
hippocampus" with a measured value across 12 brain structures.
Acceptance Criteria
☐ New helper in scidex/forge/forge_tools.py calling the Allen Brain
Atlas RMA API (
https://api.brain-map.org/api/v2/data/...) for the
adult mouse
experiment and aggregating
expression_energy over
curated structure IDs (cortex, hippocampus, striatum, thalamus,
hypothalamus, midbrain, pons, medulla, cerebellum, OB, amygdala, BG).
☐ Heatmap rendered as PNG via the existing
scidex/forge/image_generator.py and committed via
scidex.atlas.artifact_commit.commit_artifact.
☐ Migration hypothesis_allen_ish(hypothesis_id, experiment_id,
structure_acronym, expression_energy, density, intensity) keyed on
(hypothesis_id, structure_acronym).
☐ /hypothesis/<id> renders the heatmap; KOTH judge prompt includes
the per-region vector as a tool result before scoring.
☐ Backfill processes the 200+ neuroscience hypotheses with caching so
the Allen API isn't re-hit for the same gene twice.
☐ No "synthetic_heatmap=True" rows allowed; audit script must report
every heatmap traces back to a real Allen experiment_id.
Approach
Allen RMA — same auth-free pattern as the existing
allen_brain_expression tool registration.
Cache the per-gene experiment list under data/allen/experiments/ and
the per-structure energies under
data/allen/structure_energies/.
Heatmap renderer uses Matplotlib with the colorblind-safe cividis ramp.
Wire artifact commit so the figure shows up in the wiki page for the gene.Dependencies
- Quest
q-555b6bea3848: prior Allen ABC Atlas / SEA-AD task done.
allen_brain_expression skill.
Work Log