src/hg/encode/encodeDownloadsPage/encodeDownloadsPage.pl 1.10
1.10 2009/04/23 22:04:28 tdreszer
Added lookup of metadata in fileDb.ra (if one exists in downloads directory)
Index: src/hg/encode/encodeDownloadsPage/encodeDownloadsPage.pl
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/encode/encodeDownloadsPage/encodeDownloadsPage.pl,v
retrieving revision 1.9
retrieving revision 1.10
diff -b -B -U 4 -r1.9 -r1.10
--- src/hg/encode/encodeDownloadsPage/encodeDownloadsPage.pl 23 Apr 2009 21:04:10 -0000 1.9
+++ src/hg/encode/encodeDownloadsPage/encodeDownloadsPage.pl 23 Apr 2009 22:04:28 -0000 1.10
@@ -268,9 +268,16 @@
}
}
$results = $db->quickQuery("select settings from $database.trackDb where tableName = '$tableName'");
if(!$results) {
- ### TODO: This needs to be replaced with a lookup of fileDb.ra
+ ### TODO: This needs to be replaced with a select from a fileDb table
+ if(stat("fileDb.ra")) {
+ $results = `grep metadata fileDb.ra | grep '$fileName'`;
+ chomp $results;
+ $results =~ s/^ +//;
+ $results =~ s/ +$//;
+ }
+ if(!$results) {
my $associatedTable = $tableName;
$associatedTable =~ s/RawData/RawSignal/ if $tableName =~ /RawData/;
$associatedTable =~ s/Alignments/RawSignal/ if $tableName =~ /Alignments/;
if($tableName ne $associatedTable) {
@@ -280,8 +287,10 @@
$metaData{parent} = "Alignments→RawSignal" if $tableName =~ /Alignments/;
}
}
}
+ ### TODO: This needs to be replaced with a select from a fileDb table
+ }
if( $results ) {
my @settings = split(/\n/, $results); # New Line
while (@settings) {
my @pair = split(/\s+/, (shift @settings),2);