hc_segments-HilbertCurve-method: Add line segments to Hilbert curve

Description Usage Arguments Value Author(s) Examples

Description

Add line segments to Hilbert curve

Usage

1
2
3
## S4 method for signature 'HilbertCurve'
hc_segments(object, ir = NULL, x1 = NULL, x2 = NULL,
    gp = gpar(lty = 1, lwd = 1, col = 1))

Arguments

object

A HilbertCurve-class object.

ir

an IRanges object which specifies the input intervals.

x1

if start positions are not integers, they can be set by x1.

x2

if end positions are not integers, they can be set by x2.

gp

graphic parameters for lines. It should be specified by gpar. Note you cannot set linejoin and lineend.

Value

A data frame which contains coordinates (in the 2D space) of segments.

Author(s)

Zuguang Gu <z.gu@dkfz.de>

Examples

1
2
3
4
5
6
7
8
9
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_segments(hc, ir)

HilbertCurve documentation built on Nov. 8, 2020, 8:05 p.m.