[ensembl-dev] gene centred info via slices

Hardip Patel H.Patel at victorchang.edu.au
Mon Oct 11 06:06:52 BST 2010

Dear all

I am trying to fetch gene centred information using following code. It takes a long time to extract information for all genes from human or mice at least.

I was wondering if the following code could be optimized to get information faster.

my $slice_adaptor = $registry->get_adaptor($spec, 'Core', 'slice');
  foreach my $slice (@{$slice_adaptor->fetch_all('toplevel')}){
    foreach my $gene (@{$slice->get_all_Genes}){
      foreach my $transcript (@{$gene->get_all_Transcripts}){
          foreach my $exon (@{$transcript->get_all_Exons}){
            ####get transcript, UTR, exon, and intron start and end in cDNA coordinates and genomic coordinates


Hardip R. Patel

VCCRI 12th International Symposium
"Charting the depths of RNA: from molecules to therapies"
19 November 2010
visit http://www.victorchang.edu.au for details

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20101011/2452f663/attachment.html>

More information about the Dev mailing list