I am writing a C++ program that needs to process mate pair reads. I would like to avoid using the QNAME field in combination with the FLAG and PNEXT fields. I'd prefer not using the QNAME because the format seems to change depending on how the data was processed. Is it sufficient to simply check the FLAG (first in pair, second in pair) and PNEXT fields? Basically, I want a primary key that doesn't involve QNAME. I realize similar questions have been asked, but they did not satisfy me.
Please, give us an example of such case.
QNAME+FLAG is used by most (all?) tools (picard, samtools... )
I'm worried about one SAM file having the 0/1, 0/2 format and another having an identical QNAME format.
OR