# Module: LocusZoom

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.

Source:
  - index.js, line 1

### Classes

DataSources

### 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:

- module:registry/base~ClassRegistry

Source:
  - registry/adapters.js, line 19

#### (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:

- module:registry/base~RegistryBase

Source:
  - registry/data_ops.js, line 38

#### (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:

- module:registry/base~ClassRegistry

Source:
  - registry/data_layers.js, line 13

#### (inner, constant) Layouts :LayoutRegistry

A plugin registry that allows plots to use both pre-defined and user-provided data adapters.

##### Type:

- LayoutRegistry

Source:
  - registry/layouts.js, line 132

#### (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:

- module:registry/base~RegistryBase

Source:
  - registry/matchers.js, line 27

#### (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:

- TransformationFunctionsRegistry

Source:
  - registry/transforms.js, line 63

#### (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:

- module:registry/base~ClassRegistry

Source:
  - registry/widgets.js, line 10

### 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

Source:
  - index.js, line 63

#### (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:
  - helpers/display.js, line 274

##### 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

Source:
  - index.js, line 48