statgen / locuszoom

A Javascript/d3 embeddable plugin for interactively visualizing statistical genetic data from customizable sources.
https://statgen.github.io/locuszoom/
MIT License
154 stars 29 forks source link

[request] Improve handling of extreme pvalues in plots #141

Open abought opened 6 years ago

abought commented 6 years ago

Purpose

Per Peter/ Ryan discussion (record of notes for followup).

There are situations where a dataset might be fed to the client with pvalues outside the range allowed for floats. This includes analysis packages that give pvalues = 0 (eg BoltLMM), as well as client-side parsing of user-provided data (with pvalues).

If LocusZoom is asked to represent these values, the result (-log(10) = Infinity) causes no data to be displayed- see screenshot of a region with 2500 data points available. The default behavior should be to represent the point in a way that does not cause important associations to be dropped. One option would be to automatically detect infinity values, and render this as a discontinuous axis scale.

screen shot 2018-08-29 at 3 44 32 pm

For client side parsing, Ryan suggests an analogue of this function: https://github.com/statgen/locuszoom-db/blob/master/locuszoom/db/loaders.py#L80-L108