1d1ec71b7037cbb9968eff531f68d8840dff3fad angie Fri Dec 13 12:56:12 2013 -0800 In MLQ #12327, user reported that BAM track colored by tag was turningblue as we zoomed out, even though most items are red. Unbeknownst to me, if a linkedFeatures track has non-NULL colorShades, items are sorted by their color, and in this case it favored blue over other colors. Only the gray-scale coloring modes need colorShades. So don't add colorShades unless the coloring mode is gray-scale. refs #12327 diff --git src/hg/hgTracks/bamTrack.c src/hg/hgTracks/bamTrack.c index b0be159..63ee2d5 100644 --- src/hg/hgTracks/bamTrack.c +++ src/hg/hgTracks/bamTrack.c @@ -814,31 +814,31 @@ { linkedFeaturesMethods(track); track->loadItems = bamLoadItems; track->drawItems = bamLinkedFeaturesDraw; track->drawItemAt = bamDrawAt; } if (!showNames) { track->drawName = TRUE; // ironic, but this is how to suppress item labels in pack mode. track->drawLeftLabels = maybeDrawLeftLabels; } track->nextItemButtonable = track->nextExonButtonable = FALSE; track->nextPrevItem = NULL; track->nextPrevExon = NULL; -if (differentString(colorMode, BAM_COLOR_MODE_OFF)) +if (sameString(colorMode, BAM_COLOR_MODE_GRAY)) track->colorShades = shadesOfGray; } struct bamWigTrackData { struct preDrawElement *preDraw; double scale; int width; int preDrawZero; }; static int countBam(const bam1_t *bam, void *data) /* bam_fetch() calls this on each bam alignment retrieved. */ { struct bamWigTrackData *btd = (struct bamWigTrackData *)data;