7cbc567a596b5219e79efa6bef66406c30c37020 kent Tue Feb 1 15:24:46 2011 -0800 Fixing a chromosome-table check that was glitching out selected fields output for bigBed data hub tracks. diff --git src/hg/hgTables/hgTables.c src/hg/hgTables/hgTables.c index 0c1c639..d692675 100644 --- src/hg/hgTables/hgTables.c +++ src/hg/hgTables/hgTables.c @@ -533,40 +533,45 @@ } } char *connectingTableForTrack(char *rawTable) /* Return table name to use with all.joiner for track. * You can freeMem this when done. */ { return cloneString(rawTable); } char *chromTable(struct sqlConnection *conn, char *table) /* Get chr1_table if it exists, otherwise table. * You can freeMem this when done. */ { +if (isHubTrack(table)) + return cloneString(table); +else + { char *chrom = hDefaultChrom(database); if (sqlTableExists(conn, table)) return cloneString(table); else { char buf[256]; safef(buf, sizeof(buf), "%s_%s", chrom, table); return cloneString(buf); } } +} char *chrnTable(struct sqlConnection *conn, char *table) /* Return chrN_table if table is split, otherwise table. * You can freeMem this when done. */ { char buf[256]; char *splitTable = chromTable(conn, table); if (!sameString(splitTable, table)) { safef(buf, sizeof(buf), "chrN_%s", table); freez(&splitTable); return cloneString(buf); } else return splitTable;