[ensembl-dev] Problem with genome ailgnments, AlignSlice::Slice objects and Alternative assemblies
Matthieu Muffato
muffato at ebi.ac.uk
Wed Dec 21 15:22:54 GMT 2016
Hi Marc
Thank you for your detailed report.
You're right, AlignSlice::Slice doesn't set its "adaptor", and it breaks
other parts of the API that expect the adaptor to be present in order to
fetch other data.
First of all, the AlignSlice::Slice object may I think be aggregating
multiple alignment bocks and thus may be mapping to multiple locations
on the genome. It may be safer to first call get_all_underlying_Slices()
on it, which returns the set of slices it's made of. I think that
wouldn't solve the problem because get_all_underlying_Slices() doesn't
set the adaptor of these slices either.
The next move is to set the adaptor, and I believe this should work:
$slice->adaptor( Bio::EnsEMBL::Registry->get_adaptor("Human", "core",
"Slice")
Unfortunately, the slices returned by get_all_underlying_Slices() have
completely lost their species identification. To get the species in a
more automated way, you'd have to come back to the AlignSlice::Slice
object and use its genome_db() method, e.g.
$alignslice_slice->genome_db->name
Can you give this a try ?
Matthieu
On 20/12/16 10:46, Marc P. Hoeppner wrote:
> Dear EnsEMBL devs,
>
> I am currently stuck and was hoping for some insights into specifically
> the AlignSlice::Slice objects.
>
> SHORT VERSION:
>
> -------------
>
> When running "get_all_AssemblyExceptionFeatures ()" on an
> AlignSlice::Slice object, I get:
>
> "MSG: Cannot get a AssemblyExceptionFeature adaptor without a
> SliceAdaptor attached to this instance of
> Bio::EnsEMBL::Compara::AlignSlice::Slice"
>
> How do I attach a Slice adaptor to an AlignSlice::Slice object?
>
>
> LONG VERSION:
>
> -------------
>
> What am I trying to do?
>
> Iterate over whole-genome alignments (pairwise or multi), look for
> annotated features and determine whether they are present in the other
> species of a method_link_species_set using AlignSlice and
> AlignSlice::Slice objects.
>
> What's the problem?
>
> Since some genome assemblies now include ALT regions, the standard
> schema of genome alignments seems to break down a bit (case in point
> LASTZ_NET). For example, a gene on the REF assembly in human aligns to a
> gene in the ALT assembly of mouse, and the REF gene in mouse aligns to
> an ALT locus in human. What this does it confuse my more simplistic
> logic of whether any given locus in species X has a syntenic locus in
> species Y (basically, the counts get inflated when including ALT
> assemblies and I am not getting the sort of 1-to-1 correspondence I am
> looking for).
>
> What have I tried?
>
> For any given REF locus in human, check the AlignSlice::Slice in the
> aligned species and collect all possible ALT assemblies for that
> AlignSlice::Slice. That way I am hoping to reduce they many-to-many
> locus correspondence to a neat, flat 1-to-1.
>
> What's not working?
>
> When I use "get_all_AssemblyExceptionFeatures ()" on an
> AlignSlice::Slice object, I get an unhelpful:
>
> MSG: Cannot get a AssemblyExceptionFeature adaptor without a
> SliceAdaptor attached to this instance of
> Bio::EnsEMBL::Compara::AlignSlice::Slice
> FILE: Bio/EnsEMBL/Slice.pm LINE: 1768
> CALLED BY: Bio/EnsEMBL/Slice.pm LINE: 1735
> Date (localtime) = Tue Dec 20 11:32:25 2016
> Ensembl API version = 83
>
> Not sure how I attached an adaptor to a Compara object...any helpwould
> be appreciated.
>
> Kind regards,
>
> Marc
>
>
> _______________________________________________
> 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