src/hg/hgTracks/chainTrack.c 1.39

1.39 2010/05/11 01:43:27 kent
Refactoring to split the trackDb.tableName field into separate track and table fields. Similarly track.mapName field goes to the same track and table fields.
Index: src/hg/hgTracks/chainTrack.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTracks/chainTrack.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -b -B -U 4 -r1.38 -r1.39
--- src/hg/hgTracks/chainTrack.c	21 Dec 2009 22:43:32 -0000	1.38
+++ src/hg/hgTracks/chainTrack.c	11 May 2010 01:43:27 -0000	1.39
@@ -135,12 +135,12 @@
 if (hash->size)
     {
     boolean isSplit = TRUE;
     /* Make up range query. */
-    sprintf(fullName, "%s_%s", chromName, tg->mapName);
+    sprintf(fullName, "%s_%s", chromName, tg->table);
     if (!hTableExists(database, fullName))
 	{
-	strcpy(fullName, tg->mapName);
+	strcpy(fullName, tg->table);
 	isSplit = FALSE;
 	}
 
     /* in dense mode we don't draw the lines 
@@ -248,9 +248,9 @@
 /* Load up all of the chains from correct table into tg->items 
  * item list.  At this stage to conserve memory for other tracks
  * we don't load the links into the components list until draw time. */
 {
-char *track = tg->mapName;
+char *table = tg->table;
 struct chain chain;
 int rowOffset;
 char **row;
 struct sqlConnection *conn = hAllocConn(database);
@@ -269,24 +269,24 @@
     {
     snprintf(extraWhere, sizeof(extraWhere), 
             "qName = \"%s\" and score > %d",optionChrStr, 
             chainCart->scoreFilter);
-    sr = hRangeQuery(conn, track, chromName, winStart, winEnd, 
+    sr = hRangeQuery(conn, table, chromName, winStart, winEnd, 
             extraWhere, &rowOffset);
     }
 else
     {
     if (chainCart->scoreFilter > 0)
         {
         snprintf(extraWhere, sizeof(extraWhere), 
                 "score > \"%d\"",chainCart->scoreFilter);
-        sr = hRangeQuery(conn, track, chromName, winStart, winEnd, 
+        sr = hRangeQuery(conn, table, chromName, winStart, winEnd, 
                 extraWhere, &rowOffset);
         }
     else
         {
         snprintf(extraWhere, sizeof(extraWhere), " ");
-        sr = hRangeQuery(conn, track, chromName, winStart, winEnd, 
+        sr = hRangeQuery(conn, table, chromName, winStart, winEnd, 
                 NULL, &rowOffset);
         }
     }
 while ((row = sqlNextRow(sr)) != NULL)