Skip to content

Fix: agtools clean doesn't fill '*' placeholder sequences on real myloasm output - #4

Merged
Vini2 merged 1 commit into
Vini2:mainfrom
gbouras13:fix/clean-star-placeholder-sequences
Aug 7, 2026
Merged

Fix: agtools clean doesn't fill '*' placeholder sequences on real myloasm output#4
Vini2 merged 1 commit into
Vini2:mainfrom
gbouras13:fix/clean-star-placeholder-sequences

Conversation

@gbouras13

Copy link
Copy Markdown
Contributor

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.

…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.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

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.

@Vini2
Vini2 merged commit ecb6e96 into Vini2:main Aug 7, 2026
5 of 13 checks 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.

2 participants