src/hg/hgTracks/pslTrack.c 1.34
1.34 2010/05/11 01:43:28 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/pslTrack.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTracks/pslTrack.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -b -B -U 4 -r1.33 -r1.34
--- src/hg/hgTracks/pslTrack.c 21 Dec 2009 22:43:34 -0000 1.33
+++ src/hg/hgTracks/pslTrack.c 11 May 2010 01:43:28 -0000 1.34
@@ -414,33 +414,32 @@
boolean isXeno, boolean nameGetsPos, int sizeMul)
/* Return linked features from range of table after have
* already connected to database.. */
{
-char *track = tg->mapName;
struct sqlResult *sr = NULL;
char **row;
int rowOffset;
char *optionChrStr;
struct linkedFeatures *lfList = NULL, *lf;
char optionChr[128]; /* Option - chromosome filter */
char extraWhere[128];
-safef( optionChr, sizeof(optionChr), "%s.chromFilter", tg->mapName);
+safef( optionChr, sizeof(optionChr), "%s.chromFilter", tg->track);
optionChrStr = cartUsualString(cart, optionChr, "All");
if (startsWith("chr",optionChrStr))
{
safef(extraWhere, sizeof(extraWhere), "qName = \"%s\"",optionChrStr);
- sr = hRangeQuery(conn, track, chromName, start, end, extraWhere, &rowOffset);
+ sr = hRangeQuery(conn, tg->table, chromName, start, end, extraWhere, &rowOffset);
}
else
{
safef(extraWhere, sizeof(extraWhere), " ");
- sr = hRangeQuery(conn, track, chromName, start, end, NULL, &rowOffset);
+ sr = hRangeQuery(conn, tg->table, chromName, start, end, NULL, &rowOffset);
}
if (sqlCountColumns(sr) < 21+rowOffset)
- errAbort("trackDb has incorrect table type for table \"%s\"",
- tg->mapName);
+ errAbort("trackDb has incorrect table type for track \"%s\"",
+ tg->track);
while ((row = sqlNextRow(sr)) != NULL)
{
struct psl *psl = pslLoad(row+rowOffset);
lf = lfFromPslx(psl, sizeMul, isXeno, nameGetsPos, tg);
@@ -486,9 +485,9 @@
/* Fill in custom parts of xeno psl <otherdb> track */
{
char option[128]; /* Option - rainbow chromosome color */
char *optionStr ;
-safef( option, sizeof(option), "%s.color", tg->mapName);
+safef( option, sizeof(option), "%s.color", tg->track);
optionStr = cartUsualString(cart, option, colorChromDefault);
tg->mapItemName = lfMapNameFromExtra;
if( sameString( optionStr, "on" )) /*use chromosome coloring*/
tg->itemColor = lfChromColor;