From a4f9f3009cbc6167713f80767a09fca8167aa76e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Kusalananda=20K=C3=A4h=C3=A4ri?= <ak4@sanger.ac.uk> Date: Fri, 4 Dec 2009 11:43:03 +0000 Subject: [PATCH] Patch to get_species_and_object_type(): If a database adaptor does not have a corresponding 'species.stable_id_prefix' meta key it should not be skipped completely. Solves a problem with Eugene's yeast database. --- modules/Bio/EnsEMBL/Registry.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/Bio/EnsEMBL/Registry.pm b/modules/Bio/EnsEMBL/Registry.pm index e53d2e5ba7..41a84f7208 100644 --- a/modules/Bio/EnsEMBL/Registry.pm +++ b/modules/Bio/EnsEMBL/Registry.pm @@ -2428,8 +2428,13 @@ sub get_species_and_object_type { my $species = $dba->species(); + my $fetched_something = 0; + while ( $sth->fetch() ) { + $fetched_something = 1; + my $standard_prefix = 0; + foreach my $allowed_prefix (@allowed_prefixes) { if ( substr( $prefix, 0, length($allowed_prefix) ) eq @@ -2453,6 +2458,12 @@ sub get_species_and_object_type { } + if ( !$fetched_something ) { + # This database didn't have a matching + # 'species.stable_id_prefix' key in its meta table. + push( @nonstandard_prefix_species, $species ); + } + } ## end foreach my $dba ( @{ $self->get_all_DBAdaptors...}) } ## end if ( !%stable_id_prefix) -- GitLab