Skip to content

Are there some default filters in alignment pileup? #409

@huangnengCSU

Description

@huangnengCSU

hi,
I am using the function pileup(). I found that the alignments of some reads are not showing in pileup.alignments()but I can see them in IGV. So are there some default filtering strategies? Here is my code as follows:

let mut bam: bam::IndexedReader = bam::IndexedReader::from_path(bam_path).unwrap();
bam.fetch((region.chr.as_str(), region.start, region.end)).unwrap(); // set region
for p in bam.pileup() {
    let pileup = p.unwrap();
    let pos = pileup.pos(); // 0-based
    for alignment in pileup.alignments() {
        let record = alignment.record();
        let qname = std::str::from_utf8(record.qname()).unwrap().to_string();
    }
}

Thank you!
Neng

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions