src/hg/utils/automation/Encode.pm 1.62

1.62 2010/04/20 02:43:31 krish
changed expVar.ra read to get list for given track
Index: src/hg/utils/automation/Encode.pm
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/utils/automation/Encode.pm,v
retrieving revision 1.61
retrieving revision 1.62
diff -b -B -U 4 -r1.61 -r1.62
--- src/hg/utils/automation/Encode.pm	20 Apr 2010 01:42:20 -0000	1.61
+++ src/hg/utils/automation/Encode.pm	20 Apr 2010 02:43:31 -0000	1.62
@@ -203,10 +203,16 @@
 
 sub getExpVars
 {
 # Returns hash indexed by the composite name in the experiments.ra file
-    my ($configPath) = @_;
-    return RAFile::readRaFile("$configPath/$expVarsFile", "composite");
+    my ($configPath, $composite) = @_;
+    my %expVars = RAFile::readRaFile("$configPath/$expVarsFile", "composite");
+    %expVars = %{$expVars{$composite}};
+    my @results;
+    for(my $i = 1; $i <= scalar(keys %expVars); ++$i) {
+        push @results, $expVars{"expVar$i"};
+    }
+    return @results;
 }
 
 sub getControlledVocab
 {