Closed abought closed 2 years ago
Release notes will be tracked in this comment.
This release makes many internal changes to how LocusZoom retrieves data. It 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.
effect_direction
ScaleFunction, inspired by PheWeb.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.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.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!
Namespaces
have been redesigned as the central mechanism for plotting two datasets with one reusable layout.
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
.\{\{namespace\[(\w+)\]\}\}
with $1:
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).
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.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.id
(no longer optional). Most layouts already did this.dashboard.components
now use toolbar.widgets
getURL(state, chain, fields)
is now _getURL(request_options)
; annotateData(records, chain)
is now _annotateRecords(records, request_options)
, etc. combineChainBody
has been totally removed in favor of data_layer.data_operations
. Several join functions are provided by default.data_operations: [{type: 'fetch', from: ['assoc', 'ld(assoc)']}]
for details of how to specify dependent requests.params: {}
. Existing sample code to create a plot will need to revise usages of DataSources.add()
._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.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.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
data_layer.fields
. This lead to a lot of confusion when their data failed to appear. StaticSource
This PR represents all changes tagged for release 14, which will emphasize support for user-provided data, including improved tabix support and built-in parsers for common data formats.
Since there are several large chunks to this release, this PR gathers release notes and additional required tasks in one place.
Release tasks: