Whether imported (ES6 modules) or loaded via script tag (UMD), this module represents the "public interface" via which core LocusZoom features and plugins are exposed for programmatic usage.
A library using this file will need to load locuszoom.css
separately in order for styles to appear.
Classes
Members
(inner, constant) Adapters :module:registry/base~ClassRegistry
A plugin registry that allows plots to use both pre-defined and user-provided data adapters (responsible for controlling the retrieval and harmonization of data).
Type:
- Source:
(inner, constant) DataFunctions :module:registry/base~RegistryBase
A plugin registry that allows plots to use both pre-defined and user-provided "data join" functions.
Type:
- Source:
(inner, constant) DataLayers :module:registry/base~ClassRegistry
A plugin registry that allows plots to use both pre-defined and user-provided data rendering types (data layers).
Type:
- Source:
(inner, constant) Layouts :LayoutRegistry
A plugin registry that allows plots to use both pre-defined and user-provided data adapters.
Type:
- Source:
(inner, constant) MatchFunctions :module:registry/base~RegistryBase
A plugin registry that allows plots to use both pre-defined and user-provided "match" functions, used by filtering and matching behavior.
Type:
- Source:
(inner, constant) TransformationFunctions :TransformationFunctionsRegistry
A plugin registry that allows plots to use both pre-defined and user-provided transformation functions, which can be used to modify a value in the input data in a predefined way. For example, these can be used to let APIs that return p_values work with plots that display -log10(p)
Type:
- Source:
(inner, constant) Widgets :module:registry/base~ClassRegistry
A plugin registry that allows plots to use both pre-defined and user-provided toolbar widgets: interactive buttons and menus that control plot display, modify data, or show additional information as context.
Type:
- Source:
Methods
(static) use(plugin, args)
Parameters:
Name | Type | Description |
---|---|---|
plugin |
pluginCallback | The plugin should be a module that exports the function as either the default export, or as a member named "install" |
args |
Additional options to be passed when creating the plugin |
(inner) populate(selector, datasource, layout) → {Plot}
Populate a single element with a LocusZoom plot. This is the primary means of generating a new plot, and is part of the public interface for LocusZoom.
Parameters:
Name | Type | Description |
---|---|---|
selector |
String | d3.selection | CSS selector for the container element where the plot will be mounted. Any pre-existing content in the container will be completely replaced. |
datasource |
module:LocusZoom~DataSources | Ensemble of data providers used by the plot |
layout |
Object | A JSON-serializable object of layout configuration parameters |
- Source:
Returns:
The newly created plot instance
- Type
- Plot
Type Definitions
pluginCallback(LocusZoom, args)
Parameters:
Name | Type | Description |
---|---|---|
LocusZoom |
Object | The global LocusZoom object |
args |
Any additional arguments passed to LocusZoom.use will be passed to the function when the plugin is loaded |