9845c5862ee84d1005b44970fe1ba0af71dcf9cf braney Thu Jan 16 10:58:26 2014 -0800 color mismatches with N's a pale yellow if the N is in the query, or notat all if there is an N in the reference diff --git src/hg/hgTracks/snakeTrack.c src/hg/hgTracks/snakeTrack.c index 5f69ab7..bdd00f8 100644 --- src/hg/hgTracks/snakeTrack.c +++ src/hg/hgTracks/snakeTrack.c @@ -785,39 +785,39 @@ char *refDna; if (isHalSnake) { 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 (*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; - // mismatch! Color boxColor = MG_RED; if ((*ptr2 == 'N') || (*ptr2 == 'n')) boxColor = hvGfxFindRgb(hvg, &undefinedYellowColor); hvGfxBox(hvg, misX1, y, w1, heightPer, boxColor); } } // if we're zoomed to base level, draw sequence of mismatch if (zoomedToBaseLevel) { int mysx = round((double)((int)s-winStart)*scale) + xOff; int myex = round((double)((int)e-winStart)*scale) + xOff; int myw = myex - mysx; spreadAlignString(hvg, mysx, y, myw, heightPer, MG_WHITE, font, ourDna, refDna, seqLen, TRUE, FALSE);