d3f9b9ecf2a6d30bd8f97566f72e5650982c308d kent Mon Dec 13 15:22:03 2021 -0800 Adding hgTracks display of merged bar charts. diff --git src/lib/fieldedTable.c src/lib/fieldedTable.c index 796caf9..e849d80 100644 --- src/lib/fieldedTable.c +++ src/lib/fieldedTable.c @@ -318,30 +318,40 @@ fprintf(f, "%d\t", curId); curId += 1; } fputs(fr->row[0], f); for (i=1; ifieldCount; ++i) { fputc('\t', f); fputs(fr->row[i], f); } fputc('\n', f); } carefulClose(&f); } +void fieldedTableResetRowIds(struct fieldedTable *table, int startId) +/* Redo ID's in table to be incrementing numbers starting with startId */ +{ +struct fieldedRow *fr; +int id = startId; +for (fr = table->rowList; fr != NULL; fr = fr->next) + fr->id = id++; +} + + void fieldedTableToTabFile(struct fieldedTable *table, char *fileName) /* Write out a fielded table back to file */ { fieldedTableToTabFileWithId(table, fileName, NULL, 0); } int fieldedTableFindFieldIx(struct fieldedTable *table, char *field) /* Return index of field in a table's row or -1 if not found */ { return stringArrayIx(field, table->fields, table->fieldCount); } int fieldedTableMustFindFieldIx(struct fieldedTable *table, char *field) /* Find index of field in table's row. Abort if field not found. */ {