comparison variant_effect_predictor/Bio/EnsEMBL/Mapper/Unit.pm @ 0:1f6dce3d34e0

Uploaded
author mahtabm
date Thu, 11 Apr 2013 02:01:53 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:1f6dce3d34e0
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::Unit - One side of a map 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
38 package Bio::EnsEMBL::Mapper::Unit;
39
40 use strict;
41
42 sub new {
43 my ( $proto, $id, $start, $end ) = @_;
44
45 my $class = ref($proto) || $proto;
46
47 return
48 bless( { 'id' => $id, 'start' => $start, 'end' => $end }, $class );
49 }
50
51 =head2 id
52
53 Arg 1 int|char $id
54 the id of the object (e.g. seq_region_name) which is mapped
55 Function accessor method
56 Returntype int|char
57 Exceptions none
58 Caller Bio::EnsEMBL::Mapper::Unit
59 Status Stable
60
61 =cut
62
63 sub id {
64 my ( $self, $value ) = @_;
65
66 if ( defined($value) ) {
67 $self->{'id'} = $value;
68 }
69
70 return $self->{'id'};
71 }
72
73 =head2 start
74
75 Arg 1 int $start
76 the start coordinate of the mapped
77 region which this object represents
78 Function accessor method
79 Returntype int
80 Exceptions none
81 Caller Bio::EnsEMBL::Mapper::Unit
82 Status Stable
83
84 =cut
85
86 sub start {
87 my ( $self, $value ) = @_;
88
89 if ( defined($value) ) {
90 $self->{'start'} = $value;
91 }
92
93 return $self->{'start'};
94 }
95
96 =head2 end
97
98 Arg 1 int $end
99 the end coordinate of the mapped
100 region which this object represents
101 Function accessor method
102 Returntype int
103 Exceptions none
104 Caller Bio::EnsEMBL::Mapper::Unit
105 Status Stable
106
107 =cut
108
109 sub end {
110 my ( $self, $value ) = @_;
111
112 if ( defined($value) ) {
113 $self->{'end'} = $value;
114 }
115
116 return $self->{'end'};
117 }
118
119 1;