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
34 database meta information
39 $registry->get_adaptor(
'Human',
'Core',
'MetaContainer' );
44 my $scientific_name = $meta_container->get_scientific_name();
48 An
object that encapsulates specific access to core db meta data
54 package Bio::EnsEMBL::DBSQL::MetaContainer;
64 # add well known meta info get-functions below
66 =head2 get_production_name
69 Example : $species = $meta_container->get_production_name();
70 Description : Obtains the name of the species in a form usable as,
for
71 example, a table name, file name etc.
78 sub get_production_name {
83 =head2 get_display_name
86 Example : $species = $meta_container->get_display_name();
87 Description : Obtains the name of the species in a form usable as,
for
88 example, a
short label in a GUI.
95 sub get_display_name {
97 return $self->single_value_by_key(
'species.display_name');
100 =head2 get_common_name
103 Example : $species = $meta_container->get_common_name();
104 Description : Obtains the common name of the species.
111 sub get_common_name {
113 return $self->single_value_by_key(
'species.common_name');
116 =head2 get_scientific_name
119 Example : $species = $meta_container->get_scientific_name();
120 Description : Obtains the full scientific name of the species.
126 sub get_scientific_name {
128 return $self->single_value_by_key(
'species.scientific_name');
134 Example : $div = $meta_container->get_division();
135 Description : Obtains the Ensembl Genomes division to which the species belongs.
143 return $self->single_value_by_key(
'species.division');
146 =head2 get_taxonomy_id
149 Example : $tax_id = $meta_container->get_taxonomy_id();
150 Description: Retrieves the taxonomy
id from the database meta table
158 sub get_taxonomy_id {
160 return $self->single_value_by_key(
'species.taxonomy_id', 1);
166 Example : $tax_id = $meta_container->get_genebuild();
167 Description: Retrieves the genebuild from the database meta table
177 return $self->single_value_by_key(
'genebuild.start_date', 1);
182 Example : $classification = $meta_container->get_classification();
183 Description: Retrieves the classification held in the backing database minus
184 any species specific levels. This means that the first element
185 in the array will be subfamily/family level ascending to
187 Returntype : ArrayRef[String]
194 sub get_classification {
196 my $classification = $self->list_value_by_key(
'species.classification');
197 my $copy = [@{$classification}];
198 splice(@{$copy}, 0, 1); # remove the Homo sapiens