Skip to content

Commit

Permalink
added --tracks option to generate-names.pl, updated release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuels committed Oct 9, 2012
1 parent 1f3e663 commit 78c171d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
12 changes: 11 additions & 1 deletion bin/generate-names.pl
Expand Up @@ -19,6 +19,11 @@ =head1 OPTIONS
Data directory to process. Default 'data/'.
=item --tracks <trackname>[,...]
Comma-separated list of which tracks to include in the names index. If
not passed, all tracks are indexed.
=item --thresh <threshold>
Optional LazyPatricia chunking threshold. Default 200. See
Expand Down Expand Up @@ -59,6 +64,7 @@ =head1 OPTIONS
$Data::Dumper::Indent = 1;

my %trackHash;
my @includedTrackNames;
my @tracksWithNames;

my $outDir = "data";
Expand All @@ -68,8 +74,11 @@ =head1 OPTIONS
GetOptions("dir|out=s" => \$outDir,
"thresh=i" => \$thresh,
"verbose+" => \$verbose,
'tracks=s' => \@includedTrackNames,
"help|h|?" => \$help) or pod2usage();

my %includedTrackNames = map { $_ => 1 } @includedTrackNames;

pod2usage( -verbose => 2 ) if $help;

unless (-d $outDir) {
Expand All @@ -86,7 +95,8 @@ =head1 OPTIONS
mkdir($nameDir) unless (-d $nameDir);

my @refSeqs = @{ $gdb->refSeqs };
my @tracks = @{ $gdb->trackList };
my @tracks = grep { !%includedTrackNames || $includedTrackNames{ $_->{label} } }
@{ $gdb->trackList };

# open the root file; we lock this file while we're
# reading the name lists, deleting all the old lazy-*
Expand Down
6 changes: 6 additions & 0 deletions release-notes.txt
@@ -1,5 +1,11 @@
{{$NEXT}}

* Added a `--tracks` option to `generate-names.pl` that allows users
to manually specify which tracks will be indexed to enable
autocompletion and searching for their feature names in the JBrowse
location box. Thanks to Steffi Geisen for her ongoing help in
enhancing the scalability of name indexing.

* Fixed off-by-one error in Wiggle track display code: wiggle data
was incorrectly displayed shifted one base to the left of its
proper position. Thanks to Steffi Geisen for noticing this.
Expand Down
7 changes: 7 additions & 0 deletions tests/perl_tests/generate-names.pl.t
Expand Up @@ -16,4 +16,11 @@ system $^X, 'bin/generate-names.pl', (
);
ok( ! $?, 'generate-names.pl also ran ok on volvox test data' );


system $^X, 'bin/generate-names.pl', (
'--out' => "$tempdir",
'--tracks' => 'ExampleFeatures,NameTest'
);
ok( ! $?, 'generate-names.pl also ran ok with the --tracks option' );

done_testing;

0 comments on commit 78c171d

Please sign in to comment.