0
|
1 =head1 LICENSE
|
|
2
|
|
3 Copyright (c) 1999-2012 The European Bioinformatics Institute and
|
|
4 Genome Research Limited. All rights reserved.
|
|
5
|
|
6 This software is distributed under a modified Apache license.
|
|
7 For license details, please see
|
|
8
|
|
9 http://www.ensembl.org/info/about/code_licence.html
|
|
10
|
|
11 =head1 CONTACT
|
|
12
|
|
13 Please email comments or questions to the public Ensembl
|
|
14 developers list at <dev@ensembl.org>.
|
|
15
|
|
16 Questions may also be sent to the Ensembl help desk at
|
|
17 <helpdesk@ensembl.org>.
|
|
18
|
|
19 =cut
|
|
20
|
|
21 =head1 NAME
|
|
22
|
|
23 Bio::EnsEMBL::Mapper::Pair
|
|
24
|
|
25 =head1 SYNOPSIS
|
|
26
|
|
27 =head1 DESCRIPTION
|
|
28
|
|
29 Two regions mapped between different coordinate systems are each
|
|
30 represented by a Bio::EnsEMBL::Mapper::Unit and joined together as a
|
|
31 Bio::EnsEMBL::Mapper::Pair.
|
|
32
|
|
33 =head1 METHODS
|
|
34
|
|
35 =cut
|
|
36
|
|
37 package Bio::EnsEMBL::Mapper::Pair;
|
|
38
|
|
39 use strict;
|
|
40
|
|
41 sub new {
|
|
42 my ( $proto, $from, $to, $ori ) = @_;
|
|
43
|
|
44 my $class = ref($proto) || $proto;
|
|
45
|
|
46 return
|
|
47 bless( { 'from' => $from, 'to' => $to, 'ori' => $ori }, $class );
|
|
48 }
|
|
49
|
|
50 =head2 to
|
|
51
|
|
52 Arg 1 Bio::EnsEMBL::Mapper::Unit $seqobj
|
|
53 from and to represent the two regions
|
|
54 which are mapped to each other
|
|
55 Function accessor method
|
|
56 Returntype Bio::EnsEMBL::Mapper::Unit
|
|
57 Exceptions none
|
|
58 Caller Bio::EnsEMBL::Mapper::Pair
|
|
59 Status : Stable
|
|
60
|
|
61 =cut
|
|
62
|
|
63 sub to {
|
|
64 my ( $self, $value ) = @_;
|
|
65
|
|
66 if ( defined($value) ) {
|
|
67 $self->{'to'} = $value;
|
|
68 }
|
|
69
|
|
70 return $self->{'to'};
|
|
71 }
|
|
72
|
|
73 =head2 from
|
|
74
|
|
75 Arg 1 Bio::EnsEMBL::Mapper::Unit $seqobj
|
|
76 from and to represent the two regions
|
|
77 which are mapped to each other
|
|
78 Function accessor method
|
|
79 Returntype Bio::EnsEMBL::Mapper::Unit
|
|
80 Exceptions none
|
|
81 Caller Bio::EnsEMBL::Mapper::Pair
|
|
82 Status : Stable
|
|
83
|
|
84 =cut
|
|
85 sub from {
|
|
86 my ( $self, $value ) = @_;
|
|
87
|
|
88 if ( defined($value) ) {
|
|
89 $self->{'from'} = $value;
|
|
90 }
|
|
91
|
|
92 return $self->{'from'};
|
|
93 }
|
|
94
|
|
95 =head2 ori
|
|
96
|
|
97 Arg 1 Bio::EnsEMBL::Mapper::Unit $ori
|
|
98 Function accessor method
|
|
99 relative orientation of the the
|
|
100 two mapped regions
|
|
101 Returntype Bio::EnsEMBL::Mapper::Unit
|
|
102 Exceptions none
|
|
103 Caller Bio::EnsEMBL::Mapper::Pair
|
|
104 Status : Stable
|
|
105
|
|
106 =cut
|
|
107
|
|
108 sub ori {
|
|
109 my ( $self, $value ) = @_;
|
|
110
|
|
111 if ( defined($value) ) {
|
|
112 $self->{'ori'} = $value;
|
|
113 }
|
|
114
|
|
115 return $self->{'ori'};
|
|
116 }
|
|
117
|
|
118 1;
|