Skip to content
Snippets Groups Projects
Commit 5d8c0336 authored by Kieron Taylor's avatar Kieron Taylor :angry:
Browse files

Introduced a new method to supply a proper DBAdaptor for when we're not...

Introduced a new method to supply a proper DBAdaptor for when we're not writing raw SQL copies everywhere.
parent d6747b12
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@ package XrefMapper::db;
use vars '@ISA';
use Bio::EnsEMBL::DBSQL::DBConnection;
use Bio::EnsEMBL::DBSQL::DBAdaptor;
use Cwd;
sub new{
......@@ -10,7 +11,7 @@ sub new{
my $self ={};
bless $self,$class;
$self->dbc(new Bio::EnsEMBL::DBSQL::DBConnection(@args));
$self->dbc(new Bio::EnsEMBL::DBSQL::DBConnection(@args));
return $self;
}
......@@ -39,6 +40,12 @@ sub dbc{
return $self->{_dbc};
}
sub dba {
my $self = shift;
my $dbc = $self->dbc;
return Bio::EnsEMBL::DBSQL::DBAdaptor->new(-dbc => $dbc, -species => $self->species);
}
=head2 dir
Arg [1] : (optional) string $arg
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment