dd1d497191bd730a2accfa06ec62b3fc0d276722
braney
  Tue Feb 14 13:59:23 2023 -0800
sequence logo tracks should pay attention to change of viewing strand

diff --git src/hg/hgTracks/wigTrack.c src/hg/hgTracks/wigTrack.c
index fc09a69..0df427a 100644
--- src/hg/hgTracks/wigTrack.c
+++ src/hg/hgTracks/wigTrack.c
@@ -1184,30 +1184,33 @@
 
 return(mouseOverData);
 }	/*	graphPreDraw()	*/
 
 static struct wigMouseOver *logoPreDrawContainer(struct preDrawContainer *preDrawContainer,
     int preDrawZero, int width, struct track *tg, struct hvGfx *hvg,
     int xOff, int yOff, double graphUpperLimit, double graphLowerLimit,
     double graphRange, enum trackVisibility vis, struct wigCartOptions *wigCart, int seqStart, int seqEnd)
 {
 boolean baseCmpl = cartUsualBooleanDb(cart, database, COMPLEMENT_BASES_VAR, FALSE);
 struct preDrawElement *preDraw = preDrawContainer->preDraw;
 struct wigGraphOutput *wgo = tg->wigGraphOutput;
 //struct wigMouseOver *mouseOverData = NULL;
 unsigned numBases = seqEnd - seqStart;
 struct dnaSeq *seq = hChromSeq(database, chromName, seqStart, seqEnd);
+if (baseCmpl)
+    complement(seq->dna, seq->size);
+
 struct pixelCountBin *pixelBins = wgo->pixelBins;
 double *yOffsets = wgo->yOffsets;
 int numTrack = wgo->numTrack;
 Color clipColor = MG_MAGENTA;
 WigVerticalLineVirtual vLine = wgo->vLine;
 void *image = wgo->image;
 #define doLine(image, x, y, height, color) {vLine(image, x, y, height, color); }
 
 int h = tg->lineHeight;	/*	the height of our drawing window */
 double scaleFactor = h/graphRange;
 struct wigMouseOver *mouseOverData = getMouseOverData(tg, preDraw, width, xOff, preDrawZero);
 
 double xIncr = (double)width / numBases;
 unsigned baseNum;
 for(baseNum = 0; baseNum < numBases; baseNum++)