BigWig files produce divide by zero in summary view and have "disappearing" data #518

Closed
cmdcolin opened this Issue Oct 10, 2014 · 3 comments

Comments

Projects
None yet
1 participant
@cmdcolin
Contributor

cmdcolin commented Oct 10, 2014

The BigWig parser does some math to calculate the "average signal" of the bigwig, but this ends up producing a divide by zero error

Line 215 of src/JBrowse/Store/SeqFeature/BigWig/RequestWorker.js

var summaryOpts = {score: sumData/validCnt};

In some cases validCnt is zero in the bigwig.

@cmdcolin

This comment has been minimized.

Show comment
Hide comment
@cmdcolin

cmdcolin Oct 10, 2014

Contributor

We could use maxValue instead of sumData/validCnt, and this actually seems more accurate for "spikey" data.

Here are the before with var summaryOpts = {score: sumData/validCnt}; (note the clip markers/infinities where there are divide by zero errors)

screenshot-localhost 2014-10-10 10-55-38

Thanks to Scott Cain and Thomas Down for commentary on this

Contributor

cmdcolin commented Oct 10, 2014

We could use maxValue instead of sumData/validCnt, and this actually seems more accurate for "spikey" data.

Here are the before with var summaryOpts = {score: sumData/validCnt}; (note the clip markers/infinities where there are divide by zero errors)

screenshot-localhost 2014-10-10 10-55-38

Thanks to Scott Cain and Thomas Down for commentary on this

@cmdcolin cmdcolin added this to the 1.11.6 milestone Jan 23, 2015

@cmdcolin

This comment has been minimized.

Show comment
Hide comment
@cmdcolin

This comment has been minimized.

Show comment
Hide comment
@cmdcolin

cmdcolin Feb 13, 2015

Contributor

Note: Setting a variable scoreType to "maxScore" is now possible in 1.11.6 while helps considerable for wiggle tracks with spiky data. The original divide by zero bug was also fixed.

Contributor

cmdcolin commented Feb 13, 2015

Note: Setting a variable scoreType to "maxScore" is now possible in 1.11.6 while helps considerable for wiggle tracks with spiky data. The original divide by zero bug was also fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment