Bio::EnsEMBL::DBSQL MetaContainer
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::EnsEMBL::DBSQL::MetaContainer - Encapsulates all access to core
database meta information
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::DBSQL::BaseMetaContainer
Bio::EnsEMBL::Utils::Exception
Bio::Species
Inherit
Bio::EnsEMBL::DBSQL::BaseMetaContainer
Synopsis
  my $meta_container =
$registry->get_adaptor( 'Human', 'Core', 'MetaContainer' );
my $species = $meta_container->get_Species(); my @mapping_info = @{ $meta_container->list_value_by_key('assembly.mapping') };
Description
  An object that encapsulates specific access to core db meta data
Methods
get_SpeciesDescriptionCode
get_default_assemblyDescriptionCode
get_genebuildDescriptionCode
get_max_assembly_contig
No description
Code
get_taxonomy_idDescriptionCode
Methods description
get_Speciescode    nextTop
  Arg [1]    : none
Example : $species = $meta_container->get_Species();
Description: Obtains the species from this databases meta table
Returntype : Bio::Species
Exceptions : none
Caller : ?
Status : Stable
get_default_assemblycodeprevnextTop
  Description: DEPRECATED. Use the version of the coordinate system you are
interested in instead.
Example: #use this instead my ($highest_cs) = @{$db->get_CoordSystemAdaptor->fetch_all()}; my $assembly = $highest_cs->version();
get_genebuildcodeprevnextTop
  Arg [1]    : none
Example : $tax_id = $meta_container->get_genebuild();
Description: Retrieves the genebuild from the database meta table
Returntype : string
Exceptions : none
Caller : ?
Status : Stable
get_taxonomy_idcodeprevnextTop
  Arg [1]    : none
Example : $tax_id = $meta_container->get_taxonomy_id();
Description: Retrieves the taxonomy id from the database meta table
Returntype : string
Exceptions : none
Caller : ?
Status : Stable
Methods code
get_SpeciesdescriptionprevnextTop
sub get_Species {
  my $self = shift;

  my $arrRef = $self->list_value_by_key( 'species.common_name' );
  my $common_name;
  if( @$arrRef ) {
    $common_name = $arrRef->[0];
  }
  
  my $classification = $self->list_value_by_key( 'species.classification' );
  if( ! @$classification ) {
    return undef;
  }

  my $species = new Bio::Species;
  $species->common_name( $common_name );
  $species->classification( @$classification );

  return $species;
}
get_default_assemblydescriptionprevnextTop
sub get_default_assembly {
  my $self = shift;

  deprecate("Use version of coordinate system you are interested in instead.\n".
            "Example:\n".
            '  ($cs) = @{$coord_system_adaptor->fetch_all()};'."\n" .
            '  $assembly = $cs->version();');

  my ($cs) = @{$self->db->get_CoordSystemAdaptor->fetch_all()};

  return $cs->version();
}


#
# TBD This method should be removed/deprecated
#
}
get_genebuilddescriptionprevnextTop
sub get_genebuild {
  my $self = shift;

  my $arrRef = $self->list_value_by_key( 'genebuild.start_date' );

  if( @$arrRef ) {
    return $arrRef->[0];
  } else {
    warning("Please insert meta_key 'genebuild.start_date' " .
            "in meta table at core db.\n");
  }
}


1;
}
get_max_assembly_contigdescriptionprevnextTop
sub get_max_assembly_contig {
  my $self = shift;

  deprecate('This method should either be fixed or removed');

  my $value_list = $self->list_value_by_key( "assembly.maxcontig" );
  if( @$value_list ) {
    return $value_list->[0];
  } else {
    return undef;
  }
}
get_taxonomy_iddescriptionprevnextTop
sub get_taxonomy_id {
  my $self = shift;

  my $arrRef = $self->list_value_by_key( 'species.taxonomy_id' );
  
  if( @$arrRef ) {
    return $arrRef->[0];
  } else {
    warning("Please insert meta_key 'species.taxonomy_id' " .
	    "in meta table at core db.\n");
  }
}
General documentation
LICENSETop
  Copyright (c) 1999-2009 The European Bioinformatics Institute and
Genome Research Limited. All rights reserved.
This software is distributed under a modified Apache license. For license details, please see /info/about/code_licence.html
CONTACTTop
  Please email comments or questions to the public Ensembl
developers list at <ensembl-dev@ebi.ac.uk>.
Questions may also be sent to the Ensembl help desk at <helpdesk@ensembl.org>.