043ed5add3d6a0d24037a85b53b43ac9e14211c6 braney Sat Aug 17 13:06:42 2024 -0700 fix a couple of bugs when reduction level sizes have the 31st bit set. diff --git src/utils/bigWigInfo/bigWigInfo.c src/utils/bigWigInfo/bigWigInfo.c index def0371..4a0a4af 100644 --- src/utils/bigWigInfo/bigWigInfo.c +++ src/utils/bigWigInfo/bigWigInfo.c @@ -59,31 +59,31 @@ printf("version: %d\n", bwf->version); printf("isCompressed: %s\n", (bwf->uncompressBufSize > 0 ? "yes" : "no")); printf("isSwapped: %d\n", bwf->isSwapped); printLabelAndLongNumber("primaryDataSize", bwf->unzoomedIndexOffset - bwf->unzoomedDataOffset); if (bwf->levelList != NULL) { long long indexEnd = bwf->levelList->dataOffset; printLabelAndLongNumber("primaryIndexSize", indexEnd - bwf->unzoomedIndexOffset); } printf("zoomLevels: %d\n", bwf->zoomLevels); if (optionExists("zooms")) { struct bbiZoomLevel *zoom; for (zoom = bwf->levelList; zoom != NULL; zoom = zoom->next) - printf("\t%d\t%d\n", zoom->reductionLevel, (int)(zoom->indexOffset - zoom->dataOffset)); + printf("\t%u\t%u\n", zoom->reductionLevel, (int)(zoom->indexOffset - zoom->dataOffset)); } struct bbiChromInfo *chrom, *chromList = bbiChromList(bwf); printf("chromCount: %d\n", slCount(chromList)); if (optionExists("chroms")) for (chrom=chromList; chrom != NULL; chrom = chrom->next) printf("\t%s %d %d\n", chrom->name, chrom->id, chrom->size); struct bbiSummaryElement sum = bbiTotalSummary(bwf); printLabelAndLongNumber("basesCovered", sum.validCount); printf("mean: %f\n", sum.sumData/sum.validCount); printf("min: %f\n", sum.minVal); printf("max: %f\n", sum.maxVal); printf("std: %f\n", calcStdFromSums(sum.sumData, sum.sumSquares, sum.validCount)); } int main(int argc, char *argv[])