7324e7c7192292f6b1413ece2f819cd6004cf489
braney
  Mon Oct 15 10:49:12 2012 -0700
tweak how pslToBed generates non-coding beds so the browser displays them properly, twich bedExact to compare non-coding beds just by checking if both of them have thickStart==thickEnd.  (#7045)
diff --git src/lib/basicBed.c src/lib/basicBed.c
index f2ba258..9da7425 100644
--- src/lib/basicBed.c
+++ src/lib/basicBed.c
@@ -1083,35 +1083,42 @@
     return outerOverlap;
 
 /* Otherwise make up a range tree containing regions covered by a,
  * and figure out how much b overlaps it.. */
 struct rbTree *rangeTree = bedToRangeTree(a);
 int overlap = bedRangeTreeOverlap(b, rangeTree);
 
 /* Clean up and return result. */
 rangeTreeFree(&rangeTree);
 return overlap;
 }
 
 boolean bedExactMatch(struct bed *oldBed, struct bed *newBed)
 /* Return TRUE if it's an exact match. */
 {
-if (oldBed->blockCount != newBed->blockCount)
+boolean oldCoding = (oldBed->thickStart != oldBed->thickEnd);
+boolean newCoding = (newBed->thickStart != newBed->thickEnd);
+
+if (oldCoding != newCoding)
     return FALSE;
-if (oldBed->thickStart != newBed->thickStart)
+/* non-coding bed's have different standards for what exactly
+ * goes into these fields.  The standard just says they should
+ * be equal */
+if (oldCoding && ((oldBed->thickStart != newBed->thickStart) ||
+    (oldBed->thickEnd != newBed->thickEnd)))
     return FALSE;
-if (oldBed->thickEnd != newBed->thickEnd)
+if (oldBed->blockCount != newBed->blockCount)
     return FALSE;
 int oldSize = bedTotalBlockSize(oldBed);
 int newSize = bedTotalBlockSize(newBed);
 int overlap = bedSameStrandOverlap(oldBed, newBed);
 return  (oldSize == newSize && oldSize == overlap);
 }
 
 boolean bedCompatibleExtension(struct bed *oldBed, struct bed *newBed)
 /* Return TRUE if newBed is a compatible extension of oldBed, meaning
  * all internal exons and all introns of old bed are contained, in the 
  * same order in the new bed. */
 {
 /* New bed must have at least as many exons as old bed... */
 if (oldBed->blockCount > newBed->blockCount)
     return FALSE;