2571f42146cbc4c8d9e869a07ca8312d75330cd0
braney
  Thu Jan 26 07:15:22 2023 -0800
fix compiler error is USE_HAL==0

diff --git src/hg/hgTracks/chainSnakeTrack.c src/hg/hgTracks/chainSnakeTrack.c
index 1a31896..3d30b92 100644
--- src/hg/hgTracks/chainSnakeTrack.c
+++ src/hg/hgTracks/chainSnakeTrack.c
@@ -13,31 +13,30 @@
 #include "chainBlock.h"
 #include "chainLink.h"
 #include "chainDb.h"
 #include "chainCart.h"
 #include "errCatch.h"
 #include "twoBit.h"
 #include "bigWarn.h"
 #include <pthread.h>
 #include "trackHub.h"
 #include "limits.h"
 #include "snakeUi.h"
 #include "bits.h"
 #include "trix.h"
 #include "chromAlias.h"
 
-#include "halBlockViz.h"
 #include "bigPsl.h"
 #include "snake.h"
 
 // this is the number of pixels used by the target self-align bar
 #define DUP_LINE_HEIGHT	4
 // this is the number of pixels used when displaying the insertion lengths
 #define INSERT_TEXT_HEIGHT 10
 
 struct snakeFeature
     {
     struct snakeFeature *next;
     int start, end;			/* Start/end in browser coordinates. */
     int qStart, qEnd;			/* query start/end */
     int level;				/* level in snake */
     int orientation;			/* strand... -1 is '-', 1 is '+' */
@@ -779,32 +778,30 @@
 /* Draw a single simple bed item at position. */
 {
 unsigned showSnpWidth = cartOrTdbInt(cart, tg->tdb, 
     SNAKE_SHOW_SNP_WIDTH, SNAKE_DEFAULT_SHOW_SNP_WIDTH);
 struct linkedFeatures  *lf = (struct linkedFeatures *)item;
 
 
 if (tg->visibility == tvFull) 
     calcFullSnake(tg, item);
 else if (tg->visibility == tvPack)
     calcPackSnake(tg, item);
 
 if (lf->components == NULL)
     return;
 
-boolean isHalSnake = lf->isHalSnake;
-
 struct snakeFeature  *sf = (struct snakeFeature *)lf->components, *prevSf = NULL;
 int s = tg->itemStart(tg, item);
 int sClp = (s < winStart) ? winStart : s;
 int x1 = round((sClp - winStart)*scale) + xOff;
 int textX = x1;
 int yOff = y;
 boolean withLabels = (withLeftLabels && (vis == tvFull) && !tg->drawName);
 unsigned   labelColor = MG_BLACK;
 
 // draw the labels
 if (withLabels)
     {
     char *name = tg->itemName(tg, item);
     int nameWidth = mgFontStringWidth(font, name);
     int dotWidth = tl.nWidth/2;
@@ -952,85 +949,71 @@
 	{
 	int olap = insideX - sx;
 	sx = insideX;
 	w -= olap;
 	}
     char qAddress[4096];
     if ((vis == tvFull) || (vis == tvPack) )
 	{
 	safef(qAddress, sizeof qAddress, "qName=%s&qs=%d&qe=%d&qWidth=%d",sf->qName,  qs, qe,  winEnd - winStart);
 	boundMapBox(hvg, s, e, sx+1, y, w-2, heightPer, tg->track,
 		    buffer, buffer, NULL, TRUE, qAddress);
 	}
     hvGfxBox(hvg, sx, y, w, heightPer, color);
 
     // now draw the mismatches if we're at high enough resolution 
-    //if ((isHalSnake && sf->qSequence != NULL) && (winBaseCount < showSnpWidth) && ((vis == tvFull) || (vis == tvPack)))
     if ( (winBaseCount < showSnpWidth) && ((vis == tvFull) || (vis == tvPack)))
 	{
 	char *twoBitString = trackDbSetting(tg->tdb, "twoBit");
 	static struct twoBitFile *tbf = NULL;
 	static char *lastTwoBitString = NULL;
 	static struct dnaSeq *seq = NULL;
 	static char *lastQName = NULL;
 
 	// sequence for chain snakes is in 2bit files which we cache
-	if (!isHalSnake)
-	    {
         if (twoBitString == NULL)
             twoBitString = "/gbdb/hg19/hg19.2bit";
 
         if ((lastTwoBitString == NULL) ||
             differentString(lastTwoBitString, twoBitString))
             {
             if (tbf != NULL)
                 {
                 lastQName = NULL;
                 twoBitClose(&tbf);
                 }
             tbf = twoBitOpen(twoBitString);
             }
 
         // we're reading in the whole chrom
         if ((lastQName == NULL) || differentString(sf->qName, lastQName))
             seq = twoBitReadSeqFrag(tbf, sf->qName,  0, 0);
         lastQName = sf->qName;
         lastTwoBitString = twoBitString;
-	    }
 
 	char *ourDna;
-	if (isHalSnake)
-	    ourDna = sf->qSequence;
-	else
         ourDna = &seq->dna[sf->qStart];
 
 	int seqLen = sf->qEnd - sf->qStart;
 	toUpperN(ourDna, seqLen);
-	if (!isHalSnake && (sf->orientation == -1))
+	if (sf->orientation == -1)
 	    reverseComplement(ourDna,seqLen);
 
 	// get the reference sequence
 	char *refDna;
-        if (isHalSnake && differentString(tg->tdb->type, "pslSnake"))
-	    {
-	    refDna = sf->tSequence;
-	    }
-	else
-	    {
         struct dnaSeq *extraSeq = hDnaFromSeq(database, chromName, sf->start, sf->end, dnaUpper);
         refDna = extraSeq->dna;
-	    }
 	int si = s;
 	char *ptr1 = refDna;
 	char *ptr2 = ourDna;
 	for(; si < e; si++,ptr1++,ptr2++)
 	    {
 	    // if mismatch!  If reference is N ignore, if query is N, paint yellow
 	    if ( (*ptr1 != *ptr2) && !((*ptr1 == 'N') || (*ptr1 == 'n')))
 		{
 		int misX1 = round((double)((int)si-winStart)*scale) + xOff;
 		int misX2 = round((double)((int)(si+1)-winStart)*scale) + xOff;
 		int w1 = misX2 - misX1;
 		if (w1 < 1)
 		    w1 = 1;
 
 		Color boxColor = MG_RED;