0659f1c129bd233526fbf7feeada62f22b3701d6 braney Wed May 27 15:42:38 2015 -0700 use #define for constant refs #15407 diff --git src/hg/hgGene/hgGene.c src/hg/hgGene/hgGene.c index b355b29..333ba6b 100644 --- src/hg/hgGene/hgGene.c +++ src/hg/hgGene/hgGene.c @@ -608,32 +608,33 @@ char query[256]; struct sqlResult *sr; char **row; struct genePred *gp = NULL; hFindSplitTable(sqlGetDatabase(conn), curGeneChrom, track, table, &hasBin); bool hasAttrId = sqlColumnExists(conn, table, "alignId"); sqlSafef(query, sizeof(query), "select * from %s where name = '%s' " "and chrom = '%s' and txStart=%d and txEnd=%d" , table, curGeneId, curGeneChrom, curGeneStart, curGeneEnd); sr = sqlGetResult(conn, query); if ((row = sqlNextRow(sr)) != NULL) { gp = genePredLoad(row + hasBin); +#define ALIGNIDFIELD 11 // Gencode Id if (hasAttrId) - curAlignId = cloneString(row[11]); + curAlignId = cloneString(row[ALIGNIDFIELD]); } sqlFreeResult(&sr); if (gp == NULL) errAbort("getCurGenePred: Can't find %s", query); return gp; } void doKgMethod() /* display knownGene.html content (UCSC Known Genes * Method, Credits, and Data Use Restrictions) */ { cartWebStart(cart, database, "Methods, Credits, and Use Restrictions"); struct trackDb *tdb = hTrackDbForTrack(database, genomeSetting("knownGene")); hPrintf("%s", tdb->html); cartWebEnd();