Skip to content

Accumulate insertion count during CIGAR loop in build_alignment_sequence#1387

Draft
nh13 wants to merge 1 commit intopysam-developers:masterfrom
nh13:nh13/build-alignment-seq-insertion-count
Draft

Accumulate insertion count during CIGAR loop in build_alignment_sequence#1387
nh13 wants to merge 1 commit intopysam-developers:masterfrom
nh13:nh13/build-alignment-seq-insertion-count

Conversation

@nh13
Copy link
Contributor

@nh13 nh13 commented Mar 2, 2026

Summary

  • Accumulate the insertion count during the existing CIGAR loop instead of making a full separate pass over the output buffer
  • The insertion length is known from BAM_CINS/BAM_CPAD operations during the CIGAR loop, so the separate counting loop (scanning for lowercase characters) is unnecessary

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 perf: accumulate insertion count during CIGAR loop in build_alignment_sequence Accumulate insertion count during CIGAR loop in build_alignment_sequence Mar 3, 2026
@nh13 nh13 force-pushed the nh13/build-alignment-seq-insertion-count branch from e2ce546 to 59f9c26 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