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

Display results from burden and gene based tests #123

Closed abought closed 6 years ago

abought commented 6 years ago

Purpose

We would like to show burden test results in a LocusZoom plot. Burden tests can incorporate many masks, and be connected various ways of grouping variants- genes, intervals, etc.

Rather than a single visualization, we will start by rendering an HTML table- this gives us an opportunity to extend LocusZoom beyond the boundaries of the plot, so that it can be used as part of a broader collection of web page widgets that all update in response to the same data and events.

Summary of changes

New feature: "Subscribe to Data"

External widgets can now see the same data used by the plot, and update live as new data is received. For example, a table of GWAS variant data variants can update as the user pans left, or filter when a point is clicked. See plot.subscribeToData(fields, successCallback, errorCallback) for details.

New feature: Extensions

The repository now contains a place to register functionality that may be useful, but is separate from (and not required for) the core LocusZoom experience. Each extension must be included separately into your site, after the core LocusZoom JS bundle.

Dynamic URLs

The Dynamic URLs extension makes it possible to create easy sharing links to a plot. It provides a way to load the page at a specific view based on URL query params, and to update that URL as the user interacts with the plot. Clicking the back and forward buttons causes the plot to jump back to a previous view, enabling interactive experiences.

This works best with standard plots and common state parameters like chrom, start, and end. It is possible to serialize more complex behavior, but highly customized views (like dynamically adding panels) might not be a good fit for this extension.

Events

Some items in this section represent breaking API changes and are marked accordingly.

New features

Breaking changes

The data requesting pipeline

There are times when multiple sources must be requested to build up a view. We have added some new functionality to add power to this behavior.

Breaking changes DEPRECATES several data source methods: parseData, parseArrayToObjects, parseObjectsToObjects, prepareData

Provides stub implementations to avoid breaking legacy applications

parseResponse is now a wrapper for several discrete steps (normalizeResponse, annotateData, extractFields, combineChainBody). Custom data sources now have more control over how JSON data is parsed into records.

Aggregation tests

Misc bugfixes and improvements

TODO

abought commented 6 years ago

Demo feedback / action item checklist:

Existing items, ticketed separately

Demo improvement requirements