Skip to content
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

Are there some default filters in alignment pileup? #409

Open
huangnengCSU opened this issue Oct 1, 2023 · 0 comments
Open

Are there some default filters in alignment pileup? #409

huangnengCSU opened this issue Oct 1, 2023 · 0 comments

Comments

@huangnengCSU
Copy link

huangnengCSU commented Oct 1, 2023

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

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

No branches or pull requests

1 participant