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

ian Longden ianl at ebi.ac.uk
Wed Dec 1 23:24:14 GMT 2010


Use $gene->get_all_DBLinks as this gets the external database
references on the transcripts and translations of the gene too.

DBEntries only gets the ones attached to the gene directly.

-Ian Longden

On Wed, Dec 1, 2010 at 11:13 PM, Andrea Edwards <edwardsa at cs.man.ac.uk> wrote:
> 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
>
> _______________________________________________
> Dev mailing list
> Dev at ensembl.org
> http://lists.ensembl.org/mailman/listinfo/dev
>




More information about the Dev mailing list