Class: Plot

Plot

Plots are drawn as a series of arcs.

Action and Events

Action Viewer Method Plot Method Event
Add addPlots() - plots-add
Update updatePlots() update() plots-update
Remove removePlots() remove() plots-remove
Read plots() - -

Attributes

Attribute Type Description
name String Name of plot
legend String|LegendItem Name of legendItem or the legendItem itself (sets positive and negative legend)
legendNegative String|LegendItem Name of legendItem or the legendItem itself for the plot above the baseline
legendPositive String|LegendItem Name of legendItem or the legendItem itself for the plot below the baseline
source String Source of the plot
positionsrc,iu Array Array of base pair position on contig
scoresrc,iu Array Array of scores
baseline Number Score where the plot goes from negative to positive (in terms of legend)
axisMax Number Maximum value for the plot axis
axisMin Number Minimum value for the plot axis
favorite Boolean Plot is a favorite [Default: false]
visible Boolean Plot is visible [Default: true]
meta Object Meta data for Plot

rc Required on Plot creation iu Ignored on Plot update

Examples

new Plot(viewer, options, meta)

Create a new Plot.

Name Type Description
viewer Viewer

The viewer

options Object

Attributes used to create the plot

meta Object optional

User-defined Meta data to add to the plot.

Extends

Members

axisMaxNumber

Get or set the plot maximum axis value. This is a value must be greater than or equal to the maximum score.

axisMinNumber

Get or set the plot minimum axis value. This is a value must be less than or equal to the minimum score.

baselineNumber

Get or set the plot baseline. This is a value between the axisMin and axisMax and indicates where where the baseline will be drawn. By default this is 0.

canvasCanvas

Get the canvas.

colorArray Color

Return an array of the positive and negativ colors [PositiveColor, NegativeColor].

extractedFromSequenceBoolean

Get or set the extractedFromSequence. This plot is generated directly from the sequence and does not have to be saved when exported JSON.

layoutLayout

Get the layout.

legendLegendItem

Alias for legendItem

legendItemLegendItem

Set both the legendItemPositive and legendItemNegative to this legendItem. Get an CGArray of the legendItems: [legendItemPositive, legendItemNegative].

legendItemNegativeLegendItem

Get or Set both the LegendItem for the negative portion of the plot (i.e. below baseline.

legendItemPositiveLegendItem

Get or Set both the LegendItem for the positive portion of the plot (i.e. above baseline.

legendNegativeLegendItem

Alias for legendItemNegative.

legendPositiveLegendItem

Alias for legendItemPositive.

lengthNumber

Get the number of points in the plot

metaBoolean

Get or Set the meta data of this object. See the meta data tutorial for details.

nameString

Get or set the name.

positionsCGArray

Get or set the positions (bp) of the plot.

scoreCGArray

Get or set the scores of the plot. Value should be between 0 and 1.

sequenceSequence

Get the sequence.

typetype

Get or set the type

viewerViewer

Get the Viewer

visibleBoolean

Get or Set the visibility of this object.

Methods

inherited deleteFromObjects()

Remove the object from Viewer.objects

highlight(track)

Highlights the tracks the plot is on. An optional track can be provided, in which case the plot will only be highlighted on the track.

Name Type Description
track Track

Only highlight the feature on this track.

remove()

Remove the Plot from the viewer, tracks and slots

toJSON()

Returns JSON representing the object

toString(){String}

Return the class name as a string.

Returns:
Type Description
String
  • 'Plot'

update(attributes)

Update plot attributes. See updating records for details.

Name Type Description
attributes Object

Object describing the properties to change