Skip to content

Commit

Permalink
added --trackLabel and --key options to prepare-refseqs.pl
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuels committed Feb 7, 2013
1 parent 0115e09 commit c5dc091
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
9 changes: 9 additions & 0 deletions bin/prepare-refseqs.pl
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ =head1 OPTIONS
of the new (more scalable) /seq/hash/hash/hash/$seqname-$chunk.txt
structure.
=item --trackLabel <label>
The unique name of the sequence track, default 'DNA'.
=item --key <string>
The displayed name of the sequence track, defaults to the value of
C<--trackLabel>.
=back
=head1 AUTHOR
Expand Down
4 changes: 4 additions & 0 deletions release-notes.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{{$NEXT}}

* Added support for `--trackLabel` and `--key` options to
`prepare-refseqs.pl`, allowing users to specify the sequence
track's label and title.

1.8.0 2013-01-31 14:05:27 America/New_York

* Added new "File -> Open" function that can display BAM, BigWig, and
Expand Down
9 changes: 6 additions & 3 deletions src/perl5/Bio/JBrowse/Cmd/FormatSequences.pm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ use FastaDatabase;

sub option_defaults {(
out => 'data',
chunksize => 20_000
chunksize => 20_000,
trackLabel => 'DNA'
)}

sub option_definitions {(
Expand All @@ -37,6 +38,8 @@ sub option_definitions {(
"refs=s",
"refids=s",
"compress",
"trackLabel=s",
"key=s",
"help|h|?",
"nohash"
)}
Expand Down Expand Up @@ -246,7 +249,7 @@ sub writeTrackEntry {

my $compress = $self->opt('compress');

my $seqTrackName = "DNA";
my $seqTrackName = $self->opt('trackLabel');
unless( $self->opt('noseq') ) {
$self->{storage}->modify( 'trackList.json',
sub {
Expand All @@ -268,7 +271,7 @@ sub writeTrackEntry {
$tracks->[$i] =
{
'label' => $seqTrackName,
'key' => $seqTrackName,
'key' => $self->opt('key') || $seqTrackName,
'type' => "SequenceTrack",
'chunkSize' => $self->{chunkSize},
'urlTemplate' => $self->seqUrlTemplate,
Expand Down

0 comments on commit c5dc091

Please sign in to comment.