be4311c07e14feb728abc6425ee606ffaa611a58
markd
Fri Jan 22 06:46:58 2021 -0800
merge with master
diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c
index 3eaf710..a49db1c 100644
--- src/hg/hgTracks/hgTracks.c
+++ src/hg/hgTracks/hgTracks.c
@@ -4221,30 +4221,35 @@
errCatchFree(&errCatch);
bed->chrom=cloneString(bed->chrom); // loadAndValidateBed does not do it for speed. but bedFree needs it.
struct chromInfo *ci = hGetChromInfo(database, bed->chrom);
if (ci == NULL)
{
warn("Couldn't find chromosome/scaffold %s in database", bed->chrom);
return FALSE;
}
if (bed->chromEnd > ci->size)
{
warn("BED chromEnd %u > size %u for chromosome/scaffold %s", bed->chromEnd, ci->size, bed->chrom);
return FALSE;
}
+ if (!(bed->chromEnd > bed->chromStart)) // do not allow empty regions
+ {
+ warn("BED chromEnd %u must be greater than chromStart %u %s", bed->chromEnd, bed->chromStart, bed->chrom);
+ return FALSE;
+ }
slAddHead(&bedList, bed);
struct virtRegion *v;
if (numFields < 12)
{
AllocVar(v);
v->chrom = cloneString(bed->chrom);
v->start = bed->chromStart;
v->end = bed->chromEnd;
slAddHead(&virtRegionList, v);
}
else
{
int e;
@@ -8847,43 +8852,43 @@
hButtonWithOnClick("hgt.setWidth", "resize", "Resize image width to browser window size", "hgTracksSetWidth()");
hPrintf(" ");
hButtonWithMsg("hgt.refresh", "refresh","Refresh image");
hPrintf("
\n");
if( chromosomeColorsMade )
{
hPrintf("Chromosome Color Key:
");
hPrintf("
\n");
}
if (doPliColors)
{
- hPrintf("gnomAD Loss-of-Function Constraint (pLI) Color Key:
");
+ hPrintf("gnomAD Loss-of-Function Constraint (LOEUF) Color Key:
");
hPrintf("
\n");
- hPrintf("< 0.1 | \n");
- hPrintf("< 0.2 | \n");
- hPrintf("< 0.3 | \n");
- hPrintf("< 0.4 | \n");
- hPrintf("< 0.5 | \n");
- hPrintf("< 0.6 | \n");
- hPrintf("< 0.7 | \n");
- hPrintf("< 0.8 | \n");
- hPrintf("< 0.9 | \n");
- hPrintf("< 1 | \n");
- hPrintf("No pLI score | \n");
+ hPrintf("< 0.1 | \n");
+ hPrintf("< 0.2 | \n");
+ hPrintf("< 0.3 | \n");
+ hPrintf("< 0.4 | \n");
+ hPrintf("< 0.5 | \n");
+ hPrintf("< 0.6 | \n");
+ hPrintf("< 0.7 | \n");
+ hPrintf("< 0.8 | \n");
+ hPrintf("< 0.9 | \n");
+ hPrintf("≥ 0.9 | \n");
+ hPrintf("No LOEUF score | \n");
hPrintf("
\n");
}
if (showTrackControls)
{
/* Display viewing options for each track. */
/* Chuck: This is going to be wrapped in a table so that
* the controls don't wrap around randomly */
hPrintf("\n", CONTROL_TABLE_WIDTH);
hPrintf("\n");
hButtonWithOnClick("hgt.collapseGroups", "collapse all", "collapse all track groups",
"return vis.expandAllGroups(false)");
hPrintf(" | ");
@@ -10555,63 +10560,67 @@
}
extern boolean issueBotWarning;
void doMiddle(struct cart *theCart)
/* Print the body of an html file. */
{
cart = theCart;
measureTiming = hPrintStatus() && isNotEmpty(cartOptionalString(cart, "measureTiming"));
if (measureTiming)
measureTime("Startup (bottleneck %d ms) ", botDelayMillis);
char *mouseOverEnabled = cfgOption("mouseOverEnabled");
if (sameWordOk(mouseOverEnabled, "on"))
{
+ /* can not use mouseOver in any virtual mode */
+ char *isMultiRegion = cartUsualString(cart, "virtModeType", "default");
+ if (sameWordOk(isMultiRegion, "default"))
+ {
enableMouseOver = TRUE;
/* mouseOverJsonFile will be initializes and created at the same
* time as the browser .png image file
*/
mouseOverJson = jsonWriteNew();
jsonWriteObjectStart(mouseOverJson, NULL);
/* this jsonWrite structure will finish off upon successful exit.
* each track will start a list with the track name:
* jsonWriteListStart(mouseOverJson, tg->track);
*/
}
+ }
else
enableMouseOver = FALSE;
if (issueBotWarning)
{
char *ip = getenv("REMOTE_ADDR");
botDelayMessage(ip, botDelayMillis);
}
char *debugTmp = NULL;
/* Uncomment this to see parameters for debugging. */
/* struct dyString *state = NULL; */
/* Initialize layout and database. */
if (measureTiming)
measureTime("Get cart of %d for user:%s session:%s", theCart->hash->elCount,
theCart->userId, theCart->sessionId);
/* #if 1 this to see parameters for debugging. */
/* Be careful though, it breaks if custom track
* is more than 4k */
#if 0
-state = cgiUrlString();
-printf("State: %s\n", state->string);
+printf("State: %s\n", cgiUrlString()->string);
#endif
getDbAndGenome(cart, &database, &organism, oldVars);
genomeIsRna = !isHubTrack(database) && hgPdbOk(database);
initGenbankTableNames(database);
protDbName = hPdbFromGdb(database);
debugTmp = cartUsualString(cart, "hgDebug", "off");
if(sameString(debugTmp, "on"))
hgDebug = TRUE;
else
hgDebug = FALSE;