src/hg/encode/encodeValidate/doEncodeValidate.pl 1.228

1.228 2010/05/28 19:43:41 krish
fixed bug where BAM validator was breaking the cell CV term validator
Index: src/hg/encode/encodeValidate/doEncodeValidate.pl
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/encode/encodeValidate/doEncodeValidate.pl,v
retrieving revision 1.227
retrieving revision 1.228
diff -b -B -U 4 -r1.227 -r1.228
--- src/hg/encode/encodeValidate/doEncodeValidate.pl	26 May 2010 18:25:20 -0000	1.227
+++ src/hg/encode/encodeValidate/doEncodeValidate.pl	28 May 2010 19:43:41 -0000	1.228
@@ -763,8 +763,13 @@
     my ($path, $file, $type, $cell) = @_;
     doTime("beginning validateBam") if $opt_timing;
     HgAutomate::verbose(2, "validateBam($path,$file,$type)\n");
     my $paramList = validationSettings("validateFiles","bam");
+    if (not defined $terms{'Cell Line'}->{$cell}) {
+	print STDERR "ERROR: controlled Vocabulary \'Cell Line\' value \'$cell\' is not known\n";
+	# don't show end-user pipe error(s)
+	return ("Controlled Vocabulary \'Cell Line\' value \'$cell\' is not known");
+    }
     my $sex = $terms{'Cell Line'}->{$cell}->{'sex'};
     my $downloadDir = "/hive/groups/encode/dcc/pipeline/downloads/$assembly/referenceSequences";
     my $infoFile =  "$downloadDir/female.$assembly.chrom.sizes";
     my $twoBitFile =  "$downloadDir/female.$assembly.2bit";