This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to extract intron coordinates (in bed) from bam

I have aligned raw RNA-seq reads against a reference genome with STAR. I would like to extract the intronic coordinates from obtained bam files. Any suggestion?

rna-seq

1 answer

This isn't information that one extracts, since it's not held within the BAM files. Instead your steps will be:

  1. Determine where transcripts and exons are (e.g. with stringTie).
  2. Process the resulting GTF file to retrieve introns (using whatever definition of this you'd like).

The second step may require some custom code, depending on whether you want introns that overlap exons (e.g., due to having multiple transcripts for a gene) or not.

Hi Ryan, The GTF file, that I obtained from the stringTie, is missing strand information. I need strand information to check the splice sites sequence (both at 5' and 3')
Do you have idea, how can I deal with that ?

Did you use a strand-specific library prep?

We didn't use strand-specific library prep.

Then you can't know which strand the transcripts are from.

Hi Ryan,

Today, I got to know that mRNA library is stranded. In that case, how can I obtained the strand information or why could it be missing ?

Prasoon

You need to tell your aligner and stringTie that.

Log in to answer this question.