ensembl-hive  2.7.0
MapLocation.pm
Go to the documentation of this file.
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 
34 
35 =head1 SYNOPSIS
36 
37 =head1 DESCRIPTION
38 
39 Represents a location on a genetic map, yac map, radition hybrid map,
40 etc.
41 
42 =head1 METHODS
43 
44 =cut
45 
46 
47 package Bio::EnsEMBL::Map::MapLocation;
48 
49 use strict;
50 use vars qw(@ISA);
51 
52 =head2 new
53 
54  Arg [1] : (optional) string $name
55  Arg [2] : (optional) string $map_name
56  Arg [3] : (optional) string $chromosome_name
57  Arg [4] : (optional) string $position
58  Arg [5] : (optional) float $lod_score
59  Example : $map_location = Bio::EnsEMBL::Map::MapLocation->
60  new('DS1234',
61  'genethon',
62  'X',
63  '12.39',
64  50.12);
65  Description: Creates a new MapLocation
67  Exceptions : none
68  Caller : general
69  Status : stable
70 
71 =cut
72 
73 sub new {
74  my ($caller, $name, $map_name, $chromosome_name, $position, $lod_score) = @_;
75 
76  my $class = ref($caller) || $caller;
77 
78  return bless( {'map_name' => $map_name,
79  'name' => $name,
80  'chromosome_name' => $chromosome_name,
81  'position' => $position,
82  'lod_score' => $lod_score}, $class );
83 }
84 
85 
86 
87 =head2 map_name
88 
89  Arg [1] : string $map_name
90  Example : $map_name = $map_location->map_name;
91  Description: Getter/Setter for the map name
92  Returntype : string
93  Exceptions : none
94  Caller : general
95  Status : stable
96 
97 =cut
98 
99 sub map_name {
100  my $self = shift;
101  $self->{'map_name'} = shift if(@_);
102  return $self->{'map_name'};
103 }
104 
105 
106 
107 =head2 name
108 
109  Arg [1] : (optional) string $name
110  Example : $name = $map_location->name;
111  Description: A name associated with the marker at this position. For
112  example if this is a genethon map location the name will be
113  the synonym of source genethon.
114  Returntype : string
115  Exceptions : none
116  Caller : general
117  Status : stable
118 
119 =cut
120 
121 sub name {
122  my $self = shift;
123  $self->{'name'} = shift if(@_);
124  return $self->{'name'};
125 }
126 
127 
128 =head2 chromosome_name
129 
130  Arg [1] : (optional) string $chromosome_name
131  Example : $chr_name = $map_location->chromosome_name;
132  $map_location->chromosome_name('X');
133  Description: The name of the chromosome associated with this map location
134  Returntype : string
135  Exceptions : none
136  Caller : general
137  Status : stable
138 
139 =cut
140 
141 sub chromosome_name{
142  my $self = shift;
143  $self->{'chromosome_name'} = shift if(@_);
144  return $self->{'chromosome_name'};
145 }
146 
147 
148 
149 =head2 position
150 
151  Arg [1] : (optional) string $position
152  Example : $pos = $map_location->position;
153  Description: Getter/Setter for the position of this map location
154  Returntype : string
155  Exceptions : none
156  Caller : general
157  Status : stable
158 
159 =cut
160 
161 sub position {
162  my $self = shift;
163  $self->{'position'} = shift if(@_);
164  return $self->{'position'};
165 }
166 
167 
168 
169 =head2 lod_score
170 
171  Arg [1] : (optional) float $lod
172  Example : $lod = $map_location->lod_score;
173  Description: Getter/Setter for lod score of this map location
174  Returntype : float
175  Exceptions : none
176  Caller : general
177  Status : stable
178 
179 =cut
180 
181 sub lod_score {
182  my $self = shift;
183  $self->{'lod_score'} = shift if(@_);
184  return $self->{'lod_score'};
185 }
186 
187 
188 1;
map
public map()
Bio::EnsEMBL::Map::MapLocation::map_name
public String map_name()
Bio::EnsEMBL::Map::MapLocation
Definition: MapLocation.pm:14