trackSpec: Track Spec

trackSpecR Documentation

Track Spec

Description

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

Usage

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")
trackSpec(track, c("height", "label"))
trackSpec(track, c("height", "label")) <- list(100, "my range")
trackSpec(track, "background") <- "green"
trackSpec(track)

Marlin-Na/TnT documentation built on Sept. 15, 2024, 5:27 a.m.