Skip to content

Use bam_set_qname in query_name setter#1389

Draft
nh13 wants to merge 1 commit intopysam-developers:masterfrom
nh13:nh13/use-bam-set-qname
Draft

Use bam_set_qname in query_name setter#1389
nh13 wants to merge 1 commit intopysam-developers:masterfrom
nh13:nh13/use-bam-set-qname

Conversation

@nh13
Copy link
Contributor

@nh13 nh13 commented Mar 2, 2026

Summary

  • Replace the manual query name setting logic (4-byte alignment padding, buffer reallocation via pysam_bam_update, null-fill loop) with HTSlib's bam_set_qname() which handles all of this
  • Preserve the existing None/empty check and length > 254 validation as pre-checks

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 marked this pull request as draft March 3, 2026 06:21
@nh13 nh13 changed the title refactor: use bam_set_qname in query_name setter Use bam_set_qname in query_name setter Mar 3, 2026
@nh13 nh13 force-pushed the nh13/use-bam-set-qname branch from 7beaf47 to 5c31227 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