diff --git a/js/feature/wigTrack.js b/js/feature/wigTrack.js index 718302560..1b39cb91d 100755 --- a/js/feature/wigTrack.js +++ b/js/feature/wigTrack.js @@ -395,7 +395,7 @@ class WigTrack extends TrackBase { */ function summarizeData(features, startBP, bpPerPixel, windowFunction = "mean") { - if (bpPerPixel <= 1 || !features || features.length === 0) { + if (bpPerPixel <= 1 || !features || features.length === 0 || windowFunction === "none") { return features } diff --git a/test/testWig.js b/test/testWig.js index 1f5421c43..c18536ca5 100644 --- a/test/testWig.js +++ b/test/testWig.js @@ -106,6 +106,9 @@ suite("testWig", function () { summarizedData = summarizeData(features, start, bpPerPixel, windowFunction) assert.equal(summarizedData.length, 953) + windowFunction = "none" + summarizedData = summarizeData(features, start, bpPerPixel, windowFunction) + assert.equal(summarizedData.length, 24546) // first bin // console.log(features[0].start)