From 40663f1e1a95467ab1900a338ccf1d00e3720d5b Mon Sep 17 00:00:00 2001 From: Andrew Yates <ayates@ebi.ac.uk> Date: Mon, 14 May 2012 16:41:36 +0000 Subject: [PATCH] More warnings when we fail to load DBs & the VERBOSE flag is on --- modules/Bio/EnsEMBL/Registry.pm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/modules/Bio/EnsEMBL/Registry.pm b/modules/Bio/EnsEMBL/Registry.pm index 9a05d99cd4..26d37dbdcc 100644 --- a/modules/Bio/EnsEMBL/Registry.pm +++ b/modules/Bio/EnsEMBL/Registry.pm @@ -1656,6 +1656,7 @@ sub load_registry_from_db { } # Register Core like databases + my $core_like_dbs_found = 0; foreach my $type (qw(core cdna vega vega_update otherfeatures rnaseq)) { my @dbs = grep { /^[a-z]+_[a-z0-9]+(?:_[a-z0-9]+)? # species name @@ -1667,6 +1668,10 @@ sub load_registry_from_db { _ /x } @dbnames; + if(@dbs) { + $core_like_dbs_found = 1; + } + foreach my $database (@dbs) { if ( index( $database, 'collection' ) != -1 ) { # Skip multi-species databases. @@ -1685,7 +1690,7 @@ sub load_registry_from_db { /x ); if(!defined($species)){ - warn "for $database cannot get species??\n"; + warn "Cannot extract species name from database '$database'"; } my $dba = @@ -1745,6 +1750,9 @@ sub load_registry_from_db { } } ## end foreach my $multidb (@multi_dbs) + if(!$core_like_dbs_found && $verbose) { + print("No core-like databases found. Check your DB_VERSION (used '$software_version')\n"); + } # User upload DBs @@ -1825,6 +1833,10 @@ sub load_registry_from_db { my @variation_dbs = grep { /^[a-z]+_[a-z0-9]+(?:_[a-z0-9]+)?_variation_(?:\d+_)?\d+_/ } @dbnames; + if(! @variation_dbs && $verbose) { + print("No variation databases found\n"); + } + for my $variation_db (@variation_dbs) { if ( index( $variation_db, 'collection' ) != -1 ) { @@ -1901,6 +1913,10 @@ sub load_registry_from_db { } else { my @funcgen_dbs = grep { /^[a-z]+_[a-z0-9]+(?:_[a-z0-9]+)?_funcgen_(?:\d+_)?\d+_/ } @dbnames; + + if(! @funcgen_dbs && $verbose) { + print("No funcgen databases found\n"); + } for my $funcgen_db (@funcgen_dbs) { if ( index( $funcgen_db, 'collection' ) != -1 ) { -- GitLab