The alignment section of a SAM/BAM file contains 11 mandatory fields such as PNEXT.
POS in column 4 gives:
1-based leftmost mapping POSition
PNEXT in column 8 gives:
Position of the mate/next read
So, my goal is to calculate the distance between read-pairs in python by measuring the distance between the end position of a read and the end position of it's mate. Basically --->distance<---
Thus, I wonder if someone knows what position PNEXT gives exactly? Is it the start or end position of it's mate. And if it's the start position, how can I get the end position?