57eae5f7b2e6b074ec603bbe3d1c3bf6b409e81a braney Tue Dec 4 15:10:58 2018 -0800 turn off scoreFilters for bigBeds unless explicitly asked for diff --git src/hg/lib/hui.c src/hg/lib/hui.c index 4b2e8e9..44df20d 100644 --- src/hg/lib/hui.c +++ src/hg/lib/hui.c @@ -5901,63 +5901,56 @@ printf("<OPTION %s>%s</OPTION>", sameString(setting, FILTERTEXT_REGEXP) ? "SELECTED" : "", FILTERTEXT_REGEXP ); printf("</SELECT>"); printf("</P>"); } } } void scoreCfgUi(char *db, struct cart *cart, struct trackDb *tdb, char *name, char *title, int maxScore, boolean boxed) // Put up UI for filtering bed track based on a score { char option[256]; boolean parentLevel = isNameAtParentLevel(tdb,name); boolean skipScoreFilter = FALSE; +// score filters are explicitly handled by bigBed. It's not automatically on. +if (tdbIsBigBed(tdb)) + skipScoreFilter = TRUE; + // Numeric filters are first boolean isBoxOpened = FALSE; if (numericFiltersShowAll(db, cart, tdb, &isBoxOpened, boxed, parentLevel, name, title) > 0) skipScoreFilter = TRUE; textFiltersShowAll(db, cart, tdb); // Add any multi-selects next filterBy_t *filterBySet = filterBySetGet(tdb,cart,name); if (filterBySet != NULL) { if (!tdbIsComposite(tdb) && cartOptionalString(cart, "ajax") == NULL) jsIncludeFile("hui.js",NULL); if (!isBoxOpened) // Note filterBy boxes are not double "boxed", printf("<BR>"); // if there are no other filters filterBySetCfgUi(cart,tdb,filterBySet,TRUE, name); filterBySetFree(&filterBySet); skipScoreFilter = TRUE; } -// For no good reason scoreFilter is incompatible with filterBy and or numericFilters -// FIXME scoreFilter should be implemented inside numericFilters and is currently specificly -// excluded to avoid unexpected changes -if (skipScoreFilter) - { - if (isBoxOpened) - cfgEndBox(boxed); - - return; // Cannot have both '*filter' and 'scoreFilter' - } - -boolean scoreFilterOk = (trackDbSettingClosestToHome(tdb, NO_SCORE_FILTER) == NULL); +boolean scoreFilterOk = (trackDbSettingClosestToHome(tdb, NO_SCORE_FILTER) == NULL) && !skipScoreFilter; boolean glvlScoreMin = (trackDbSettingClosestToHome(tdb, GRAY_LEVEL_SCORE_MIN) != NULL); if (! (scoreFilterOk || glvlScoreMin)) return; boxed = cfgBeginBoxAndTitle(tdb, boxed, title); if (scoreFilterOk) { int minLimit=0,maxLimit=maxScore,minVal=0,maxVal=maxScore; getScoreIntRangeFromCart(cart,tdb,parentLevel,SCORE_FILTER,&minLimit,&maxLimit, &minVal, &maxVal); boolean filterByRange = trackDbSettingClosestToHomeOn(tdb, SCORE_FILTER _BY_RANGE); if (filterByRange) { puts("<B>Filter score range: min:</B>");