Learn R Programming

HilbertCurve (version 1.2.2)

hc_layer-GenomicHilbertCurve-method: Add a new layer to the Hilbert curve

Description

Add a new layer to the Hilbert curve

Usage

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

Arguments

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

Value

Details

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

Examples

Run this code
require(circlize)
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)))

Run the code above in your browser using DataLab