This is a test version of Biostars. For the public version, visit https://www.biostars.org.
what is the easiest/fastest way to convert from BAM to GTF

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?

Thanks

bam 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).

I think I may know @Sam's meaning. Do you mean that a single record in bam file may represent a single record in GTF. Have you mapped the cDNA sequence to the reference?

1 answer

You may look into this one to see if the script works for you.

https://github.com/PASApipeline/PASApipeline/issues/79

Log in to answer this question.