141deaec9ba7a2912faedaf2a62fa189108b4c43 braney Thu Apr 13 12:15:01 2023 -0700 some final clean-up on logoMaf: allow the user to turn it off, and scale by the amount of the data within the clipping rectangle diff --git src/hg/lib/hui.c src/hg/lib/hui.c index 5809699..f82b4d5 100644 --- src/hg/lib/hui.c +++ src/hg/lib/hui.c @@ -6023,30 +6023,31 @@ wordCount = chopLine(typeLine,words); wigFetchMinMaxYWithCart(cart, tdb, name, &minY, &maxY, &tDbMinY, &tDbMaxY, wordCount, words); freeMem(typeLine); wigFetchTransformFuncWithCart(cart,tdb,name, &transformFunc); wigFetchAlwaysZeroWithCart(cart,tdb,name, &alwaysZero); wigFetchHorizontalGridWithCart(cart,tdb,name, &horizontalGrid); wigFetchAutoScaleWithCart(cart,tdb,name, &autoScale); wigFetchGraphTypeWithCart(cart,tdb,name, &lineBar); wigFetchWindowingFunctionWithCart(cart,tdb,name, &windowingFunction); wigFetchSmoothingWindowWithCart(cart,tdb,name, &smoothingWindow); wigFetchYLineMarkWithCart(cart,tdb,name, &yLineMarkOnOff); wigFetchYLineMarkValueWithCart(cart,tdb,name, &yLineMark); boolean doNegative = wigFetchDoNegativeWithCart(cart,tdb,tdb->track, (char **) NULL); +boolean doSequenceLogo = wigFetchDoSequenceLogoWithCart(cart,tdb,tdb->track, (char **) NULL); printf(""); boolean isLogo = ((tdb->parent != NULL) && trackDbSetting(tdb->parent, "logo") != NULL); boolean parentLevel = isNameAtParentLevel(tdb, name); boolean didAggregate = FALSE; if (parentLevel && !isLogo) { assert(tdb->parent != NULL); char *aggregate = trackDbSetting(tdb->parent, "aggregate"); if (aggregate != NULL && parentLevel) { char *aggregateVal = cartOrTdbString(cart, tdb->parent, "aggregate", NULL); safef(option, sizeof(option), "%s.%s", name, AGGREGATE); if (isCustomComposite(tdb)) @@ -6161,30 +6162,40 @@ printf(""); printf("" "" + "
Negate values:"); safef(option, sizeof(option), "%s.%s", name, DONEGATIVEMODE ); cgiMakeCheckBox(option, doNegative); puts("
Draw y indicator lines:"); printf("at y = 0.0:"); safef(option, sizeof(option), "%s.%s", name, HORIZGRID ); wiggleGridDropDown(option, horizontalGrid); printf("   at y ="); safef(option, sizeof(option), "%s.%s", name, YLINEMARK ); cgiMakeDoubleVarInRange(option, yLineMark, "Indicator at Y", 0, NULL, NULL); safef(option, sizeof(option), "%s.%s", name, YLINEONOFF ); wiggleYLineMarkDropDown(option, yLineMarkOnOff); + + char *logoMaf = trackDbSetting(tdb, "logoMaf"); + + if (logoMaf) + { + printf("
Draw sequence logo when near base level:"); + safef(option, sizeof(option), "%s.%s", name, DOSEQUENCELOGOMODE ); + cgiMakeCheckBox(option, doSequenceLogo); + } } if (boxed) puts("
"); else { puts(""); if (!isLogo) printf("Graph configuration help",WIGGLE_HELP_PAGE); } // add a little javascript call to make sure we don't get whiskers with stacks in multiwigs if (didAggregate) jsInlineF("$(function () { multiWigSetupOnChange('%s'); });\n", name);