7ac9dba0abbb050561bb41ea08d98fa76a27d4cb max Thu Feb 13 03:03:31 2025 -0800 improvements to data schema page to make it easier for users to convert and download big data, refs #35223 diff --git src/hg/hgTables/bigBed.c src/hg/hgTables/bigBed.c index 6e24217969b..3a9ac5e07d4 100644 --- src/hg/hgTables/bigBed.c +++ src/hg/hgTables/bigBed.c @@ -533,30 +533,32 @@ /* Get description of columns, making it up from BED records if need be. */ struct asObject *as = bigBedAsOrDefault(bbi); hPrintf("Database: %s", trackHubSkipHubName(database)); hPrintf("    Primary Table: %s ", table); printf("Data last updated: %s
\n", firstWordInLine(sqlUnixTimeToDate(&timep, FALSE))); printDownloadLink("Big Bed", tdb, fileName); if (bbi->version >= 2) { hPrintf("
Item Count: "); printLongWithCommas(stdout, bigBedItemCount(bbi)); } printTypeHelpDesc(tdb->type); +printTableBrowserLink(tdb, table); + hPrintf("
\n"); hPrintf("Format description: %s
", as->comment); /* Put up table that describes fields. */ hTableStart(); hPrintf("field"); if (ivList != NULL) hPrintf("example"); hPrintf("description "); puts("\n"); struct asColumn *col; int colCount = 0; char *row[bbi->fieldCount]; char startBuf[16], endBuf[16]; if (ivList != NULL) @@ -572,31 +574,30 @@ hPrintf("%s", row[colCount]); hPrintf("%s", col->comment); ++colCount; } /* If more fields than descriptions put up minimally helpful info (at least has example). */ for ( ; colCount < bbi->fieldCount; ++colCount) { hPrintf("column%d", colCount+1); if (ivList != NULL) hPrintf("%s", row[colCount]); hPrintf("n/a\n"); } hTableEnd(); - if (ivList != NULL) { /* Put up another section with sample rows. */ webNewSection("Sample Rows"); hTableStart(); /* Print field names as column headers for example */ hPrintf(""); int colIx = 0; for (col = as->columnList; col != NULL; col = col->next) { hPrintf("%s", col->name); ++colIx; } for (; colIx < colCount; ++colIx) @@ -605,22 +606,24 @@ /* Print sample lines. */ struct bigBedInterval *iv; for (iv=ivList; iv != NULL; iv = iv->next) { bigBedIntervalToRow(iv, chromList->name, startBuf, endBuf, row, bbi->fieldCount); hPrintf(""); for (colIx=0; colIx\n"); } hTableEnd(); } +explainCoordSystem(); + printTrackHtml(tdb); /* Clean up and go home. */ lmCleanup(&lm); bbiFileClose(&bbi); freeMem(fileName); hFreeConn(&conn); }