Module: LocusZoom_DataLayers

Data layers represent instructions for how to render common types of information. (GWAS scatter plot, nearby genes, straight lines and filled curves, etc)

Each rendering type also provides helpful functionality such as filtering, matching, and interactive tooltip display. Predefined layers can be extended or customized, with many configurable options.

Source:

Classes

annotation_track
arcs
BaseDataLayer
category_forest
category_scatter
forest
genes
highlight_regions
intervals
intervals_enrichment
orthogonal_line
scatter

Type Definitions

behavior

Type:
  • Object
Properties:
Name Type Description
action 'set' | 'unset' | 'toggle' | 'link'
status 'highlighted' | 'selected' | 'faded' | 'hidden'

An element display status to set/unset/toggle

exclusive boolean

Whether an element status should be exclusive (eg only allow one point to be selected at a time)

href string

For links, the URL to visit when clicking

target string

For links, the target attribute (eg, name of a window or tab in which to open this link)

Source:

FilterOption

Type:
  • object
Properties:
Name Type Description
field string

The name of a field found within each datapoint datum

operator module:LocusZoom_MatchFunctions

The name of a comparison function to use when deciding if the field satisfies this filter

value

The target value to compare to

Source:

LegendItem

Type:
  • object
Properties:
Name Type Attributes Description
shape <optional>

This is optional (e.g. a legend element could just be a textual label). Supported values are the standard d3 3.x symbol types (i.e. "circle", "cross", "diamond", "square", "triangle-down", and "triangle-up"), as well as "rect" for an arbitrary square/rectangle or line for a path.

color string

The point color (hexadecimal, rgb, etc)

label string

The human-readable label of the legend item

class string <optional>

The name of a CSS class used to style the point in the legend

size number <optional>

The point area for each element (if the shape is a d3 symbol). Eg, for a 40 px area, a circle would be ~7..14 px in diameter.

length number <optional>

Length (in pixels) for the path rendered as the graphical portion of the legend element if the value of the shape parameter is "line".

width number <optional>

Width (in pixels) for the rect rendered as the graphical portion of the legend element if the value of the shape parameter is "rect".

height number <optional>

Height (in pixels) for the rect rendered as the graphical portion of the legend element if the value of the shape parameter is "rect".

style object

CSS styles object to be applied to the DOM element representing the graphical portion of the legend element.

Source:

ScalableParameter

"Scalable" parameters indicate that a datum can be rendered in custom ways based on its value. (color, size, shape, etc)

This means that if the value of this property is a scalar, it is used directly (color: '#FF0000'). But if the value is an array of options, each will be evaluated in turn until the first non-null result is found. The syntax below describes how each member of the array should specify the field and scale function to be used. Often, the last item in the list is a string, providing a "default" value if all scale functions evaluate to null.

Type:
  • Array.<object> | string
Properties:
Name Type Attributes Description
field string <optional>

The name of the field to use in the scale function. If omitted, all fields for the given datum element will be passed to the scale function.

scale_function module:LocusZoom_ScaleFunctions

The name of a scale function that will be run on each individual datum

parameters object

A set of parameters that configure the desired scale function (options vary by function)

Source: