dc68ca87c184d7a6d4112e293073bddb34a9e913 hiram Tue Mar 19 10:36:54 2019 -0700 full reporting of all track names in html display even when not in detail mode refs #18869 diff --git src/hg/hubApi/hubApi.c src/hg/hubApi/hubApi.c index 81847be..f9a2b0c 100644 --- src/hg/hubApi/hubApi.c +++ src/hg/hubApi/hubApi.c @@ -152,52 +152,74 @@ hashIncInt(countTracks, "superTrack child"); hashIncInt(countTracks, stripType); hashIncInt(countTracks, "track count"); } else if (isEmpty(tdb->type)) hashIncInt(countTracks, "no type specified"); else { hashIncInt(countTracks, stripType); hashIncInt(countTracks, "track count"); } freeMem(stripType); // showCounts(countTracks); } +static void showSubTracks(struct trackDb *tdb, struct hash *countTracks) +/* tdb has subtracks, show only subTracks, no details */ +{ +hPrintf("
  • \n"); +} + static void trackSettings(struct trackDb *tdb, struct hash *countTracks) /* process the settingsHash for a trackDb, recursive when subtracks */ { hPrintf("
  • \n"); } static int bbiBriefMeasure(char *type, char *bigDataUrl, char *bigDataIndex, long *chromCount, long *itemCount, struct dyString *errors) /* check a bigDataUrl to find chrom count and item count */ { int retVal = 0; @@ -315,78 +337,84 @@ hPrintf("
  • %s : %s : ERROR: %s
  • \n", tdb->track, tdb->type, errors->string); } else { if (startsWithWord("bigBed", tdb->type)) hPrintf("
  • %s : %s : %ld chroms : %ld item count
  • \n", tdb->track, tdb->type, chromCount, itemCount); else if (startsWithWord("bigWig", tdb->type)) hPrintf("
  • %s : %s : %ld chroms : %ld bases covered
  • \n", tdb->track, tdb->type, chromCount, itemCount); else hPrintf("
  • %s : %s : %ld chroms : %ld count
  • \n", tdb->track, tdb->type, chromCount, itemCount); } } else { if (compositeContainer) - hPrintf("
  • %s : %s : composite track container
  • \n", tdb->track, tdb->type); + hPrintf("
  • %s : %s : composite track container has %d subtracks
  • \n", tdb->track, tdb->type, slCount(tdb->subtracks)); else if (compositeView) hPrintf("
  • %s : %s : composite view of parent: %s
  • \n", tdb->track, tdb->type, tdb->parent->track); else if (superChild) hPrintf("
  • %s : %s : superTrack child of parent: %s
  • \n", tdb->track, tdb->type, tdb->parent->track); - else if (! depthSearch) + else if (! depthSearch && bigDataUrl) hPrintf("
  • %s : %s : %s
  • \n", tdb->track, tdb->type, bigDataUrl); else hPrintf("
  • %s : %s
  • \n", tdb->track, tdb->type); } if (allTrackSettings) { hPrintf("
  • \n"); } +else if (tdb->subtracks) + { + showSubTracks(tdb, countTracks); + } return; } /* static void countOneTdb(struct trackDb *tdb, * char *bigDataIndex, struct hash *countTracks) */ static void hubTrackList(struct trackDb *topTrackDb, struct trackHubGenome *genome) /* process the track list in a hub to show all tracks */ { hPrintf("
  • \n"); } /* static struct trackDb *hubTrackList() */ @@ -581,38 +609,41 @@ static void tracksForUcscDb(char *db) /* scan the specified database for all tracks */ { struct hash *countTracks = hashNew(0); hPrintf("

    Tracks in UCSC genome: '%s'
    \n", db); struct trackDb *tdbList = obtainTdb(NULL, db); struct trackDb *tdb; hPrintf("

    \n"); hPrintf("

    \n"); } // static void tracksForUcscDb(char * db) static void introductionText() /* output explanation text */ { char *scriptUri = getenv("SCRIPT_URI"); hPrintf("

    JSON data API interface to U.C. Santa Cruz genome browser data

    \n"); hPrintf("

    Data access URL: %s

    \n", scriptUri); @@ -719,47 +750,44 @@ initGenbankTableNames(database); char *docRoot = cfgOptionDefault("browser.documentRoot", DOCUMENT_ROOT); int timeout = cartUsualInt(cart, "udcTimeout", 300); if (udcCacheTimeout() < timeout) udcSetCacheTimeout(timeout); knetUdcInstall(); char *pathInfo = getenv("PATH_INFO"); /* nothing on incoming path, then display the WEB page instead */ if (sameOk("/",pathInfo)) pathInfo = NULL; boolean commandError = FALSE; +/*expect no more than MAX_PATH_INFO number of words*/ char *words[MAX_PATH_INFO]; if (isNotEmpty(pathInfo)) { setupFunctionHash(); - /*expect no more than MAX_PATH_INFO number of words*/ struct hashEl *hel = parsePathInfo(pathInfo, words); /* verify valid API command */ if (hel) /* have valid command */ { hPrintDisable(); puts("Content-Type:application/json"); puts("\n"); - /* skip the first leading slash to simplify chopByChar parsing */ -// pathInfo += 1; -// apiFunctionSwitch(hel, words); void (*apiFunction)(char **) = hel->val; (*apiFunction)(words); return; } else commandError = TRUE; } puts("Content-Type:text/html"); puts("\n"); (void) hubPublicLoadAll(); struct dbDb *dbList = ucscDbDb(); char **ucscDbList = NULL;