feat: add class to generate pileup over AlignedSegments#1353
Open
nh13 wants to merge 1 commit intopysam-developers:masterfrom
Open
feat: add class to generate pileup over AlignedSegments#1353nh13 wants to merge 1 commit intopysam-developers:masterfrom
nh13 wants to merge 1 commit intopysam-developers:masterfrom
Conversation
nh13
commented
Jul 4, 2025
| cdef class IteratorColumnAll(IteratorColumn): | ||
| pass | ||
|
|
||
| cdef class IteratorColumnRecords: |
Contributor
Author
There was a problem hiding this comment.
this cannot extend IteratorColumn since IteratorColumn requires a SAM file.
Contributor
Author
Member
|
I've now finally finished up and merged #1362. Can I interest you in rebasing this onto current master and ideally updating it to use |
08461e0 to
4d6e755
Compare
…ents Add new IteratorColumnRecords class that generates pileup columns from a collection of AlignedSegment objects using htslib's push-based pileup API (bam_plp_push/bam_plp64_next). Key features: - Accepts any iterable of AlignedSegments (requires coordinate-sorted order) - Supports optional reference sequence (fastafile parameter) - Includes add_reference(), has_reference(), and seq_len property - Configurable min_base_quality parameter - Uses 64-bit position types (hts_pos_t) for extended chromosome support Implementation notes: - Uses bam_plp_push/bam_plp64_next instead of callback-based approach - Records consumed during initialization for push-based API - Includes required NULL push to signal end-of-input - Leverages 64-bit APIs (bam_plp64_next, faidx_fetch_seq64) from PR pysam-developers#1362 - Uses opaque bam_plp_s struct (no direct field access needed) Testing: - 12 new tests covering reference support, edge cases, and parameters - Documented known limitation: minor depth differences vs samtools mpileup due to push-based vs pull-based filtering differences Changes: - Add IteratorColumnRecords class in pysam/libcalignmentfile.pyx - Update to use 64-bit pileup APIs (bam_plp64_next, faidx_fetch_seq64) - Add type stub in pysam/libcalignmentfile.pyi - Add parameterized to test dependencies for parameterized tests - Update CI workflows to install parameterized package Closes pysam-developers#1352
Contributor
Author
|
@jmarshall done! Ready for re-review! |
Contributor
Author
|
@jmarshall bump! |
Member
|
I know 😄 — It's on the short list! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add new IteratorColumnRecords class that generates pileup columns from a
collection of AlignedSegment objects using htslib's push-based pileup API
(bam_plp_push/bam_plp64_next).
Key features:
Implementation notes:
Testing:
due to push-based vs pull-based filtering differences
Changes:
Closes #1352