I converted the output of STAR to BAM and for the next step I need to convert it to GTF, so what is the easiest/fastest way to convert from BAM to GTF?
What do you mean by BAM to GTF ? There is no direct connection between BAM and GTF. You usually quantify genes from GTF (gene annotation) by using BAM file (alignment) as input. What is your goal ? Are you planning to do transcript assembly (in that case you can go for Cufflinks which generated GTF for your assembled transcripts) ?
Request: Please put some effort in framing your question with more details.
As said by @EagleEye, what you just mentioned doesn't sound like something you would like to do. A Bam file contains records organized by read and mapping position, a Gtf contains features with start-end positions and correspondent parent feature (like exons in a gene).
Login before adding your answer.