stringtie icon indicating copy to clipboard operation
stringtie copied to clipboard

stringtie analyze bam of STAR

Open QuanLG opened this issue 4 years ago • 1 comments

HI,gpertea. Histat2 can add XS tag for all read alignments,I have a stranded library (fr-firststrand) data, I use STAR to mapping genome and set options --outSAMstrandField intronMotif which can add XS flag to spliced alignments only, other read alignments do not have the XS tag. Then I use stringtie to Transcript assembly and quantification,so I want to know is there a problem with that? And XS tag plays a decisive role in Transcript assembly and quantification?

QuanLG avatar Mar 17 '20 08:03 QuanLG

Hi,

I'm not @gpertea, but I might be able to help!

STAR has an interesting thing where, if the data is unstranded, you can add that option --outSAMstrandField intronMotif. However, for stranded data, you should not do this, or you'll get the result you have with some reads marked with the XS tag and some not.

Alex Dobin has solved this by writing an awk script which is present in the bin of the STAR release called tagXSstrandedData.awk. You have to align your stranded data without the aforementioned STAR option, then after you get your BAM file, run this script on it. He's got a good explanation here:

https://groups.google.com/g/rna-star/c/t-oT4wUFFow

The XS tag is indispensable to stringtie.

Hope this helps

srisarya avatar Apr 14 '23 15:04 srisarya