<p>I have a script that returns ensembl API info from the variation module.  Currently, using the example code it returns the transcript ID of the variant queried, with this code:</p>

<pre><code>   my $gene = $gene_adaptor-&gt;fetch_by_transcript_id($tv-&gt;transcript-&gt;dbID);
  return $gene-&gt;stable_id if (defined $gene-&gt;external_name);
</code></pre>

<p>I would like to return the gene name, instead of the ENSG#### ID that this command returns. Is anyone familiar with this tool set, and how I might adjust the code to return the gene name instead of the transcript id? </p>

Hello,

`$gene->external_name` will usually get you the (official) gene symbol. For human genes this would be the HGNC symbol, e.g. "BRCA2".

`$gene->description` will give you the gene name, e.g. "breast cancer 2, early onset".

Note that Ensembl-specific questions can also send to the Ensembl helpdesk (helpdesk@ensembl.org) or the Ensembl developers mailing list (dev@ensembl.org).To the latter you first have to subscribe, though: <a href="http://www.ensembl.org/info/about/contact/mailing.html.">http://www.ensembl.org/info/about/contact/mailing.html.</a>

Cheers,  
Bert  
Bert Overduin, Ph.D.  
Vertebrate Genomics Team  
EMBL - European Bioinformatics Institute  
Wellcome Trust Genome Campus  
Hinxton, Cambridge CB10 1SD  
United Kingdom  
<a href="http://www.ebi.ac.uk/~bert">http://www.ebi.ac.uk/~bert</a>