74545feb9a7243db89d1007709287f657d78091b kuhn Wed Sep 8 15:14:33 2021 -0700 changed error message when beginning of a block is not zero. documentation everywhere calls the 12th field blockStarts, though the code uses chromStarts diff --git src/lib/basicBed.c src/lib/basicBed.c index d14d464..33b41d4 100644 --- src/lib/basicBed.c +++ src/lib/basicBed.c @@ -1543,32 +1543,32 @@ count = lineFileAllIntsArray(lf, row, 11, bed->chromStarts, bed->blockCount+1, TRUE, 4, "integer", TRUE); chromStarts = bed->chromStarts; } else { count = lineFileAllIntsArray(lf, row, 11, tempChromStarts, tempArraySize, TRUE, 4, "integer", TRUE); chromStarts = tempChromStarts; } if (count != bed->blockCount) lineFileAbort(lf, "Expecting %d elements in chromStarts list, found at least %d", bed->blockCount, count); // tell the user if they appear to be using absolute starts rather than // relative... easy to forget! Also check block order, coord ranges... if (chromStarts[0] != 0) lineFileAbort(lf, "BED blocks must span chromStart to chromEnd. " - "BED chromStarts[0] = %d, must be 0 so that (chromStart + " - "chromStarts[0]) equals chromStart.", chromStarts[0]); + "BED blockStarts[0] = %d, must be 0 so that (chromStart + " + "blockStarts[0]) equals chromStart.", chromStarts[0]); for (i=1; i < bed->blockCount; i++) { /* printf("%d:%d %s %s s:%d c:%u cs:%u ce:%u csI:%d bsI:%d ls:%d le:%d<BR>\n", lineIx, i, bed->chrom, bed->name, bed->score, bed->blockCount, bed->chromStart, bed->chromEnd, bed->chromStarts[i], bed->blockSizes[i], lastStart, lastEnd); */ // extra check to give user help for a common problem if (chromStarts[i]+bed->chromStart >= bed->chromEnd) { if (chromStarts[i] >= bed->chromStart) lineFileAbort(lf, "BED chromStarts offsets must be relative to chromStart, " "not absolute. Try subtracting chromStart from each offset " "in chromStarts."); else