src/hg/utils/automation/makePushQSql.pl 1.28
1.28 2010/01/09 00:07:01 hiram
fix up some chain net confusion and beginning to get ready to use composite settings
Index: src/hg/utils/automation/makePushQSql.pl
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/utils/automation/makePushQSql.pl,v
retrieving revision 1.27
retrieving revision 1.28
diff -b -B -U 4 -r1.27 -r1.28
--- src/hg/utils/automation/makePushQSql.pl 29 Aug 2009 00:29:26 -0000 1.27
+++ src/hg/utils/automation/makePushQSql.pl 9 Jan 2010 00:07:01 -0000 1.28
@@ -248,12 +248,29 @@
while (<P>) {
chomp;
my ($tableName, $type, $shortLabel, $priority) = split("\t");
my $otherTables = "";
- if ($type =~ /^wigMaf/) {
my $settingsQuery = "select settings from trackDb " .
"where tableName = \\'$tableName\\'";
my $settings = `echo $settingsQuery | $sql`;
+# I don't know why this is, but the settings string comes back with
+# the newlines as explicit literal backslash and n instead of a real
+# newline \n character. This sed will turn those two characters
+# '\' and 'n' into the real \n newline character.
+ $settings =~ s#\\n#\n#g;
+# we are not using this settingHash yet, but may need it some day
+ my %settingHash;
+# now we can split the settings on newlines:
+ my @setNameValue = split('\n',$settings);
+
+ &HgAutomate::verbose(2, "settings for tableName '$tableName', type='$type'\n") if (scalar(@setNameValue) > 0);
+ for (my $i = 0; $i < scalar(@setNameValue); ++$i) {
+ # first space separates the tag and its value
+ my ($tag, $value) = split('\s', $setNameValue[$i], 2);
+ $settingHash{$tag} = $value;
+ &HgAutomate::verbose(2, "$i: $tag='$value'\n");
+ }
+ if ($type =~ /^wigMaf/) {
if ($settings =~ /wiggle\s+(\w+)/) {
$otherTables .= " $1";
push @wigTables, $1;
}
@@ -336,13 +353,9 @@
$entry{'files'} = "";
if ($type =~ /^chain ?/) {
$entry{'tables'} .= " ${table}Link";
my $net = $table;
- if ($prefixPattern) {
- $net =~ s/^${prefixPattern}chain/net/;
- } else {
- $net =~ s/^chain/net/;
- }
+ $net =~ s/^.*chain/net/;
# Lump in nets with chains, when we find them.
if (defined $allTables->{$net}) {
&HgAutomate::verbose(2, "Lumping $net in with $table\n");
$entry{'tables'} .= " $net";
@@ -411,9 +424,9 @@
# Remove accounted-for tables.
foreach my $t (split(" ", $entry{'tables'})) {
delete $allTables->{$t};
}
- &HgAutomate::verbose(3, "Deleted $entry{tables}\n");
+ &HgAutomate::verbose(3, "Deleted $entry{'tables'}\n");
$trackEntries{$track} = \%entry;
}
}
# Now cycle through the leftovers still in $allTables and see if all.joiner
@@ -532,9 +545,9 @@
my $checkNet = "net$Db";
my ($oO) = &HgAutomate::getAssemblyInfo($dbHost, $db);
foreach my $oDb (@netODbs) {
my %entry = ();
- $entry{'shortLabel'} = "$oO Chain and Net";
+ $entry{'shortLabel'} = "$oO Chain/Net";
$entry{'priority'} = 1;
my $tableList = "";
my $dbTables = &getAllTables($oDb);
foreach my $table (sort keys %{$dbTables}) {
@@ -556,9 +569,9 @@
&HgAutomate::verbose(0, "WARNING: $dbHost:$oDb does not have " .
"chain/net download $downloads !\n");
}
}
- &printEntry(\%entry, $id, $oDb, "$oO Chain and Net");
+ &printEntry(\%entry, $id, $oDb, "$oO Chain/Net");
++$id;
undef($dbTables);
undef(%entry);
}
@@ -646,9 +659,11 @@
&HgAutomate::verbose(1, <<_EOF_
Files go in the second field after tables (it's tables, cgis, files).
*** 5. This script currently does not recognize composite tracks. If $db
has any composite tracks, you should manually merge the separate
- per-table entries into one entry.
+ per-table entries into one entry. The Chain/Net composites are taken
+ care of, and the beginning of handling composites is here but not used
+ yet.
*** 6. Make sure that qapushq does not already have a table named $db:
ssh hgwbeta hgsql -h mysqlbeta qapushq -NBe "'desc $db;'"
You *should* see this error:
ERROR 1146 at line 1: Table 'qapushq.$db' doesn't exist