Commit d7d9bdac authored by Andy Yates's avatar Andy Yates
Browse files

Classificaiton was not working as expected

parent dbeed8a3
......@@ -262,8 +262,9 @@ sub get_genebuild {
sub get_classification {
my ($self) = @_;
my $classification = $self->list_value_by_key('species.classification');
splice(@{$classification}, 0, 2); # remove the sapiens, Homo from the backing array
return $classification;
my $copy = [@{$classification}];
splice(@{$copy}, 0, 1); # remove the Homo sapiens
return $copy;
}
......
......@@ -63,6 +63,12 @@ $mc->store_key_value('species.division',$divname);
$div = $mc->get_division();
ok($div eq $divname);
#
# classification
#
my $classification = [ qw/Hominidae Catarrhini Primates Eutheria Mammalia Vertebrata Chordata Metazoa Eukaryota/ ];
is_deeply($mc->get_classification(), $classification, 'Checking classification as expected');
#
# Testing get_Species()
#
......
......@@ -9,6 +9,7 @@
27 1 species.classification Hominidae
34 1 species.classification Metazoa
35 1 species.classification Eukaryota
26 1 species.classification Homo sapiens
36 1 species.common_name Human
70 1 species.scientific_name Homo sapiens
3 1 species.taxonomy_id 9606
......
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