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
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 |
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.
#> NULLtrackSpec(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" #>