EnsEMBL/Mapper/Pair.pm untested

filter: Statementstmt 0.0% 0 / 22 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 3 Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 40 CC 4 SCAR 16.1
CC
4
Cov
0%
to
6.0
from
6.0
ori
6.0
CRAP 5.0
1 =head1 LICENSE
2  
3 See the NOTICE file distributed with this work for additional information
4 regarding copyright ownership.
5  
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9  
10 http://www.apache.org/licenses/LICENSE-2.0
11  
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17  
18 =cut
19  
20  
21 =head1 CONTACT
22  
23 Please email comments or questions to the public Ensembl
24 developers list at <http://lists.ensembl.org/mailman/listinfo/dev>.
25  
26 Questions may also be sent to the Ensembl help desk at
27 <http://www.ensembl.org/Help/Contact>.
28  
29 =cut
30  
31 =head1 NAME
32  
33 Bio::EnsEMBL::Mapper::Pair
34  
35 =head1 SYNOPSIS
36  
37 =head1 DESCRIPTION
38  
39 Two regions mapped between different coordinate systems are each
40 represented by a Bio::EnsEMBL::Mapper::Unit and joined together as a
41 Bio::EnsEMBL::Mapper::Pair.
42  
43 =head1 METHODS
44  
45 =cut
46  
47 package Bio::EnsEMBL::Mapper::Pair;
48 $Bio::EnsEMBL::Mapper::Pair::VERSION = '114.0.0_50'; # TRIAL
49 $Bio::EnsEMBL::Mapper::Pair::VERSION = '114.0.050';
50 use strict;
51  
52 sub new {
53 my ( $proto, $from, $to, $ori ) = @_;
54  
55 my $class = ref($proto) || $proto;
56  
57 return
58 bless( { 'from' => $from, 'to' => $to, 'ori' => $ori }, $class );
59 }
60  
61 =head2 to
62  
63 Arg 1 Bio::EnsEMBL::Mapper::Unit $seqobj
64 from and to represent the two regions
65 which are mapped to each other
66 Function accessor method
67 Returntype Bio::EnsEMBL::Mapper::Unit
68 Exceptions none
69 Caller Bio::EnsEMBL::Mapper::Pair
70 Status : Stable
71  
72 =cut
73  
74 sub to {
75 my ( $self, $value ) = @_;
76  
77 if ( defined($value) ) {
78 $self->{'to'} = $value;
79 }
80  
81 return $self->{'to'};
82 }
83  
84 =head2 from
85  
86 Arg 1 Bio::EnsEMBL::Mapper::Unit $seqobj
87 from and to represent the two regions
88 which are mapped to each other
89 Function accessor method
90 Returntype Bio::EnsEMBL::Mapper::Unit
91 Exceptions none
92 Caller Bio::EnsEMBL::Mapper::Pair
93 Status : Stable
94  
95 =cut
96 sub from {
97 my ( $self, $value ) = @_;
98  
99 if ( defined($value) ) {
100 $self->{'from'} = $value;
101 }
102  
103 return $self->{'from'};
104 }
105  
106 =head2 ori
107  
108 Arg 1 Bio::EnsEMBL::Mapper::Unit $ori
109 Function accessor method
110 relative orientation of the the
111 two mapped regions
112 Returntype Bio::EnsEMBL::Mapper::Unit
113 Exceptions none
114 Caller Bio::EnsEMBL::Mapper::Pair
115 Status : Stable
116  
117 =cut
118  
119 sub ori {
120 my ( $self, $value ) = @_;
121  
122 if ( defined($value) ) {
123 $self->{'ori'} = $value;
124 }
125  
126 return $self->{'ori'};
127 }
128  
129 1;