c85802ccef6bba0d6159c20950a01094e817c56c angie Thu Dec 15 11:15:23 2016 -0800 Add env var UDC_CACHEDIR to override hg.conf udc.cacheDir for command-line use of CGI. Add -udcCache option to vai.pl using UDC_CACHEDIR. refs #12216 note-32 diff --git src/hg/utils/vai.pl src/hg/utils/vai.pl index a7ffece..e5cd4cd 100755 --- src/hg/utils/vai.pl +++ src/hg/utils/vai.pl @@ -7,37 +7,39 @@ # See README in this or parent directory for licensing information. use Cwd; use File::Basename; use Getopt::Long; use warnings; use strict; # Constants my $doQueryParam = "hgva_startQuery"; # Command line option variables with default values my $hgVai = '/usr/local/apache/cgi-bin/hgVai'; my $position = ''; my $rsId = 0; +my $udcCache; my $debug = ''; # GetOpt option configuration for options that don't directly map to hgva_... CGI params, # and references to the corresponding global variables or handlers: my %optionConfig = ('hgVai=s' => \$hgVai, 'position=s' => \$position, 'rsId' => \$rsId, + 'udcCache' => \$udcCache, 'dry-run|n|debug' => \$debug, 'help|h' => sub { usage(0) }, ); # Command line options that map directly to hgva_... CGI params, with their default values # and descriptions my %paramOptions = ( geneTrack => ['refGene', '=track', 'Genome Browser track with transcript predictions'], variantLimit => [10000, '=N', 'Maximum number of variants to process'], ); # CGI params and values to be passed to hgVai are collected here: my %hgVaiParams = ( $doQueryParam => 'go', @@ -55,30 +57,32 @@ add functional effect predictions (e.g. does the variant fall within a regulatory region or part of a gene) and other data relevant to function. input.(...) must be a file or URL containing either variants formatted as VCF or pgSnp, or a sequence of dbSNP rs# IDs, optionally compressed by gzip. Output is printed to stdout. options: --hgVai=/path/to/hgVai Path to hgVai executable (default: $hgVai) --position=chrX:N-M Sequence name, start and end of range to query (default: genome-wide query) --rsId Attempt to match dbSNP rs# ID with variant position at the expense of performance. (default: don't attempt to match dbSNP rs# ID) + --udcCache=/path/to/udcCache Path to udc cache, overriding hg.conf setting + (default: use value in hg.conf file) EOF ; foreach my $param (sort keys %paramOptions) { my ($default, $optArg, $desc) = @{$paramOptions{$param}}; print STDERR sprintf(" --%-29s $desc\n%34s(default: $default)\n", $param . $optArg, ''); } print STDERR <