ab076cf0a98938e33c5e76b251f8ed1110c4923c kate Thu Oct 22 16:51:00 2015 -0700 Improve display for non-log transformed by adding max view limit. refs #15645 diff --git src/hg/lib/gtexUi.c src/hg/lib/gtexUi.c index b39a71d..95bfe73 100644 --- src/hg/lib/gtexUi.c +++ src/hg/lib/gtexUi.c @@ -1,56 +1,57 @@ /* 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 "gtexUi.h" void gtexGeneUi(struct cart *cart, struct trackDb *tdb, char *name, char *title, boolean boxed) /* GTEx (Genotype Tissue Expression) per gene data */ { boxed = cfgBeginBoxAndTitle(tdb, boxed, title); printf("<TABLE%s><TR><TD>",boxed?" width='100%'":""); char cartVarName[1024]; char *selected = NULL; /* Sample selection */ printf("<p><b>Samples:</b> "); safef(cartVarName, sizeof(cartVarName), "%s.%s", name, GTEX_SAMPLES); selected = cartCgiUsualString(cart, cartVarName, GTEX_SAMPLES_DEFAULT); boolean isAllSamples = sameString(selected, GTEX_SAMPLES_ALL); cgiMakeRadioButton(cartVarName, GTEX_SAMPLES_ALL, isAllSamples); printf("All\n"); cgiMakeRadioButton(cartVarName, GTEX_SAMPLES_COMPARE_SEX, !isAllSamples); printf("Compare by gender\n"); /* Data transform */ printf("<p><B>Log10 transform:</B>\n"); safef(cartVarName, sizeof(cartVarName), "%s.%s", name, GTEX_LOG_TRANSFORM); boolean isLogTransform = cartCgiUsualBoolean(cart, cartVarName, GTEX_LOG_TRANSFORM_DEFAULT); cgiMakeCheckBox(cartVarName, isLogTransform); printf("</p>\n"); /* Viewing limits max */ printf("<p><B>View limits maximum:</B>\n"); safef(cartVarName, sizeof(cartVarName), "%s.%s", name, GTEX_MAX_LIMIT); // TODO: set max and initial limits from gtexInfo table -cgiMakeDoubleVarWithLimits(cartVarName, 100, NULL, 5, 10, 178200); +int viewMax = cartCgiUsualInt(cart, cartVarName, GTEX_MAX_LIMIT_DEFAULT); +cgiMakeIntVar(cartVarName, viewMax, 4); printf("RKPM (range 10-180000)<br>\n"); /* Color scheme */ printf("<p><B>Tissue colors:</B>\n"); safef(cartVarName, sizeof(cartVarName), "%s.%s", name, GTEX_COLORS); selected = cartCgiUsualString(cart, cartVarName, GTEX_COLORS_DEFAULT); boolean isGtexColors = sameString(selected, GTEX_COLORS_GTEX); cgiMakeRadioButton(cartVarName, GTEX_COLORS_GTEX, isGtexColors); printf("GTEx\n"); cgiMakeRadioButton(cartVarName, GTEX_COLORS_RAINBOW, !isGtexColors); printf("rainbow\n"); cfgEndBox(boxed); }