Skip to content

Releases: statgen/locuszoom

0.8.1

13 Sep 18:34
2da2ac0
Compare
Choose a tag to compare
  • Update demonstration pages for recent API changes
  • AssociationSource (AssociationLZ) now provides an optional {sort: true}
    parameter. Some sources do not return association data in ascending order,
    which was causing grey coloring in LD.

0.8.0

26 Jun 18:33
5190d7f
Compare
Choose a tag to compare

LocusZoom 0.8.0 adds a variety of new functionality aimed at interactive, dynamic experiences that help users explore the underlying data behind the plot. This release also adds a new demo showcasing live calculation of aggregation tests in the browser.

If you are already using LocusZoom in a complex page, there may be a few small backwards incompatible changes- particularly around event listeners and custom data sources.

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

  • Events can now be bubbled from panel to plot. This makes it easier to subscribe to events from a single source.
  • Events now identify the place where they originated (eg plot.genes for the genes panel)
  • Events have a new way of passing structured data to listeners.
  • A new element_selection event has been added. This is unique from element_clicked in that it conveys whether a selection is being activated vs turned off.

Breaking changes

  • When an event listener fires,this is now always the value of where the listener was attached. It is never used to pass data. (few events provide data; the change mostly affects usages of element_clicked)
    • Example: if you listen to a panel event at the plot level, this will refer to the plot instance. If you listen to the same event at the panel level, this will refer to the panel.
  • All event listener functions now receive a single argument with a consistent structure: eventContext, with {sourceID: string, data: *}. Each event determines what, if any, data to provide.
    • sourceID refers to where the event originated (eg panel) rather than where the listener was attached (eg plot level).
    • Only a few events provide data. For example, element_clicked identifies the data used to draw the item that was clicked.

The data requesting pipeline

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

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.

  • The data chain now saves a copy of the raw response payload (chain.discrete) that would be returned by a single source. This is useful when requesting information from several different sources that do not directly combine.
  • Added a new type of Connector source. This is useful when a single piece of data (such as a calculation) is used by many kinds of data layers: the data can be requested once, with separate Connectors for each use case.
    • For example, a calculation can be run once, and the results can be displayed as a table view (one connector) as well as matched to the data points on a data layer (another connector).
    • Previously the request and the merging of fields had to be part of the same data source

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.

New demo: Aggregation tests

  • Add an example page based on raremetal.js, a library that performs aggregation tests in the browser.

Misc bugfixes and improvements

  • Bugfix: should now correctly render scientific notation with negative numbers

0.7.2

23 Apr 18:15
aacedfc
Compare
Choose a tag to compare

PheWAS improvements

  • Points are no longer clipped on the edge of the PheWAS. Add lower_buffer and upper_buffer to the default layout. (GH #132)
  • PheWAS plot layouts can now specify the list of colors they want rather than being forced to use a preset color palette; plots are also now better at handling a lot of categories at once. (GH #130)
  • Improved interactivity events for plot labels (GH #131)

Misc bugfixes and enhancements

  • Association plots will now work better in regions with no data ( #128 )
  • locuszoom.app.min.js now provides sourcemaps for easier development/ debugging
  • Fix an issue with how axis extents are calculated; better respect default minima

0.7.1

15 Feb 18:59
7a38aea
Compare
Choose a tag to compare
  • Add a new option to suppress confirmation modals when removing a plot panel
  • Fix interval annotation example to reflect recent API changes

0.7.0

21 Dec 18:06
7cd5d30
Compare
Choose a tag to compare

New features

  • Single-item annotation track: customizable track to identify points that meet certain criteria. Useful when annotating specific data points alongside other information like LD: allows rich display of many kinds of information on the same plot.
  • Display options dashboard button: interactively apply different colors and styles to
  • New demonstration: annotate plots with region-based credible sets based on standalone gwas-credible-sets library

Internal improvements

  • Revamped build process; we now provide source maps for vendor files to facilitate debugging
  • Built assets have been moved to consolidated dist directory
  • Fix issue with tooltips not appearing correctly in interval annotation plot

0.6.1

26 Oct 20:59
410f52f
Compare
Choose a tag to compare
  • Allow plot to shrink when panels are removed (bugfix)
  • Update example html files for recent API changes

v0.6.0

25 Sep 20:19
Compare
Choose a tag to compare

User-facing features

  • PheWAS plots are now flexible and customizable
  • New "category scatter" layer type can automatically find and plot groups in plot categorical data (such as PheWAS)
  • PheWAS data sources can now talk to a real API, and examples include documentation on what is required for a plot to work.
  • Add a new field filter, htmlescape, which is helpful when using data from other people in your custom plots

Internal improvements

  • Most code now annotates JSDoc information about methods and input types. This internal documentation should help developers looking to extend and build on the core, at a level of detail beyond the traditional user-level documentation in our wiki. Feedback and improvements welcome!
  • Better support for extending built-in functionality with custom code (new helpers for subclassing and DataLayers.extend())
  • Add helper method plot.clearPanelData, which is useful when reloading data on the same page. (arguments/api may change slightly in the future)
  • DataLayers can now communicate with the panel to generate custom tick marks for specific data. (if DataLayer subclass implements getTicks method). As used in category_scatter, this provides a way to customize plots during the rendering process, without needing to hardcode tick marks or add extensive boilerplate code in every similar plot.

Bugfixes

  • Better error messages when API returns no data
  • Fix issue with "plot interesting data" links, where plot behaved oddly when a different region was loaded (error messages and tooltips should now properly clear)

Possible breaking changes

  • Most methods now better enforce data types, to help avoid subtle bugs. This means that a string ("10") and a number (10) are no longer considered interchangeable. Please check your layouts if you notice any issues.

v0.5.6

17 Mar 03:14
Compare
Choose a tag to compare
  • Conditional block support in parsed HTML (e.g. tool tips)
  • Support vertical or horizontal tool tip positioning on scatter data layers
  • Allow for mouse guides to be toggled off in plot layout
  • Refactor tool tip close buttons to be floated elements such that content flows around them
  • Make gene constraint data source more fault tolerant when not available
  • Support for scale functions operating on entire data element instead of single field
  • Fix order-of-operations issues with floor/ceiling and upper/lower buffer axis extent logic

v0.5.5

06 Mar 03:47
Compare
Choose a tag to compare
  • Extend mouse actions on scatter points to labels
  • Add built-in PheWAS data source with flexible field support
  • Refactor built-in phewas scatter data layer layout to not pre-specify fields
  • Introduce Data Field object for resolving field names to values
  • Refactor parseFields function (tooltips) and other key places to use Data Field object allowing for deferred transformations

v0.5.4

21 Feb 17:05
Compare
Choose a tag to compare
  • Migrate signifigance lines to more generic orthogonal line data layer, definable with only layout directives (no more static data)
  • Correct return values for several transformation functions when the input is 0
  • Refactor behavior definitions to be more explicit in layouts and allow for easier expansion of behaviors
  • Add support for linking to a dynamically generated URL as an event behavior (e.g. clicking an element)
  • Clean up color declarations that were not SVG-standards compliant and add support for fill_opacity layout directive
  • Updated dev dependencies and fixed dev install process