src/hg/lib/wigAsciiToBinary.c 1.31
1.31 2009/09/30 17:13:26 hiram
Was missing overlapping data condition on a fixedStep case
Index: src/hg/lib/wigAsciiToBinary.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/wigAsciiToBinary.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -b -B -U 4 -r1.30 -r1.31
--- src/hg/lib/wigAsciiToBinary.c 16 Jan 2009 05:23:04 -0000 1.30
+++ src/hg/lib/wigAsciiToBinary.c 30 Sep 2009 17:13:26 -0000 1.31
@@ -563,12 +563,29 @@
/* see if this is the first time through, establish chromStart */
if (validLines == 1)
{
chromStart = Offset;
- verbose(2, "first offset: %llu\n", chromStart);
+ verbose(2, "initial chromStart: %llu\n", chromStart);
+ if (prevChromName && sameWord(prevChromName,chromName) &&
+ (Offset <= previousOffset))
+ {
+ if (noOverlap)
+ errAbort("chrom positions not in numerical order "
+ "or\n\toverlapping data at line %lu.\n\t"
+ "previous position: %llu >= %llu <-current",
+ lineCount, BASE_1(previousOffset), BASE_1(Offset));
+ else
+ warn("WARNING: chrom positions not in numerical order "
+ "or\n\toverlapping data at line %lu.\n\t"
+ "previous position: %llu >= %llu <-current",
+ lineCount, BASE_1(previousOffset), BASE_1(Offset));
+ }
}
else if ((validLines > 1) && (Offset <= previousOffset))
- errAbort("chrom positions not in numerical order at line %lu. previous: %llu > %llu <-current (offset)", lineCount, BASE_1(previousOffset), BASE_1(Offset));
+ errAbort("chrom positions not in numerical order "
+ "or\n\toverlapping data at line %lu.\n\t"
+ "previous position: %llu >= %llu <-current",
+ lineCount, BASE_1(previousOffset), BASE_1(Offset));
/* if we are working on a zoom level and the data is not exactly
* spaced according to the span, then we need to put each value
* in its own row in order to keep positioning correct for these