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();
}
}
hi, I am using the function
pileup()
. I found that the alignments of some reads are not showing inpileup.alignments()
but I can see them in IGV. So are there some default filtering strategies? Here is my code as follows:Thank you! Neng