Closed abought closed 3 years ago
Merging into feature branch so that it can be tested in conjunction with TRAITS and PARSERS (each separate changesets, which are intended to work together towards several new features).
Rough release notes so far:
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.
Namespaces
have been redesigned as the central mechanism for plotting two datasets with one reusable layout.
{unnamespaced: true}
or {{{{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
.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 from somewhere else. For example, it is now easier to source custom LD from a local tabix file, without having to write custom code or use one specific base class whose assumptions do not match your data source.Internal improvements
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 for "fake ID fields" in plots like phewas or coaccessibility, where no single ID 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
\{\{namespace\[(\w+)\]\}\}
with $1:
)fields
array 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._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.params: {}
. Existing DataSources.add
calls will need to be widely updated.id
. Most layouts already did this.Bugfixes:
Ticket: #253
π£ This is a work in progress PR. It contains significant breaking changes that will affect every LZ usage, particularly involving the mechanisms of data adapters (retrieval) and how layouts deal with data. The syntax will evolve over time. π£
Purpose
Revise and extend the way in which LZ retrieves data.
Decouples the act of retrieval from the act of combining datasets; for example, would allow any payload-compliant source to feed LD information, without needing to write a custom LD subclass in order to get the join logic.
More functional style to make request processing much easier to follow, debug, and extend.
Support multi-value subset caches (for smoother region switching + smarter LD)
Revise the current mechanism of namespaces- eliminate the distinction between "abstract" and "concrete" layouts by emphasizing locally (not globally) distinct field names
TODO