Consolidate dot_prep into uniq_anchor; add regression tests#71
Merged
Conversation
dot_prep previously re-read the delta file twice and re-ran the full planesweep filtering already done by uniq_anchor. Now uniq_anchor builds and returns (reference_lengths, fields_by_query) during its existing second pass, which cli.py threads directly into index_for_dot(). This removes ~300 lines of duplicate code and shaves ~3-4s off every run. Also fixed a latent bug in index_for_dot() where all_references_by_query used a stale `ref` variable for repetitive alignments; now uses fields[6]. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Runs the full pipeline on the ecoli example (fast, ~5s) and compares key text outputs against checked-in fixtures. Covers structural variants BED, coords files, dot visualization coords/index, and assembly stats. GitHub Actions runs these on every push and PR. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From Maria
Remove a duplicate step that Dot and Assemblytics had in common. They both did unique anchor filtering, so now that's only done once.
Also add pytest with a github action to ensure basic regression testing runs automatically on all new PRs.
From Claude
dot_prep.pypreviously re-read the delta file twice and re-ran the full planesweep filtering thatuniq_anchor.pyhad already done. Nowuniq_anchor.run()builds and returns(reference_lengths, fields_by_query)during its existing second pass, whichcli.pythreads directly intoindex_for_dot().dot_prep.py(duplicatesummarize_planesweep,binary_search,getQueryRefCombinations,calculateUniqueness,writeFilteredDeltaFile).index_for_dot()whereall_references_by_queryused a stalerefvariable for repetitive alignments instead offields[6].tests/test_pipeline.pyruns the full pipeline on the ecoli example (~5s) and does exact-match comparison against checked-in fixture files for all key text outputs..github/workflows/test.ymlrunspyteston every push and PR.Test plan
🤖 Generated with Claude Code