Entering edit mode
4.1 years ago
mhasa006
▴
70
I have following BAM file
NB551232:115:H2VJHBGXF:2:22303:20719:3554:CT:GT 97 chr3 17443 54 70M = 17458 72 GTCATATAGATGATGACTGATTTACCCTTTTACTCTGCATGCAGCTTCTCCTGATGGAGTATCGTTTGTG EEE6/EEAEEAAEEAAEA/E/AEE/<EEEE/EE/EEEAAE/EEEEEE/E<A</EEEAAAEA<<E//EE/< NM:i:0MD:Z:70 AS:i:70 XS:i:52
NB551232:115:H2VJHBGXF:2:22303:20719:3554:CT:GT 145 chr3 17458 46 57M = 17443 -72 ACTGATTTACCCTTTTACTCTGCATGCAGCTTCTCCTGATGGAGTATCGTTTGTGTG EEEE6EEE/E/EE/EEEEEEAEEEE//AEEEE/AA/EEE/</EEEEE///EE/E/EA NM:i:0 MD:Z:57 AS:i:57 XS:i:43
As the flags indicated 97
and 145
these reads are not properly paired reads. How can I read these reads with java hstjdk
Here's what I'm trying
SamReader reader = SamReaderFactory.makeDefault().
validationStringency(ValidationStringency.LENIENT).
open(new File(BamPath));
for(SAMRecord record : reader) {
// do something
}
But this loop doesn't work and does not read the BAM file.
Is there some limitations on SAMReader
on reading reads with specific flags? How can I read such BAM file with flags like 97
, 145
, 161
or 81
?