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
42 -DESCRIPTION =>
'This is my statistics description.',
45 print $statistic->
name(),
"\n";
46 print $statistic->code(),
"\n";
47 print $statistic->description(),
"\n";
48 print $statistic->value(),
"\n";
52 This is a
generic genome
class used to represent statistics
53 associated with a genome and species
61 package Bio::EnsEMBL::Genome;
67 use Scalar::Util qw(weaken isweak);
71 Arg [-NAME] :
string - the name
for this statistic
72 Arg [-CODE] :
string - the code
for this statistic
73 Arg [-DESCRIPTION] :
string - a description
for this statistic
74 Arg [-VALUE] : value - the value of
this statistic
78 -DESCRIPTION =>
'This is my statistics description.',
92 # allow to be called as class or object method
93 my $class = ref($caller) || $caller;
95 my ($dbID, $statistic, $value, $species_id, $code, $name, $desc) =
96 rearrange([qw(DBID STATISTIC VALUE SPECIES_ID CODE NAME DESCRIPTION)], @_);
98 return bless {
'dbID' => $dbID,
99 'statistic' => $statistic,
101 'species_id' => $species_id,
104 'description' => $desc}, $class;
109 Arg [1] : hashref to be blessed
113 Caller : general, subclass constructors
122 my $self = bless $hashref, $class;
123 weaken($self->{adaptor})
if ( ! isweak($self->{adaptor}) );
129 Arg [1] :
string $statistic (optional)
130 Example : $statistic = $statistic->name();
131 Description: Getter/Setter
for the statistic name
141 $self->{
'statistic'} = shift
if(@_);
142 return $self->{
'statistic'};
147 Arg [1] :
string $code (optional)
148 Example : $code = $genome->code();
149 Description: Getter/Setter
for code statistic
159 $self->{
'code'} = shift
if(@_);
160 return $self->{
'code'};
166 Arg [1] :
string $name (optional)
167 Example : $name = $statistic->name();
168 Description: Getter/Setter
for the name associated to the statistic attribute
178 $self->{
'name'} = shift
if(@_);
179 return $self->{
'name'};
184 Arg [1] :
string $description (optional)
185 Example : $description = $statistic->description();
186 Description: Getter/Setter
for description statistic
196 $self->{
'description'} = shift
if(@_);
197 return $self->{
'description'};
203 Arg [1] :
string $value (optional)
204 Example : $value = $statistic->value();
205 Description: Getter/Setter
for value statistic
215 $self->{
'value'} = shift
if(@_);
216 return $self->{
'value'};
221 Arg [1] :
string $value (optional)
222 Example : $dbID = $statistic->dbID();
223 Description: Getter/Setter
for statistic
internal id
233 $self->{
'dbID'} = shift
if(@_);
234 return $self->{
'dbID'};
239 Arg [1] :
string $value (optional)
240 Example : $species_id = $statistic->dbID();
241 Description: Getter/Setter
for statistic species
id
251 $self->{
'species_id'} = shift
if(@_);
252 return $self->{
'species_id'};