This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Retrieve Information About The Exons Of A Gene

Given a gene, I would like to get the coordinates (left-end and right-end) of all of its exons.

I can do it manually, looking at the gene in the UCSC Genome Browser, but I need to automatize this procedure.

Where can I find the information that I need?

Thank you for your help

genes exon database

2 answers

Here's a way to do this in python with cruzdb using the TRIM13 from hg19 gene as an example:

from cruzdb import Genome
g = Genome('hg19')

for transcript in g.refGene.filter_by(name2='TRIM13'):
    print transcript.exons

the output is a list of start, end tuples for each transcript.

First time I've come across your cruzdb package -- nice work!

Similar questions like these pop up quite often here, so please search the archives.

That having been said:

  • Genomic Cordinates From Ucsc to one such question that you can adapt to get what you want.
  • If you are familiar with R/Bioconductor, you can easily address such questions with facilities provided by the GenomicFeatures, and you can read through its vignette to become more familiar with it.

Log in to answer this question.