Archive Ensembl HomeArchive Ensembl Home
Translation.pm
Go to the documentation of this file.
00001 #
00002 # Ensembl module for Bio::EnsEMBL::Compara::AlignSlice::Translation
00003 #
00004 # Original author: Javier Herrero <jherrero@ebi.ac.uk>
00005 #
00006 # Copyright EnsEMBL Team
00007 #
00008 # You may distribute this module under the same terms as perl itself
00009 
00010 # pod documentation - main docs before the code
00011 
00012 =head1 NAME
00013 
00014 Bio::EnsEMBL::Compara::AlignSlice::Translation - Extension of the Bio::EnsEMBL::Translation
00015 module for the translations mapped on the AlignSlices
00016 
00017 =head1 INHERITANCE
00018 
00019 This module inherits attributes and methods from Bio::EnsEMBL::Translation module
00020 
00021 =head1 SYNOPSIS
00022 
00023 The Bio::EnsEMBL::Compara::AlignSlice framework is used to map features between species. As the
00024 original Bio::EnsEMBL::Translation might mapped only partially, this module extends the core
00025 Bio::EnsEMBL::Translation module to allow the storage of the mapping of both start end codons.
00026 Both start and end codons might be mapped no, one or several times. At the moment this module
00027 implements a couple of method only, all_start_codon_mappings and all_end_codon_mappings which
00028 return a reference to an array of Bio::EnsEMBL::Compara::AlignSlice::Slice which correspond to
00029 sub-slices of the original Bio::EnsEMBL::Compara::AlignSlice::Slice.
00030 
00031 Actual mapping is done by the Bio::EnsEMBL::Compara::AlignSlice::Slice module, this one only
00032 stores the results.
00033 
00034 =head1 OBJECT ATTRIBUTES
00035 
00036 
00037 =head1 AUTHORS
00038 
00039 Javier Herrero (jherrero@ebi.ac.uk)
00040 
00041 =head1 COPYRIGHT
00042 
00043 Copyright (c) 1999-2012. EnsEMBL Team
00044 
00045 You may distribute this module under the same terms as perl itself
00046 
00047 =head1 CONTACT
00048 
00049 This modules is part of the EnsEMBL project (http://www.ensembl.org)
00050 
00051 Questions can be posted to the ensembl-dev mailing list:
00052 dev@ensembl.org
00053 
00054 =head1 APPENDIX
00055 
00056 The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
00057 
00058 =cut
00059 
00060 
00061 # Let the code begin...
00062 
00063 
00064 package Bio::EnsEMBL::Compara::AlignSlice::Translation;
00065 
00066 use strict;
00067 use Bio::EnsEMBL::Translation;
00068 use Bio::EnsEMBL::Utils::Argument qw(rearrange);
00069 use Bio::EnsEMBL::Utils::Exception qw(throw warning info);
00070 
00071 our @ISA = qw(Bio::EnsEMBL::Translation);
00072 
00073 
00074 =head2 all_start_codon_mappings
00075 
00076   Arg [1]    : [optional] listref of Bio::EnsEMBL::Compara::AlignSlice::Slice
00077   Example    : $translation->all_start_codon_mappings($all_start_codon_mappings);
00078   Example    : my $all_start_codon_mappings = $translation->all_start_codon_mappings();
00079   Description: getter/setter for the results of the mapping of the original start
00080                codon on the corresponding Bio::EnsEMBL::Compara::AlignSlice::Slice
00081   Returntype : listref of Bio::EnsEMBL::Compara::AlignSlice::Slice
00082   Exceptions :
00083 
00084 =cut
00085 
00086 sub all_start_codon_mappings {
00087   my $self = shift(@_);
00088 
00089   if (@_) {
00090     $self->{_all_start_codon_mappings} = shift;
00091   }
00092 
00093   return $self->{_all_start_codon_mappings};
00094 }
00095 
00096 
00097 =head2 all_end_codon_mappings
00098 
00099   Arg [1]    : [optional] listref of Bio::EnsEMBL::Compara::AlignSlice::Slice
00100   Example    : $translation->all_end_codon_mappings($all_end_codon_mappings);
00101   Example    : my $all_end_codon_mappings = $translation->all_end_codon_mappings();
00102   Description: getter/setter for the results of the mapping of the original end
00103                codon on the corresponding Bio::EnsEMBL::Compara::AlignSlice::Slice
00104   Returntype : listref of Bio::EnsEMBL::Compara::AlignSlice::Slice
00105   Exceptions :
00106 
00107 =cut
00108 
00109 sub all_end_codon_mappings {
00110   my $self = shift(@_);
00111 
00112   if (@_) {
00113     $self->{_all_end_codon_mappings} = shift;
00114   }
00115 
00116   return $self->{_all_end_codon_mappings};
00117 }
00118 
00119 1;