0239643d97af85334bfeb84c9e9732c19ae6682f
angie
  Thu Dec 15 10:40:53 2016 -0800
Oops, an overly restrictive regex was preventing vai.pl from accepting --position=chrX (without the range).  refs #12216 note-20

diff --git src/hg/utils/vai.pl src/hg/utils/vai.pl
index 7e9e67f..a7ffece 100755
--- src/hg/utils/vai.pl
+++ src/hg/utils/vai.pl
@@ -93,31 +93,31 @@
   # Parse command line options and make sure $db and $inputFile are given; return $db and $inputFile
   foreach my $param (keys %paramOptions) {
     $optionConfig{"$param=s"} = \&setParam;
   }
 
   my $ok = GetOptions(%optionConfig);
   if (! $ok) {
     usage(-1);
   }
 
   if ($position) {
     # Strip commas and whitespace from position; abort if it doesn't look like a position.
     my $trimmedPos = $position;
     $trimmedPos =~ s/,//g;
     $trimmedPos =~ s/\s//g;
-    if ($trimmedPos =~ /^[^:]+:\d+-\d+$/) {
+    if ($trimmedPos =~ /^[^:]+(:\d+-\d+)?$/) {
       $position = $trimmedPos;
     } else {
       print STDERR "position argument should be like chrX:N-M (sequence name, colon,\n" .
         "starting base offset, ending base offset), not '$position'\n";
       usage(-1);
     }
   }
 
   my $db = shift @ARGV;
   if (! $db) {
     print STDERR "Missing first argument db.";
     usage(-1);
   }
   if ($db !~ /^\w+$/) {
     print STDERR "First argument must be a database identifier.\n";