Module: ext/lz-widget-addons

Optional LocusZoom extension: must be included separately, and after LocusZoom has been loaded

This contains (reusable) code to power some (rarely used) demo features:

  • The "covariates model" demo, in which an LZ toolbar widget is populated with information by selecting points on the plot (see "covariates model" demo)
  • The "data layers" button, which allows fine control over multiple data layers shown in the same panel (show/hide, fade, change order, etc). This is powerful, but rarely used because showing many datasets in a small space makes data hard to see. (see "multiple phenotypes layered" demo)

Loading and usage

The page must incorporate and load all libraries before this file can be used, including:

  • LocusZoom

To use in an environment without special JS build tooling, simply load the extension file as JS from a CDN (after any dependencies):

<script src="https://cdn.jsdelivr.net/npm/locuszoom@INSERT_VERSION_HERE/dist/ext/lz-widget-addons.min.js" type="application/javascript"></script>

To use with ES6 modules, the plugin must be loaded and registered explicitly before use:

import LocusZoom from 'locuszoom';
import WidgetAddons from 'locuszoom/esm/ext/lz-widget-addons';
LocusZoom.use(WidgetAddons);

Then use the features made available by this extension. (see demos and documentation for guidance)

Source:

Classes

covariates_model
data_layers