Skip to content
Snippets Groups Projects
Commit e4669487 authored by Dan Bolser's avatar Dan Bolser
Browse files

nasty way to make versions unique

could be done better I'm sure
parent 23cd518b
No related branches found
No related tags found
2 merge requests!117nasty way to make versions unique,!117nasty way to make versions unique
......@@ -160,7 +160,18 @@ sub run_on_dba {
sub get_liftover_mappings {
my ($core_dba) = @_;
my $mappings = $core_dba->get_MetaContainer()->list_value_by_key('liftover.mapping');
return [ map { $_ =~ /.+:(.+)#.+:(.+)/; [$1, $2] } @{$mappings} ];
my %unique_mappings;
for (@$mappings){
die "Can't parse mapping string for coord system version '$_'!\n"
unless /.+:(.+)#.+:(.+)/;
my $version_1 = $1;
my $version_2 = $2;
$unique_mappings{$version_1. ":". $version_2}++;
}
my @unique_mappings;
push @unique_mappings, [split(/:/, $_)]
for keys %unique_mappings;
return \@unique_mappings;
}
sub write_mappings {
......
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