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

Fix log scale for some types of signal tracks #4495

Merged
merged 1 commit into from
Jul 26, 2024
Merged

Fix log scale for some types of signal tracks #4495

merged 1 commit into from
Jul 26, 2024

Conversation

cmdcolin
Copy link
Collaborator

When we apply the log scale, we change the minimum value to 1 in some cases

This helps avoid performing log(0) which is undefined (or...-Infinity in javascript)

The current check applies well to "count data" but less well for "fractional data"

I found that there are ENCODE bigwigs return fractional values between 0-maxval so there are things like 0.02 and 34.8 and 24.5 etc.

The 0.02 causes the log scale to go negative though, in a way that is not super informative. Therefore, we try to make the logscale again snap to 1 with this PR

The caveat is that if the min and max are just between 0-1 then we do not perform this operation, because in that case, the values might be raw p-values, and then just not transforming it gives someone something similar to -log(p), a common unit for graphing, but just without the negative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant