5fc4e4b808fce37ff781fd27d6782808ebbb5e92 max Wed Oct 11 14:06:15 2017 -0700 allowing trackDb statement dataVersion to be a file name, refs #20174 diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c index b16a0f9..c29fe11 100644 --- src/hg/hgc/hgc.c +++ src/hg/hgc/hgc.c @@ -3133,30 +3133,39 @@ printf("<P><A HREF=\"%s?g=%s&%s\">" "Go to %s track controls</A></P>\n", hTrackUiForTrack(tdb->track), trackName, cartSidUrlString(cart), parentTdb->shortLabel); } static void printDataVersion(struct trackDb *tdb) /* If this annotation has a dataVersion trackDb setting, print it */ { if (trackHubDatabase(database)) return; metadataForTable(database,tdb,NULL); const char *version = metadataFindValue(tdb,"dataVersion"); if(version == NULL) version = trackDbSetting(tdb,"dataVersion"); if (version != NULL) + if (startsWith("/", version)) + { + char *path = replaceInUrl((char *)version, "", cart, database, seqName, winStart, winEnd, tdb->track, FALSE); + struct lineFile* lf = lineFileOpen(path, TRUE); + if (lf) + version = lineFileReadAll(lf); + } + +if (version != NULL) printf("<B>Data version:</B> %s <BR>\n", version); } void printDataRestrictionDate(struct trackDb *tdb) /* If this annotation has a dateUnrestricted trackDb setting, print it */ { char *restrictionDate = encodeRestrictionDateDisplay(database,tdb); if (restrictionDate != NULL) { printf("<A HREF=\"/ENCODE/terms.html\" TARGET=_BLANK><B>Restricted until</A>:</B> %s <BR>\n", restrictionDate); freeMem(restrictionDate); } }