hc_layer-GenomicHilbertCurve-method {HilbertCurve} | R Documentation

## Add a new layer to the Hilbert curve

### Description

Add a new layer to the Hilbert curve

### Usage

    ## S4 method for signature 'GenomicHilbertCurve'
    hc_layer(object, gr, col = "red", border = NA,
        mean_mode = c("w0", "absolute", "weighted", "max_freq"), grid_line = 0,
        grid_line_col = "black", overlay = default_overlay)

### Arguments

`object` | a `GenomicHilbertCurve-class` object
`gr` | a `GRanges` object which contains the genomic regions to be mapped to the curve
`col` | a scalar or a vector of colors which correspond to regions in `gr`, pass to `hc_layer,HilbertCurve-method`
`border` | a scalar or a vector of colors which correspond to the borders of regions. Set it to `NA` if borders are suppressed.
`mean_mode` | Under 'pixel' mode, each pixel represents a small window. This argument provides methods to summarize value for the small window if the input genomic regions can not completely overlap with the window, pass to `hc_layer,HilbertCurve-method`
`grid_line` | whether add grid lines to show blocks of the Hilber curve, pass to `hc_layer,HilbertCurve-method`
`grid_line_col` | color for the grid lines, pass to `hc_layer,HilbertCurve-method`
`overlay` | a self-defined function which defines how to overlay new layer to the plot, pass to `hc_layer,HilbertCurve-method`

### Details

It is basically a wrapper of `hc_layer,HilbertCurve-method`.

### Value

Refer to `hc_layer,HilbertCurve-method`

### Author(s)

Zuguang Gu <z.gu@dkfz.de>

### Examples

    require(circlize)
    require(GenomicRanges)
    bed = generateRandomBed()
    gr = GRanges(seqnames = bed[[1]], ranges = IRanges(bed[[2]], bed[[3]]))
    hc = GenomicHilbertCurve(mode = "pixel", level = 9)
    hc_layer(hc, gr, col = rand_color(length(gr)))

[Package HilbertCurve version 1.24.0 Index]