3 See the NOTICE file distributed with
this work
for additional information
4 regarding copyright ownership.
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
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.
23 Please email comments or questions to the
public Ensembl
24 developers list at <http:
26 Questions may also be sent to the Ensembl help desk at
39 Representation of a gap in a sequence; returned from
Mapper.pm when the
40 target region is in a gap.
46 package Bio::EnsEMBL::Mapper::Gap;
55 Description: Creates a
new Gap object.
64 my ( $proto, $start, $end, $rank ) = @_;
66 my $class = ref($proto) || $proto;
68 return bless( {
'start' => $start,
'end' => $end,
'rank' => $rank || 0 }, $class );
73 Arg [1] : (optional)
int $start
74 start coordinate of gap region
75 Example : $start = $gap->start();
76 Description: Getter/Setter
for the start attribute
85 my ( $self, $value ) = @_;
87 if ( defined($value) ) {
88 $self->{
'start'} = $value;
91 return $self->{
'start'};
96 Arg [1] : (optional)
int $newval
97 The
new value to set the end coordinate to
98 Example : $end = $gap->end()
99 Description: Getter/Setter
for the end coordinate of the gap region
108 my ( $self, $value ) = @_;
110 if ( defined($value) ) {
111 $self->{
'end'} = $value;
114 return $self->{
'end'};
120 Example : $len = $gap->length();
121 Description: Getter
for the length of
this gap region
132 return $self->{
'end'} - $self->{
'start'} + 1;
136 my ( $self, $value ) = @_;
138 if ( defined($value) ) {
139 $self->{
'rank'} = $value;
142 return $self->{
'rank'};