src/hg/hgTracks/mafTrack.c 1.65
1.65 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/mafTrack.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTracks/mafTrack.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -b -B -U 4 -r1.64 -r1.65
--- src/hg/hgTracks/mafTrack.c 14 May 2009 21:45:24 -0000 1.64
+++ src/hg/hgTracks/mafTrack.c 11 May 2010 01:43:27 -0000 1.65
@@ -60,15 +60,15 @@
if (isAxt)
{
struct hash *qSizeHash = hChromSizeHash(tg->otherDb);
struct mafAli *mafList =
- axtLoadAsMafInRegion(conn, tg->mapName, chrom, start, end,
+ axtLoadAsMafInRegion(conn, tg->table, chrom, start, end,
database, tg->otherDb, hChromSize(database, chrom), qSizeHash);
hashFree(&qSizeHash);
return mafList;
}
else
- return mafLoadInRegion(conn, tg->mapName, chrom, start, end);
+ return mafLoadInRegion(conn, tg->table, chrom, start, end);
}
static struct mafItem *baseByBaseItems(struct track *tg, int scoreHeight)
/* Make up base-by-base track items. */
@@ -488,9 +488,9 @@
{
char **row;
int rowOffset;
struct sqlConnection *conn = hAllocConn(database);
-struct sqlResult *sr = hRangeQuery(conn, tg->mapName, chromName,
+struct sqlResult *sr = hRangeQuery(conn, tg->table, chromName,
seqStart, seqEnd, NULL, &rowOffset);
double scale = scaleForPixels(width);
int x1,x2,y,w;
struct mafItem *mi = tg->items;
@@ -723,9 +723,9 @@
* to construct the tablename, otherwise, use the track name */
char mafTable[64];
if ((suffix = trackDbSetting(tg->tdb, "pairwise")) == NULL ||
*suffix == 0)
- suffix = tg->mapName;
+ suffix = tg->table;
safef(mafTable, sizeof(mafTable), "%s_%s", mi->name, suffix);
if (!hTableExists(database, mafTable))
continue;
mafList = mafLoadInRegion(conn, mafTable, chromName, seqStart, seqEnd);
@@ -909,10 +909,10 @@
{
mafDrawGraphic(tg, seqStart, seqEnd, hvg, xOff, yOff, width, font,
color, vis, isAxt);
}
-mapBoxHc(hvg, seqStart, seqEnd, xOff, yOff, width, tg->height, tg->mapName,
- tg->mapName, NULL);
+mapBoxHc(hvg, seqStart, seqEnd, xOff, yOff, width, tg->height, tg->track,
+ tg->track, NULL);
}
static void mafDraw(struct track *tg, int seqStart, int seqEnd,
struct hvGfx *hvg, int xOff, int yOff, int width,