ssvConsensusIntervalSets: Intersect a list of GRanges to create a single GRanges object...

View source: R/overlapIntervalSets.R

ssvConsensusIntervalSetsR Documentation

Intersect a list of GRanges to create a single GRanges object of merged ranges including metadata describing overlaps per input GRanges.

Description

In constrast to ssvOverlapIntervalSets, only regions where a consensus of input grs are present are preserved and annotated.

Usage

ssvConsensusIntervalSets(grs, ext = 0, min_number = 2, min_fraction = 0.5, ...)

Arguments

grs

A list of GRanges

ext

An integer specifying how far to extend ranges before merging. in effect, ranges withing 2*ext of one another will be joined during the merge

min_number

An integer number specifying the absloute minimum of input grs that must overlap for a site to be considered consensus.

min_fraction

A numeric between 0 and 1 specifying the fraction of grs that must overlap to be considered consensus.

...

arguments passed to IRanges::findOverlaps, i.e. maxgap, minoverlap, type, select, invert.

Details

Only the most stringent of min_number or min_fraction will be applied.

Value

GRanges with metadata columns describing consensus overlap of input grs.

Examples

library(GenomicRanges)
a = GRanges("chr1", IRanges(1:7*10, 1:7*10))
b = GRanges("chr1", IRanges(5:10*10, 5:10*10))
ssvConsensusIntervalSets(list(a, b))

jrboyd/seqsetvis documentation built on March 17, 2024, 3:14 p.m.