[Bioperl-l] from transcript to genes

Albert Vilella avilella at gmail.com
Wed Mar 28 09:41:14 UTC 2007


Hi Zhang,

This question is more for the ensembl-dev mailing list:
ensembl-dev at ebi.ac.uk than the bioperl ml.

You can get the gene object from the transcript object with a script like
this:

----

use strict;
use Bio::EnsEMBL::Registry;

Bio::EnsEMBL::Registry->load_registry_from_db(-host=>"ensembldb.ensembl.org",
-user=>"anonymous", -verbose=>'0');

my $transcript_adaptor = Bio::EnsEMBL::Registry->get_adaptor("Danio rerio",
"core", "Transcript");
my $transcript =
$transcript_adaptor->fetch_by_stable_id("ENSDART00000011751");

my $gene_adaptor = Bio::EnsEMBL::Registry->get_adaptor("Danio rerio",
"core", "Gene");
my $gene_from_transcript =
$gene_adaptor->fetch_by_transcript_id($transcript->dbID);

print "transcript_stable_id: ", $transcript->stable_id, "\n";
print "gene_stable_id: ", $gene_from_transcript->stable_id, "\n";
print "Chromosome: ",  $gene_from_transcript->seq_region_name, "\n";
print "Strand (1,-1): ",  $gene_from_transcript->seq_region_strand, "\n";
print "Start: ", $gene_from_transcript->seq_region_start, "\n";
print "End: ", $gene_from_transcript->seq_region_end, "\n";

1;

----

Cheers,

    Albert.


On 3/28/07, zhang zhang <lavende_dresden at hotmail.com> wrote:
>
> Dear all,
>
> I just begin to use Ensembl perl API. for example, now I have zebrafish
> transcrits like "ENSDART00000011751", how can I find its corresponding
> gene
> and further get gene's location such chromosome, start, end information?
>
> what kinds of ensembl database and adaptors or methods should I use?
>
> Thanks,
> Yanju Zhang
>
> _________________________________________________________________
> 与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>




More information about the Bioperl-l mailing list