[ensembl-dev] Wrongly documented gene_adaptor method ?

Monika Komorowska monika at ebi.ac.uk
Mon Jun 25 14:02:51 BST 2012


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 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/

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/3aa3cf72/attachment.html>


More information about the Dev mailing list