[ensembl-dev] Wrongly documented gene_adaptor method ?

PATERSON Trevor trevor.paterson at roslin.ed.ac.uk
Mon Jun 25 13:50:04 BST 2012

According to the Perl documentation, you should be able to get a list of genes for a given display label, using:

public    Listref    Bio::EnsEMBL::DBSQL::GeneAdaptor::fetch_all_by_display_label ( )

However,  this method is wrongly documented in the online perl docs, and does not return an array - but a single gene object

my @genes = @{$geneAdaptor->fetch_by_display_label("TBC1D3B")};

When you look at the real code in Release 67 API, rather than the www perldocs, the method actually returns a single gene, preferring one that is on a reference slice.

I am looking for a way of getting alternative gene models on Patch exceptions: and this method would have been promising. e.g for the gene ENSG00000224226<http://www.ensembl.org/Homo_sapiens/Gene/Summary?db=core;g=ENSG00000224226;r=HG75_PATCH:34442621-34976908> Location Chromosome 17: 34,493,061-34,503,984<http://www.ensembl.org/Homo_sapiens/Location/View?db=core;g=ENSG00000224226;r=17:34493061-34503984> how do I get its equivalent on the patch-fix ENSG00000260069<http://www.ensembl.org/Homo_sapiens/Gene/Summary?db=core;g=ENSG00000260069;r=HG75_PATCH:34442621-34976908> Location Chromosome HG75_PATCH: 34,493,132-34,503,984<http://www.ensembl.org/Homo_sapiens/Location/View?db=core;g=ENSG00000260069;r=HG75_PATCH:34493132-34503984>.

obviously I can dig into the API and call the appropriate sql code myself:

my $constraint = "x.display_label = '". $gene->display_xref()->display_id()."' AND g.is_current = 1";
my @same_labelled_genes = @{ $gene_adaptor->generic_fetch($constraint) };

but is there an alternative (simple) method to get either 'same_labelled' genes  or ideally 'equivalent-exception' genes for a given gene?

the method
public    Listref    Bio::EnsEMBL::Gene::get_all_alt_alleles ( )

of course does something similar using the alt_alleles table , but only for alternative haplotypes not patches.



Trevor Paterson PhD
trevor.paterson at roslin.ed.ac.uk<mailto:trevor.paterson at roslin.ed.ac.uk>
The Roslin Institute
Royal (Dick) School of Veterinary Studies
University of Edinburgh
Easter Bush
EH25 9RG
Scotland UK

phone +44 (0)131 651 9157


Please consider the environment before printing this e-mail
The University of Edinburgh is a charitable body, registered in Scotland with registration number SC005336
Disclaimer:This e-mail and any attachments are confidential and intended solely for the use of the recipient(s) to whom they are addressed. If you have received it in error, please destroy all copies and inform the sender.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20120625/fe287356/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20120625/fe287356/attachment.ksh>

More information about the Dev mailing list