[ensembl-dev] gene centred info via slices
Ma, Man Chun John
manchunjohn-ma at uiowa.edu
Tue Oct 12 18:07:59 BST 2010
This would probably cause problems for methods that indirectly call
Slice::get_all_Genes (such as Feature::get_all_overlapping_Genes) since
we cannot pass parameters to Slice::get_all_Genes. Even the change to
the code is minimal (from $feature->get_all_overlapping_Genes to
$feature->feature_Slice->get_all_Genes), I cannot estimate the effect on
the memory footprint of the Slice called this way...
Cheers,
John MC Ma
Graduate Assistant
Kwitek Lab
Department of Internal Medicine
3125E MERF
375 Newton Road
Iowa City IA 52242
-----Original Message-----
From: dev-bounces at ensembl.org [mailto:dev-bounces at ensembl.org] On Behalf
Of Patrick Meidl
Sent: Monday, October 11, 2010 4:10 AM
To: dev at ensembl.org
Subject: Re: [ensembl-dev] gene centred info via slices
On Mon, Oct 11 2010, Felix Kokocinski <fsk at sanger.ac.uk> wrote:
> >>my $slice_adaptor = $registry->get_adaptor($spec, 'Core', 'slice');
> >> foreach my $slice (@{$slice_adaptor->fetch_all('toplevel')}){
> >> foreach my $gene (@{$slice->get_all_Genes}){
> >> foreach my $transcript (@{$gene->get_all_Transcripts}){
> >> foreach my $exon (@{$transcript->get_all_Exons}){
> >> ####get transcript, UTR, exon, and intron start and end
> >>in cDNA coordinates and genomic coordinates
> >> }
> >> }
> >> }
> >>}
> >
> >If you are only interested in one biotype eg. protein-coding then you
> >could modify your gene-fetch query like:
> >
> >foreach my $gene (@{$slice->get_all_Genes(undef, undef, undef, undef,
> >'protein_coding')}){
>
> just to add to this: For specific biotypes you could also do:
> $genes = $slice->get_all_Genes_by_type($type);
probably the most important performance optimisation would be to set
argument 3 for get_all_Genes() to a true value. since you are looping
over all transcripts, you should turn off lazy-loading.
see
http://www.ensembl.org/info/docs/Pdoc/ensembl/modules/Bio/EnsEMBL/Slice.
html#POD27
HTH
patrick
--
Patrick Meidl, Mag.
Bioinformatician
Ce-M-M-
Research Centre for Molecular Medicine
of the Austrian Academy of Science
Lazarettgasse 14 / AKH BT 25.3
Vienna, Austria
room 02.205
phone +43 1 40160 70016
email pmeidl at cemm.oeaw.ac.at
web http://www.cemm.at/
_______________________________________________
Dev mailing list
Dev at ensembl.org
http://lists.ensembl.org/mailman/listinfo/dev
More information about the Dev
mailing list