alexdobin / STAR

RNA-seq aligner

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

why are some SAM attributes marked as BAM-only?

ilia-kats opened this issue · comments

When trying to run STAR with SAM output and --outSAMattributes GX GN, I get an error

EXITING because of fatal PARAMETER error: --outSAMattributes contains GN tag, which requires BAM output.
SOLUTION: re-run STAR with --outSAMtype BAM Unsorted (and/or) SortedByCoordinate option, or without GN tag in --outSAMattributes

This is because these two tags, as well as many others, are explicitly marked as BAM-only in the STAR source. What is the rationale for this? As far as I can tell, the SAM/BAM file format specification makes no distinction between these formats when it comes to the content of the file, so there is no technical reason for this behavior.

I need SAM output because I also need --outSAMorder PairedKeepInputOrder, which does not work with BAM output.