Bio::EnsEMBL::Compara::DBSQL DnaFragRegionAdaptor
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::EnsEMBL::Compara::DBSQL::DnaFragRegionAdaptor - DESCRIPTION of Object
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::Compara::DnaFragRegion
Bio::EnsEMBL::DBSQL::BaseAdaptor
Bio::EnsEMBL::Utils::Exception
Inherit
Bio::EnsEMBL::DBSQL::BaseAdaptor
Synopsis
Give standard usage here
Description
Describe the object here
Methods
fetch_by_synteny_region_id
No description
Code
store
No description
Code
Methods description
None available.
Methods code
fetch_by_synteny_region_iddescriptionprevnextTop
sub fetch_by_synteny_region_id {
  my ($self, $synteny_region_id) = @_;
  
  if( !defined $synteny_region_id ) {
    throw("fetch_by_synteny_region_id with no synteny_region_id!");
  }
#  print "synteny_region_id : $synteny_region_id\n";
my $sth = $self->prepare("select synteny_region_id, dnafrag_id, dnafrag_start, dnafrag_end, dnafrag_strand from dnafrag_region where synteny_region_id = $synteny_region_id"); $sth->execute; my ($dnafrag_id, $dnafrag_start, $dnafrag_end, $dnafrag_strand); $sth->bind_columns(\$synteny_region_id,\$ dnafrag_id,\$ dnafrag_start,\$ dnafrag_end,\$ dnafrag_strand); my $dfrs; while ($sth->fetch()) { my $dfr = new Bio::EnsEMBL::Compara::DnaFragRegion; $dfr->synteny_region_id($synteny_region_id); $dfr->dnafrag_id($dnafrag_id); $dfr->dnafrag_start($dnafrag_start); $dfr->dnafrag_end($dnafrag_end); $dfr->dnafrag_strand($dnafrag_strand); $dfr->adaptor($self); push @{$dfrs}, $dfr; } return $dfrs;
}
storedescriptionprevnextTop
sub store {
   my ($self,$dfr) = @_;

   if( !ref $dfr || !$dfr->isa("Bio::EnsEMBL::Compara::DnaFragRegion") ) {
       throw("$dfr is not a DnaFragRegion object");
   }

   my $sth = $self->prepare("insert into dnafrag_region (synteny_region_id, dnafrag_id, dnafrag_start, dnafrag_end, dnafrag_strand) VALUES (?,?,?,?,?)");
   
   $sth->execute($dfr->synteny_region_id, $dfr->dnafrag_id, $dfr->dnafrag_start, $dfr->dnafrag_end, $dfr->dnafrag_strand);
   $dfr->adaptor($self);
   
   return 1;
}

1;
}
General documentation
CONTACTTop
Ensembl - ensembl-dev@ebi.ac.uk
APPENDIXTop
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _