[ensembl-dev] Retrieving a gene name without isoform information

Giuseppe Gallone G.Gallone at sms.ed.ac.uk
Sun Nov 7 12:34:20 GMT 2010


Hi,

just in case somebody else is interested. My question was the following:

When I query ensembl core with a stable gene id, and I try to retrieve 
that gene's name, I'll get a transcript name instead

my $gene = $gene_adaptor->fetch_by_stable_id('FBgn0013812');
my $name = $gene->external_name;

$name will be Dhc93AB-RB. As I'm not interested in the transcript info, 
can I get the gene name as it appears in flybase? (Dhc93AB).

One solution is getting the flybase_name DB link and getting the name 
from there works (unless you want to use local regexes of course).

my @dblinks = @{ $gene->get_all_DBLinks("FlyBaseName_Gene%") };
my $flybasenamelink = $dblinks[0];
my $name = $flybasenamelink->display_id;

Unfortunately I had to find that "FlyBaseName_Gene" string by debugging 
and looking at all the db links. This means it's a problem when I want 
to query ids from several other organisms. In such case, is my only 
option to trim with a regex?

Regards,
G

On 05/11/10 20:52, Giuseppe Gallone wrote:
> Hi,
>
> is there a method to get the gene name from a gene object without the
> isoform info (like it used to be before)?
>
> Cheers,
> G

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.




More information about the Dev mailing list