Skip to content

Address review findings on sub-k seed labels (#691) and map-only mode (#692) - #694

Merged
adamant-pwn merged 1 commit into
masterfrom
fix/review-followups-691-692
Oct 28, 2026
Merged

adamant-pwn merged 1 commit into
masterfrom
fix/review-followups-691-692

Conversation

@adamant-pwn

@adamant-pwn adamant-pwn commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Follow-up to the cubic review comments on #691 and #692, which were merged before the comments were processed.

#692, --align-map-only with --map / --count-kmers / --query-presence. Those flags take the k-mer mapping path, so --align-map-only was silently ignored. The combination is now rejected in Config, with an error naming the flags.

#691, coordinates in the sub-k seed regression test. SubkSeedLabels now also runs the BASIC case with a coordinate annotation. For every alignment label it checks three things: there is one coordinate set per label, every coordinate is non-negative, and each coordinate points at the aligned sequence in that label. That includes the query that matches only a source dummy k-mer.

#691, negative coordinates for source dummies (no code change). The $…$ source-dummy coordinates are c - num_dummy, which is negative at a sequence start. They are stored as int64_t (the subtraction wraps in unsigned arithmetic, and the conversion back to int64_t gives the intended negative value). They do not reach the output:

  • A seed on a source dummy spells no $, so its offset is at least num_dummy.
  • filter_seeds adds the offset back, so the seed's coordinate is at least c.
  • Extension compares only differences of coordinates.

Checks:

  • The new coordinate assertions pass.
  • On a 24-genome BASIC graph with a column_coord annotation, I aligned 252 reads that are bare 20/25/30 bp contig-start prefixes on both strands. No reported coordinate wrapped, at seed length 19 (246 aligned) or 15 (252 aligned).

#692, two rows per header with --fwd-and-reverse (kept). With that flag the FASTA parser yields each record and its reverse complement as two queries with the same header. Plain align prints a row for each, and map-only now does the same. Dropping one in map-only mode would make the two modes disagree on the row contract.

#691, test for the >16-continuation cap (not added). Exceeding the cap needs a source dummy with at least 3 $ and more than 16 distinct continuations. A test for that would mostly assert on graph construction, so I did not add one.

🤖 Generated with Claude Code


Summary by cubic

Addresses review comments on the merged PRs #691 and #692.

Behavior change

  • --align-map-only is now rejected when combined with --map, --count-kmers, or --query-presence, since those flags take the k-mer mapping path and previously caused --align-map-only to be silently ignored.

Bug fixes

  • Extends the SubkSeedLabels test to run the BASIC case with a coordinate annotation and asserts that every reported coordinate is non-negative and points at the aligned sequence within its label.

Written for commit 7e87878. Summary will update on new commits.

View guided diff Turn on auto-fix

- Reject --align-map-only together with --map, --count-kmers or
  --query-presence, which take the k-mer mapping path and would silently
  ignore it.
- Check the coordinates of sub-k seeds at sequence starts on a BASIC graph
  with a coordinate annotation: every reported coordinate is non-negative
  and points at the aligned sequence in its label.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

View guided diff | Turn on auto-fix | Re-trigger cubic

@adamant-pwn
adamant-pwn merged commit f7a7b12 into master Oct 28, 2026
49 checks passed
@adamant-pwn
adamant-pwn deleted the fix/review-followups-691-692 branch October 28, 2026 23:12
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.

1 participant