-
Notifications
You must be signed in to change notification settings - Fork 44
Track library
Genoverse has a number of predefined tracks, which can be found in src/js/Track/library.
A track displaying chromosome bands, predominantly for use in the karyotype plugin.
A track showing genes obtained from the Ensembl REST API. When sufficiently zoomed in, genes are split into their transcripts.
A track for highlighting regions of the genome, used by genoverse.addHighlight
A track to show a legend for the features of another track or tracks.
The legend track displays a series of coloured boxes and associated labels, based on which features are currently visible for the legend's track(s).
For a feature to result in a legend, it must have a legend
property, for example
{ legend: 'feature type 1', color: 'green', ... }
{ legend: 'feature type 2', color: 'black', legendColor: 'red' ... }
{ legend: [{ label: 'feature type 3', color: 'blue' }, { label: 'feature type 3a', color: 'cyan' }] ... }
would result in
- a green box labelled "feature type 1"
- a red box labelled "feature type 2"
- a blue box labelled "feature type 3"
- a cyan box labelled "feature type 3a"
If
true
, the legend will initially appear just below the last track that the legend is for, and will move automatically to retain this state when tracks are reordered.If
false
, the legend will initially appear below the last non-legend track.
If
false
, legends can be moved separately to the track(s) it is for. If such a move occurs,lockToTrack
is set tofalse
.
If
true
, the legends for any other tracks with the same namespaced legend will be merged into one track, for examplenew Genoverse({ tracks: [ Genoverse.Track.extend({ name: 'track 1', legend: Genoverse.Track.Legend.Foo.extend({ shared: true }) }), Genoverse.Track.extend({ name: 'track 2', legend: Genoverse.Track.Legend.Foo.extend({ shared: true }) }), ], })would result in two tracks but only one legend.
Displays alternating black and white bars, separated by grey guidelines which extend which the whole length of the genome browser (behind other tracks), and coordinate labels to show where in the chromosome the browser is currently focussed. When present, always appears as the first track in the browser.
If
true
, the black and white bars and coordinate labels will also appear as the last track in the browser
Displays an arrow which extends the length of the genome browser, with a centre-aligned label showing how wide the region being shown is.
If
1
, the arrow points to the right, and an additional label saying "Forward strand" is shown on the left (at the base of the arrow) If-1
, the arrow points to the left, and an additional label saying "Reverse strand" is shown on the right (at the base of the arrow) Iffalse
, the arrow is double-headed, and there is no additional label
A track sequence variants from the dbSNP database, obtained from the Ensembl REST API.
An abstract class, extended to show data loaded from files rather than a URL. The following extensions exist to support their respective file types:
-
File.BAM
: supports .bam + .bam.bai File.BED
File.BIGBED
File.BIGWIG
File.GFF
-
File.VCF
: supports both .vcf and .vcf.gz + .vcf.gz.tbi File.WIG
An abstract class, extended to show data as either a bar (Graph.Bar
) or line (Graph.Line
) graph
An array of
[ minY, maxY ]
for the graph
If
true
, 0 will always be included in auto-generatedyRanges
. IfyRange
is defined in track configuration, this setting will be ignored.
Used to change the colors of the axes
For
Graph.Line
tracks only. Iftrue
, clicking on the track will show popups. Iffalse
, popups will not appear.
For
Graph.Line
tracks only. Iftrue
, the area between the line and 0 on the y-axis will be colored. If falsy, only the line itself will be colored.
For
Graph.Line
tracks only. A number determining the width in pixels to draw the line.
An array of objects used to group features in order to display multiple bars/lines on the same graph.
A string used to identify the dataset. Features with a
dataset
property matching that name will be displayed as part of the dataset.
An HTML color code string. Bars/lines in the dataset will be drawn with this color. If not set, bars/lines will be black.
A number between 0 and 1, determining the alpha value (opacity) used to draw the bars/lines for the dataset. If not set, the alpha value will be
1
(full opaque).
For
Graph.Line
tracks only. Overwritestrack.fill
for the dataset.
For
Graph.Line
tracks only. Overwritestrack.lineWidth
for the dataset.
resizable and rescaleableY combine to define what happens when the track "resizes", as follows:
resizable rescaleableY Effect true
true
Users can change the track height, and doing so changes the y-axis range (y-axis range will change proportionally to track height change) true
'auto' Users can change the track height, and doing so does not change the y-axis range. However, the y-axis range will automatically change so that no peaks are cut off. true
false
Users can change the track height, and doing so does not change the y-axis range (peak heights will change proportionally to track height change) false
true
Like true
/true
false
'auto' Track height cannot be changed, but the y-axis range will automatically change so that no peaks are cut off false
false
Neither track height nor y-axis range can be changed, either by users or automatically 'auto' true
Like false
/'auto''auto' 'auto' Like false
/'auto''auto' false
Like false
/'auto' (it is not possible to change a track's height such that no peaks are cut off without being able to change the y-axis range)
An abstract class, extended to show data which is not region-specific, such as the Scaleline
and Legend
tracks.