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