Skip to content
Snippets Groups Projects
Commit bf762334 authored by Simon Brent's avatar Simon Brent
Browse files

merging changes from branch-ensembl-63

parent 531b4a97
No related branches found
No related tags found
No related merge requests found
......@@ -65,6 +65,8 @@ use Cwd qw(abs_path);
use DBI;
use Data::Dumper;
my $species_c = 1; #counter to be used for each database connection made
=head2 new
Arg[1] : String $serverroot - root directory of your ensembl sandbox
......@@ -722,13 +724,15 @@ sub get_database {
throw("Unknown database: $database") unless $adaptors{$database};
$self->dynamic_use($adaptors{$database});
my $species = 'species' . $species_c;
my $dba = $adaptors{$database}->new(
-host => $self->param("${prefix}host"),
-port => $self->param("${prefix}port"),
-user => $self->param("${prefix}user"),
-pass => $self->param("${prefix}pass") || '',
-dbname => $self->param("${prefix}dbname"),
-group => $database,
-host => $self->param("${prefix}host"),
-port => $self->param("${prefix}port"),
-user => $self->param("${prefix}user"),
-pass => $self->param("${prefix}pass") || '',
-dbname => $self->param("${prefix}dbname"),
-group => $database,
-species => $species,
);
#can use this approach to get dna from another db
# my $dna_db = $adaptors{$database}->new(
......@@ -744,6 +748,8 @@ sub get_database {
# a group 'core' for this now
$dba->dnadb($dba);
$species_c++;
$self->{'_dba'}->{$database} = $dba;
$self->{'_dba'}->{'default'} = $dba unless $self->{'_dba'}->{'default'};
return $self->{'_dba'}->{$database};
......
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