src/hg/hgTracks/chromGraphTrack.c 1.21

1.21 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/chromGraphTrack.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTracks/chromGraphTrack.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -b -B -U 4 -r1.20 -r1.21
--- src/hg/hgTracks/chromGraphTrack.c	5 Dec 2009 01:29:00 -0000	1.20
+++ src/hg/hgTracks/chromGraphTrack.c	11 May 2010 01:43:27 -0000	1.21
@@ -50,9 +50,9 @@
 matchingCartSettings = cartFindLike(cart, cartGenomeWildStr);
 for (el = matchingCartSettings; el != NULL; el = el->next)
     {
     char *val = (char *)el->val;
-    if (val && sameString(val, tg->mapName))
+    if (val && sameString(val, tg->track))
 	{
 	graphCartVarName = el->name;
 	break;
 	}
@@ -141,9 +141,9 @@
      * we can draw connecting lines. */
     safef(query, sizeof(query),
 	"select chromStart,val from %s "
 	"where chrom='%s' and chromStart>=%d and chromStart<%d",
-	tg->mapName, chromName,
+	tg->table, chromName,
 	seqStart - cgs->maxGapToFill, seqEnd + cgs->maxGapToFill);
     sr = sqlGetResult(conn, query);
 
     /* Loop through drawing lines from one point to another unless
@@ -178,9 +178,9 @@
 
 /* Do map box */
 xOff = hvGfxAdjXW(hvg, xOff, width);
 
-char *encodedTrack = cgiEncode(tg->mapName);
+char *encodedTrack = cgiEncode(tg->track);
 if(theImgBox && curImgTrack)
     {
     char link[512];     // FIXME: winStart/winEnd are not right when using a portal
     safef(link,sizeof(link),"%s&o=%d&t=%d&g=%s", hgcNameAndSettings(),
@@ -318,9 +318,9 @@
 {
 chromGraphMethodsCommon(tg);
 tg->drawItems = cgDrawItems;
 struct sqlConnection *conn = hAllocConn(database);
-tg->customPt = chromGraphSettingsGet(tg->mapName, conn,
+tg->customPt = chromGraphSettingsGet(tg->track, conn,
 	tg->tdb, cart);
 hFreeConn(&conn);
 }
 
@@ -328,7 +328,7 @@
 /* Fill in chromGraph methods for custom track. */
 {
 tg->drawItems = cgDrawItemsCt;
 chromGraphMethodsCommon(tg);
-tg->customPt = chromGraphSettingsGet(tg->mapName, NULL, tg->tdb, cart);
+tg->customPt = chromGraphSettingsGet(tg->track, NULL, tg->tdb, cart);
 }