db7c8abb6d7674bb26f579eabb58bc080ce76fdd
max
Tue May 12 07:04:05 2020 -0700
adding a protease track to uniprot, refs #25192
diff --git src/hg/hgTrackUi/hgTrackUi.c src/hg/hgTrackUi/hgTrackUi.c
index 738c147..d59e030 100644
--- src/hg/hgTrackUi/hgTrackUi.c
+++ src/hg/hgTrackUi/hgTrackUi.c
@@ -3076,126 +3076,30 @@
struct dyString *dy = dyStringNew(1024);
jsonDyStringPrint(dy, jsonGlobalsHash, "common", 0);
jsInline(dy->string);
dyStringFree(&dy);
}
}
void jsonObjectAddGlobal(char *name, struct jsonElement *ele)
/* Add json object to global hash */
{
if (jsonGlobalsHash == NULL)
jsonGlobalsHash = newJsonObject(newHash(5));
jsonObjectAdd(jsonGlobalsHash, name, ele);
}
-void showSupertrackInfo(struct trackDb *tdb)
-{
-// A bit of context when we're in hierarchy: parent description and sibling track list
-
-if (!tdb->parent)
- return;
-
-// show super-track info
-struct trackDb *tdbParent = tdb->parent;
-if (trackDbSetting(tdbParent, "wgEncode"))
- printf("
");
-printf("Track collection: %s ",
- hgTrackUiName(), cartSessionVarName(), cartSessionId(cart),
- chromosome, cgiEncode(tdbParent->track), tdbParent->longLabel);
-
-// show group info
-struct grp *grp, *grps = hLoadGrps(database);
-for (grp = grps; grp != NULL; grp = grp->next)
- {
- if (sameString(grp->name, tdb->grp))
- {
- printf(" "
- "(
All %s%s)",
- hgTracksName(), cartSessionVarName(), cartSessionId(cart), chromosome,
- tdb->grp, tdb->grp, grp->label, grp->label,
- endsWith(grp->label," Tracks")?"":" tracks");
- break;
- }
- }
-grpFreeList(&grps);
-
-// collapsed panel for Description
-
-printf("
");
-printf("
"); // required by jsCollapsible
-jsBeginCollapsibleSectionFontSize(cart, tdb->track, "superDescription", "Description", FALSE,
- "medium");
-char *html = replaceChars(tdbParent->html, "Description", "");
-html = replaceChars(html, "Description
", "");
-html = replaceChars(html, "Description
", "");
-
-// remove everything after Description text
-char *end = stringIn("", html);
-if (!end)
- end = stringIn("", html);
-if (!end)
- end = stringIn("", html);
-if (end)
- *end = '\0';
-printf("%s", html);
-printf("
To view the full description, click "
- "here.\n",
- hgTrackUiName(), cartSessionVarName(), cartSessionId(cart),
- chromosome, cgiEncode(tdbParent->track));
-jsEndCollapsibleSection();
-printf("
"); // required by jsCollapsible
-
-// collapsed panel for list of other tracks in the supertrack
-
-char listTitle[1000];
-safef(listTitle, sizeof listTitle, "All tracks in this collection (%d)",
- slCount(tdbParent->children));
-printf(""); // required by jsCollapsible
-jsBeginCollapsibleSectionFontSize(cart, tdb->track, "superMembers", listTitle, FALSE, "medium");
-printf("");
-struct slRef *childRef;
-tdbRefSortPrioritiesFromCart(cart, &tdbParent->children);
-for (childRef = tdbParent->children; childRef != NULL; childRef = childRef->next)
- {
- struct trackDb *sibTdb = childRef->val;
- if (sameString(sibTdb->track, tdb->track))
- {
- printf("%s | \n", sibTdb->shortLabel);
- printf("%s |
\n", sibTdb->longLabel);
- continue;
- }
- printf("");
- printf("%s | ",
- tdbIsDownloadsOnly(sibTdb) ? hgFileUiName(): hTrackUiForTrack(sibTdb->track),
- cartSessionVarName(), cartSessionId(cart), chromosome, cgiEncode(sibTdb->track),
- sibTdb->shortLabel);
- printf("%s |
\n", sibTdb->longLabel);
- }
-printf("
");
-jsEndCollapsibleSection();
-printf("
"); // required by jsCollapsible
-printf("");
-}
-
void trackUi(struct trackDb *tdb, struct trackDb *tdbList, struct customTrack *ct, boolean ajax)
/* Put up track-specific user interface. */
{
if (!ajax)
{
jsIncludeFile("jquery.js", NULL);
webIncludeResourceFile("jquery-ui.css");
jsIncludeFile("jquery-ui.js", NULL);
jsIncludeFile("utils.js",NULL);
webIncludeResourceFile("spectrum.min.css");
jsIncludeFile("spectrum.min.js",NULL);
jsonObjectAddGlobal("track", newJsonString(tdb->track));
jsonObjectAddGlobal("db", newJsonString(database));
}
#define RESET_TO_DEFAULTS "defaults"
@@ -3231,32 +3135,30 @@
printf("No description found for: %s.
",tdbParent?tdbParent->track:tdb->track);
}
cartRemove(cart,"descriptionOnly"); // This is a once only request and should be deleted
return;
}
if (tdbIsContainer(tdb))
{
safef(setting,sizeof(setting),"%s.%s",tdb->track,RESET_TO_DEFAULTS);
// NOTE: if you want track vis to not be reset, move to after vis dropdown
if (1 == cartUsualInt(cart, setting, 0))
cartRemoveAllForTdbAndChildren(cart,tdb);
else if (!ajax) // Overkill on !ajax, because ajax shouldn't be called for a composite
cartTdbTreeReshapeIfNeeded(cart,tdb);
}
-/* track configuration form */
-
printf("