gpertea / stringtie

Transcript assembly and quantification for RNA-Seq
MIT License
378 stars 78 forks source link

stringtie analyze bam of STAR #268

Open QuanLG opened 4 years ago

QuanLG commented 4 years ago

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?

srisarya commented 1 year ago

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