Commit 2efe4f22 authored by Dan Staines's avatar Dan Staines
Browse files

deal with situation where ensembl_taxonomy API is not available but the database is

parent b89b3719
......@@ -2312,9 +2312,14 @@ sub load_registry_from_db {
# Taxonomy
if ( defined $taxonomy_db) {
require Bio::EnsEMBL::Taxonomy::DBSQL::TaxonomyDBAdaptor;
my $dba =
Bio::EnsEMBL::Taxonomy::DBSQL::TaxonomyDBAdaptor->new(
my $has_taxonomy = eval {require Bio::EnsEMBL::Taxonomy::DBSQL::TaxonomyDBAdaptor};
if($@ or (!defined $has_taxonomy)) {
if($verbose) {
print "ensembl_taxonomy API not found - ignoring $taxonomy_db\n";
}
} else {
my $dba = Bio::EnsEMBL::Taxonomy::DBSQL::TaxonomyDBAdaptor->new(
'-species' => 'multi' . $species_suffix,
'-group' => 'taxonomy',
'-host' => $host,
......@@ -2323,9 +2328,10 @@ sub load_registry_from_db {
'-pass' => $pass,
'-dbname' => $taxonomy_db, );
if ($verbose) {
printf( "%s loaded\n", $taxonomy_db );
}
if ($verbose) {
printf( "%s loaded\n", $taxonomy_db );
}
}
}
elsif ($verbose) {
print("No taxonomy database found\n");
......
Markdown is supported
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