Skip to content
Snippets Groups Projects
Commit dde2bac0 authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

Add support for Ensembl Genomes releases (e.g. "8_61").

parent bf603dae
No related branches found
No related tags found
No related merge requests found
...@@ -139,7 +139,10 @@ my %found_databases; ...@@ -139,7 +139,10 @@ my %found_databases;
} }
{ {
my $statement = 'SELECT full_db_name FROM db_list JOIN db USING (db_id) WHERE db.is_current = 1'; my $statement =
'SELECT full_db_name '
. 'FROM db_list JOIN db USING (db_id) '
. 'WHERE db.is_current = 1';
my $sth = $dbh->prepare($statement); my $sth = $dbh->prepare($statement);
$sth->execute(); $sth->execute();
...@@ -165,7 +168,7 @@ foreach my $server (@servers) { ...@@ -165,7 +168,7 @@ foreach my $server (@servers) {
my $sth = $dbh->prepare($statement); my $sth = $dbh->prepare($statement);
foreach my $species ( keys(%species) ) { foreach my $species ( keys(%species) ) {
$sth->bind_param( 1, sprintf( '%s%%\_%d\_%%', $species, $release ), $sth->bind_param( 1, sprintf( '%s%%\_%s\_%%', $species, $release ),
SQL_VARCHAR ); SQL_VARCHAR );
$sth->execute(); $sth->execute();
...@@ -180,7 +183,7 @@ foreach my $server (@servers) { ...@@ -180,7 +183,7 @@ foreach my $server (@servers) {
} }
my ( $db_type, $db_assembly, $db_suffix ) = ( $database =~ my ( $db_type, $db_assembly, $db_suffix ) = ( $database =~
/^[a-z]+_[a-z]+_([a-z]+)_[0-9]+_([0-9a-z]+?)([a-z]?)$/ ); /^[a-z]+_[a-z]+_([a-z]+)_(?:[0-9]+_)?[0-9]+_([0-9a-z]+?)([a-z]?)$/ );
if ( !defined($db_type) if ( !defined($db_type)
|| !defined($db_assembly) || !defined($db_assembly)
......
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