Bio::EnsEMBL::DBSQL ProxySNPAdaptor
SummaryIncluded librariesPackage variablesSynopsisGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::EnsEMBL::DBSQL::ProxySNPAdaptor
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::DBSQL::BaseAdaptor
Bio::EnsEMBL::Utils::Exception qw ( throw )
Inherit
Bio::EnsEMBL::DBSQL::BaseAdaptor
Synopsis
Designed as an abstraction over the database specific SNPAdaptors. This
is written right now to serve as a replacement for a core SNPadaptor
which doesn''t even exist yet and probably never will since SNPs are
taken from external databases. In the future some sort of DBRegistry may
remove the need for this class.
Description
No description!
Methods
AUTOLOADDescriptionCode
DESTROY
No description
Code
fetch_attributes_onlyDescriptionCode
Methods description
AUTOLOADcode    nextTop
  Arg [1]    : list of arbitrary values @args
a list of arguments to pass to the request method
Example : -
Description: AUTOLOAD method should not be called directly. It is called
implicitly when a method requested from this class cannot be
found. This method first tries to execute the requested method
in the primary adaptor. If the method cannot be found then
it searches the other attached databases for equivalent adaptors
and tries then one at a time.
Returntype : arbitrary
Exceptions : thrown if the requested method cannot be found on the primary
adaptor or on any of the attached databases.
Caller : called implicitly by perl
fetch_attributes_onlycodeprevnextTop
  Arg [1]    : int refsnp_id
Arg [2] : (optional) string source
Example : none
Description: Retrieves a snp objcet from the SNP database but does not
populate the location information. This is necessary given
the current state of the snp database because location
information has to be retrieved differently for different
species!
Returntype : Bio::EnsEMBL::SNP
Exceptions : none
Caller : snpview
Methods code
AUTOLOADdescriptionprevnextTop
sub AUTOLOAD {
  my ($self, @args) =  @_;
  
  #determine the method which was called
my $method = $AUTOLOAD; #strip out fully qualified method name
$method =~ s/.*:://; my $lite_db = Bio::EnsEMBL::Registry->get_db($self->db(),'lite'); my $snp_db = Bio::EnsEMBL::Registry->get_db($self->db(),'SNP'); if( defined $lite_db ) { my $snp_adaptor = $lite_db->get_SNPAdaptor(); if($snp_adaptor->can($method)) { return $snp_adaptor->$method(@args); } } if( defined $snp_db ) { my $snp_adaptor = $snp_db->get_SNPAdaptor(); if($snp_adaptor->can($method)) { return $snp_adaptor->$method(@args); } } throw("The requested method $method could not be found in lite or snp" );
}
DESTROYdescriptionprevnextTop
sub DESTROY {
}

1;

__END__
}
fetch_attributes_onlydescriptionprevnextTop
sub fetch_attributes_only {
    my ( $self, @args ) = @_;

  my $lite_db = Bio::EnsEMBL::Registry->get_db($self->db(),'lite');
  my $snp_db = Bio::EnsEMBL::Registry->get_db($self->db(),'SNP');

  if( defined $snp_db ) {
      my $snp_adaptor = $snp_db->get_SNPAdaptor();
      return $snp_adaptor->fetch_attributes_only( @args );
  }

  if( defined $lite_db ) {
      my $snp_adaptor = $lite_db->get_SNPAdaptor();
      return $snp_adaptor->fetch_attributes_only( @args );
  }
}
General documentation
LICENSETop
  Copyright (c) 1999-2009 The European Bioinformatics Institute and
Genome Research Limited. All rights reserved.
This software is distributed under a modified Apache license. For license details, please see /info/about/code_licence.html
CONTACTTop
  Please email comments or questions to the public Ensembl
developers list at <ensembl-dev@ebi.ac.uk>.
Questions may also be sent to the Ensembl help desk at <helpdesk@ensembl.org>.