Skip to content

Commit

Permalink
Merge branch 'postreleasefix/107' into release/107
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomscoelho committed Jul 1, 2022
2 parents 5253c54 + d5bb845 commit 736eef3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/Bio/EnsEMBL/VEP/Stats.pm
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,13 @@ sub sort_keys {
# sort data
if(defined($sort)) {
if($sort eq 'chr') {
@keys = sort {($a !~ /^\d+$/ || $b !~ /^\d+/ || $a =~ /^\d\w/ || $b =~ /^\d\w/ ) ? $a cmp $b : $a <=> $b} keys %{$data};
@keys = sort {
(my $aterm = $a) =~ s/chr//;
(my $bterm = $b) =~ s/chr//;
$aterm = ord($aterm) unless $aterm =~ /^\d+$/;
$bterm = ord($bterm) unless $bterm =~ /^\d+$/;
return $aterm <=> $bterm;
} keys %{$data};
}
elsif($sort eq 'value') {
@keys = sort {$data->{$a} <=> $data->{$b}} keys %{$data};
Expand Down

0 comments on commit 736eef3

Please sign in to comment.