df22e780c9e8a304b59e6d26bc34e0f729e33e45 galt Thu Nov 13 17:07:54 2025 -0800 Adds a checkbox that turns on rearrangement mode automatically for all CTs generated by hgBlat. This is one of the main features of the ticket, but not all desired features. fixes #32857 diff --git src/hg/hgBlat/hgBlat.c src/hg/hgBlat/hgBlat.c index 901fa42df3e..0816e941f76 100644 --- src/hg/hgBlat/hgBlat.c +++ src/hg/hgBlat/hgBlat.c @@ -30,30 +30,31 @@ #include "portable.h" #include "portable.h" #include "dystring.h" #include "chromInfo.h" #include "net.h" #include "fuzzyFind.h" #include "chromAlias.h" #include "subText.h" struct cart *cart; /* The user's ui state. */ struct hash *oldVars = NULL; boolean orgChange = FALSE; boolean dbChange = FALSE; boolean allGenomes = FALSE; boolean allResults = FALSE; +boolean autoRearr = FALSE; static long enteredMainTime = 0; boolean autoBigPsl = FALSE; // DEFAULT VALUE change to TRUE in future /* for earlyBotCheck() function at the beginning of main() */ #define delayFraction 0.5 /* standard penalty is 1.0 for most CGIs */ /* this one is 0.5 */ static boolean issueBotWarning = FALSE; struct gfResult /* Detailed gfServer results, this is a span of several nearby tiles, minimum 2 for dna. */ { struct gfResult *next; /* have to multiply translated coordinates by 3 */ @@ -2120,30 +2121,40 @@ htmlPrintf("\n", userSeq); printf("\n"); printf("\n"); printf("\n"); printf("\n"); cgiMakeCheckBoxWithId("allResults", allResults, "allResults"); printf("All Results (no minimum matches)"); // clicking on the All Results text clicks the checkbox. jsOnEventById("click", "allResultsText", "document.mainForm.allResults.click();" "return false;" // cancel the default ); printf("\n"); +printf("\n"); +cgiMakeCheckBoxWithId("autoRearr", autoRearr, "autoRearr"); +printf("Automatically Turn on Rearrangement Mode in Custom Tracks"); +// clicking on the autoRearr text clicks the checkbox. +jsOnEventById("click", "autoRearrText", + "document.mainForm.autoRearr.click();" + "return false;" // cancel the default + ); +printf("\n"); + printf("\n"); printf("\n"); printf("\n"); printf("\n"); printf("\n"); printf("\n"); printf("\n"); puts("\n" "Paste in a query sequence to find its location in the\n" "the genome. Multiple sequences may be searched \n" "if separated by lines starting with '>' followed by the sequence name.\n" "\n" "\n" ); @@ -2408,30 +2419,31 @@ cart = theCart; dnaUtilOpen(); orgChange = sameOk(cgiOptionalString("changeInfo"),"orgChange"); if (orgChange) cgiVarSet("db", hDefaultDbForGenome(cgiOptionalString("org"))); getDbAndGenome(cart, &db, &organism, oldVars); chromAliasSetup(db); char *oldDb = cloneString(db); // n.b. this changes to default db if db doesn't have BLAT findClosestServer(&db, &organism); allResults = cartUsualBoolean(cart, "allResults", allResults); +autoRearr = cartUsualBoolean(cart, "autoRearr", autoRearr); /* Get sequence - from userSeq variable, or if * that is empty from a file. */ if (clearUserSeq) { cartSetString(cart, "userSeq", ""); cartSetString(cart, "seqFile", ""); } userSeq = cartUsualString(cart, "userSeq", ""); if (isEmpty(userSeq)) { userSeq = cartOptionalString(cart, "seqFile"); } if (isEmpty(userSeq) || orgChange) {