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

List of all members.


Class Summary

Synopsis

=head2 Connecting to the database using the Registry

  use Bio::EnsEMBL::Registry;

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

  $reg-\>load_registry_from_db(-host=\>"ensembldb.ensembl.org", -user=\>"anonymous");

  my $genomic_align_block_adaptor = $reg-\>get_adaptor(
      "Multi", "compara", "GenomicAlignBlock");

=head2 Store/Delete data from the database

  $genomic_align_block_adaptor-\>store($genomic_align_block);

  $genomic_align_block_adaptor-\>delete_by_dbID($genomic_align_block-\>dbID);

=head2 Retrieve data from the database

  $genomic_align_block = $genomic_align_block_adaptor-\>fetch_by_dbID(12);

  $genomic_align_blocks = $genomic_align_block_adaptor-\>fetch_all_by_MethodLinkSpeciesSet(
      $method_link_species_set);

  $genomic_align_blocks = $genomic_align_block_adaptor-\>fetch_all_by_MethodLinkSpeciesSet_Slice(
      $method_link_species_set, $human_slice);

  $genomic_align_blocks = $genomic_align_block_adaptor-\>fetch_all_by_MethodLinkSpeciesSet_DnaFrag(
      $method_link_species_set, $human_dnafrag);

  $genomic_align_blocks = $genomic_align_block_adaptor-\>fetch_all_by_MethodLinkSpeciesSet_DnaFrag_DnaFrag(
      $method_link_species_set, $human_dnafrag, $mouse_dnafrag);

=head2 Other methods

$genomic_align_block = $genomic_align_block_adaptor-\>
    retrieve_all_direct_attributes($genomic_align_block);

$genomic_align_block_adaptor-\>lazy_loading(1);

$genomic_align_block_adaptor-\>use_autoincrement

Description

This module is intended to access data in the genomic_align_block table.
Each alignment is represented by Bio::EnsEMBL::Compara::GenomicAlignBlock. Each GenomicAlignBlock
contains several Bio::EnsEMBL::Compara::GenomicAlign, one per sequence included in the alignment.
The GenomicAlign contains information about the coordinates of the sequence and the sequence of
gaps, information needed to rebuild the aligned sequence. By combining all the aligned sequences
of the GenomicAlignBlock, it is possible to get the orignal alignment back.
 

Definition at line 68 of file GenomicAlignBlockAdaptor.pm.

Available Methods

protected _columns ()
protected
Bio::EnsEMBL::Compara::GenomicAlign 
_create_GenomicAlign ()
protected _default_where_clause ()
protected Ref _fetch_all_by_MethodLinkSpeciesSet_DnaFrag_with_limit ()
protected _final_clause ()
protected _left_join ()
protected _list_dbIDs ()
protected _load_DnaFrags ()
protected _objs_from_sth ()
protected _straight_join ()
protected _tables ()
public Listref bind_param_generic_fetch ()
public
Bio::EnsEMBL::DBSQL::DBAdaptor 
db ()
public
Bio::EnsEMBL::DBSQL::DBConnection 
dbc ()
public void delete_by_dbID ()
public dump_data ()
public fetch_all ()
public Listref fetch_all_by_dbID_list ()
public Ref fetch_all_by_MethodLinkSpeciesSet ()
public Ref fetch_all_by_MethodLinkSpeciesSet_DnaFrag ()
public Ref fetch_all_by_MethodLinkSpeciesSet_DnaFrag_DnaFrag ()
public Ref fetch_all_by_MethodLinkSpeciesSet_DnaFrag_GroupType ()
public fetch_all_by_MethodLinkSpeciesSet_DnaFragORIG ()
public Ref fetch_all_by_MethodLinkSpeciesSet_GroupID ()
public Ref fetch_all_by_MethodLinkSpeciesSet_Slice ()
public
Bio::EnsEMBL::Compara::GenomicAlignBlock 
fetch_by_dbID ()
public Listref generic_fetch ()
public get_dumped_data ()
public Boolean is_multispecies ()
public Scalar last_insert_id ()
public Int lazy_loading ()
public void new ()
public DBI::StatementHandle prepare ()
public
Bio::EnsEMBL::Compara::GenomicAlignBlock 
retrieve_all_direct_attributes ()
public retrieve_all_direct_attributesORIG ()
public Int species_id ()
public
Bio::EnsEMBL::Compara::GenomicAlignBlock 
store ()
public store_group_id ()
public Int use_autoincrement ()

Method Documentation

protected Bio::EnsEMBL::Compara::GenomicAlign Bio::EnsEMBL::Compara::DBSQL::GenomicAlignBlockAdaptor::_create_GenomicAlign ( )
  [Arg  1]   : int genomic_align_id
  [Arg  2]   : int genomic_align_block_id
  [Arg  3]   : int method_link_species_set_id
  [Arg  4]   : int dnafrag_id
  [Arg  5]   : int dnafrag_start
  [Arg  6]   : int dnafrag_end
  [Arg  7]   : int dnafrag_strand
  [Arg  8]   : string cigar_line
  [Arg  9]   : int visible
  Example    : my $this_genomic_align1 = $self->_create_GenomicAlign(
                  $genomic_align_id, $genomic_align_block_id,
                  $method_link_species_set_id, $dnafrag_id,
                  $dnafrag_start, $dnafrag_end, $dnafrag_strand,
                  $cigar_line, $visible);
  Description: Creates a new Bio::EnsEMBL::Compara::GenomicAlign object
               with the values provided as arguments. If this GenomicAlign
               is part of a composite GenomicAlign, the method will return
               a Bio::EnsEMBL::Compara::GenomicAlignGroup containing all the
               underlying Bio::EnsEMBL::Compara::GenomicAlign objects instead
  Returntype : Bio::EnsEMBL::Compara::GenomicAlign object or
               Bio::EnsEMBL::Compara::GenomicAlignGroup object
  Exceptions : 
  Caller     : internal
  Status     : stable
 
Code:
click to view
protected Ref Bio::EnsEMBL::Compara::DBSQL::GenomicAlignBlockAdaptor::_fetch_all_by_MethodLinkSpeciesSet_DnaFrag_with_limit ( )
  This is an internal method. Please, use the fetch_all_by_MethodLinkSpeciesSet_DnaFrag() method instead.
  Arg  1     : Bio::EnsEMBL::Compara::MethodLinkSpeciesSet $method_link_species_set
  Arg  2     : Bio::EnsEMBL::Compara::DnaFrag $dnafrag
  Arg  3     : integer $start [optional]
  Arg  4     : integer $end [optional]
  Arg  5     : integer $limit_number
  Arg  6     : integer $limit_index_start [optional, default = 0]
  Arg  7     : boolean $restrict_resulting_blocks [optional, default = no restriction]
  Example    : my $genomic_align_blocks =
                  $genomic_align_block_adaptor->_fetch_all_by_MethodLinkSpeciesSet_DnaFrag_with_limit(
                      $mlss, $dnafrag, 50000000, 50250000);
  Description: Retrieve the corresponding
               Bio::EnsEMBL::Compara::GenomicAlignBlock objects. Objects 
  Returntype : ref. to an array of Bio::EnsEMBL::Compara::GenomicAlignBlock objects. Only dbID,
               adaptor and method_link_species_set are actually stored in the objects. The remaining
               attributes are only retrieved when requiered.
  Exceptions : Returns ref. to an empty array if no matching
               Bio::EnsEMBL::Compara::GenomicAlignBlock object can be retrieved
  Caller     : fetch_all_by_MethodLinkSpeciesSet_DnaFrag
  Status     : Stable
 
Code:
click to view
protected Bio::EnsEMBL::Compara::DBSQL::GenomicAlignBlockAdaptor::_load_DnaFrags ( )
  [Arg  1]   : listref Bio::EnsEMBL::Compara::GenomicAlignBlock objects
  Example    : $self->_load_DnaFrags($genomic_align_blocks);
  Description: Load the DnaFrags for all the GenomicAligns in these
               GenomicAlignBlock objects. This is much faster, especially
               for a large number of objects, as we fetch all the DnaFrags
               at once. Note: These DnaFrags are not cached by the
               DnaFragAdaptor at the moment
  Returntype : -none-
  Exceptions : 
  Caller     : fetch_all_* methods
  Status     : at risk
 
Code:
click to view
public void Bio::EnsEMBL::Compara::DBSQL::GenomicAlignBlockAdaptor::delete_by_dbID ( )
  Arg  1     : integer $genomic_align_block_id
  Example    : $gen_ali_blk_adaptor->delete_by_dbID(352158763);
  Description: It removes the given GenomicAlginBlock in the database as well
               as the GenomicAlign objects it contains
  Returntype : none
  Exceptions : 
  Caller     : general
  Status     : Stable
 
Code:
click to view
public Ref Bio::EnsEMBL::Compara::DBSQL::GenomicAlignBlockAdaptor::fetch_all_by_MethodLinkSpeciesSet ( )
  Arg  1     : Bio::EnsEMBL::Compara::MethodLinkSpeciesSet $method_link_species_set
  Arg  2     : integer $limit_number [optional]
  Arg  3     : integer $limit_index_start [optional]
  Example    : my $genomic_align_blocks =
                  $genomic_align_block_adaptor->
                      fetch_all_by_MethodLinkSpeciesSet($mlss);
  Description: Retrieve the corresponding
               Bio::EnsEMBL::Compara::GenomicAlignBlock objects. Objects 
  Returntype : ref. to an array of Bio::EnsEMBL::Compara::GenomicAlignBlock objects.
               Corresponding Bio::EnsEMBL::Compara::GenomicAlign are only retrieved
               when required.
  Exceptions : Returns ref. to an empty array if no matching
               Bio::EnsEMBL::Compara::GenomicAlignBlock object can be retrieved
  Caller     : none
  Status     : Stable
 
Code:
click to view
public Ref Bio::EnsEMBL::Compara::DBSQL::GenomicAlignBlockAdaptor::fetch_all_by_MethodLinkSpeciesSet_DnaFrag ( )
  Arg  1     : Bio::EnsEMBL::Compara::MethodLinkSpeciesSet $method_link_species_set
  Arg  2     : Bio::EnsEMBL::Compara::DnaFrag $dnafrag
  Arg  3     : integer $start [optional, default = 1]
  Arg  4     : integer $end [optional, default = dnafrag_length]
  Arg  5     : integer $limit_number [optional, default = no limit]
  Arg  6     : integer $limit_index_start [optional, default = 0]
  Arg  7     : boolean $restrict_resulting_blocks [optional, default = no restriction]
  Arg  8     : boolean $view_visible [optional, default = all visible]
  Example    : my $genomic_align_blocks =
                  $genomic_align_block_adaptor->fetch_all_by_MethodLinkSpeciesSet_DnaFrag(
                      $mlss, $dnafrag, 50000000, 50250000);
  Description: Retrieve the corresponding
               Bio::EnsEMBL::Compara::GenomicAlignBlock objects.
  Returntype : ref. to an array of Bio::EnsEMBL::Compara::GenomicAlignBlock objects. Only dbID,
               adaptor and method_link_species_set are actually stored in the objects. The remaining
               attributes are only retrieved when requiered.
  Exceptions : Returns ref. to an empty array if no matching
               Bio::EnsEMBL::Compara::GenomicAlignBlock object can be retrieved
  Caller     : none
  Status     : Stable
 
Code:
click to view
public Ref Bio::EnsEMBL::Compara::DBSQL::GenomicAlignBlockAdaptor::fetch_all_by_MethodLinkSpeciesSet_DnaFrag_DnaFrag ( )
  Arg  1     : Bio::EnsEMBL::Compara::MethodLinkSpeciesSet $method_link_species_set
  Arg  2     : Bio::EnsEMBL::Compara::DnaFrag $dnafrag (query)
  Arg  3     : integer $start [optional]
  Arg  4     : integer $end [optional]
  Arg  5     : Bio::EnsEMBL::Compara::DnaFrag $dnafrag (target)
  Arg  6     : integer $limit_number [optional]
  Arg  7     : integer $limit_index_start [optional]
  Example    : my $genomic_align_blocks =
                  $genomic_align_block_adaptor->fetch_all_by_MethodLinkSpeciesSet_DnaFrag_DnaFrag(
                      $mlss, $qy_dnafrag, 50000000, 50250000,$tg_dnafrag);
  Description: Retrieve the corresponding
               Bio::EnsEMBL::Compara::GenomicAlignBlock objects.
  Returntype : ref. to an array of Bio::EnsEMBL::Compara::GenomicAlignBlock objects.
  Exceptions : Returns ref. to an empty array if no matching
               Bio::EnsEMBL::Compara::GenomicAlignBlock object can be retrieved
  Caller     : none
  Status     : Stable
 
Code:
click to view
public Ref Bio::EnsEMBL::Compara::DBSQL::GenomicAlignBlockAdaptor::fetch_all_by_MethodLinkSpeciesSet_DnaFrag_GroupType ( )
Deprecated:
! Use Bio::EnsEMBL::Compara::GenomicAlignBlockAdaptor->fetch_all_by_MethodLinkSpeciesSet_DnaFrag method instead
  Arg  1     : Bio::EnsEMBL::Compara::MethodLinkSpeciesSet $method_link_species_set
  Arg  2     : Bio::EnsEMBL::Compara::DnaFrag $dnafrag (query)
  Arg  3     : integer $start [optional]
  Arg  4     : integer $end [optional]
  Arg  5     : string $group_type
  Example    : my $genomic_align_blocks =
                  $genomic_align_block_adaptor->fetch_all_by_MethodLinkSpeciesSet_DnaFrag_GroupType(
                      $mlss, $qy_dnafrag, 50000000, 50250000,"chain");
  Description: Retrieve the corresponding
               Bio::EnsEMBL::Compara::GenomicAlignBlock objects.
  Returntype : ref. to an array of Bio::EnsEMBL::Compara::GenomicAlignBlock objects. 
  Exceptions : Returns ref. to an empty array if no matching
               Bio::EnsEMBL::Compara::GenomicAlignBlock object can be retrieved
  Caller     : none
  Status     :

Deprecated:
 
Code:
click to view
public Bio::EnsEMBL::Compara::DBSQL::GenomicAlignBlockAdaptor::fetch_all_by_MethodLinkSpeciesSet_DnaFragORIG ( )

Undocumented method

Code:
click to view
public Ref Bio::EnsEMBL::Compara::DBSQL::GenomicAlignBlockAdaptor::fetch_all_by_MethodLinkSpeciesSet_GroupID ( )
  Arg  1     : Bio::EnsEMBL::Compara::MethodLinkSpeciesSet $method_link_species_set
  Arg  2     : integer $group_id
  Example    : my $genomic_align_blocks =
                  $genomic_align_block_adaptor->fetch_all_by_MethodLinkSpeciesSet_GroupID($mlss, $group_id);
  Description: Retrieve the corresponding
               Bio::EnsEMBL::Compara::GenomicAlignBlock objects.
  Returntype : ref. to an array of Bio::EnsEMBL::Compara::GenomicAlignBlock objects. 
  Exceptions : Returns ref. to an empty array if no matching
               Bio::EnsEMBL::Compara::GenomicAlignBlock object can be retrieved
  Caller     : none
  Status     : Stable
 
Code:
click to view
public Ref Bio::EnsEMBL::Compara::DBSQL::GenomicAlignBlockAdaptor::fetch_all_by_MethodLinkSpeciesSet_Slice ( )
  Arg  1     : Bio::EnsEMBL::Compara::MethodLinkSpeciesSet $method_link_species_set
  Arg  2     : Bio::EnsEMBL::Slice $original_slice
  Arg  3     : integer $limit_number [optional]
  Arg  4     : integer $limit_index_start [optional]
  Arg  5     : boolean $restrict_resulting_blocks [optional]
  Example    : my $genomic_align_blocks =
                  $genomic_align_block_adaptor->fetch_all_by_MethodLinkSpeciesSet_Slice(
                      $method_link_species_set, $original_slice);
  Description: Retrieve the corresponding
               Bio::EnsEMBL::Compara::GenomicAlignBlock objects. The alignments may be
               reverse-complemented in order to match the strand of the original slice.
  Returntype : ref. to an array of Bio::EnsEMBL::Compara::GenomicAlignBlock objects. Only dbID,
               adaptor and method_link_species_set are actually stored in the objects. The remaining
               attributes are only retrieved when required.
  Exceptions : Returns ref. to an empty array if no matching
               Bio::EnsEMBL::Compara::GenomicAlignBlock object can be retrieved
  Caller     : $object->method_name
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::Compara::GenomicAlignBlock Bio::EnsEMBL::Compara::DBSQL::GenomicAlignBlockAdaptor::fetch_by_dbID ( )
  Arg  1     : integer $genomic_align_block_id
  Example    : my $genomic_align_block = $genomic_align_block_adaptor->fetch_by_dbID(1)
  Description: Retrieve the corresponding
               Bio::EnsEMBL::Compara::GenomicAlignBlock object
  Returntype : Bio::EnsEMBL::Compara::GenomicAlignBlock object
  Exceptions : Returns undef if no matching
               Bio::EnsEMBL::Compara::GenomicAlignBlock object can be retrieved
  Caller     : none
  Status     : Stable
 
Code:
click to view

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

public Int Bio::EnsEMBL::Compara::DBSQL::GenomicAlignBlockAdaptor::lazy_loading ( )
  [Arg  1]   : (optional)int $value
  Example    : $genomic_align_block_adaptor->lazy_loading(1);
  Description: Getter/setter for the _lazy_loading flag. This flag
               is used when fetching objects from the database. If
               the flag is OFF (default), the adaptor will fetch the
               all the attributes of the object. This is usually faster
               unless you run in some memory limitation problem. This
               happens typically when fetching loads of objects in one
               go.In this case you might want to consider using the
               lazy_loading option which return lighter objects and
               deleting objects as you use them:
               $gaba->lazy_loading(1);
               my $all_gabs = $gaba->fetch_all_by_MethodLinkSpeciesSet($mlss);
               foreach my $this_gab (@$all_gabs) {
                 # do something
                 ...
                 # delete object
                 undef($this_gab);
               }
  Returntype : integer
  Exceptions :
  Caller     : none
  Status     : Stable
 
Code:
click to view
public void Bio::EnsEMBL::Compara::DBSQL::GenomicAlignBlockAdaptor::new ( )
  Arg [1]    : list of args to super class constructor
  Example    : $ga_a = new Bio::EnsEMBL::Compara::GenomicAlignBlockAdaptor($dbobj);
  Description: Creates a new GenomicAlignBlockAdaptor.  The superclass 
               constructor is extended to initialise an internal cache.  This
               class should be instantiated through the get method on the 
               DBAdaptor rather than calling this method directly.
  Returntype : none
  Exceptions : none
  Caller     : Bio::EnsEMBL::DBSQL::DBConnection
  Status     : Stable
 
Code:
click to view

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

public Bio::EnsEMBL::Compara::GenomicAlignBlock Bio::EnsEMBL::Compara::DBSQL::GenomicAlignBlockAdaptor::retrieve_all_direct_attributes ( )
  Arg  1     : Bio::EnsEMBL::Compara::GenomicAlignBlock $genomic_align_block
  Example    : $genomic_align_block_adaptor->retrieve_all_direct_attributes($genomic_align_block)
  Description: Retrieve the all the direct attibutes corresponding to the dbID of the
               Bio::EnsEMBL::Compara::GenomicAlignBlock object. It is used after lazy fetching
               of the object for populating it when required.
  Returntype : Bio::EnsEMBL::Compara::GenomicAlignBlock object
  Exceptions : 
  Caller     : none
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::Compara::DBSQL::GenomicAlignBlockAdaptor::retrieve_all_direct_attributesORIG ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::GenomicAlignBlock Bio::EnsEMBL::Compara::DBSQL::GenomicAlignBlockAdaptor::store ( )
  Arg  1     : Bio::EnsEMBL::Compara::GenomicAlignBlock
               The things you want to store
  Example    : $gen_ali_blk_adaptor->store($genomic_align_block);
  Description: It stores the given GenomicAlginBlock in the database as well
               as the GenomicAlign objects it contains
  Returntype : Bio::EnsEMBL::Compara::GenomicAlignBlock object
  Exceptions : - no Bio::EnsEMBL::Compara::MethodLinkSpeciesSet is linked

 
Code:
click to view
public Bio::EnsEMBL::Compara::DBSQL::GenomicAlignBlockAdaptor::store_group_id ( )
  Arg  1     : reference to Bio::EnsEMBL::Compara::GenomicAlignBlock
  Arg  2     : group_id
  Example    : $genomic_align_block_adaptor->store_group_id($genomic_align_block, $group_id);
  Description: Method for storing the group_id for a genomic_align_block
  Returntype : 
  Exceptions : - cannot lock tables

 
Code:
click to view
public Int Bio::EnsEMBL::Compara::DBSQL::GenomicAlignBlockAdaptor::use_autoincrement ( )
  [Arg  1]   : (optional)int value
  Example    : $genomic_align_block_adaptor->use_autoincrement(0);
  Description: Getter/setter for the _use_autoincrement flag. This flag
               is used when storing new objects with no dbID in the
               database. If the flag is ON (default), the adaptor will
               let the DB set the dbID using the AUTO_INCREMENT ability.
               If you unset the flag, then the adaptor will look for the
               first available dbID after 10^10 times the
               method_link_species_set_id.
  Returntype : integer
  Exceptions : 
  Caller     : none
  Status     : Stable
 
Code:
click to view

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