Why perfectly match (150M) records are not primary alignment in SAM
1
0
Entering edit mode
7.2 years ago
CY ▴ 750

I saw lot of record with perfect alignment (150M) but marked as secondary alignment in SAM file. For example those with FLAG number 339 or 419. The following one for example:

E00477:134:H2H2NCCXx:6:2203:29267:71384 419     chr1    14479   3       150M    =       14705   376     GTGGAGCCGTCCCCCCATGGAGCACAGGCAGACAGAAGTCCCCGCCCCAGCTGTGTGGCCTCAAGCCAGCCTTCCGCTCCTTGAAGCTGGTCTCCACACAGTGCTGGCTCCGTCACCCCCTCCCAAGGAAGTAGGTCTGAGCAGCTTGTC  AAAFFK<AF<A<AFFFKFKFKKKKKKKK7FK<AKAA7AFKFKK<FFKKKKKKKAKKKKKKKF,,7AAFKAK,,<AFFKKK7,,<FKKKKFAK7AFF<,AFA7AAA<K(FKKKA,,<FFAK7AK(,AFAF7,,7AFF,,<AA77,<77FAA  NH:i:2  HI:i:2  AS:i:296        nM:i:1

Why is that? Does that mean their corresponding primary alignment is also perfect and has higher base call quality? Any comments are appreciated!

BAM SAM alignment • 3.1k views
ADD COMMENT
2
Entering edit mode

furthermore, it's NOT perfect there is at least one mismatch :nm:i:1 and there is another alignment for this read: NH:i:2

ADD REPLY
0
Entering edit mode

Thanks for responding. I checked again and found out that those record with mapping quality of 255 are all primary alignment. It seems to me that mapping quality is the most important determinant for this, right?

I didn't pay much attention on 'nm' tap earlier. But how comes 'nm' shows mismatch when 150M? I thought 150M means every base match for read of 150bp long

ADD REPLY
1
Entering edit mode

mapping quality of 255 . It seems to me that mapping quality is the most important determinant for this, right?

No.

https://samtools.github.io/hts-specs/SAMv1.pdf :

"A value 255 indicates that the mapping quality is not available."

ADD REPLY
0
Entering edit mode

I forgot to mention that I was using STAR. I did some searching and it seems to me that MAPQ is different for different aligner. For STAR, 255 means uniquely mapped

ADD REPLY
0
Entering edit mode

I thought 150M means every base match for read of 150bp long

no, see the SAM spec for the cigar operator 'M': https://samtools.github.io/hts-specs/SAMv1.pdf

M : alignment match (can be a sequence match or mismatch)
= : sequence match
X : sequence mismatch
ADD REPLY
0
Entering edit mode

which organism/build is it ?

ADD REPLY
1
Entering edit mode
7.2 years ago
h.mon 35k

Which aligner did you use, which settings? For example, for multi-mappers, STAR default settings will mark only one read pair as primary alignment, the other pairs will be marked as secondary. As Pierre pointed out, there are other alignments (NH:i:2) for this read pair.

ADD COMMENT
0
Entering edit mode

I was using STAR. It turns out some of the columns in bam are aligner specific, right? For example MAPQ. Also, bam generated by different aligner may keep different information. For example, STAR excludes unmapped record while bwa keeps both mapped and unmapped record.

ADD REPLY

Login before adding your answer.

Traffic: 1979 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