Bio::EnsEMBL::ExternalData::SangerSNP
DBAdaptor
Toolbar
Summary
Bio::EnsEMBL::ExternalData::SangerSNP::DBAdaptor -
Database adaptor for a SangerSNP database
Package variables
No package variables defined.
Included modules
Inherit
Synopsis
$db_adaptor = Bio::EnsEMBL::ExternalData::SangerSNP::DBAdaptor->new(
-user => 'root',
-pass => 'secret',
-dbname => 'pog',
-host => 'caldy',
-driver => 'Oracle'
);
$snp_adaptor = $db_adaptor->get_SangerSNPAdaptor;
Description
This object represents a SangerSNP database. Once created you can retrieve object
adaptors that allow you to create objects from data in the SangerSNP database.
It delegates its connection responsibilities to the DBConnection class (no
longer inherited from) and its object adaptor retrieval to the static
Bio::EnsEMBL::Registry.
Methods
Methods description
Example : my %object_adaptors = %{ $dbadaptor->get_available_adaptors }; Description : returns a lookup hash of object adaptors for this DBAdaptor Return type : Hashref Exceptions : none Caller : Bio::EnsEMBL::Utils::ConfigRegistry |
Arg [-DNADB]: (optional) Bio::EnsEMBL::ExternalData::SangerSNP::DBAdaptor DNADB All sequence, assembly, contig information etc, will be retrieved from this database instead. Arg [..] : Other args are passed to Bio::EnsEMBL::ExternalData::SangerSNP::DBConnection Exmaple : $db = new Bio::EnsEMBL::ExternalData::SangerSNP::DBAdaptor( -species => 'Homo_sapiens', -group => 'sangersnp' -user => 'root', -dbname => 'pog', -host => 'caldy', -driver => 'Oracle'); Description: Constructor for DBAdaptor. Returntype : Bio::EnsEMBL::ExternalData::SangerSNP::DBAdaptor Exceptions : none Caller : general |
Methods code
sub get_available_adaptors
{ my %pairs = (
"Variation" => "Bio::EnsEMBL::ExternalData::SangerSNP::VariationAdaptor",
"TranscriptVariation" => "Bio::EnsEMBL::ExternalData::SangerSNP::TranscriptVariationAdaptor",
);
return (\%pairs);
}
1; } |
sub new
{ my($class, @args) = @_;
my $self ={};
bless $self,$class;
$self->dbc(new Bio::EnsEMBL::ExternalData::SangerSNP::DBConnection(@args));
my ($species, $group, $con, $dnadb) =
rearrange([qw(SPECIES GROUP DBCONN DNADB)], @args);
if(defined($con)){
$self->dbc($con);
}
else{
$self->dbc(new Bio::EnsEMBL::ExternalData::SangerSNP::DBConnection(@args));
}
if(defined($species)){
$self->species($species);
}
else{
$self->species("DEFAULT");
}
if(defined($group)){
$self->group($group);
}
$self = Bio::EnsEMBL::Utils::ConfigRegistry::gen_load($self);
if(defined $dnadb) {
$self->dnadb($dnadb);
}
return $self; } |
General documentation
This code is distributed under an Apache style licence:
Please see
/code_licence.html for details