984ba3b31499263d5e71deff44dbf7f23abc2bda chmalee Fri Dec 13 12:01:13 2019 -0800 hgTrack makes a color key for the pLI track, refs #20394 diff --git src/hg/hgTracks/simpleTracks.c src/hg/hgTracks/simpleTracks.c index 6aa6a31..7f971ca 100644 --- src/hg/hgTracks/simpleTracks.c +++ src/hg/hgTracks/simpleTracks.c @@ -163,30 +163,31 @@ Color blueColor = 0; Color darkBlueColor = 0; Color greenColor = 0; Color darkGreenColor = 0; boolean exprBedColorsMade = FALSE; /* Have the shades of Green, Red, and Blue been allocated? */ int maxRGBShade = EXPR_DATA_SHADES - 1; Color scafColor[SCAF_COLORS+1]; /* declare colors for scaffold coloring, +1 for unused scaffold 0 color */ Color chromColor[CHROM_COLORS+1]; /* Declare colors for chromosome coloring, +1 for unused chrom 0 color */ /* Have the 3 shades of 8 chromosome colors been allocated? */ boolean chromosomeColorsMade = FALSE; +boolean doPliColors = FALSE; /* have the 10 scaffold colors been allocated */ static boolean scafColorsMade = FALSE; int maxItemsInFullTrack = 1000; /* Maximum number of items displayed in full */ int maxItemsToUseOverflowDefault = 10000; /* # of items to allow overflow mode*/ /* These variables persist from one incarnation of this program to the * next - living mostly in the cart. */ // multi-window variables global to hgTracks struct window *windows = NULL; // list of windows in image struct window *currentWindow = NULL; bool trackLoadingInProgress; // flag to delay ss layout until all windows are ready. int fullInsideX; // full-image insideX int fullInsideWidth; // full-image insideWidth @@ -4779,30 +4780,34 @@ struct hvGfx *hvg, int xOff, int yOff, int width, MgFont *font, Color color, enum trackVisibility vis) /* Draw linked features items. */ { if (tg->items == NULL && vis == tvDense && canDrawBigBedDense(tg)) { bigBedDrawDense(tg, seqStart, seqEnd, hvg, xOff, yOff, width, font, color); } else { if (vis == tvDense && tg->colorShades) slSort(&tg->items, cmpLfWhiteToBlack); genericDrawItems(tg, seqStart, seqEnd, hvg, xOff, yOff, width, font, color, vis); } + +// put up the color key for the gnomAD pLI track +if (startsWith("pliBy", tg->track)) + doPliColors = TRUE; } void incRange(UBYTE *start, int size) /* Add one to range of bytes, taking care to not overflow. */ { int i; UBYTE b; for (i=0; i<size; ++i) { b = start[i]; if (b < 254) start[i] = b+2; } }