4a1540ff08c68fd435e71eeefe579e368ad8211a angie Wed Dec 14 14:51:15 2016 -0800 Doh, an early extra close() on a filehandle... refs #12216 note-27 diff --git src/hg/utils/vai.pl src/hg/utils/vai.pl index cc83e85..d6fef54 100755 --- src/hg/utils/vai.pl +++ src/hg/utils/vai.pl @@ -171,31 +171,30 @@ # If input begins with # header lines, collect those into a header string. # Once we get to the first line of data, see if it looks like rsIds. # If it does, set rsId input parameters. If not, complain and abort. # or none of the above (in which case, complain and abort). my ($inputFile) = @_; my $header; my $type; open(my $inFh, $inputFile) || die "Can't open inputFile '$inputFile': $!\n"; my $firstLine = <$inFh>; chomp $firstLine; chomp $firstLine; while (defined $firstLine && ($firstLine =~ /^\s*#/ || $firstLine =~ /^\s*$/)) { $header .= "$firstLine\n"; $firstLine = <$inFh>; chomp $firstLine; chomp $firstLine; } - close($inFh); if (looksLikeRsIds($firstLine)) { $hgVaiParams{hgva_variantIds} = rsIdStringFromInput($inFh, $firstLine); $hgVaiParams{hgva_variantTrack} = 'hgva_useVariantIds'; } else { print STDERR "Unrecognized input format: please provide input file(s) formatted as\n" . "VCF, pgSnp or text with one dbSnp rsNNNN ID per line.\n"; usage(-1); } close($inFh); } # autodetectRsId sub runHgVai(@) { my ($command) = @_; my $origDir = getcwd;