Bam Format: What'S The Purpose Of Rnext And Pnext ?
2
4
Entering edit mode
13.3 years ago

I've read the SAM/BAM specification but I wonder what is the purpose of the fields RNEXT and PNEXT ?

are they only used with paired end data to check the size of the fragment ? if no, are those fields updated when a BAM file is sorted and when are they used in samtools or some other programs ?

Thanks,

Pierre

sam bam format next-gen sequencing • 8.0k views
ADD COMMENT
8
Entering edit mode
13.3 years ago
Peter 6.0k

One use of RNEXT and PNEXT is to know the reference and position of a paired end read's partner for visualisation tools. This has now been generalised in the spec to cope with multiple reads per template (e.g. strobe reads).

Sorting should not affect the values of RNEXT and PNEXT. Note that as a hack, when only one of a pair of reads is mapped, I believe the partner is given the same reference name (and position?) but marked as unmapped. This is to ensure if sorted by position, both reads are located next to each other in the file.

Isn't this a perfect question for the samtools-help mailing list?

ADD COMMENT
0
Entering edit mode

So those fields are only useful for paired-end/mate reads isn't it ?

ADD REPLY
0
Entering edit mode

Yes - for single end reads (or whatever you call non-paired end), RNEXT and PNEXT are irrelevant.

ADD REPLY
0
Entering edit mode

for single end reads, could it mean the next segment if the original read is in a split alignment, i.e. different segments of the read maps to different locations of the same chromosome?

ADD REPLY
4
Entering edit mode
13.3 years ago
Marvin ▴ 900

Given a sorted and indexed BAM file, RNEXT/PNEXT allow a program to find the mate of a given read (or more generally since BAM 1.4, other "fragments" of the same "template").

ADD COMMENT

Login before adding your answer.

Traffic: 1873 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6