Skip to content

Feat/ibd suggestion target guid - #30

Merged
JamesKane merged 2 commits into
mainfrom
feat/ibd-suggestion-target-guid
Aug 4, 2026
Merged

Feat/ibd suggestion target guid#30
JamesKane merged 2 commits into
mainfrom
feat/ibd-suggestion-target-guid

Conversation

@JamesKane

Copy link
Copy Markdown
Owner

No description provided.

JamesKane and others added 2 commits August 2, 2026 09:48
`/api/v1/ibd/attest` gates on `owns_sample(attester_did, claimed_sample)`, but a
self-publishing Edge client has no way to learn its server-side
`core.biosample.sample_guid` — the suggestions payload returned only the
*candidate's* guid, so Navigator could never fill in `claimed_sample` and the
attest endpoint was unreachable from the edge.

`suggestions_for_did` already joins on `ms.target_sample_guid` (that is how the
per-DID scope is enforced), so surfacing it costs nothing and leaks nothing: the
caller owns that sample by construction. `suggested_sample_guid` supplies the
`counterpart_sample` of the same report.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The de-novo loader reuses a catalog row only when it matches on
`coordinates @> {'hs1': ...}`, so markers whose hs1 coordinate had not been
lifted yet missed the match and got a fresh hs1-only row — and that row is what
`tree.haplogroup_variant` points at. `variant-name-reconcile` later adopted the
marker's name onto the branch row but never touches `coordinates`, leaving the
tree with correct names and, on the 2026-08-04 prod dump, GRCh38 for only 44,181
of 203,983 branch SNPs (21.7%).

The Navigator places each source in its native build with no liftover
(`place_y_consensus_decodingus`), and `parse_decodingus_json(json, build_key)`
drops every locus lacking that build's coordinate — so a GRCh38 subject saw
3,413 of 11,421 Y nodes. All 33 backbone nodes survived; what vanished was the
terminal tree (node visibility 81% at depth 0-10 → 21% at 31-40), so GRCh38
subjects placed plausibly but shallow rather than failing outright.

Copy GRCh38/GRCh37 from the marker's catalog row (same canonical_name AND
identical hs1 site + alleles) rather than chain-lifting: the catalog row holds
YBrowse's own values, and a lift would re-derive them and can mismap in the
inverted / ampliconic Y blocks. All 132,183 candidate rows agree with their twin
on position and alleles (0 swapped), so the copy is exact. Rows whose twin
disagrees are not filled — the match is enforced in the join.

Verified against a restored copy of the 2026-08-04 prod dump and against
decodingus_cutover: 130,553 rows filled in 34s, GRCh38 44,181 → 174,734, node
visibility 3,413 → 11,104/11,421, flat across every depth band. Idempotent — a
re-run fills 0 and leaves tree_revision alone (the ~60 MB tree payload should
not be invalidated for a no-op).

Residual ~27.6k rows have no named twin and need variant-coord-lift, which
requires the reverse hs1->GRCh38 chain staged to establish its pivot.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@JamesKane
JamesKane merged commit 2910309 into main Aug 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant