Skip to content

Consolidate aux tag value decoding in get_tag and get_tags#1391

Draft
nh13 wants to merge 1 commit intopysam-developers:masterfrom
nh13:nh13/consolidate-aux-tag-decoding
Draft

Consolidate aux tag value decoding in get_tag and get_tags#1391
nh13 wants to merge 1 commit intopysam-developers:masterfrom
nh13:nh13/consolidate-aux-tag-decoding

Conversation

@nh13
Copy link
Contributor

@nh13 nh13 commented Mar 2, 2026

Summary

  • Extract a _decode_aux_value() cdef helper that both get_tag() and get_tags() use to decode aux tag values, eliminating duplicated type-dispatch logic
  • Rewrite get_tags() to use HTSlib's bam_aux_first()/bam_aux_next() iterators instead of manual pointer arithmetic with hand-calculated byte offsets

Test plan

  • Run REF_PATH=: pytest tests/AlignedSegment_test.py -v

AI disclosure: This PR was AI-assisted using Claude Code. The issue was identified via AI-guided code review, and the implementation was drafted by AI with human review and approval.

@nh13 nh13 force-pushed the nh13/consolidate-aux-tag-decoding branch 2 times, most recently from 6bb0539 to c1431d3 Compare March 2, 2026 05:47
@nh13 nh13 marked this pull request as draft March 3, 2026 06:21
@nh13 nh13 changed the title refactor: consolidate aux tag value decoding in get_tag and get_tags Consolidate aux tag value decoding in get_tag and get_tags Mar 3, 2026
@nh13 nh13 force-pushed the nh13/consolidate-aux-tag-decoding branch from c1431d3 to 95fdc17 Compare March 3, 2026 06:24
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