Bio::EnsEMBL::DBSQL
ProxySNPAdaptor
Toolbar
Summary
Bio::EnsEMBL::DBSQL::ProxySNPAdaptor
Package variables
No package variables defined.
Included modules
Inherit
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
Methods description
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 |
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
sub AUTOLOAD
{ my ($self, @args) = @_;
my $method = $AUTOLOAD;
$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" ); } |
sub DESTROY
{}
1;
__END__ } |
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
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