src/hg/hgTracks/cds.c 1.93
1.93 2009/04/28 23:40:24 markd
fixed bug where exons within 3 bases of the start of a chromosome are rendered in solid yellow. No idea why this code was this way
Index: src/hg/hgTracks/cds.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTracks/cds.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -b -B -U 4 -r1.92 -r1.93
--- src/hg/hgTracks/cds.c 7 Apr 2009 17:31:01 -0000 1.92
+++ src/hg/hgTracks/cds.c 28 Apr 2009 23:40:24 -0000 1.93
@@ -103,10 +103,9 @@
static int convertCoordUsingPsl( int s, struct psl *psl )
/*return query position corresponding to target position in one
* of the coding blocks of a psl file, or return -1 if target position
- * is not in a coding exon of this psl entry or if the psl entry is
- * null*/
+ * is not in an exon of this psl entry*/
{
int i;
int idx = -1;
unsigned *qStarts = psl->qStarts;
@@ -132,9 +131,9 @@
tEnd = tStart + psl->blockSizes[i];
if (psl->strand[1] == '-')
reverseUnsignedRange(&tStart, &tEnd, psl->tSize);
- if (s >= tStart-3 && s < tEnd)
+ if (s >= tStart && s < tEnd)
{
idx = i;
break;
}
@@ -1344,8 +1343,10 @@
else
{
/*show we have an error by coloring entire exon block yellow*/
drawScaledBox(hvg, s, e, scale, xOff, y, heightPer, MG_YELLOW);
+ // FIXME: this shouldn't ever happen, should be an errAbort
+ warn("Bug: drawDiffTextBox: convertCoordUsingPsl failed<br>\n");
}
}
void baseColorDrawItem(struct track *tg, struct linkedFeatures *lf,
@@ -1438,8 +1439,10 @@
else
{
/*show we have an error by coloring entire exon block yellow*/
drawScaledBox(hvg, s, e, scale, xOff, y, heightPer, MG_YELLOW);
+ // FIXME: this shouldn't ever happen, should be an errAbort
+ warn("Bug: drawCdsDiffCodonsOnly: convertCoordUsingPsl failed<br>\n");
}
}
}
}