a9dd8b9c383927df373d50e5917b20c959c662fc kate Wed Nov 23 10:49:30 2016 -0800 Link to new GTEX Body Map configuration page from hgc and config page. From QA review. refs #17369 diff --git src/hg/lib/gtexUi.c src/hg/lib/gtexUi.c index d4b3503..b8969e2 100644 --- src/hg/lib/gtexUi.c +++ src/hg/lib/gtexUi.c @@ -1,41 +1,67 @@ /* GTEx (Genotype Tissue Expression) track controls */ /* Copyright (C) 2015 The Regents of the University of California * See README in this or parent directory for licensing information. */ #include "cheapcgi.h" #include "cart.h" #include "hui.h" #include "trackDb.h" #include "jsHelper.h" +#include "hCommon.h" #include "gtexTissue.h" #include "gtexInfo.h" #include "gtexUi.h" #define SYSTEM_BRAIN "Brain" #define SYSTEM_REPRODUCTIVE "Reproductive" #define SYSTEM_GASTRO "Digestive" #define SYSTEM_ENDOCRINE "Endocrine" #define SYSTEM_CARDIO "Cardiovascular" #define SYSTEM_OTHER "Other" /* Restrict features on right-click (popup) version */ static boolean isPopup = FALSE; +/* Path to Body Map-based track configuration */ +static char *_hgGtexTrackSettingsName = "../cgi-bin/hgGtexTrackSettings"; + +boolean gtexIsGeneTrack(char *trackName) +/* Identify GTEx gene track so custom trackUi CGI can be launched */ +{ +return startsWith(GTEX_GENE_TRACK_BASENAME, trackName); +} + +char *gtexGeneTrackUiName() +/* Refer to Body Map CGI if suitable */ +{ +// TODO: Remove cfg option when CGI is formally released +#include "hgConfig.h" +if (!cfgOption("gtexBodyMap")) + return hgTrackUiName(); + +// Display body map configuration page if user is on a browser we've tested +enum browserType bt = cgiBrowser(); +if (bt == btChrome || bt == btFF || bt == btSafari) + return(_hgGtexTrackSettingsName); + +return hgTrackUiName(); +} + /* Convenience functions for tissue filter controls */ static char *makeTissueColorPatch(struct gtexTissue *tis) /* Display a box colored by defined tissue color */ { char buf[256]; safef(buf, sizeof(buf), "