4d1bafe4de39413f4ab1a9cd7183c64655b01e0a kate Mon Oct 24 14:59:31 2016 -0700 Temporarily hardcode hg19 for review purposes. refs #17369 diff --git src/hg/hgGtexTrackSettings/hgGtexTrackSettings.c src/hg/hgGtexTrackSettings/hgGtexTrackSettings.c index 6a96147..bc47caa 100644 --- src/hg/hgGtexTrackSettings/hgGtexTrackSettings.c +++ src/hg/hgGtexTrackSettings/hgGtexTrackSettings.c @@ -54,37 +54,42 @@ jsIncludeFile("utils.js",NULL); } static void printTrackDescription() { puts(""); puts("
"); puts("
Track Description
"); puts("
" "" "" //"" "
"); puts("
"); struct sqlConnection *conn = sqlConnect(db); +if (conn == NULL) + errAbort("Can't connect to database %s\n", db); char query[256]; sqlSafef(query, sizeof(query), "select html from trackDb where tableName='gtexGene'"); char *html = sqlQuickString(conn, query); -sqlDisconnect(&conn); +if (html != NULL) + { puts("
"); puts("
"); puts(html); + } +sqlDisconnect(&conn); puts("
"); puts(""); } static void printTissueTable(char *version) /* Output HTML with tissue labels and colors, in 2 columns, to fit next to body map */ { struct gtexTissue *tis, *tissues = gtexGetTissues(version); struct gtexTissue **tisTable = NULL; int count = slCount(tissues); AllocArray(tisTable, count); int i=0, col=0; int cols = 2; int last = count/2 + 1; @@ -108,31 +113,37 @@ if (col > cols-1) { puts("\n"); col = 0; } } puts("\n"); puts(""); } static void doMainPage() /* Send HTML with javascript to bootstrap the user interface. */ { // Start web page with new banner char *genome = NULL, *clade = NULL; -getDbGenomeClade(cart, &db, &genome, &clade, oldVars); +//getDbGenomeClade(cart, &db, &genome, &clade, oldVars); + +/* hardcode for now -- later, check for hg19 or hg38 */ + +db = "hg19"; +genome = "human"; +clade = "mammal"; // char *chromosome = cartUsualString(cart, "c", hDefaultChrom(database)); //char *track = cartString(cart, "g"); webStartJWestNoBanner(cart, db, "Genome Browser GTEx Track Settings"); puts(""); puts(""); // The initial visible page elements are hgGtexTrackSettings.html, // which is transformed into a quoted .h // file containing a string constant that we #include and print here (see makefile). puts( #include "hgGtexTrackSettings.html.h" ); @@ -144,31 +155,31 @@ printTissueTable(gtexVersion(table)); puts(""); printTrackDescription(); puts(""); // end panel, section and body layout container // Track description // JS libraries doJsIncludes(); // Main JS -puts(""); +puts(""); webIncludeFile("inc/jWestFooter.html"); webEndJWest(); } void doMiddle(struct cart *theCart) /* Display the main page or execute a command and update the page */ { cart = theCart; if (cgiOptionalString(CARTJSON_COMMAND)) doCartJson(); else doMainPage();