add_rect_track: add retangles to a new or exsited track

Description Usage Arguments Value Author(s) See Also Examples

View source: R/custimized_track.R

Description

add retangles to a new or exsited track

Usage

1
add_rect_track(gr, h1, h2, gp = gpar(), ...)

Arguments

gr

genomic regions, it can be a data frame or a GRanges object

h1

top/bottom positions for rectangles

h2

top/bottom positions for rectangles

gp

graphic settings, should be specified by gpar.

...

other arguments passed to add_track

Value

No value is returned.

Author(s)

Zuguang Gu <[email protected]>

See Also

add_heatmap_track, add_track

Examples

1
2
3
4
5
6
require(circlize)
bed = generateRandomBed(200)
col_fun = colorRamp2(c(-1, 0, 1), c("green", "black", "red"))
gtrellis_layout(track_ylim = range(bed[[4]]), nrow = 3, byrow = FALSE)
add_rect_track(bed, h1 = bed[[4]], h2 = 0, 
    gp = gpar(col = NA, fill = col_fun(bed[[4]])))

gtrellis documentation built on June 21, 2018, 2 a.m.