therapeutic_target=True, fetch DepMap CRISPRdepmap skill and persist a per-lineagetarget_validity score drifts.hypothesis_depmap_dependency(hypothesis_id, lineage,scripts/backfill_hypothesis_depmap.py walks hypotheses wherepayload_json->>'therapeutic_target'='true' OR atarget_class IN ('kinase','GPCR','enzyme','transporter') heuristicscidex/forge/depmap_client.py wraps the local depmaphttps://depmap.org/portal/api) anddependency_block listing/hypothesis/<id> shows a lineage bar chart with essentiality23Q4) so reproducibilitydepmap skill if installed; otherwise hit the publicdata/depmap/.
scidex/senate/personas/domain_expert.py.q-555b6bea3848.All acceptance criteria implemented:
Migration: migrations/add_hypothesis_depmap_dependency.py — creates
hypothesis_depmap_dependency table with all required columns plus UNIQUE
constraint on (hypothesis_id, lineage, depmap_release) and indexes on
hypothesis_id and depmap_release. Applied and verified on live DB.
Client module: scidex/forge/depmap_client.py — follows the
census_expression.py pattern with parquet cache under data/depmap/.
Primary path: DepMap portal API (/api/gene_dependency). Secondary path:
downloads Model.csv (~546KB) from DepMap 24Q2 figshare (article 25880521)
for cell-line lineage mapping. Falls back gracefully when network unavailable.
Uses DEPMAP_RELEASE = "24Q2" (latest accessible release; update to 24Q4
when figshare article becomes publicly available).
Backfill script: scripts/backfill_hypothesis_depmap.py — follows
backfill_hypothesis_census.py pattern. Selects hypotheses where
hypothesis_type IN ('therapeutic', 'therapeutic_genetics', 'pharmacological', OR
'combination_target', 'pathway_target')druggability_score IS NOT NULL,
with target_gene IS NOT NULL. De-duplicates API calls per gene. Upserts with
ON CONFLICT DO UPDATE. Supports --dry-run, --stale-only, --ids, --limit.
API endpoint: GET /api/hypotheses/{hypothesis_id}/depmap — returns JSON
{hypothesis_id, target_gene, depmap_essential_threshold, lineage_summaries[]}.
Bar chart in hypothesis page: _build_depmap_tab_html() helper generates
SVG horizontal bar chart with essentiality threshold at -0.5 (yellow dashed)
and -1.0 (red label). New "DepMap" tab added to /hypothesis/{id} tab strip.
Tab panel shows bar chart + data table with Chronos scores, %essential, and
verdict labels (Strong/Likely/—).
Domain Expert injection: _build_depmap_dependency_block() in agent.py
queries hypothesis_depmap_dependency by target_gene (joining through
hypotheses) for pre-computed data, falls back to live dependency_for_gene()
API. Injected into domain expert expert_prompt before the feasibility
assessment round.
Note on data availability: DepMap portal API returns 403 in this environment
(likely IP-restricted). Backfill requires outbound network access. Run manually
after network access is confirmed:
python3 scripts/backfill_hypothesis_depmap.py --stale-only --limit 200