[ensembl-dev] Question about AligSlice and get_all_Slices method

Matthieu Muffato muffato at ebi.ac.uk
Tue Sep 15 09:07:45 BST 2015


Dear Marc,

It looks like Gene::slice() returns a slice over the whole chromosome 
the gene is on. It will indeed take ages to fetch the multiple alignment 
of hundreds of mega-bases. Are you not rather interested in the 
alignment of the gene locus alone ? If so, doing "my $slice = 
$gene->feature_Slice;" will help

In my hands, the behaviour of slice() is the same as in the previous 
releases (I tried 79, 70 and 60)

Regards,
Matthieu

On 14/09/15 10:40, Marc P. Hoeppner wrote:
>
> Note: Sorry if this is a double post, but it seems my first message
> didn't go through (?). Sending this again to be sure.
>
> Dear EnsEMBL developers,
>
> I've just played around with a script I wrote ages ago and found it does
> not work anymore. Briefly, I am retrieving a human gene, converting it
> to a slice and am then trying to use the AlignSlice to check which other
> genomes have alignments to this feature. However, this query never
> completes and seems stuck on
>
> my $sub_slices = $align_slice->get_all_Slices;
>
> Tried it against the EnsEMBL mirror as well as a mix of remote and local
> DBs as well as different MethodLinkSpeciesSets for releases 79 and 81.
> Has anything changed about the behaviour of this class?
>
>
> Cheers,
>
> Marc
>
> PS: For reference, the relevant code:
>
> my $gene_adaptor = $registry->get_adaptor("human", "Core", "Gene");
> my $genes = $gene_adaptor->fetch_all_by_external_name($rfam_acc,'RFAM');
> throw("No genes found for this rfam accession") if (!$genes);
>
> # Getting Bio::EnsEMBL::Compara::MethodLinkSpeciesSet object
> my $mlssa = $registry->get_adaptor("Multi", "compara",
> "MethodLinkSpeciesSet");
> my $method_link_species_set =
> $mlssa->fetch_by_method_link_type_species_set_name($alignment_type,$set_of_species);
>
> throw("MLSS not found") if (!$method_link_species_set);
>
> my $align_slice_adaptor = Bio::EnsEMBL::Registry->get_adaptor( "Multi"
> ,"Compara","AlignSlice");
>
> throw("Failed to retrieve AlignSlice Adaptor") if (!$align_slice_adaptor);
>
> foreach my $gene (@$genes) {
>
>      print $gene->stable_id , "\n";
>      my $slice = $gene->slice;
>
>      my $align_slice =
> $align_slice_adaptor->fetch_by_Slice_MethodLinkSpeciesSet(
>                $slice,
>                $method_link_species_set,
>                "expanded"
>            );
>
>      throw("No AlignSlice for this region found") if (!$align_slice) ;
>
>      my $sub_slices = $align_slice->get_all_Slices;
>      foreach my $slice (@$sub_slices) {
>          print $slice->genome_db->name , "\n";
>      }
> }
>
>
>
>
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info:
> http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/

-- 
Matthieu Muffato, Ph.D.
Ensembl Compara and TreeFam Project Leader
European Bioinformatics Institute (EMBL-EBI)
European Molecular Biology Laboratory
Wellcome Trust Genome Campus, Hinxton
Cambridge, CB10 1SD, United Kingdom
Room  A3-145
Phone + 44 (0) 1223 49 4631
Fax   + 44 (0) 1223 49 4468




More information about the Dev mailing list