Commit 2df0380a authored by Ian Longden's avatar Ian Longden
Browse files

valid species suffix check

parent 6d2f7533
......@@ -2005,17 +2005,23 @@ sub find_and_add_aliases {
my ( $adaptor, $group, $dbh, $species_suffix ) =
rearrange( [ 'ADAPTOR', 'GROUP', 'HANDLE', 'SPECIES_SUFFIX' ], @_ );
my @dbas;
if ( defined($adaptor) ) {
@dbas = ($adaptor);
}
elsif(defined($dbh)){
my @full = @{ $class->get_all_DBAdaptors( '-GROUP' => $group ) };
foreach my $db (@full){
if($db->species =~ /$species_suffix/){
push @dbas, $db;
if(length($species_suffix) > 0){
my @full = @{ $class->get_all_DBAdaptors( '-GROUP' => $group ) };
foreach my $db (@full){
if($db->species =~ /$species_suffix/){
push @dbas, $db;
}
}
}
else{
@dbas = @{ $class->get_all_DBAdaptors( '-GROUP' => $group ) };
}
}
else {
@dbas = @{ $class->get_all_DBAdaptors( '-GROUP' => $group ) };
......
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