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("<TABLE BORDER=0>"); 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("<th align=right>Negate values:</th><td align=left>"); safef(option, sizeof(option), "%s.%s", name, DONEGATIVEMODE ); cgiMakeCheckBox(option, doNegative); puts("</TD></TR>"); printf("<TR valign=middle><td align=right><b>Draw y indicator lines:</b></td>" "<td align=left colspan=2>"); 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("<TR valign=middle><td align=right><b>Draw sequence logo when near base level:</b></td>" + "<td align=left colspan=2>"); + safef(option, sizeof(option), "%s.%s", name, DOSEQUENCELOGOMODE ); + cgiMakeCheckBox(option, doSequenceLogo); + } } if (boxed) puts("</TD></TR></TABLE>"); else { puts("</TD></TR></TABLE>"); if (!isLogo) printf("<A HREF=\"%s\" TARGET=_blank>Graph configuration help</A>",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);