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

1.217 2010/03/24 03:16:26 kate
1. Special handling of 'None' 2. Table/filename gen uses view and replicate last
Index: src/hg/encode/encodeValidate/doEncodeValidate.pl
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/encode/encodeValidate/doEncodeValidate.pl,v
retrieving revision 1.216
retrieving revision 1.217
diff -b -B -U 4 -r1.216 -r1.217
--- src/hg/encode/encodeValidate/doEncodeValidate.pl	24 Mar 2010 02:50:02 -0000	1.216
+++ src/hg/encode/encodeValidate/doEncodeValidate.pl	24 Mar 2010 03:16:26 -0000	1.217
@@ -1071,8 +1071,9 @@
                     my @pairs = split(';', $key);
                     for my $pair (@pairs) {
                         my ($var, $term) = split('=', $pair);
                         if ($var eq $variable) {
+                            next if ($term eq "None");
                             die "'$term' is not a registered '$cvTypeVar' term\n" unless defined($terms{$cvTypeVar}->{$term}) ;
                             my $tag = $terms{$cvTypeVar}->{$term}->{'tag'};
                             if (!defined($tags{$tag})) {
                                 # suppress dups, requested by Brian
@@ -1081,9 +1082,9 @@
                             }
                         }
                     }
                 }
-                print OUT_FILE $setting . "\n";     # "subGroup2\cellTyle Cell_Line ???\n;
+                print OUT_FILE $setting . "\n";     # "subGroup2\cellType Cell_Line ???\n;
             }
         }
         $setting = $sortOrder . "view=+";
         print OUT_FILE $dimensions . "\n";         # "dimensions  dimensionX=cellType dimensionY=factor"
@@ -1690,14 +1691,9 @@
         }
     }
     # Construct table name from track name and variables
     my $tableName = "$compositeTrack";
-    #if($Encode::dafVersion le "1.0") {
-        $tableName .= $view;
-        if(defined($replicate)) {
-            $tableName .= "Rep$replicate";
-        }
-    #}
+
     if(!defined($daf->{TRACKS}{$view}{shortLabelPrefix})) {
         $daf->{TRACKS}{$view}{shortLabelPrefix} = "";
     }
     my $shortLabel = defined($daf->{TRACKS}{$view}{shortLabelPrefix}) ? $daf->{TRACKS}{$view}{shortLabelPrefix} : "";
@@ -1802,14 +1798,14 @@
         if(defined($replicate) && ($daf->{lab} eq "HudsonAlpha" || $daf->{lab} eq "Uw") || $daf->{lab} eq "Gis") {
             $subGroups .= " rep=rep$replicate"; # UGLY special casing
         }
     }
-    #if($Encode::dafVersion gt "1.0") {
-    #    $tableName .= "$view";
-    #    if(defined($replicate)) {
-    #        $tableName .= "Rep$replicate";
-    #    }
-    #}
+
+    # Add view and replicate to tablename
+    $tableName .= $view;
+    if(defined($replicate)) {
+        $tableName .= "Rep$replicate";
+    }
 
     # mysql doesn't allow hyphens in table names and our naming convention doesn't allow underbars; to be
     # safe, we strip non-alphanumerics.
     $tableName =~ s/[^A-Za-z0-9]//g;