[ensembl-dev] chromosome for transcript

Andreas Kahari ak at ebi.ac.uk
Wed Nov 17 09:37:03 GMT 2010


Hi,

If you have a transcript object, then this would do it:

  my $seq_region_name = $transcript->slice()->seq_region_name();

This will give you the top-level name if the transcript comes from a
released Ensembl database, because we always put the transcripts on
top-level.

Otherwise, you can do something like this:

  # untested
  if ( !$transcript->slice()->is_toplevel() ) {
    $seq_region_name =
      $transcript->transform('toplevel')->slice()->seq_region_name();
  }

Regards,
Andreas

On Wed, Nov 17, 2010 at 10:10:35AM +1100, Hardip Patel wrote:
> Hi all,
> Is there a quick way of knowing the chromosome (toplevel) name for a transcript stable id?
> 
> currently I am trying to get this information by creating a slice for transcript and then obtaining the seq region id.
> 
> Any help is greatly appreciated.
> 
> cheers
> 
> --
> Hardip R. Patel
> Bioinformatician, Molecular Genetics Division,
> Victor Chang Cardiac Research Institute,
> Darlinghurst, NSW - 2010, Australia
> (W): +61 - 2 - 9295 8611
> (M): 0449 180 715
> 
> VCCRI 12th International Symposium
> "Charting the depths of RNA: from molecules to therapies"
> 19 November 2010
> visit http://www.victorchang.edu.au for details
> 
> 

> _______________________________________________
> Dev mailing list
> Dev at ensembl.org
> http://lists.ensembl.org/mailman/listinfo/dev


-- 
Andreas Kähäri, Ensembl Software Developer
European Bioinformatics Institute (EMBL-EBI)
Wellcome Trust Genome Campus
Hinxton, Cambridge CB10 1SD, United Kingdom




More information about the Dev mailing list