Archive Ensembl HomeArchive Ensembl Home
Bio::EnsEMBL::Compara::DBSQL::GenomeDBAdaptor Class Reference
Inheritance diagram for Bio::EnsEMBL::Compara::DBSQL::GenomeDBAdaptor:

List of all members.


Class Summary

Description

 

Synopsis

  use Bio::EnsEMBL::Registry;

  my $reg = "Bio::EnsEMBL::Registry";

  $reg-\>load_registry_from_db(-host=\>"ensembldb.ensembl.org", -user=\>"anonymous");
  my $genome_db_adaptor = $reg-\>get_adaptor("Multi", "compara", "GenomeDB");

  $genome_db_adaptor-\>store($genome_db);

  $genome_db = $genome_db_adaptor-\>fetch_by_dbID(22);
  $all_genome_dbs = $genome_db_adaptor-\>fetch_all();
  $genome_db = $genome_db_adaptor-\>fetch_by_name_assembly("Homo sapiens", 'NCBI36');
  $genome_db = $genome_db_adaptor-\>fetch_by_registry_name("human");
  $genome_db = $genome_db_adaptor-\>fetch_by_Slice($slice);

Description

This module is intended to access data in the genome_db table. The genome_db table stores information about each species including the taxon_id, species name, assembly, genebuild and the location of the core database
 

Definition at line 35 of file GenomeDBAdaptor.pm.

Available Methods

protected _columns ()
protected _default_where_clause ()
protected _fetch_by_name ()
protected _final_clause ()
protected _left_join ()
protected _list_dbIDs ()
protected _objs_from_sth ()
protected _straight_join ()
protected _tables ()
public Listref bind_param_generic_fetch ()
public void create_GenomeDBs ()
public
Bio::EnsEMBL::DBSQL::DBAdaptor 
db ()
public
Bio::EnsEMBL::DBSQL::DBConnection 
dbc ()
public void deleteObj ()
public dump_data ()
public Listref fetch_all ()
public Listref fetch_all_by_ancestral_taxon_id ()
public Listref fetch_all_by_dbID_list ()
public
Bio::EnsEMBL::Compara::GenomeDB 
fetch_by_core_DBAdaptor ()
public
Bio::EnsEMBL::Compara::GenomeDB 
fetch_by_dbID ()
public
Bio::EnsEMBL::Compara::GenomeDB 
fetch_by_name_assembly ()
public
Bio::EnsEMBL::Compara::GenomeDB 
fetch_by_registry_name ()
public
Bio::EnsEMBL::Compara::GenomeDB 
fetch_by_Slice ()
public
Bio::EnsEMBL::Compara::GenomeDB 
fetch_by_taxon_id ()
public Listref generic_fetch ()
public Listref get_all_db_links ()
public get_dumped_data ()
public Scalar get_species_name_from_core_MetaContainer ()
public Boolean is_multispecies ()
public Scalar last_insert_id ()
public
Bio::EnsEMBL::DBSQL::BaseAdaptor 
new ()
public DBI::StatementHandle prepare ()
public Int species_id ()
public Int store ()
public void sync_with_registry ()

Method Documentation

protected Bio::EnsEMBL::Compara::DBSQL::GenomeDBAdaptor::_fetch_by_name ( )

Undocumented method

Code:
click to view
public void Bio::EnsEMBL::Compara::DBSQL::GenomeDBAdaptor::create_GenomeDBs ( )
  Arg [1]    : none
  Example    : none
  Description: Reads the genomedb table and creates an internal cache of the
               values of the table.
  Returntype : none
  Exceptions : none
  Caller     : internal
  Status      : Stable
 
Code:
click to view
public void Bio::EnsEMBL::Compara::DBSQL::GenomeDBAdaptor::deleteObj ( )
  Arg         : none
  Example     : none
  Description : Called automatically by DBConnection during object destruction
                phase. Clears the cache to avoid memory leaks.
  Returntype  : none
  Exceptions  : none
  Caller      : general
  Status      : Stable
 
Code:
click to view
public Listref Bio::EnsEMBL::Compara::DBSQL::GenomeDBAdaptor::fetch_all ( )
  Args       : none
  Example    : my $all_genome_dbs = $genome_db_adaptor->fetch_all();
  Description: gets all GenomeDBs for this compara database
  Returntype : listref Bio::EnsEMBL::Compara::GenomeDB
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

Reimplemented from Bio::EnsEMBL::DBSQL::BaseAdaptor.

public Listref Bio::EnsEMBL::Compara::DBSQL::GenomeDBAdaptor::fetch_all_by_ancestral_taxon_id ( )
  Arg [1]    : int $ancestral_taxon_id
  Arg [2]    : (optional) bool $default_assembly_only
  Example    : $gdb = $gdba->fetch_by_taxon_id(1234);
  Description: Retrieves all the genome dbs derived from that NCBI taxon_id.
  Note       : This method uses the ncbi_taxa_node table
  Returntype : listref of Bio::EnsEMBL::Compara::GenomeDB obejcts
  Exceptions : 
  Caller     : general
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::Compara::GenomeDB Bio::EnsEMBL::Compara::DBSQL::GenomeDBAdaptor::fetch_by_core_DBAdaptor ( )
	Arg [1]     : Bio::EnsEMBL::DBSQL::DBAdaptor
	Example     : my $gdb = $gdba->fetch_by_core_DBAdaptor($core_dba);
	Description : For a given core database adaptor object; this method will
	              return the GenomeDB instance
	Returntype  : Bio::EnsEMBL::Compara::GenomeDB
	Exceptions  : thrown if no name is found for the adaptor
	Caller      : general
	Status      : Stable
 
Code:
click to view
public Bio::EnsEMBL::Compara::GenomeDB Bio::EnsEMBL::Compara::DBSQL::GenomeDBAdaptor::fetch_by_dbID ( )
  Arg [1]    : int $dbid
  Example    : $genome_db = $gdba->fetch_by_dbID(1);
  Description: Retrieves a GenomeDB object via its internal identifier
  Returntype : Bio::EnsEMBL::Compara::GenomeDB
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view

Reimplemented from Bio::EnsEMBL::DBSQL::BaseAdaptor.

public Bio::EnsEMBL::Compara::GenomeDB Bio::EnsEMBL::Compara::DBSQL::GenomeDBAdaptor::fetch_by_name_assembly ( )
  Arg [1]    : string $name
  Arg [2]    : string $assembly
  Example    : $gdb = $gdba->fetch_by_name_assembly("Homo sapiens", 'NCBI36');
  Description: Retrieves a genome db using the name of the species and
               the assembly version.
  Returntype : Bio::EnsEMBL::Compara::GenomeDB
  Exceptions : thrown if GenomeDB of name $name and $assembly cannot be found
  Caller     : general
  Status      : Stable
 
Code:
click to view
public Bio::EnsEMBL::Compara::GenomeDB Bio::EnsEMBL::Compara::DBSQL::GenomeDBAdaptor::fetch_by_registry_name ( )
  Arg [1]    : string $name
  Example    : $gdb = $gdba->fetch_by_registry_name("human");
  Description: Retrieves a genome db using the name of the species as
               used in the registry configuration file. Any alias is
               acceptable as well.
  Returntype : Bio::EnsEMBL::Compara::GenomeDB
  Exceptions : thrown if $name is not found in the Registry configuration
  Caller     : general
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::Compara::GenomeDB Bio::EnsEMBL::Compara::DBSQL::GenomeDBAdaptor::fetch_by_Slice ( )
  Arg [1]    : Bio::EnsEMBL::Slice $slice
  Example    : $gdb = $gdba->fetch_by_Slice($slice);
  Description: Retrieves the genome db corresponding to this
               Bio::EnsEMBL::Slice object
  Returntype : Bio::EnsEMBL::Compara::GenomeDB
  Exceptions : thrown if $slice is not a Bio::EnsEMBL::Slice
  Caller     : general
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::Compara::GenomeDB Bio::EnsEMBL::Compara::DBSQL::GenomeDBAdaptor::fetch_by_taxon_id ( )
  Arg [1]    : string $name
  Arg [2]    : string $assembly
  Example    : $gdb = $gdba->fetch_by_taxon_id(1234);
  Description: Retrieves a genome db using the NCBI taxon_id of the species.
  Returntype : Bio::EnsEMBL::Compara::GenomeDB
  Exceptions : thrown if GenomeDB of taxon_id $taxon_id cannot be found. Will
               warn if the taxon returns more than one GenomeDB (possible in
               some branches of the Taxonomy)
  Caller     : general
  Status     : Stable
 
Code:
click to view
public Listref Bio::EnsEMBL::Compara::DBSQL::GenomeDBAdaptor::get_all_db_links ( )
  Arg[1]     : Bio::EnsEMBL::Compara::GenomeDB $query_genomedb
  Arg[2]     : int $method_link_id
  Example    :
  Description: For the GenomeDB object passed in, check is run to
               verify which other genomes it has been analysed against
               irrespective as to whether this was as the consensus
               or query genome. Returns a list of matching dbIDs
               separated by white spaces.
  Returntype : listref of Bio::EnsEMBL::Compara::GenomeDBs
  Exceptions : none
  Caller     : Bio::EnsEMBL::Compara::GenomeDB.pm
  Status     : At risk
 
public Scalar Bio::EnsEMBL::Compara::DBSQL::GenomeDBAdaptor::get_species_name_from_core_MetaContainer ( )
  Arg [1]     : Bio::EnsEMBL::MetaContainer
  Example     : $gdba->get_species_name_from_core_MetaContainer($slice->adaptor->db->get_MetaContainer);
  Description : Returns the name of a species which was used to
                name the GenomeDB from a meta container. Can be
                the species binomial name or the value of the
                meta item species.compara_name
  Returntype  : Scalar string
  Exceptions  : thrown if no name is found
  Caller      : general
  Status      : Stable
 
Code:
click to view
public Int Bio::EnsEMBL::Compara::DBSQL::GenomeDBAdaptor::store ( )
  Arg [1]    : Bio::EnsEMBL::Compara::GenomeDB $gdb
  Example    : $gdba->store($gdb);
  Description: Stores a genome database object in the compara database if
               it has not been stored already.  The internal id of the
               stored genomeDB is returned.
  Returntype : int
  Exceptions : thrown if the argument is not a Bio::EnsEMBL::Compara:GenomeDB
  Caller     : general
  Status     : Stable
 
Code:
click to view
public void Bio::EnsEMBL::Compara::DBSQL::GenomeDBAdaptor::sync_with_registry ( )
  Example    :
  Description: Synchronize all the cached genome_db objects
               db_adaptor (connections to core databases)
               with those set in Bio::EnsEMBL::Registry.
               Order of presidence is Registry.conf > ComparaConf > genome_db.locator
  Returntype : none
  Exceptions : none
  Caller     : Bio::EnsEMBL::DBSQL::DBAdaptor
  Status     : At risk
 
Code:
click to view

The documentation for this class was generated from the following file: