[ensembl-dev] The synonyms of several genes could not be successfully retrieved
Alessandro Vullo
avullo at ebi.ac.uk
Wed Jun 19 11:54:30 BST 2013
Hello Chester,
On 19/06/13 03:10, nk10936 at yahoo.com.tw wrote:
> I am new to the Ensembl APIs and got one question about using Ens. Perl
> APIs to retrieve the synonyms for genes.
> Through the methods “Bio::EnsEMBL::DBEntry::get_all_synonyms()” and
> “Bio::EnsEMBL::DBEntry::display_id()”, I noticed that the synonyms of
> several genes could not be successfully retrieved.
> For instance, as I used the keyword “FLJ25421” to query the Ens. site,
> the result showed it could be matched to the gene “ENTHD1”; however, I
> failed to get the synonym “FLJ25421” if I used the two methods described
> above to dump the synonyms.
in this case, it is enough to call the method external name on the gene
obtained through the corresponding adaptor:
$registry->load_registry_from_db( -host => 'ensembldb.ensembl.org',
-user => 'anonymous');
my $gene_adaptor =
Bio::EnsEMBL::Registry->get_adaptor( "human", "core", "gene" );
my @genes = @{ $gene_adaptor->fetch_all_by_external_name('FLJ25421') };
my $gene = $genes[0];
print $gene->external_name, "\n";
which would give you "ENTHD1" as output.
Hope this helps,
Alessandro
More information about the Dev
mailing list