--outSAMmapqUnique retrospectively

16 views
Skip to first unread message

praful aggarwal

unread,
Feb 8, 2018, 1:56:47 PM2/8/18
to rna-star
Hi,

I have over 100 RNA-Seq samples that i have aligned using STAR 2.4.2a (started last year). I plan to use this data to call variants and am using GATK. At the time when my analysis started, GATK had the option to reassign mapping quality scores, but it has since been changed. Is it possible to somehow use the --outSAMmapqUnique parameter in STAR to update the mapping quality scores without having to re perform the entire alignment on all the samples?

Thank you,
Praful

Alexander Dobin

unread,
Feb 14, 2018, 5:10:17 PM2/14/18
to rna-star
Hi Praful,

with STAR, you would have to re-map it.
It should be relatively fast to just replace it in the BAM file, with something like this:
$ samtools view -h Aligned.out.bam | awk 'BEGIN {OFS="\t"} {if ($5==255) $5=60; print}' | samtools -bS - > Aligned.fixed.bam

Cheers
Alex
Reply all
Reply to author
Forward
0 new messages