src/hg/encode/encodeValidate/doEncodeValidate.pl 1.203
1.203 2009/11/30 23:31:02 larrym
make -database required if they are using -validateFile; remove "NULL"
Index: src/hg/encode/encodeValidate/doEncodeValidate.pl
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/encode/encodeValidate/doEncodeValidate.pl,v
retrieving revision 1.202
retrieving revision 1.203
diff -b -B -U 4 -r1.202 -r1.203
--- src/hg/encode/encodeValidate/doEncodeValidate.pl 30 Nov 2009 23:13:40 -0000 1.202
+++ src/hg/encode/encodeValidate/doEncodeValidate.pl 30 Nov 2009 23:31:02 -0000 1.203
@@ -72,9 +72,9 @@
our $maxBedRows=80_000_000; # number of rows to allow in a bed-type file
our %tableNamesUsed;
our ($grants, $fields, $daf);
our $SORT_BUF = " -S 5G ";
-our $assembly = NULL;
+our $assembly;
sub usage {
print STDERR <<END;
usage: encodeValidate.pl submission-type project-submission-dir
@@ -88,10 +88,9 @@
options:
-allowReloads Allow reloads of existing tables
-configDir=dir Path of configuration directory, containing
metadata .ra files (default: submission-dir/../config)
- -database=assembly Use an assembly other than the default ($assembly); necessary only
- when using -validateFile
+ -database=assembly Specify an assembly; necessary only when using -validateFile
-fileType=type used only with validateFile option; e.g. narrowPeak
-justFileDb Just generate the fileDb.ra file which contains all metadata
-metaDataOnly Process DAF/DDF and just update the projects.metadata field;
equal to -allowReloads -skipAll
@@ -1226,9 +1225,15 @@
my $submitDir = $ARGV[1];
$ENV{TMPDIR} = $Encode::tempDir;
-if($opt_validateFile && $opt_fileType) {
+if($opt_validateFile) {
+ if(!$opt_fileType) {
+ die "Error: -fileType argument is required when using -validateFile\n";
+ }
+ if(!$assembly) {
+ die "Error: -database argument is required when using -validateFile\n";
+ }
my $db = HgDb->new(DB => $assembly);
$db->getChromInfo(\%chromInfo);
if(my @errors = checkDataFormat($opt_fileType, $submitDir)) {
die "Invalid file: " . join(", ", @errors) . "\n";