Skip to content

Commit

Permalink
Updated to only compare the number of species.alias entrys.
Browse files Browse the repository at this point in the history
  • Loading branch information
dpopleton committed Mar 27, 2023
1 parent ec9e4ab commit e9c1076
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/Bio/EnsEMBL/DataCheck/Checks/CompareSpeciesAlias.pm
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ use constant {
};

sub skip_tests {
my ($self) = @_;
my $old_dba = $self->get_old_dba();
if (not defined $old_dba) {
return (1, 'New database');
Expand All @@ -46,18 +47,16 @@ sub skip_tests {


sub tests {
my ($self) = @_;
my $old_dba = $self->get_old_dba();
my $mca = $self->dba->get_adaptor('MetaContainer');
my $old_mca = $old_dba->get_adaptor('MetaContainer');

my @new_alias = $mca->list_value_by_key('species.alias');
my @old_alias = $old_mca->list_value_by_key('species.alias');

my %new_aliases = map { $_ => 1 } @new_alias;

for my $element (@old_alias) {
ok(exists($new_aliases{$element}), 'Old species.alias is found in new database');
}
my $description = 'Number of species.aliases did not decrease';
ok($#old_alias <= $#new_alias, $description );

}

Expand Down

0 comments on commit e9c1076

Please sign in to comment.