ensembl-hive  2.8.1
MarkerSynonym.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 an alias for a marker in the EnsEMBL database.
40 
41 =head1 METHODS
42 
43 =cut
44 
45 package Bio::EnsEMBL::Map::MarkerSynonym;
46 
47 use strict;
48 use vars qw(@ISA);
49 
50 
51 =head2 new
52 
53  Arg [1] : (optional) int $dbID
54  Arg [2] : (optional) string $source
55  Arg [3] : (optional) string $name
56  Example : $synonym = Bio::EnsEMBL::Map::MarkerSynonym->new(12,$src,$name);
57  Description: Creates a new MarkerSynonym
59  Exceptions : non
60  Caller : general
61  Status : stable
62 
63 =cut
64 
65 sub new {
66  my ($caller, $dbID, $source, $name) = @_;
67 
68  my $class = ref($caller) || $caller;
69 
70  return bless( {'dbID' => $dbID,
71  'source' => $source,
72  'name' => $name}, $class );
73 }
74 
75 
76 =head2 dbID
77 
78  Arg [1] : (optional) int $dbID
79  Example : $mid = $marker_synonym->dbID;
80  Description: Getter/Setter for the internal id of this synonym
81  Returntype : int
82  Exceptions : none
83  Caller : general
84  Status : stable
85 
86 =cut
87 
88 sub dbID {
89  my $self = shift;
90 
91  if(@_) {
92  $self->{'dbID'} = shift;
93  }
94 
95  return $self->{'dbID'};
96 }
97 
98 
99 =head2 source
100 
101  Arg [1] : (optional) string $source
102  Example : $source = $marker_synonym->source;
103  Description: Getter/Setter for the source of this marker synonym
104  Returntype : string
105  Exceptions : none
106  Caller : general
107  Status : stable
108 
109 =cut
110 
111 sub source {
112  my $self = shift;
113 
114  if(@_) {
115  $self->{'source'} = shift;
116  }
117 
118  return $self->{'source'};
119 }
120 
121 
122 =head2 name
123 
124  Arg [1] : (optional) string $name
125  Example : $name = $marker_synonym->name;
126  Description: Getter/Setter for the name/identifier of this synonym
127  Returntype : string
128  Exceptions : none
129  Caller : general
130  Status : stable
131 
132 =cut
133 
134 sub name {
135  my $self = shift;
136 
137  if(@_) {
138  $self->{'name'} = shift;
139  }
140 
141  return $self->{'name'}
142 }
143 
144 1;
145 
EnsEMBL
Definition: Filter.pm:1
Bio::EnsEMBL::Map::MarkerSynonym::dbID
public Int dbID()
Bio::EnsEMBL::Map::MarkerSynonym
Definition: MarkerSynonym.pm:13