0b6ca6827857d15705fb41028e8938c82aae9d3e kate Mon Jan 8 16:01:06 2018 -0800 Add standard box config. refs #17512 diff --git src/hg/lib/longRange.c src/hg/lib/longRange.c index 2637527..c2d95ce 100644 --- src/hg/lib/longRange.c +++ src/hg/lib/longRange.c @@ -1,42 +1,49 @@ /* longRange --- functions to provide UI for long range interaction * graph. Functions to retrieve long range information from * bedTabix format. */ /* Copyright (C) 2016 The Regents of the University of California * * See README in this or parent directory for licensing information. */ +#include "hui.h" #include "longRange.h" void longRangeCfgUi(struct cart *cart, struct trackDb *tdb, char *name, char *title, boolean boxed) /* Complete track controls for long range interaction. */ { +boxed = cfgBeginBoxAndTitle(tdb, boxed, title); + +// track height control char buffer[1024]; int min, max, deflt, current; cartTdbFetchMinMaxPixels(cart, tdb, LONG_MINHEIGHT, LONG_MAXHEIGHT, atoi(LONG_DEFHEIGHT), &min, &max, &deflt, ¤t); safef(buffer, sizeof buffer, "%s.%s", tdb->track, LONG_HEIGHT); printf("
Track height: "); cgiMakeIntVar(buffer, current, 3); printf(" pixels (range: %d to %d, default: %d)", min, max, deflt); +// score control safef(buffer, sizeof buffer, "%s.%s", tdb->track, LONG_MINSCORE); double minScore = sqlDouble(cartUsualString(cart, buffer, LONG_DEFMINSCORE)); printf("

Minimum score: "); cgiMakeDoubleVar(buffer, minScore, 0); + +cfgEndBox(boxed); } static char *getOther(struct bed *bed, unsigned *s, unsigned *e, boolean *hasColor, double *score, unsigned *rgb) /* parse the name field of longTabix to get the other location */ { char *otherChrom = cloneString(bed->name); char *ptr = strchr(otherChrom, ':'); if (ptr == NULL) errAbort("bad longTabix bed name %s\n", bed->name); *ptr++ = 0; *s = atoi(ptr); ptr = strchr(ptr, '-'); if (ptr == NULL) errAbort("bad longTabix bed name %s\n", bed->name);