[ensembl-dev] Wrongly documented gene_adaptor method ?

PATERSON Trevor trevor.paterson at roslin.ed.ac.uk
Mon Jun 25 15:42:28 BST 2012


cheers monika

serves me right for blithely cut and pasting...

Do you think that the best way to get patched genes is :

my @genes =  @{ $gene_adaptor->fetch_all_by_display_label($gene->display_xref()->display_id()) };

or is there another way?

trevor

Trevor Paterson PhD
trevor.paterson at roslin.ed.ac.uk<mailto: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.

From: Monika Komorowska [mailto:monika at ebi.ac.uk]
Sent: 25 June 2012 14:03
To: PATERSON Trevor
Cc: Ensembl developers list
Subject: Re: [ensembl-dev] Wrongly documented gene_adaptor method ?

Hi Trevor

Apologies, but we seem to have the wrong method called in the example for fetch_all_by_display_label
It should state:

Example    : my @genes = @{$geneAdaptor->fetch_all_by_display_label("PPP1R2P1")};

I committed the change to the GeneAdaptor 'fetch_all_by_display_label' method documentation head code, which will be released in a month with release 68.

fetch_all_by_display_label (as Bert mentioned) will return an arrayref of genes.
Sorry about the confusion which the wrong example has caused.

Thanks
Monika

On 25 Jun 2012, at 13:50, PATERSON Trevor 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<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.

Thanks

Trevor


Trevor Paterson PhD
trevor.paterson at roslin.ed.ac.uk<mailto: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<mailto:Dev at ensembl.org>
List admin (including subscribe/unsubscribe): http://lists.ensembl.org/mailman/listinfo/dev
Ensembl Blog: http://www.ensembl.info/

Monika Komorowska
EnsEMBL Software Developer

European Bioinformatics Institute (EMBL-EBI)
tel: +44(0) 1233 494 409

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20120625/fb375af8/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/fb375af8/attachment.ksh>


More information about the Dev mailing list