[ensembl-dev] getting EntrezGene IDs from Ensembl $gene

Sergei Manakov manakov at ebi.ac.uk
Tue Sep 14 15:12:19 BST 2010


Hello,

I found a way of getting EntrezGene IDs from $translation (the code is
below), but is there a way of getting EntrezGene IDs directly from
$gene ?

thanks,
Sergei


        foreach my $transcript (@{$gene->get_all_Transcripts}) {
            my $translation = $transcript->translation;
            if (defined $translation) {
                my $tln_dbentries = $translation->get_all_DBEntries;
                foreach my $dbe (@$tln_dbentries) {
                    if ($dbe->dbname eq 'EntrezGene') {
                        print $dbe->primary_id, "\t";
                    }
                }
            }
        }





-- 
EMBL-EBI and Wellcome Trust Sanger Institute

tel: 00441223492675




More information about the Dev mailing list