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

List of all members.


Class Summary

Synopsis

=head2 Get the adaptor from the Registry

  use Bio::EnsEMBL::Registry;

  my $reg = "Bio::EnsEMBL::Registry";
  $reg-\>load_registry_from_db(
      -host =\> "ensembldb.ensembl.org",
      -user =\> "anonymous");

  my $synteny_region_adaptor = $reg-\>get_adaptor(
      "Multi", "compara", "SyntenyRegion");

=head2 Store method

  $synteny_region_adaptor-\>store($synteny_region);

=head2 Fetching methods

  my $synteny_region = $synteny_region_adaptor-\>fetch_by_dbID(1);
  my $synteny_regions = $synteny_region_adaptor-\>
      fetch_all_by_MethodLinkSpeciesSet_DnaFrag(
          $mlss, $dnafrag, $start, $end);


=head2 Example script

  use strict;
  use Bio::EnsEMBL::Registry;

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

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

  my $method_link_species_set_adaptor = $reg-\>get_adaptor(
      "Multi", "compara", "MethodLinkSpeciesSet");
  my $human_mouse_synteny_method_link_species_set =
      $method_link_species_set_adaptor-\>
          fetch_by_method_link_type_registry_aliases(
              "SYNTENY", ["human", "mouse"]);

  my $genome_db_adaptor = $reg-\>get_adaptor(
      "Multi", "compara", "GenomeDB");
  my $genome_db = $genome_db_adaptor-\>
      fetch_by_name_assembly("Homo sapiens", undef);

  my $dnafrag_adaptor = $reg-\>get_adaptor(
      "Multi", "compara", "DnaFrag");
  my $dnafrag = $dnafrag_adaptor-\>
      fetch_by_GenomeDB_and_name($genome_db, "3");

  my $synteny_region_adaptor = $reg-\>get_adaptor(
      "Multi", "compara", "SyntenyRegion");
  my $synteny_regions = $synteny_region_adaptor-\>
      fetch_all_by_MethodLinkSpeciesSet_DnaFrag(
          $human_mouse_synteny_method_link_species_set,
          $dnafrag, 100000, 200000);

  foreach my $this_synteny_region (@$synteny_regions) {
    my $these_dnafrag_regions = $this_synteny_region-\>children();
    foreach my $this_dnafrag_region (@$these_dnafrag_regions) {
      print $this_dnafrag_region-\>dnafrag-\>genome_db-\>name, ": ", $this_dnafrag_region-\>slice-\>name, "\n";
    }
    print "\n";
  }

Description

This object is intended for accessing data in the synteny_region and dnafrag_region tables.
 

Definition at line 84 of file SyntenyRegionAdaptor.pm.

Available Methods

protected _columns ()
protected _default_where_clause ()
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
Bio::EnsEMBL::DBSQL::DBAdaptor 
db ()
public
Bio::EnsEMBL::DBSQL::DBConnection 
dbc ()
public dump_data ()
public fetch_all ()
public Listref fetch_all_by_dbID_list ()
public Listref fetch_all_by_MethodLinkSpeciesSet ()
public Listref fetch_all_by_MethodLinkSpeciesSet_DnaFrag ()
public Ref fetch_all_by_MethodLinkSpeciesSet_Slice ()
public
Bio::EnsEMBL::Compara::SyntenyRegion 
fetch_by_dbID ()
public Listref generic_fetch ()
public get_dumped_data ()
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 ()

Method Documentation

public Listref Bio::EnsEMBL::Compara::DBSQL::SyntenyRegionAdaptor::fetch_all_by_MethodLinkSpeciesSet ( )
  Arg 1      : Bio::EnsEMBL::Compara::MethodLinkSpeciesSet $mlss
  Example    : my $these_synteny_regions = $synteny_region_adaptor->
                  fetch_all_by_MethodLinkSpeciesSet($mlss);
  Description: Fetches the Bio::EnsEMBL::Compara::SyntenyRegion
               objects for the set of species defined by the $mlss.
  Returntype : listref of Bio::EnsEMBL::Compara::SyntenyRegion objects
  Exception  : Thrown if the argument is not defined
  Caller     :
  Status     : Stable
 
Code:
click to view
public Listref Bio::EnsEMBL::Compara::DBSQL::SyntenyRegionAdaptor::fetch_all_by_MethodLinkSpeciesSet_DnaFrag ( )
  Arg 1      : Bio::EnsEMBL::Compara::MethodLinkSpeciesSet $mlss
  Arg 2      : Bio::EnsEMBL::Compara::DnaFrag $dnafrag
  Arg 3 (opt): int $start
  Arg 4 (opt): int $end
  Example    : my $these_synteny_regions = $synteny_region_adaptor->
                  fetch_all_by_MethodLinkSpeciesSet_DnaFrag(
                  $mlss, $dnafrag, 100000, 200000);
  Description: Fetches the Bio::EnsEMBL::Compara::SyntenyRegion
               objects in this region for the set of species
               defined by the $mlss.
  Returntype : listref of Bio::EnsEMBL::Compara::SyntenyRegion objects
  Exception  : Thrown if the argument is not defined
  Caller     :
  Status     : Stable
 
Code:
click to view
public Ref Bio::EnsEMBL::Compara::DBSQL::SyntenyRegionAdaptor::fetch_all_by_MethodLinkSpeciesSet_Slice ( )
  Arg  1     : Bio::EnsEMBL::Compara::MethodLinkSpeciesSet $method_link_species_set
  Arg  2     : Bio::EnsEMBL::Slice $original_slice
  Example    : my $synteny_regions =
                  $synteny_region_adaptor->fetch_all_by_MethodLinkSpeciesSet_Slice(
                      $method_link_species_set, $original_slice);
  Description: Retrieve the corresponding
               Bio::EnsEMBL::Compara::SyntenyRegion objects.
  Returntype : ref. to an array of Bio::EnsEMBL::Compara::SyntenyRegion objects.
  Exceptions : Returns ref. to an empty array if no matching
               Bio::EnsEMBL::Compara::SyntenyRegion object can be retrieved
  Caller     : $object->method_name
  Status     : Medium risk
 
Code:
click to view
public Bio::EnsEMBL::Compara::SyntenyRegion Bio::EnsEMBL::Compara::DBSQL::SyntenyRegionAdaptor::fetch_by_dbID ( )
  Arg  1     : int $synteny_region_id
  Example    : my $this_synteny_region = $synteny_region_adaptor->
                  fetch_by_dbID($synteny_region_id)
  Description: Fetches the corresponding Bio::EnsEMBL::Compara::SyntenyRegion
               object.
  Returntype : Bio::EnsEMBL::Compara::SyntenyRegion object
  Exception  : Thrown if the argument is not defined
  Caller     :
 
Code:
click to view

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

public Int Bio::EnsEMBL::Compara::DBSQL::SyntenyRegionAdaptor::store ( )
  Arg  1     : Bio::EnsEMBL::Compara::SyntenyRegion object
  Example    : $synteny_region_adaptor->store($synteny_region)
  Description: Stores a Bio::EnsEMBL::Compara::SyntenyRegion object into
               the database as well as the underlying
               Bio::EnsEMBL::Compara::DnaFragRegion objects
  Returntype : int (the synteny_region_id)
  Exception  : Thrown if the argument is not a
               Bio::EnsEMBL::Compara::SyntenyRegion object
  Caller     :
 
Code:
click to view

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