7bc24686024ec14d351ab208b5179ab251d7c463
tdreszer
  Fri Oct 14 16:34:15 2011 -0700
Major work on bedFilt, psl and wigMaf to make them properly composite ready.
diff --git src/hg/hgTracks/pslTrack.c src/hg/hgTracks/pslTrack.c
index 055947a..f6a0b51 100644
--- src/hg/hgTracks/pslTrack.c
+++ src/hg/hgTracks/pslTrack.c
@@ -52,54 +52,53 @@
 unsigned colorIx = 0;
 boolean isExclude = FALSE;
 boolean andLogic = TRUE;
 char query[256];
 struct sqlResult *sr;
 char **row;
 struct sqlConnection *conn = NULL;
 
 if (*pLfList == NULL || mud == NULL)
     return;
 
 /* First make a quick pass through to see if we actually have
  * to do the filter. */
 for (fil = mud->filterList; fil != NULL; fil = fil->next)
     {
-    fil->pattern = cartUsualString(cart, fil->key, "");
+    fil->pattern = cartUsualStringClosestToHome(cart, tg->tdb,FALSE,fil->suffix, "");
     if (fil->pattern[0] != 0)
         anyFilter = TRUE;
     }
 if (!anyFilter)
     return;
 
-type = cartUsualString(cart, mud->filterTypeVar, "red");
+type = cartUsualStringClosestToHome(cart, tg->tdb, FALSE, mud->filterTypeSuffix, "red");
 if (sameString(type, "exclude"))
     isExclude = TRUE;
 else if (sameString(type, "include"))
     isExclude = FALSE;
 else
     colorIx = getFilterColor(type, MG_BLACK);
-type = cartUsualString(cart, mud->logicTypeVar, "and");
+type = cartUsualStringClosestToHome(cart, tg->tdb, FALSE, mud->logicTypeSuffix, "and");
 andLogic = sameString(type, "and");
 
 /* Make a pass though each filter, and start setting up search for
  * those that have some text. */
 conn = hAllocConn(database);
 for (fil = mud->filterList; fil != NULL; fil = fil->next)
     {
-    fil->pattern = cartUsualString(cart, fil->key, "");
-    if (fil->pattern[0] != 0)
+    if (fil->pattern[0] != 0)   // Filled above
 	{
 	fil->hash = newHash(10);
 	if ((fil->mrnaTableIx = sqlFieldIndex(conn, "gbCdnaInfo", fil->table)) < 0)
 	    internalErr();
 	}
     }
 
 /* Scan tables id/name tables to build up hash of matching id's. */
 for (fil = mud->filterList; fil != NULL; fil = fil->next)
     {
     struct hash *hash = fil->hash;
     int wordIx, wordCount;
     char *words[128];
 
     if (hash != NULL)