Recent Releases of locuszoom

locuszoom - v0.14.0

💣 This release makes many internal changes to how LocusZoom retrieves and uses data. It is primarily aimed at simplifying existing features for new and future LocusZoom.js users. If you are upgrading from a prior version, we have tried to provide a guide to what has changed, but read the notes carefully. 💣

The new version provides new functionality that should make it easier to create custom plots from various types of file. Some minor display changes have also been added to improve the appearance and readability of figures.

New features

  • Built in parsers and a new "Tabix Tracks Demo" make it easier to generate plots from tabix files for GWAS, BED, and user-provided LD, without manually creating a JSON file or loading the data into an API first. This should make it easier to get started with small in house datasets!
  • Developer-focused internal changes make some aspects of generating plots less confusing. The README and getting started guide have also been revised to reflect current usage.
  • Both GWAS and PheWAS layouts will now try to render points with an up/down triangle to indicate direction of effect, when possible. Internally this uses the new effect_direction ScaleFunction, inspired by PheWeb.
  • Default plot font sizes have been increased by 20-40%, to help readability in publications/presentations
  • New more compact LD "ribbon" legend
  • (from LZ 0.13.x) New "turbo" color scheme provides better support for colorblind users (or black and white printing)

Internal improvements

  • Plots can now switch between different view regions more quickly, thanks to a new multi-value LRU cache that can eliminate unnecessary network requests
  • TabixUrlSource now accepts a pre-made reader instance . This is useful for sites that want to validate file contents before adding the file to the plot.
  • Data layers now accept a template expression for id_field. This means that data elements can be uniquely identified as a combination of several fields. This eliminates the need to add "synthetic" unique ID fields in plots like phewas or coaccessibility, where no single datum field would have been globally unique. This also means that certain tooltip and mouse behaviors will be more stable as the user pans and zooms.

Deprecations and major breaking changes

We generally try to avoid issuing breaking changes, but after 5+ years of LocusZoom.js, we are doing some tidying to make custom and interactive usages easier. Please consult the updated documentation and guides, and let us know if any important information is missing after the rewrite!

Layout syntax

  • Namespaces have been redesigned as the central mechanism for plotting two datasets with one reusable layout.
    • The difference between "abstract" and "concrete" layouts has been eliminated. Syntax like Layouts.get(..., {unnamespaced: true}) or some_value: '{{{{namespace[assoc}}afield}}' is no longer necessary. All layers will now refer to fields by an internal name that is easier to read, write, and remember: assoc:afield.
    • Useful migration regex: replace \{\{namespace\[(\w+)\]\}\} with $1:
  • New data_operations make it possible to mix-and-match different datasets, by moving the join logic from adapter to the point where the data is used (the data layer).
    • This replaces the old combineChainBody method of adapters. Closely coupling the act of retrieval (API) to the join logic (display) made it hard to use data fetched from a different location.
    • This also makes it much easier for a single API call to be displayed in several different ways throughout the plot.
  • The data_layer.fields array property has been removed completely. Many people wanted to customize their data with just one extra field, and manually updating the contract of expected data proved cumbersome.
  • Panel layouts must now provide an explicit id (no longer optional). Most layouts already did this.
  • subscribeToData call signature has changed. It now accepts either an explicit specification of what data is requested, or else the name of a data layer ("give me exactly what is being used to draw something that is already specified elsewhere"). See docs for details.
  • Removed old aliases for things that were renamed in prior versions: all references to dashboard.components now use toolbar.widgets

Adapters

  • Adapters have been completely rewritten in a more functional style, making them easier to understand and debug. Many methods have been renamed slightly to reflect that they have a different call signature. Almost all custom adapter subclasses will need to update their code.
    • Example: getURL(state, chain, fields) is now _getURL(request_options); annotateData(records, chain) is now _annotateRecords(records, request_options), etc.
  • The concept of the data chain has been eliminated; it was confusing and made it hard to use the same data in two different ways.
    • New "data operations", like "joins", specify how to connect two datasets at the point where the data is used, rather than when the data is first retrieved. The adapter method combineChainBody has been totally removed in favor of data_layer.data_operations. Several join functions are provided by default.
    • If your request depends on a prior request (like "LD for a particular GWAS variant"), a new dependency resolver has been introduced. See the guides/tutorials describing data_operations: [{type: 'fetch', from: ['assoc', 'ld(assoc)']}] for details of how to specify dependent requests.
  • Adapter options are now specified as top-level keys, instead of inside a nested key calledparams: {}. Existing sample code to create a plot will need to revise usages of DataSources.add().
  • Adapters will usually return all the fields from the API.
    • All pre-defined data layer layouts now contain an _auto_fields variable that defines what information a layer expects. At the time of render, a user-friendly error message will warn if the server fails to provide expected fields.
    • If you use LD information, rename ld:isrefvar to lz_is_ld_refvar and ld:state to ld:correlation. The new names for "auto-generated" properties better reflect what is actually coming back from the API, and make the code far easier to understand.
  • Any data source specified in data_layer.namespaces will now trigger a network request for data. This is different than the previous behavior, where a different property ("fields") had to also be mutated
    • People really liked adding custom fields/ data to the plot, but no one ever remembered to update data_layer.fields. This lead to a lot of confusion when their data failed to appear.

Other

  • Many private variables were renamed in LocusZoom plot and panel internals. This should make the console debugging experience nicer, by hiding things that were not useful to most developers.

Bugfixes:

  • If the user selects an LD refvar, ignore the choice when switching to another region far from that variant.
  • Cached adapter data now does a better job of isolating each individual layer that uses the data. This is especially noteworthy in, eg, StaticSource
  • Fix an issue where plot would be sized incorrectly when initially drawn in a hidden area (like collapsible or tab widgets). Plot will now resize to fit available space when the area is un-collapsed.
  • Fix broken rendering of intervals (eg BED tracks) if they had very narrow markings
  • Increase spacing around axis labels (so that plots look good with logp > 1000; previously, 4-digit numbers overlapped with the label)

- JavaScript
Published by abought almost 4 years ago

locuszoom - v0.14.0-beta.4

Minor bugfix for LD reference variants, and performance improvements for responsive resize.

- JavaScript
Published by abought about 4 years ago

locuszoom - v0.14.0-beta.2

  • More concise and readable plots
    • Includes all changes from previous beta. See updated release notes at: #259 (comment)

- JavaScript
Published by abought over 4 years ago

locuszoom - v0.14.0-beta.1

See in progress release notes for details. This release contains a number of breaking changes and internal improvements to how data is retrieved. It also makes it easier to use tabix datasets to plot your own data without transforming to an intermediate file format, and adds user-facing enhancements like direction of effect indicators on GWAS and PheWAS plot (when beta and se are provided)

- JavaScript
Published by abought over 4 years ago

locuszoom - v0.13.4

LD is now shown using a new color schema, "Turbo", to replace the old rainbow palette. The new color scheme is designed to have better contrast and support for colorblind users.

- JavaScript
Published by abought over 4 years ago

locuszoom - v0.13.3

  • Allow legends to be updated after initial render, solely by altering layout options
  • (provisional) New LocusZoom.Layouts.query_attrs and LocusZoom.Layouts.mutate_attrs helper functions provide a more convenient way to customize nested layouts, or to modify all tracks with the same kind of data at once (like a plot with 3 gwas scatter plots)

- JavaScript
Published by abought almost 5 years ago

locuszoom - v0.13.2

  • Bugfix for incorrect positioning of plot "curtain" error messages
  • New renameFields helper function for working with layouts and field names (recursively renames a field anywhere it is used)

- JavaScript
Published by abought almost 5 years ago

locuszoom - v0.13.1

Minor bugfixes

  • Fix an issue with annotation track display and positioning
  • Improve documentation for CDN loading of CSS, which will help avoid problems when saving images in certain situations

- JavaScript
Published by abought almost 5 years ago

locuszoom - v0.13.0

This release is focused on improvements for performance and interactivity. It contains several changes of particular use when displaying a lot of data at once, as well as bugfixes and documentation that will help with generating highly customized plots.

New features

User facing

  • The documentation has been completely overhauled. The wiki has been replaced with new public docs . This includes several newly written prose user guides (getting started, data, layouts, and interactivity) as well as deep developer documentation.
  • "Standard" datasets like genes, recombination rate, and GWAS catalog will now fetch the newest data available from the UM PortalDev API, rather than hard-coding a specific (possibly outdated) dataset ID.
    • This will give your users a better LZ.js experience over time, even if you don't update your code very often.
  • New data layer rendering options:
    • highlight_region (beta) draws one or more translucent rectangles to draw attention to a part of the plot.
    • lz-intervals-enrichment (beta) Renders categorical interval-based data in a shared area, with y-axis prioritized by pvalues from enrichment analysis.
    • All panels now show loading indicators at first render, enabled by default. This is controlled by the new panel_layout.show_loading_indicator option. It replaces the old imperative function call, panel.addBasicLoader.

Developer-friendly features

  • New stable_choice scaling function allows predictable auto-coloring of items, especially categorical data. Unlike random selection, this will choose the same colors regardless of page reload or data order.
  • Allow match and filter behavior to use field transforms and custom operators via the new LocusZoom.MatchFunctions plugin registry. This allows greater control over interactive functionality.
  • Tooltip templates now support an optional {{#else}} block. This is useful for writing tooltips with toggle buttons: "show/hide label", "is ld reference variant", etc.
  • Several new events have been added to identify when a widget has been used. See documentation for details.
    • Additionally, tooltips and widgets are now allowed to emit "custom" events not pre-defined to LocusZoom (the old behavior was restrictive- unrecognized events would not be fired)
    • This is useful for analytics (to find out which features of the plot are used most often). Many widgets can now fire additional events when they are used: widget_display_options_choice, widget_download_png, widget_download_svg, widget_filter_field_action, widget_set_state_choice

Internal improvements

  • The rendering code has been refactored throughout LocusZoom to use fewer resources when rendering plots with a large number of elements. (eg many variants in a wide genomic region)
  • Zooming in to a region plot will now use cached data instead of making an unnecessary network request. This means that zooming will be faster and more responsive.
  • GWAS scatter plots may now hide some overlapping low-significance variants by default.
    • This is controlled by the options under scatter_layout.coalesce. This can reduce the number of points to render by 40-50% for a narrow region or noisy plot, and >90% for a GWAS with a few strong hits in a wide viewing region.
  • Improved the coaccessibility/arc track demo with new highlighting marks and better demonstration of enhancer / promoter / target gene matching

Deprecations and breaking changes

  • Tooltip templates no longer treat 0 values as truthy. To conditionally show a value (even if it is 0), use the new is_numeric transformation function: {{#if value|is_numeric}}...{{/if}}
    • This is slightly less convenient, but a lot less confusing.
  • Renamed the "magic field" lz_highlight_match to lz_is_match to reflect that matching is useful for controlling a wide range of scalable presentation options. (this synthetic field can also be used for size, shape, or even filtering)
  • The gene constraint tooltip will no longer contact an external API in cases where the query would return no data (eg, gnomAD limits queries to 25 elements and build GRCh37 only)
  • Most datasets now use a new implementation of getCacheKey. Instead of caching when the region is an exact match, it now considers whether the requested chrom/start/end is a subset of the prior region.
  • /shift-clicking/ on a plot element will no longer allow "multiselect". Few people used this feature. It can still be enabled manually, but is now turned off by default.
  • Several little-used features have been moved to extensions, in order to make the library smaller for most users
    • Intervals data layer (lz-intervals-track)
    • Forest plot data layer (lz-forest-track)
  • Removed the dimensions toolbar widget, as it was widely unused.
  • Removed unused or confusing configuration options related to height and width, including proportional_*. Plot width is now controlled solely by plot_layout.width and height is now solely defined by sum(panel_layouts.height).
  • Internal build changes may affect people using LocusZoom.js with extremely old web browser versions. If your deployment needs to support such users, you may need to add your own tooling. For everyone else, enjoy the 25% smaller file size.

Bugfixes

  • Fixed issues that caused panels to become distorted when elements were resized (see "breaking changes" above)
  • Fix issues with label display on scatter plots (double escaping of text + labels not removed on re-render)
  • The LD reference variant will now be correctly marked as such, even if your dataset uses non-standard variant marker formats.
  • Fix an issue with link behavior on data elements
  • Initiating a match event will now cause tooltips on other panels to be removed, rather than reappearing as zombie elements
  • Annotation tracks (like GWAS catalog) will now be better aligned with variants in the scatter plot

- JavaScript
Published by abought about 5 years ago

locuszoom - v0.13.0-beta.4

  • Simplify height and layout logic for smoother resize behavior
    • Fix bugs where adding/removing panels causes other panels to distory
    • Remove unused proportionalorigin.* and proportional* layout options
    • Simplify redundant or confusing config options: All panels are now assumed to have the same width (plot.width governs width, and panel.width was removed), and the height is only controlled by panel heights (removed plot.height)
  • Allow match and filter behavior to use field transforms and custom operators via the new LocusZoom.MatchFunctions plugin registry
  • Rename lz_highlight_match to lz_is_match to reflect the fact that matching controls more than style
  • New stable_choice scale function allows autogenerating color and layout options that are the same every time page is loaded
  • Remove dimensions toolbar widget, which was widely unused
  • Use cached data on zoom in (this may affect custom sources that previously relied on getUrl = getCacheKey)

- JavaScript
Published by abought about 5 years ago

locuszoom - v0.13.0-beta.3

New and improved features

  • Improve performance of intervals track rendering
  • Loading indicators are now added by default and can be used via the declarative layout api (no need to use panel.addBasicLoader imperatively after render). Loaders can be disabled via the new panel layout directive, show_loading_indicator.

Bugfixes

  • Fix "link" behavior for clickable data elements
  • Annotation (rug) track and chromatin accessibility track: fixes for position and hitarea behavior

Breaking changes

  • Moved little-used forest plot to a new extension

- JavaScript
Published by abought about 5 years ago

locuszoom - v0.13.0-beta.2

  • Fix display of LD reference variant when incomplete/non-standard variant format is used
  • Fix warnings when using ES6 modules and newest webpack version
  • Fix demo "offline mode" sample data to reflect updated payload structure of genes endpoint

- JavaScript
Published by abought over 5 years ago

locuszoom - v0.13.0-beta.1

Features

  • Rendering performance improvements
    • Use fewer system resources/ listeners/ function calls to render each scatter plot point (cache computed values, event bubbling, etc)
  • Provide an option to coalesce adjacent points in the scatter plot. This can reduce the number of points to render by 40-50% for a narrow region or noisy plot, and >90% for a GWAS with a few strong hits in a wide viewing region. (controlled by the new scatter layer option section, coalesce._)
    • Coalescing is turned on by default for association plots (only). You may wish to adjust this behavior and options if you use a different y-axis range for your plots (eg, user-selectable "toggle y-axis display" behaviors)
    • The final rendered result will appear almost indistinguishable from plots without coalescing. All significant points and "highlight matching points" behaviors will be preserved.

Deprecations:

  • Remove shift-click "multiselect" from plots: few people seem to use this feature, and it adds complexity for limited gain

Bugfixes:

  • Correctly remove old scatter plot labels on toggle/re-render
  • Fix double-escaping issue with label display values

- JavaScript
Published by abought over 5 years ago

locuszoom - v0.12.2

  • Improvements to event callbacks for responding to plot and user actions
    • Plot and panel event callbacks now receive event.target with reference to event originator (plot or panel instance)
    • subscribeToData callbacks now receive a second argument, plot
  • Fixes for credible set calculations in regions with no variants

- JavaScript
Published by abought over 5 years ago

locuszoom - v0.12.1

Bugfixes:

  • Re-implement a triangledown symbol shape (was removed by d3v4). Useful for showing direction of effect arrows.
  • Better handle server errors in gnomAD graphQL API
  • Fix an issue where responsive_resize = true was incorrectly still preserving aspect ratio. This should make LocusZoom plots look better on large screens.

- JavaScript
Published by abought over 5 years ago

locuszoom - v0.12.0

This version contains numerous breaking changes and new features. Although we have tried to keep most familiar aspects of using LocusZoom intact, please read carefully before upgrading.

If you are using LocusZoom via <script> tag, LocusZoom now requires D3v5. Check any other visualizations on your site for compatibility.

New features for users

Several new features are available and enabled by default.

  • New "save as PNG" feature
  • Fix "scroll to zoom" in Firefox (new "alt-scroll" keyboard shortcut)
  • Better LD by default
    • Build 38 datasets will now use an improved LD panel based on deep WGS sequencing of 1000G.
    • The "select LD population" button has been added to the default layout for all association plot toolbars (this button must be used with the LDServer adapter)
  • Improved genes track
    • Now hides pseudogenes by default.
    • A dropdown menu can be used to customize what is shown.
    • Visual tweaks: Genes track now shows more genes in the same amount of space (better for publications etc)
  • Gene and GWAS catalog views refreshed with the newest data available (GENCODE v35 and GWAS catalog v1.0 e100)

New features for developers

LocusZoom is highly customizable. We have added a variety of internal improvements that make it easier to build truly dynamic visualizations.

  • New "filters" mechanism lets users interactively choose which points are shown on scatter, arc, forest, and gene tracks, based on customizable criteria.
    • A new toolbar widget can be used to let users change filters interactively
  • The "save as svg" button no longer relies on a hardcoded CSS file name. This should resolve issues where saved images did not look good on some sites.
  • New region_changed plot-level event reports exact plot coordinates after pan, zoom, or region change
  • New log10 transformation function (a complement to neglog10). Useful for creating, eg, loglog plots.
  • New plot.destroy() cleanup method: helps to avoid memory leaks when using LocusZoom with single-page-application frameworks like Vue or React.
  • More systematic way of registering and bundling LZ plugins (LocusZoom.use(function(LocusZoom, ...args) { /* plugin code*/ }))
  • All registries (layouts, adapters, datasources, etc) are now more consistent in their behavior, exposing add, remove, has, get, and list methods. Efforts have been made to preserve method syntax for any existing usages.

Important breaking changes

The code was heavily reorganized. Unused features were removed, and some improvements were made to make the library more approachable for new developers.

Overview

  • LocusZoom is now based on D3v5. If you are using the library via a script tag, you will need to update the D3 version used. We no longer provide a vendor.js bundle.
    • Some breakages may occur due to D3 changes. For example, triangle-up is now triangle, and triangle-down was removed from the library.
  • All extensible "plugin" features are now based on ES6 classes, making it easier to customize small pieces of functionality (like new data layers)
  • The codebase is now based on ES6 modules. Many "private" features have been moved out of the global namespace, to avoid overwhelming developers with functions they don't need.
    • LocusZoom will only be exposed as a global variable if you load it via <script> tag.
    • If your code uses ES6 modules, import LocusZoom from 'locuszoom'; will continue to work. But you should update how you import extensions for best results: use locuszoom/esm/ext/... instead of locuszoom/dist/ext/...

Renamed features

To support doc/instruction improvements, several things have been renamed.

  • Three different things had "data source" in their names and all were available globally. This was unnecessarily confusing.
    • LocusZoom.KnownDataSources -> LocusZoom.Adapters
    • Data.Source has been renamed to BaseApiAdapter and is no longer available as a global.
      • Users of modern ES6 may import it from locuszoom/data to create true ES6 subclasses.
      • If using via a <script> tag, the shortcut for creating and registering a new class will be almost the same as old versions: LocusZoom.Adapters.extend('BaseApiAdapter', 'MySourceName', {}) .
    • The helper used to assign data for a specific plot (LocusZoom.DataSources) was left unchanged.
      • dashboards are now called toolbars , and Dashboard.Components -> Widgets.
    • This rename will affect layouts: eg dashboard.components should be changed to toolbar.widgets and Layouts.get('dashboard'...) -> Layouts.get('toolbar'...).

New/improved defaults

  • Plots now handle resizing differently. The old responsive_resize: both mode has been removed. The default option (true) will now trigger resize only for width.
    • Preserving aspect ratio sometimes caused odd behavior on re-render. Many sites that use LZ have already migrated to the new default.
  • Most usages of the genes datalayer should now use genes_filtered instead. This is intended to work best with the new "hide pseudogenes by default" behavior used by the default genes panel.
  • Layouts (such as annotation tracks) that used filters now have a new unified syntax, where each filter is represented as an object with {field, operator, value} keys. This extends and standardizes the quasi-public implementation of track filters from previous releases.
    • Some old layouts represented each filter in an array form and will need to be updated.

Removals

  • Any methods previously marked as deprecated in prior releases have been removed. In previous versions, these were usually indicated by warning messages on the JS console.
  • The LocusZoom.createCORSPromise method has been removed. Internal usages have been replaced with the standard JS fetch function; we recommend doing the same with your own code.
  • The old LDLZ data source (adapter) has been completely removed, because it referenced an old server. Prior LocusZoom versions had already introduced its replacement, LDLZ2 (also known as LDServer).
  • Data.Source.extend has been removed, in favor of true ES6 classes.
  • Removed setElementStatusByFilters and largely unused methods.
  • Remove datalayer.addField method, due to limited utility. It is better to know what fields are required before requesting the data.
  • Removed "transition" option from layouts, which was poorly supported and largely unused.

Other

If you are testing experimental LocusZoom features, we have changed the build scripts. Gulp has been removed and replaced with new commands: npm run dev and npm run build. The unit tests now support test coverage.

The build process and modules work on all currently supported node LTS versions: 10.x or above. Old versions of Ubuntu tend to ship with very old versions of nodeJS, so this is something to check if your modified locuszoom code refuses to build.

If you modify the code, we welcome open source contributions! Please share your improvements or suggestions.

- JavaScript
Published by abought over 5 years ago

locuszoom - v0.12.0-beta.5

  • Intervals track now supports basic display filters
  • Bugfix for missing tooltips on intervals track at first render
  • Improve default plot-level toolbar

- JavaScript
Published by abought over 5 years ago

locuszoom - v0.12.0-beta.4

  • Genes layer is now filtered to a curated subset of gene types by default
  • Update gene and gwas catalog datasets to use newest releases in portaldev api

- JavaScript
Published by abought over 5 years ago

locuszoom - v0.12.0-beta.3

  • Support all active nodeLTS when using as ESM
  • Build and minor display issues

- JavaScript
Published by abought over 5 years ago

locuszoom - v0.12.0-beta.2

  • Bugfixes: pan/zoom, axis label display, event cleanup
  • New filtering widget + UI
  • Better default LD panel for GRCh38 datasets

- JavaScript
Published by abought over 5 years ago

locuszoom - v0.12.0-beta.1

Preview release that includes breaking changes

See #193 for details

- JavaScript
Published by abought over 5 years ago

locuszoom - v0.11.0

New features

  • New coaccessibility loop visualization feature
  • New tabix-reader extension
  • New "guides" documentation for advanced layouts features
  • New annotation feature allows users to preserve markings across rerender for custom code (eg "label this point")

Breaking changes

  • Code cleanup and refactoring to support reuse
  • Move non-generic features to extensions: Covariates Model dashboard widget, Intervals track

Bugfixes and other improvements

  • Bugfixes for gene constraint and credible set display
  • Improve LD point coloring when assoc data has a nonstandard variant format
  • display_options widget can now control filter options, for data layers that support this
  • Interval track now supports several ways to specify colors

- JavaScript
Published by abought over 5 years ago

locuszoom - 0.10.2

Bugfix: improve how the gnomAD gene constraint source handles edge cases with unusual or duplicate gene names

- JavaScript
Published by abought about 6 years ago

locuszoom - 0.10.1

  • We have restored and improved gene constraint tooltips, using gnomAD as our new source of data. Using this feature on an existing site will require updating LocusZoom.Datasources options (see below). Tooltips now include o/e constraint metrics and confidence intervals. Genes with no constraint information now hide the table rather than showing blank fields.
    • Currently gene constraint information is only available for build GRCh37
  • Fix a bug where panel titles were sometimes rendered twice

Breaking changes

  • Old layouts using GeneConstraintLZ will need to be updated to use the new gnomAD API URL, as well as to correctly specify the genome build. For example: .add("constraint", ["GeneConstraintLZ", { url: "https://gnomad.broadinstitute.org/api", params: { build: 'GRCh37' } }]);
    • Although we generally try to preserve backwards compatibility, in this case, the old GeneConstraintLZ datasource was designed for a server (exAC) that is no longer available, and no custom datasources were found in an audit of users. Therefore the datasource has been redefined to use a different request and response format based on gnomAD.

- JavaScript
Published by abought about 6 years ago

locuszoom - 0.10.0

New features

  • New datalayer match directive allows users to click on a point, and see corresponding points with the same value on the same/other data layers. The visualization is based on existing configurable layout directives, providing control over point size, point shape, etc.
    • This is an experimental feature; the API and features may change based on user feedback
  • Aggregation test demo now uses real data from a live server and supports more kinds of calculations
  • Add a new widget to select LD population for the plot
    • All examples have been updated to add this widget
    • This widget is designed to work with the LDLZ2 data source, and the UMich LDServer at https://portaldev.sph.umich.edu/ld/ (prebuilt populations are based on those available in the 1000G dataset). We encourage all users to migrate off the old (legacy) LD API ( http://portaldev.sph.umich.edu/api/v1/pair/LD/results ), and enjoy new features made possible by the UMich LDServer.
    • This widget is not part of the default layout, because many old LZ installations are still using the old URL
  • Dashboard widget improvements for developers
    • A new plot-level set_state dashboard widget lets users select an item from a menu to change plot.state. This can be used to modify requests dynamically- eg, to provide configuration options used to make LD requests
    • Developers can now control button text for the "Download" and "Resize to data" buttons
    • Developers can now specify a default filename other than 'locuszoom.svg" for the download image button

Bugfixes

  • The "download plot as image" button is now faster and works more reliably when saving images of large (or dense) plot regions
  • Default layouts and extensions will now more consistently apply the htmlescape filter for user-provided data
  • Fix issues where closed tooltips could reopen when panning, zooming, or other dynamic actions
  • "Full height" vertical lines will now redraw to the correct size when the plot is resized
  • Fix regression where x-axis labels did not update to show region, when the plot was dynamically redrawn

Deprecations/ breaking changes

  • The landing page for LocusZoom has been updated to emphasize CDNs. We no longer upload new versions of Locuszoom in a static asset folder on github; please migrate to using the CDN (or a build system like NPM + webpack) to get the newest code.
  • The syntax for specifying color of phewas scatter plots has changed. Users of the stock layout should automatically be upgraded, but code for custom color schemes may need to be changed.
  • All usages of the Q library have been replaced with native ES6 promises, including in the pre-bundled vendor.js. Custom code may need to be updated. In general this will involve small function renames.
    • locuszoom.vendor.js incorporates a polyfill for modern ES6 Promises, to help existing LocusZoom users ensure support for old browsers.
  • Removed the "gene constraint information" table from gene track tooltips, due to lack of a data provider. This has been replaced with a link to gnomAD.
    • This change was made because the data source (exAC) has been decommissioned, and the new gnomAD API does not yet support bulk queries. We hope to restore this feature in the future.

- JavaScript
Published by abought about 6 years ago

locuszoom - 0.10.0-beta.2

  • Add a new widget to select LD population for the plot
    • All examples have been updated to add this widget
    • This widget is designed to work with the LDLZ2 data source, and the UMich LDServer (prebuilt populations are based on those available in the 1000G dataset). We encourage all users to migrate off the old (legacy) URL, and enjoy new features made possible by the UMich LDServer.
    • This widget is not part of the default layout, because many old LZ installations are still using the old URL
  • Generic version: the LD picker uses the new plot-level set_state dashboard widget. This can be used to modify requests dynamically- eg, to provide configuration options used to make LD requests
  • Fix regression where x-axis labels did not update to show region

- JavaScript
Published by abought over 6 years ago

locuszoom - 0.10.0-beta.1

This is a preview release. It contains several minor, though possibly breaking, changes; we have posted it publicly to allow users try it out and give feedback.

New features

  • New data-layer match directive allows users to click on a point, and see corresponding points with the same value on the same/other data layers. The visualization is based on existing configurable layout directives, providing control over point size, point shape, etc.
    • This is an experimental feature; the API and features may change based on user feedback
  • Aggregation test demo now uses real data from a live server and support more kinds of calculations

Bugfixes

  • The "download plot as image" button is now more reliable for large plot regions
  • Default layouts and extensions will now more consistently apply the htmlescape filter for user-provided data

Deprecations/ breaking changes

  • The landing page for LocusZoom has been updated to emphasize CDNs. We no longer upload new versions of Locuszoom in a static asset folder on github; please migrate to using the CDN (or a package manager like NPM) to get the newest code.
  • The syntax for specifying color of phewas scatter plots has changed. Users of the stock layout should automatically be upgraded, but code for custom color schemes may need to be changed.
  • All usages of the Q library have been replaced with native ES6 promises, including in the pre-bundled vendor.js. Custom code may need to be updated. In general this will involve small function renames.
    • Vendor JS incorporates a polyfill, to help existing LocusZoom users ensure support for old browsers.

- JavaScript
Published by abought over 6 years ago

locuszoom - 0.9.1

  • Bugfix: LD source will now correctly pick best variant for non-log pvalues
  • Improve aggregation test demo to use real data from UM/METSIM LDServer
  • Correctly support UMD module usage ; allows import 'LocusZoom'; for core + extensions
  • Documentation fixes

(*) This was released to NPM May 2019, and has been retroactively tagged.

- JavaScript
Published by abought over 6 years ago

locuszoom - 0.9.0

Summary

  • New: configurable build 38 support for all datasources
  • New: label SNPs in a study that are in the GWAS catalog
  • Improve reusability and caching for credible set calculations
  • Forest plots have better support for handling dynamic data
  • Annotation/rug tracks are easier to click, and have a configurable tooltip position.
  • Line track now supports filled curves
  • Plots now support a "width_only" responsive resize mode. This is useful for dynamic layouts or rug tracks (where more control over panel height is desired)
  • The display_options widget has improved control over legends and item labels
  • Improvements for development and debugging
    • Many error messages now log debugging stacktraces to the console
    • Issue console warnings for certain behaviors known to cause broken layouts
  • New plot level event: notify when a panel is removed.
  • Label and element filtering options now support != to test for absence of a value.

Developer notes

Deprecation warnings

  • The original LD Source (LDLZ) is now deprecated. All examples have been upgraded to use LDLZ2, which uses the new Michigan LDServer.
    • The new source supports multiple genome builds and configurable choice of reference panels; the previous LD source does not offer this functionality, and relies on a deprecated server endpoint.
  • The plot builder tool was unmaintained, and has been removed.
  • vendor.js has been updated to use a slightly newer d3 version. (3.5.6 --> 3.5.17)

Features and layout changes

  • Where possible, most "region" data sources (genes, recomb rate, and LD) will respond to a state.genome_build parameter, and automatically attempt to select the best API source for that build.
    • params.source parameter is no longer required for many data sources. To ensure that your plot uses the newest and best version of data available, we recommend using params.build or state.genome_build instead.

Bugfixes

  • Better handling for regions with no data

- JavaScript
Published by abought about 7 years ago

locuszoom - 0.8.2

Allow forest plots to operate on dynamic data from the server

New category_forest layer type that allows ticks and labels to be determined from the server response, without having to be specified in the layout in advance

Updated forest plot example to take advantage of these features.

- JavaScript
Published by abought over 7 years ago

locuszoom - 0.8.1

  • 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.

- JavaScript
Published by abought over 7 years ago

locuszoom - 0.8.0

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

- JavaScript
Published by abought over 7 years ago

locuszoom - 0.7.2

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

- JavaScript
Published by abought almost 8 years ago

locuszoom - 0.7.1

  • Add a new option to suppress confirmation modals when removing a plot panel
  • Fix interval annotation example to reflect recent API changes

- JavaScript
Published by abought about 8 years ago

locuszoom - 0.7.0

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

- JavaScript
Published by abought about 8 years ago

locuszoom - 0.6.1

  • Allow plot to shrink when panels are removed (bugfix)
  • Update example html files for recent API changes

- JavaScript
Published by abought over 8 years ago

locuszoom - v0.6.0

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.

- JavaScript
Published by abought over 8 years ago

locuszoom - v0.5.6

  • 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

- JavaScript
Published by Frencil almost 9 years ago

locuszoom - v0.5.5

  • 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

- JavaScript
Published by Frencil almost 9 years ago

locuszoom - v0.5.4

  • 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

- JavaScript
Published by Frencil about 9 years ago

locuszoom - v0.5.3

  • Fix positioning bug for plot-level dashboard component menus (#83)
  • Add an example demonstrating the covariates model menu
  • Adjust some styles to be more resilient against environmental CSS

- JavaScript
Published by Frencil about 9 years ago

locuszoom - v0.5.2

  • Fix Firefox shift+scroll zoom bug
  • Basic region navigation elements as available predefined dashboard components
  • Data layers menu as an available predefined dashboard component
  • Support for live-altering the z-index sort of data layers and removal of data layers
  • Confirmation checks when removing panels and data layers
  • Add multiple phenotypes (layered) plot to examples

- JavaScript
Published by Frencil about 9 years ago

locuszoom - v0.5.1

  • Add forest plot data layer
  • Add genome legend data layer and built-in layout
  • Reorganize and expand example pages
  • Fix several minor geometry-related edge case bugs
  • Alter scroll-to-zoom to require holding shift key, with info message
  • Break out built-in tool tip layouts to a distinct layout category
  • Fix covariant model menu dashboard component bugs

- JavaScript
Published by Frencil about 9 years ago

locuszoom - v0.5.0

  • Refactored interaction architecture for simplicity, consistency, and performance
  • Refactored packaging to work more seamlessly across environments (browser/AMD/CommonJS)
  • Data Layer exportData() method to extract data as JSON/CSV/TSV
  • More consistent geometry bounds enforcement
  • Dropped some deprecated API elements
  • Minor cross-browser compatibility improvements

- JavaScript
Published by Frencil over 9 years ago

locuszoom - v0.4.9

  • Abstract name spacing in layouts
    • All predefined layout field name spaces are explicitly aliased
    • Logic to define a collection of name spaces when getting a layout to resolve field names
    • Inheritance pattern for "default" name spaces in nested layouts
  • Fix running rescaleSVG bug (preserve aspect ratio correctly during responsive resizing)

- JavaScript
Published by Frencil over 9 years ago

locuszoom - v0.4.8

  • Annotation tracks data layer and accompanying layouts
  • Data filtering methods (select/highlight/dim/hide by filters)
  • Dim and Hide settable statuses on all data elements
  • Enforce consistent margins/clipareas across x-linked panels regardless of initial layout
  • Distribution of LocusZoom.js as an NPM module

- JavaScript
Published by Frencil over 9 years ago

locuszoom - v0.4.7

  • Add support for dynamic layout-defined legends
  • Define dynamic legend in standard GWAS panel layout
  • Improve cross-browser mousewheel zoom support and stability
  • Panel method for automatic vertical sizing directed by child data layer content

- JavaScript
Published by Frencil over 9 years ago

locuszoom - v0.4.6

  • Break Standard Layout into remixable layout pieces
  • Clean up test/build suite
  • Update SVG architecture diagram

- JavaScript
Published by Frencil over 9 years ago

locuszoom - v0.4.5

  • Introduce layout-defined range limits for region extent, enforced by zoom interaction
  • Reimplement zoom interaction for tighter control of relative scale (fixes gigantic zoom step bug seen in certain browser versions)
  • Add syntax shortcut for defining "basic" loader on panels
  • Fully port "Instance" namespace to more accurate "Plot" namespace
  • Various iterations on styles and small bug fixes

- JavaScript
Published by Frencil over 9 years ago

locuszoom - v0.4.4

  • Abstract HTML-based UI elements to a new "Dashboard" system (replaces "controls")
  • Reimplement existing HTML-based UI elements, such as panel remove/reorder buttons, download SVG button and plot dimensions, etc. as Dashboard Components
  • Add support for generic Dashboard buttons with arbitrary HTML menu overlays
  • Introduce special Dashboard menu component for covariate model building using arbitrarily many selected variants

- JavaScript
Published by Frencil over 9 years ago

locuszoom - v0.4.3

  • Tighten up interactive behaviors
  • Apply data transition capabilities on the genes panel
  • Make data transitions standard
  • Refactor plot resize element to be HTML-based analogous to panel boundaries
  • Various cross-browser compatibility fixes

- JavaScript
Published by Frencil over 9 years ago

locuszoom - v0.4.2

  • Add ability for panels to pan / zoom, including axis-based panning and axis-based scaling
  • Add ability for panels to be linked in the layout by axis such that interaction that affects the axis in one panel may be broadcast to other linked panels

- JavaScript
Published by Frencil over 9 years ago

locuszoom - v0.4.1

  • Show/update region size in plot controls area
  • Better handling of panel description content that stretches beyond panel dimensions
  • Minor big fixes left over from 0.4.0
  • Documentation/README updates

- JavaScript
Published by Frencil over 9 years ago

locuszoom - v0.4.0

  • Abstract selected/highlighted statuses and define layout syntax for binding to mouse events and binding tool tip behavior to select/highlight statuses
  • Expand original "onUpdate" into framework of event hooks that include changes to layout, data request/render events, and element click events
  • Refactor layout syntax to define panels and data layers as arrays of objects with ids as named properties
  • Refactor curtains to be HTML overlays with customizable CSS and graceful content scrolling styles
  • Implement a "loader" element to show loading progress with discrete checkpointing or arbitrary animation

- JavaScript
Published by Frencil over 9 years ago

locuszoom - v0.3.10

  • Gene constraint known data source and display in gene tool tips
  • LD reference variant identification
  • Multiselection and closable tool tip support
  • Filterable labels on scatter elements
  • Support for scalable parameters with arbitrarily many filters
  • Refactor of known data sources and request layer
  • Cross-origin support for embedding stylesheet in SVG download

- JavaScript
Published by Frencil over 9 years ago

locuszoom - v0.3.9

  • Constrain layouts to vertical panel orientations
  • Add methods to seamlessly add and remove panels after plot intiialization
  • Add support for panel titles and descriptions
  • Add panel controls to provide UI for rearranging panels, removing panels, and showing panel descriptions
  • Add panel boundaries for adjusting panel heights on an individual basis
  • Add Recombination Rate data layer to the standard layout

- JavaScript
Published by Frencil almost 10 years ago

locuszoom - v0.3.8

  • Refactor data sources to have a simpler extend method for creating new/custom data sources
  • Add known data sources for Recombination Rates and Static JSON
  • Add a line data layer with styling and tool tip support
  • Add a line of significance to the positions panel in StandardLayout utilizing the Static JSON data source and line data layer

- JavaScript
Published by Frencil almost 10 years ago

locuszoom -

  • Tool tip support

- JavaScript
Published by Frencil almost 10 years ago

locuszoom -

  • Responsive/automatic plot resizing

- JavaScript
Published by Frencil almost 10 years ago

locuszoom -

  • Adding plot_builder.html - a tool for live editing layouts
  • Folding state into the layout object as a top-level attribute

- JavaScript
Published by Frencil almost 10 years ago

locuszoom -

  • Conform to D3's general enter/update/exit pattern for rendering data elements
  • Expanding tick controls to support:
    • Manual tick definitions
    • Tick label styling
    • Tick label transformation (position, rotate, etc.)

- JavaScript
Published by Frencil almost 10 years ago