overlapOfGRanges-methods {compEpiTools} | R Documentation

## visualization of GRanges overlap

### Description

given a list of GRanges, all pair-wise overlap are evaluated and the percentage of overlapping ranges is visualized in a heatmap

### Methods

To be used in this form:

overlapOfGRanges(GRlist, plot=TRUE)

where:

- GRlist: a list of GRanges

- plot: logical

This function uses countOverlaps to count the number of shared ranges for all pairs of GRanges in the input list. The result is returned as an heatmap, white to beige to red, corresponding to increased overlap. The percentage overlap is added on each heatmap cell. For each GRanges on the column of the heatmap (GRC) it represents the percentage of each GRanges in the heatmap rows which is overlapping with GRC.

### Examples

    	starts <- seq(100, 500, length.out=5)
    	gr1 <- GRanges(Rle('chr1'),
    		ranges=IRanges(start=starts, end=starts+100))
    	starts <- seq(300, 700, length.out=5)
    	gr2 <- GRanges(Rle('chr1'),
    		ranges=IRanges(start=starts+50, end=starts+120))
    	overlapOfGRanges(GRlist=list(gr1, gr2), plot=FALSE)

[Package compEpiTools version 1.24.0 Index]