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

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

track <- BlockTrack(GRanges("chr13", IRanges(6, 9))) trackSpec(track, "background")
#> NULL
trackSpec(track, c("height", "label"))
#> $height #> [1] 30 #> #> $label #> [1] "GRanges(\"chr13\", IRanges(6, 9))" #>
trackSpec(track, c("height", "label")) <- list(100, "my range") trackSpec(track, "background") <- "green" trackSpec(track)
#> $background #> [1] "green" #> #> $height #> [1] 100 #> #> $label #> [1] "my range" #>