src/hg/lib/hdb.c 1.405
1.405 2009/07/09 04:13:05 angie
Oops, backing out the previous changes because they trigger both mrna and all_mrna trackDb records to display, and an upstream fix in hgFind.c fixed the original problem.
Index: src/hg/lib/hdb.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/hdb.c,v
retrieving revision 1.404
retrieving revision 1.405
diff -b -B -U 4 -r1.404 -r1.405
--- src/hg/lib/hdb.c 8 Jul 2009 21:50:18 -0000 1.404
+++ src/hg/lib/hdb.c 9 Jul 2009 04:13:05 -0000 1.405
@@ -719,29 +719,19 @@
if (tHel == NULL)
hashAdd(dbTblHash, trackName, tbl);
else if (! sameString(tbl->name, trackName))
slAddHead(&(tHel->val), tbl);
- if (sameString("all_mrna", tbl->name) || sameString("all_est", tbl->name))
- {
- struct slName *sln = slNameNew(tbl->name + strlen("all_"));
- hashAdd(dbTblHash, sln->name, tbl);
- }
}
}
else
{
- /* Just hash all table names (watch out for all_mrna and all_est): */
+ /* Just hash all table names: */
struct slName *tbl = NULL, *nextTbl = NULL;
for (tbl = allTables; tbl != NULL; tbl = nextTbl)
{
nextTbl = tbl->next;
tbl->next = NULL;
hashAdd(dbTblHash, tbl->name, tbl);
- if (sameString("all_mrna", tbl->name) || sameString("all_est", tbl->name))
- {
- struct slName *sln = slNameNew(tbl->name + strlen("all_"));
- hashAdd(dbTblHash, sln->name, tbl);
- }
}
}
hFreeConn(&conn);
}
@@ -2877,19 +2867,10 @@
if (!isSplit)
{
safef(fullName, sizeof(fullName), "%s", rootName);
if (!hTableExists(db, fullName))
- {
- if (sameString(rootName, "mrna") || sameString(rootName, "est"))
- {
- safef(fullName, sizeof(fullName), "all_%s", rootName);
- if (!hTableExists(db, fullName))
return NULL;
}
- else
- return NULL;
- }
- }
AllocVar(hti);
hashAddSaveName(hash, rootName, hti, &hti->rootName);
hti->isSplit = isSplit;
hti->isPos = hFindBed12FieldsAndBinWithConn(conn, fullName,
@@ -3156,11 +3137,10 @@
}
else
{
table = rootTable;
- char *prefix = (sameString(table, "mrna") || sameString(table, "est")) ? "all_" : "";
- dyStringPrintf(query, "%s%s where %s='%s' and ",
- prefix, table, hti->chromField, chrom);
+ dyStringPrintf(query, "%s where %s='%s' and ",
+ table, hti->chromField, chrom);
}
}
if (table != NULL)
{