Bio::EnsEMBL::Compara::DBSQL::DnaFragAdaptor Class Reference

Class Summary
Synopsis
use Bio::EnsEMBL::Registry; my $reg = "Bio::EnsEMBL::Registry"; $reg-\>load_registry_from_db(-host=\>"ensembldb.ensembl.org", -user=\>"anonymous"); my $dnafrag_adaptor = $reg-\>get_adaptor("Multi", "compara", "DnaFrag"); $dnafrag_adaptor-\>store($dnafrag); $dnafrag = $dnafrag_adaptor-\>fetch_by_dbID(905406); $dnafrag = $dnafrag_adaptor-\>fetch_by_GenomeDB_and_name($human_genome_db, 'X'); $dnafrags = $dnafrag_adaptor-\>fetch_all_by_GenomeDB_region( $human_genome_db, 'chromosome') $dnafrag = $dnafrag_adaptor-\>fetch_by_Slice($slice); $all_dnafrags = $dnafrag_adaptor-\>fetch_all();
Description
This module is intended to access data in the dnafrag table. The dnafrag table stores information on the toplevel sequences such as the name, coordinate system, length and species.
Definition at line 35 of file DnaFragAdaptor.pm.
Method Documentation
protected List Bio::EnsEMBL::Compara::DBSQL::DnaFragAdaptor::_columns | ( | ) |
Args : none Example : $columns = $self->_columns() Description: a list of [tablename, alias] pairs for use with generic_fetch Returntype : list of [tablename, alias] pairs Exceptions : none Caller : BaseAdaptor::generic_fetch Status : Stable

click to view
Reimplemented from Bio::EnsEMBL::DBSQL::BaseAdaptor.
protected Listref Bio::EnsEMBL::Compara::DBSQL::DnaFragAdaptor::_objs_from_sth | ( | ) |
Args[1] : DBI::row_hashref $hashref containing key-value pairs Example : my $dna_frags = $self->_objs_from_sth($sth); Description: convert DBI row hash reference into a Bio::EnsEMBL::Compara::DnaFrag object Returntype : listref of Bio::EnsEMBL::Compara::DnaFrag objects Exceptions : throw if $sth is not supplied Caller : general Status : Stable

click to view
Reimplemented from Bio::EnsEMBL::DBSQL::BaseAdaptor.
protected List Bio::EnsEMBL::Compara::DBSQL::DnaFragAdaptor::_tables | ( | ) |
Args : none Example : $tables = $self->_tables() Description: a list of [tablename, alias] pairs for use with generic_fetch Returntype : list of [tablename, alias] pairs Exceptions : none Caller : BaseAdaptor::generic_fetch Status : Stable

click to view
Reimplemented from Bio::EnsEMBL::DBSQL::BaseAdaptor.
public Listref Bio::EnsEMBL::Compara::DBSQL::DnaFragAdaptor::fetch_all | ( | ) |
Arg : none Example : my $all_dnafrags = $dnafrag_adaptor->fetch_all(); Description : fetches all Bio::EnsEMBL::Compara::DnaFrag objects for this compara database Returntype : listref of all Bio::EnsEMBL::Compara::DnaFrag objects Exceptions : none Caller : general Status : Stable

click to view
Reimplemented from Bio::EnsEMBL::DBSQL::BaseAdaptor.
public Listref Bio::EnsEMBL::Compara::DBSQL::DnaFragAdaptor::fetch_all_by_GenomeDB_region | ( | ) |
Arg [1] : Bio::EnsEMBL::Compara::DBSQL::GenomeDB Arg [2] : (optional) string $coord_system_name Arg [3] : (optional) string $name Example : my $human_chr_dnafrags = $dnafrag_adaptor-> fetch_all_by_GenomeDB_region( $human_genome_db, 'chromosome') Description: Returns the Bio::EnsEMBL::Compara::DnaFrag object corresponding to the Bio::EnsEMBL::Compara::GenomeDB and region given. Returntype : listref of Bio::EnsEMBL::Compara::DnaFrag objects Exceptions : throw unless $genome_db is a Bio::EnsEMBL::Compara::GenomeDB Caller : Status : Stable

click to view
public Bio::EnsEMBL::Compara::DnaFrag Bio::EnsEMBL::Compara::DBSQL::DnaFragAdaptor::fetch_by_dbID | ( | ) |
Arg [1] : integer $db_id Example : my $dnafrag = $dnafrag_adaptor->fetch_by_dbID(905406); Description: Returns the Bio::EnsEMBL::Compara::DnaFrag object corresponding to the database internal identifier Returntype : Bio::EnsEMBL::Compara::DnaFrag Exceptions : throw if $dbid is not supplied. Caller : general Status : Stable

click to view
Reimplemented from Bio::EnsEMBL::DBSQL::BaseAdaptor.
public Bio::EnsEMBL::Compara::DnaFrag Bio::EnsEMBL::Compara::DBSQL::DnaFragAdaptor::fetch_by_GenomeDB_and_name | ( | ) |
Arg [1] : integer $genome_db_id
- or - Bio::EnsEMBL::Compara::DBSQL::GenomeDB Arg [2] : string $name Example : my $dnafrag = $dnafrag_adaptor->fetch_by_GenomeDB_and_name($human_genome_db, 'X'); Example : my $dnafrag = $dnafrag_adaptor->fetch_by_GenomeDB_and_name(1, 'X'); Description: Returns the Bio::EnsEMBL::Compara::DnaFrag object corresponding to the Bio::EnsEMBL::Compara::GenomeDB and name given. $genome_db can be a valid $genome_db_id instead. Returntype : Bio::EnsEMBL::Compara::DnaFrag Exceptions : throw when genome_db_id cannot be retrieved Exceptions : warns and returns undef when no DnaFrag matches the query Caller : $dnafrag_adaptor->fetch_by_GenomeDB_and_name Status : Stable

click to view
public Bio::EnsEMBL::Compara::DnaFrag Bio::EnsEMBL::Compara::DBSQL::DnaFragAdaptor::fetch_by_Slice | ( | ) |
Arg [1] : Bio::EnsEMBL::Slice $slice Example : $dnafrag = $dnafrag_adaptor->fetch_by_Slice($slice); Description: Retrieves the DnaFrag corresponding to this Bio::EnsEMBL::Slice object Returntype : Bio::EnsEMBL::Compara::DnaFrag Exceptions : thrown if $slice is not a Bio::EnsEMBL::Slice Caller : general Status : Stable

click to view
public Bio::EnsEMBL::Compara::DBSQL::DnaFragAdaptor::is_already_stored | ( | ) |
Title : is_already_stored Usage : $self->is_already_stored($dnafrag) Function: checks if already stored by querying database Example : Returns : $dnafrag->dbID if stored and 0 if not stored Args : Bio::EnsEMBL::Compara::DnaFrag object Status : Stable

click to view
public Int Bio::EnsEMBL::Compara::DBSQL::DnaFragAdaptor::store | ( | ) |
Arg [1] : Bio::EnsEMBL::Compara::DnaFrag $new_dnafrag Example : $dnafrag_adaptor->store($new_dnafrag) Description : Stores a Bio::EnsEMBL::Compara::DnaFrag object in the DB- ReturnType : integer new_dnafrag_id Exceptions : throw if $new_dnafrag is not a Bio::EnsEMBL::Compara::DnaFrag object Exceptions : does not store anything if $new_dnafrag->adaptor is already defined and is equal to this adaptor Exceptions : throw if $new_dnafrag->genome_db is not defined or has no dbID. Exceptions : throw if $new_dnafrag has no name Caller : $object->methodname Status : Stable

click to view
public Bio::EnsEMBL::Compara::DBSQL::DnaFragAdaptor::store_if_needed | ( | ) |
Title : store_if_needed Usage : $self->store_if_needed($dnafrag) Function: store instance in the defined database if NOT already present. Example : Returns : $dnafrag->dbID Args : Bio::EnsEMBL::Compara::DnaFrag object Status : Stable

click to view
public Int Bio::EnsEMBL::Compara::DBSQL::DnaFragAdaptor::update | ( | ) |
Title : update Usage : $self->update($dnafrag) Function: look for this dnafrag in the database, using the genome_db_id, the coordinate_system_name and the name of the Bio::EnsEMBL::Compara::DnaFrag object. If there is already an entry in the database for this dnafrag, it does do anything. If the length is different, it updates it. If there is not any entry for this, it stores it. Example : Returns : int $dnafrag->dbID Args : Bio::EnsEMBL::Compara::DnaFrag object Status : Stable

click to view
The documentation for this class was generated from the following file:
- Bio/EnsEMBL/Compara/DBSQL/DnaFragAdaptor.pm