[ensembl-dev] Wrongly documented gene_adaptor method ?

Bert Overduin bert at ebi.ac.uk
Mon Jun 25 13:54:25 BST 2012


Hello Trevor,

Aren't you confusing two methods, i.e.

fetch_all_by_display_label

and

fetch_by_display_label

Cheers,
Bert

On Mon, Jun 25, 2012 at 1:50 PM, PATERSON Trevor
<trevor.paterson at roslin.ed.ac.uk> wrote:
>
>
> 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")};
>
> DEBUGGER ERROR MESSAGE : Not an ARRAY reference
>
>
>
> 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 Location Chromosome 17: 34,493,061-34,503,984 how do I get
> its equivalent on the patch-fix ENSG00000260069 Location Chromosome
> HG75_PATCH: 34,493,132-34,503,984.
>
>
>
>
>
> 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.
>
>
>
> Thanks
>
>
>
> Trevor
>
>
>
>
>
> Trevor Paterson PhD
> trevor.paterson at roslin.ed.ac.uk
>
> Bioinformatics
> The Roslin Institute
> Royal (Dick) School of Veterinary Studies
> University of Edinburgh
> Easter Bush
> Midlothian
> EH25 9RG
> Scotland UK
>
> phone +44 (0)131 651 9157
>
> http://bioinformatics.roslin.ed.ac.uk/
>
> 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.
>
>
>
>
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> List admin (including subscribe/unsubscribe):
> http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/
>



-- 
Bert Overduin, Ph.D.
Vertebrate Genomics Team

EMBL - European Bioinformatics Institute
Wellcome Trust Genome Campus
Hinxton, Cambridge CB10 1SD
United Kingdom

http://www.ebi.ac.uk/~bert

Ensembl browser: http://www.ensembl.org

Mailing lists: http://www.ensembl.org/info/about/contact/mailing.html

Blog: http://www.ensembl.info

YouTube: http://www.youtube.com/user/EnsemblHelpdesk
Facebook: http://www.facebook.com/Ensembl.org
Twitter: http://twitter.com/Ensembl




More information about the Dev mailing list