trackSpec: Track Spec

Description Usage Arguments Value Examples

Description

Height, background and label are common options of all tracks, use these functions to get and set them.

Usage

1
2
3
trackSpec(track, which = c("background", "height", "label"))

trackSpec(track, which = c("background", "height", "label")) <- value

Arguments

track

A TnTTrack object.

which

Character vector, can be "background", "height" or "label".

value

Value to set: background should be character, height should be numeric, label should be character. If length of which is bigger than one, value should be a list with the same length.

Value

For trackSpec, if length of which equals to one, return a scalar character or numeric, if length of which is bigger than one, return as a list.

Examples

1
2
3
4
5
6
track <- BlockTrack(GRanges("chr13", IRanges(6, 9)))
trackSpec(track, "background")
trackSpec(track, c("height", "label"))
trackSpec(track, c("height", "label")) <- list(100, "my range")
trackSpec(track, "background") <- "green"
trackSpec(track)

TnT documentation built on Nov. 8, 2020, 8:11 p.m.