Entering edit mode
9.0 years ago
R
▴
10
Hi I would like to separate 1/2 mates of a paired-end bam file.
To see first mate:
samtools view -F 0x40 in.bam
To see second mate:
samtools view -F 0x80 in.bam
but it returns the following as first mate (0x40
):
H0544AFXX:1:11101:8739:1038 163 chr3 17908775 3 1S74M = 17909029 330 ...
and for example this one as second (0x80
):
NS500173:56:H0544AFXX:1:11101:8739:1038 **`83`** chr3 17909029 3 75M = 17908775 -330
while Flag 163 means:
read paired
read mapped in proper pair
mate reverse strand
second in pair
and 83:
read paired
read mapped in proper pair
read reverse strand
first in pair
It would be great if somebody could clarify this issue. Thanks