Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

@cmdcolin
Copy link
Contributor

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
Copy link
Contributor Author

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
Copy link
Contributor Author

cmdcolin commented Feb 5, 2015

@cmdcolin
Copy link
Contributor Author

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant