feat(merge): add pangraph merge command - #197
Conversation
fix(build): support building a graph from a single input sequence
fix(merge): repeated merges, help grouping and release test build
#197. feat(merge): add pangraph merge command
OverviewClick to expand
ObservedThe diff matches its description: it adds Blocking issuesCorrectness items worth resolving before this ships on the 🔴 F1. `reconstruct_path_sequence` panics on a malformed graph in release builds [click to expand]
Effect: Suggestions:
Non-blocking issuesTest deficiencies, robustness, and convention drift. Fix if time allows. 🟡 F2. Error tests match message substrings instead of `assert_error!` [click to expand]Every new error-path test asserts a hand-picked substring of the rendered message ( Effect: the loosest cases ( Suggestions:
🟡 F3. Id-namespacing retry: underived bound, asymmetric collision handling, untested control flow [click to expand]
Effect: correctness rests on a probabilistic argument where a collision-free construction is available, and the only non-trivial control flow in the method is unverified. In the rare within-graph collision case a merge a different salt would complete instead aborts. Note: this machinery is removed by #199, which derives ids from genome names. If #197 lands independently, address it here; if it lands stacked under #199, this becomes moot. Suggestions:
🟡 F4. New logic and error branches lack tests [click to expand]Several new or reachable branches are untested:
Effect: user-facing precondition guards and a new pure primitive have no regression coverage; a future refactor could drop a guard or reorder Suggestions:
🟡 F5. Genome-name uniqueness ignores surrounding whitespace [click to expand]
Effect: genome names differing only by surrounding whitespace slip through. They are then hard to address via Suggestions:
🟡 F6. `argmin` aborts guide-tree construction on a NaN distance [click to expand]
Effect: guide-tree construction fails with an opaque Suggestions:
🟡 F7. Weak assertions in new merge integration tests [click to expand]
Effect: tests whose names promise a behavior (id survival, reordering independence) verify only that the run did not error. Suggestions:
🟡 F8. Broken documentation link shipped in `--help` and the generated reference [click to expand]
Effect: users following the documentation link from Suggestions:
🔵 F9. Convention drift in new code and tests [click to expand]
Suggestions: use the project error macros; swap assertion argument order; move 🔵 F10. ndarray usage nits in neighbor-joining [click to expand]
Suggestions: use 🔵 F11. Redundant work on cold and debug-only paths [click to expand]
Suggestions: reserve 🔵 F12. AI-writing tells and prose nits [click to expand]New Rust doc comments carry U+2014 em dashes ( Suggestions: replace em dashes with Validation summaryValidation checks [click to expand]
NotesClick to expand
|
refactor(pangraph): derive block and node ids from genome names
Adds pangraph
merge <LEFT_GRAPH> <RIGHT_GRAPH>, which combines two existing pangenome graphs into one without rebuilding from FASTA. The main use case is extending a graph with new genomes: build a graph for the new sequences, then append it to the existing one.This branch integrates five PRs: #191, #192, #193, #195, #196.
Changes to already-released commands:
buildsingle-sequence panic--verifymore strict