Skip to content

Commit

Permalink
sort new reference sequences in refSeqs.json by name. closes #187
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuels committed Jan 17, 2013
1 parent 3129e16 commit 08f693e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
6 changes: 2 additions & 4 deletions src/perl5/Bio/JBrowse/Cmd/FormatSequences.pm
Expand Up @@ -197,10 +197,8 @@ sub run {
$old->[$i] = delete $refs{$old->[$i]->{name}};
}
}
foreach my $newRef (values %refSeqs) {
if( $refs{$newRef->{name}} ) {
push @{$old}, $newRef;
}
foreach my $name (sort keys %refs) {
push @{$old}, $refs{$name};
}
return $old;
});
Expand Down
12 changes: 6 additions & 6 deletions tests/data/volvox_formatted_refseqs/seq/refSeqs.json
@@ -1,16 +1,16 @@
[
{
"length" : 6079,
"name" : "ctgB",
"length" : 50001,
"name" : "ctgA",
"seqChunkSize" : 20000,
"end" : 6079,
"end" : 50001,
"start" : 0
},
{
"length" : 50001,
"name" : "ctgA",
"length" : 6079,
"name" : "ctgB",
"seqChunkSize" : 20000,
"end" : 50001,
"end" : 6079,
"start" : 0
}
]

0 comments on commit 08f693e

Please sign in to comment.