Fix: agtools clean doesn't fill '*' placeholder sequences on real myloasm output - #4
Merged
Conversation
…oasm output transform_segment in clean.py only filled a segment's sequence when the existing GFA field was a literal empty string (parts[2] == ""). Real myloasm output uses the standard GFA1 "*" placeholder for an unspecified sequence instead -- confirmed against actual myloasm assembly output, not assumed. tests/data/myloasm/final_contig_graph.gfa happens to use the empty-field convention (it appears to be from an older myloasm build, judging by its embedded dna_r10.4.1_e8.2_sup@v3.5.1 model tag), which is why the existing test suite didn't catch this -- it only exercised the convention that already worked. Net effect: `agtools clean -a myloasm` ran without error and correctly dropped segments/links/paths with no FASTA match, but silently left every surviving segment's sequence as "*" -- the GFA looked cleaned but was still missing the one thing most downstream tools need. Also treats "*" as needing a fill, matching real-world myloasm output. Added test_write_filtered_graph_fills_star_placeholder_sequences alongside the existing empty-field test; both pass, full suite (250 tests) passes with no regressions.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
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.
transform_segment in clean.py only filled a segment's sequence when the existing GFA field was a literal empty string (parts[2] == ""). Real myloasm output uses the standard GFA1 "*" placeholder for an unspecified sequence instead -- confirmed against actual myloasm assembly output, not assumed. tests/data/myloasm/final_contig_graph.gfa happens to use the empty-field convention (it appears to be from an older myloasm build, judging by its embedded dna_r10.4.1_e8.2_sup@v3.5.1 model tag), which is why the existing test suite didn't catch this -- it only exercised the convention that already worked.
Net effect:
agtools clean -a myloasmran without error and correctly dropped segments/links/paths with no FASTA match, but silently left every surviving segment's sequence as "*" -- the GFA looked cleaned but was still missing the one thing most downstream tools need.Also treats "*" as needing a fill, matching real-world myloasm output. Added test_write_filtered_graph_fills_star_placeholder_sequences alongside the existing empty-field test; both pass, full suite (250 tests) passes with no regressions.