Traversal v1 (1/4): label oracle and /resolve support profiling
AD
36m ago+2349+2349+0123456789012345678901234567890123456789-32-32-01234567890123456789
First of four stacked PRs that bring labeled traversal from gr/labeled-traversal (d5d26baa) onto master. Next: #709 (walker), #710 (CLI and routes), #711 (Python client and docs).
This PR adds the backend of the experimental /resolve route. For a query sequence, it reports which labels carry which runs of its k-mers and picks seeds for /traverse. A label is an annotation column or, on an index with coordinates and a header index, one sequence record.
LabelOracleandLabelQuerymap query k-mers to annotation rows in every graph mode and read the requested labels there.- Label discovery uses the
/searchsignature ranking (get_top_label_signatures), so both report the same labels. select_seedsrepeatedly picks the interval carried by the most labels.CoordToHeadergains a header-to-record index, 8 bytes per record.- On row-diff annotations, a walk keeps the rows it decodes, which makes
/traverse2.5x faster.
Outside traversal: get_header_results throws instead of exiting, and the aligner shares the new CanonicalDBG::with_node_first_cache.
Co-authored-by: Gunnar Rätsch
🤖 Generated with Claude Code