a623f8b7d5f5d7ad88a33e7a0cba4a91f76800ac
hiram
Tue Feb 26 17:53:14 2019 -0800
catch up list functions to recent revisions to getting trackDb refs #18869
diff --git src/hg/hubApi/hubApi.c src/hg/hubApi/hubApi.c
index 45a44b1..77d64ed 100644
--- src/hg/hubApi/hubApi.c
+++ src/hg/hubApi/hubApi.c
@@ -316,33 +316,33 @@
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);
else if (compositeView)
- hPrintf(" %s : %s : composite view\n", tdb->track, tdb->type);
+ hPrintf(" %s : %s : composite view of parent: %s\n", tdb->track, tdb->type, tdb->parent->track);
else if (superChild)
- hPrintf(" %s : %s : superTrack child\n", tdb->track, tdb->type);
+ hPrintf(" %s : %s : superTrack child of parent: %s\n", tdb->track, tdb->type, tdb->parent->track);
else if (! depthSearch)
hPrintf(" %s : %s : %s\n", tdb->track, tdb->type, bigDataUrl);
else
hPrintf(" %s : %s\n", tdb->track, tdb->type);
}
if (allTrackSettings)
{
hPrintf(" \n");
trackSettings(tdb, countTracks); /* show all settings */
hPrintf("
\n");
}
return;
} /* static void countOneTdb(struct trackDb *tdb,
* char *bigDataIndex, struct hash *countTracks)
*/
@@ -376,50 +376,51 @@
{
int prevCount = ptToInt(hashFindVal(trackCounter, hel->name));
if (differentStringNullOk("track count", hel->name))
totalTracks += ptToInt(hel->val);
hashReplace(trackCounter, hel->name, intToPt(prevCount + ptToInt(hel->val)));
hPrintf(" %d - %s\n", ptToInt(hel->val), hel->name);
}
hPrintf(" \n");
}
hPrintf(" \n");
}
else
hPrintf(" no trackTopDb\n");
} /* static struct trackDb *hubTrackList() */
-static void assemblySettings(struct trackHubGenome *genome)
+static struct trackDb *assemblySettings(struct trackHubGenome *genome)
/* display all the assembly 'settingsHash' */
{
struct trackDb *tdb = trackHubTracksForGenome(genome->trackHub, genome);
tdb = trackDbLinkUpGenerations(tdb);
hPrintf(" \n");
struct hashEl *hel;
struct hashCookie hc = hashFirst(genome->settingsHash);
while ((hel = hashNext(&hc)) != NULL)
{
hPrintf(" - %s : %s
\n", hel->name, (char *)hel->val);
if (sameWord("trackDb", hel->name)) /* examine the trackDb structure */
{
hubTrackList(tdb, genome);
}
if (timeOutReached())
break;
}
hPrintf("
\n");
+return tdb;
}
struct slName *genomeList(struct trackHub *hubTop, struct trackDb **dbTrackList, char *selectGenome)
/* follow the pointers from the trackHub to trackHubGenome and around
* in a circle from one to the other to find all hub resources
* return slName list of the genomes in this track hub
* optionally, return the trackList from this hub for the specified genome
*/
{
struct slName *retList = NULL;
long totalAssemblyCount = 0;
struct trackHubGenome *genome = hubTop->genomeList;
hPrintf("genome sequences (and tracks) present in this track hub
\n");
@@ -431,31 +432,33 @@
{
if ( differentStringNullOk(selectGenome, genome->name) )
continue;
}
++totalAssemblyCount;
struct slName *el = slNameNew(genome->name);
slAddHead(&retList, el);
if (genome->organism)
{
hPrintf("%s - %s - %s\n", genome->organism, genome->name, genome->description);
}
else
{ /* can there be a description when organism is empty ? */
hPrintf("%s\n", genome->name);
}
- assemblySettings(genome);
+ struct trackDb *tdb = assemblySettings(genome);
+ if (dbTrackList)
+ *dbTrackList = tdb;
if (measureTiming)
{
long thisTime = clock1000();
hPrintf("processing time %s: %ld millis
\n", genome->name, thisTime - lastTime);
}
if (timeOutReached())
break;
}
if (trackCounter->elCount)
{
hPrintf(" total genome assembly count: %ld\n", totalAssemblyCount);
hPrintf(" %ld total tracks counted, %d different track types:\n", totalTracks, trackCounter->elCount);
hPrintf(" \n");
struct hashEl *hel, *helList = hashElListHash(trackCounter);
slSort(&helList, hashElCmpIntValDesc);