Archive Ensembl HomeArchive Ensembl Home
Pair.pm
Go to the documentation of this file.
00001 =head1 LICENSE
00002 
00003   Copyright (c) 1999-2012 The European Bioinformatics Institute and
00004   Genome Research Limited.  All rights reserved.
00005 
00006   This software is distributed under a modified Apache license.
00007   For license details, please see
00008 
00009     http://www.ensembl.org/info/about/code_licence.html
00010 
00011 =head1 CONTACT
00012 
00013   Please email comments or questions to the public Ensembl
00014   developers list at <dev@ensembl.org>.
00015 
00016   Questions may also be sent to the Ensembl help desk at
00017   <helpdesk@ensembl.org>.
00018 
00019 =cut
00020 
00021 =head1 NAME
00022 
00023 Bio::EnsEMBL::Mapper::Pair
00024 
00025 =head1 SYNOPSIS
00026 
00027 =head1 DESCRIPTION
00028 
00029 Two regions mapped between different coordinate systems are each
00030 represented by a Bio::EnsEMBL::Mapper::Unit and joined together as a
00031 Bio::EnsEMBL::Mapper::Pair.
00032 
00033 =head1 METHODS
00034 
00035 =cut
00036 
00037 package Bio::EnsEMBL::Mapper::Pair;
00038 
00039 use strict;
00040 
00041 sub new {
00042   my ( $proto, $from, $to, $ori ) = @_;
00043 
00044   my $class = ref($proto) || $proto;
00045 
00046   return
00047     bless( { 'from' => $from, 'to' => $to, 'ori' => $ori }, $class );
00048 }
00049 
00050 =head2 to
00051 
00052   Arg  1      Bio::EnsEMBL::Mapper::Unit $seqobj
00053           from and to represent the two regions
00054           which are mapped to each other
00055   Function    accessor method
00056   Returntype  Bio::EnsEMBL::Mapper::Unit
00057   Exceptions  none
00058   Caller      Bio::EnsEMBL::Mapper::Pair
00059   Status     : Stable
00060 
00061 =cut
00062 
00063 sub to {
00064   my ( $self, $value ) = @_;
00065 
00066   if ( defined($value) ) {
00067     $self->{'to'} = $value;
00068   }
00069 
00070   return $self->{'to'};
00071 }
00072 
00073 =head2 from
00074 
00075   Arg  1      Bio::EnsEMBL::Mapper::Unit $seqobj
00076           from and to represent the two regions
00077           which are mapped to each other
00078   Function    accessor method
00079   Returntype  Bio::EnsEMBL::Mapper::Unit
00080   Exceptions  none
00081   Caller      Bio::EnsEMBL::Mapper::Pair
00082   Status     : Stable
00083 
00084 =cut
00085 sub from {
00086   my ( $self, $value ) = @_;
00087 
00088   if ( defined($value) ) {
00089     $self->{'from'} = $value;
00090   }
00091 
00092   return $self->{'from'};
00093 }
00094 
00095 =head2 ori
00096 
00097   Arg  1      Bio::EnsEMBL::Mapper::Unit $ori
00098   Function    accessor method
00099           relative orientation of the the
00100           two mapped regions
00101   Returntype  Bio::EnsEMBL::Mapper::Unit
00102   Exceptions  none
00103   Caller      Bio::EnsEMBL::Mapper::Pair
00104   Status     : Stable
00105 
00106 =cut
00107 
00108 sub ori {
00109   my ( $self, $value ) = @_;
00110 
00111   if ( defined($value) ) {
00112     $self->{'ori'} = $value;
00113   }
00114 
00115   return $self->{'ori'};
00116 }
00117 
00118 1;