Commit 6f0f8eb6 authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

In get_alias(): Prompt user to investigate API version and DB version in

warning if species alias is not found.

In get_DBAdaptor(): Thow exception if species alias not found (excactly
as in get_adaptor()).
parent 10c7f799
......@@ -573,11 +573,18 @@ sub add_DBAdaptor {
sub get_DBAdaptor {
my ( $class, $species, $group, $no_alias_check ) = @_;
throw 'Species not defined.' if !defined $species;
#if ( !defined($no_alias_check) or !$no_alias_check ) {
$species = $class->get_alias( $species, $no_alias_check ) || $species;
#}
if ( !defined($species) ) {
throw('Species not defined.');
}
my $ispecies = $class->get_alias( $species, $no_alias_check );
if ( !defined($ispecies) ) {
throw("Can not find internal name for species '$species'");
}
else { $species = $ispecies }
return $registry_register{_SPECIES}{$species}{ lc($group) }{'_DB'};
}
......@@ -1143,7 +1150,8 @@ sub get_alias {
( !defined( $registry_register{_ALIAS}{ lc($key) } ) ) )
{
if ( ( !defined($no_warn) ) or ( !$no_warn ) ) {
warn "$key is not a valid species name for this instance\n";
warning( "$key is not a valid species name " .
"(check DB and API version)" );
}
return;
}
......
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