alexdobin / STAR

RNA-seq aligner
MIT License
1.85k stars 506 forks source link

Question about alignment score (AS tag) #1673

Open wlkath opened 2 years ago

wlkath commented 2 years ago

Hi Alex,

Apologies if this question has already been asked and answered. I've searched but haven't found it.

I have 2x151 bp data.

Perfectly aligned fragments (no mismatches) without splice junctions (cigar strings 151M and 151M) have AS=300, but perfectly aligned fragments with one splice junction (e.g., cigar1=111M648N40M and cigar2=151M) have AS=302.

Fragments with more splice junctions have higher scores: a read with cigar1=115M72N36M and cigar2=21M72N91M55N39M has AS=306. All of these splices agree with the annotation.

How should I think about this? I had thought that the score is +1/-1 for matches/mismatches plus additional penalties, but clearly something else is involved.

This is STAR 2.7.10a alpha 220818

Thanks very much,

wlkath commented 2 years ago

OK, I understand, I think: sjdbScore (2) is an extra score that's added for splices that agree with the annotation.

-- Bill