I have a BAM file sorted by position. I need to process a group of reads from the BAM file at a time. To process that, I need to access the mate pair of each of these read at the same time. Is there a way using htsjdk
to access the mate pair information using the information of the other pair.
I can get the Mate Pair record name with getMateReferenceName()
and alignment start position by getMateAlignmentStart()
. But I need to access the read sequence and the base quality string and the flag of the mate pair. How can I do that? Thanks.