[ensembl-dev] getting the entrez gene id from an ensembl record

Andrea Edwards edwardsa at cs.man.ac.uk
Wed Dec 1 23:13:47 GMT 2010


Hello

I was womdering how to get the Entrez Gene ref for an ensembl gene. I 
tried this code from the tutorial

print_DBEntries( $gene->get_all_DBEntries() );

sub print_DBEntries
{
     my $db_entries = shift;

     foreach my $dbe ( @{$db_entries} ) {
         printf "\tXREF %s (%s)\n", $dbe->display_id(), $dbe->dbname();
     }
}


but none of my genes had entrez gene ids.

How can i use the api to find out for sure ensembl links to entrez gene?

many thanks




More information about the Dev mailing list