Skip to content
Snippets Groups Projects
Commit d5ece2ba authored by Andy Yates's avatar Andy Yates
Browse files

Support the attachement of DNADBs

parent 9f287e73
No related branches found
No related tags found
No related merge requests found
......@@ -135,8 +135,8 @@ for my $db_args ( @{ $cli_helper->get_dba_args_for_opts($opts) } ) {
$other_dbname =~ s/$1/core/;
$opts->{dbname} = $other_dbname;
#for vega databases, add the core as the dna database
my $core_db = Bio::EnsEMBL::DBSQL::DBAdaptor->new( %{$db_args} );
#for vega and otherfeatures databases, add the core as the dna database
my $core_db = Bio::EnsEMBL::DBSQL::DBAdaptor->new( %{$db_args}, -DBNAME => $other_dbname, -GROUP => 'core' );
$dba->dnadb($core_db);
}
......
......@@ -191,6 +191,9 @@ sub get_dba_args_for_opts {
}
for my $dbname (@dbnames) {
#Decipher group of DBAdaptor by capturing the name_name(_name?)_core_ code. Otherwise we don't know
my ($group) = $dbname =~ /^[a-z]+_[a-z0-9]+(?:_[a-z0-9]+)?_([a-z]+)(?:_\d+)?_\d+/;
my $multi = 0;
my $species_ids = [ [ 1, undef ] ];
if ( !$single_species ) {
......@@ -208,7 +211,7 @@ sub get_dba_args_for_opts {
}
}
for my $species_id ( @{$species_ids} ) {
push @db_args, {
my $args = {
-HOST => $opts->{$host},
-USER => $opts->{$user},
-PORT => $opts->{$port},
......@@ -218,6 +221,8 @@ sub get_dba_args_for_opts {
-SPECIES_ID => $species_id->[0],
-SPECIES => $species_id->[1],
-MULTISPECIES_DB => $multi };
$args->{-GROUP} = $group if $group;
push(@db_args, $args);
}
}
} ## end if ( defined $opts->{$host...})
......
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