-
Notifications
You must be signed in to change notification settings - Fork 294
feat: add class to generate pileup over AlignedSegments #1353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| cdef class IteratorColumnAll(IteratorColumn): | ||
| pass | ||
|
|
||
| cdef class IteratorColumnRecords: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this cannot extend IteratorColumn since IteratorColumn requires a SAM file.
|
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
|
@jmarshall done! Ready for re-review! |
|
@jmarshall bump! |
|
I know 😄 — It's on the short list! |
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