hc_rect-HilbertCurve-method {HilbertCurve} | R Documentation |
Add rectangles on Hilbert curve
## S4 method for signature 'HilbertCurve' hc_rect(object, ir = NULL, x1 = NULL, x2 = NULL, gp = gpar(fill = "red"), mean_mode = c("w0", "absolute", "weighted"))
object |
A |
ir |
an |
x1 |
if start positions are not integers, they can be set by |
x2 |
if end positions are not integers, they can be set by |
gp |
graphic parameters for rectangles. It should be specified by |
mean_mode |
when a segment in the curve can not be overlapped with intervals in |
Rectangles are put if a segment in the Hilbert curve overlaps with the input intervals. You cannot set the width or height of the rectangles. It is always fixed (actually it is a square).
It can be thought as the low-resolution version of hc_layer,HilbertCurve-method
.
A data frame which contains coordinates (in the 2D space) of rectangles.
Zuguang Gu <z.gu@dkfz.de>
hc = HilbertCurve(1, 100, level = 4, reference = TRUE) x = sort(sample(100, 20)) s = x[1:10*2 - 1] e = x[1:10*2] require(IRanges) ir = IRanges(s, e) hc_rect(hc, ir)