Is there a way to extract alignment score from STAR aligner bam files?
1
0
Entering edit mode
3.4 years ago
simplitia ▴ 130

Hi I know that samtools view, column 5 can display mapq scores however is there way to extract alignment scores as well from the same bam file? thanks.

rnaseq • 1.9k views
ADD COMMENT
0
Entering edit mode

What exactly do you mean with 'alignment score' ?

Keep in mind that mappers for NGS data work an quite a different approach than the classical sequence aligners and as such the alignment score you would get from old school aligners is not applicable for them.

The mapq score you mention is likely the closest you can get (and even as informative as the alignment score)

ADD REPLY
2
Entering edit mode

Not sure this is true lieven.sterck - STAR computes a score for each alignment with +1/-1 for matches and miss-matches and gap opening and extension penalities as specific by the parameters.

ADD REPLY
0
Entering edit mode

ah, so it does indeed, my bad.

I stand corrected.

ADD REPLY
5
Entering edit mode
3.4 years ago

The alignment score for each alignment in the STAR output is in the bam AS tag, this is output by the default STAR settings, but if for some reason you are not getting it, you can add --outSAMattributes NH HI AS nM to your STAR command line.

For further documentation of the STAR specific meaning of these tags, see the STAR manual:

https://github.com/alexdobin/STAR/blob/master/doc/STARmanual.pdf

ADD COMMENT
0
Entering edit mode

Thanks this is perfect. You are correct I see the AS tag info now.

ADD REPLY

Login before adding your answer.

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