olRanges: Identify Range Overlaps for IRanges and GRanges Object

Description Usage Arguments Author(s) Examples

View source: R/chipseq.R

Description

Function for identifying consensus peak among two peaks sets sharing a minimum relative overlap.

Usage

1
olRanges(query, subject, output = "gr")

Arguments

query

Object of class GRanges, which is a vector of genomic locations and associated annotations.

subject

Object of class GRanges.

output

By default "gr" returns any overlap with OL length information in an object of class GRanges. Also, can returns an object of class data.frame with "df".

Author(s)

Thomas Girke

Examples

1
2
3
4
5
6
## Sample Data Sets
grq <- GRanges(seqnames = Rle(c("chr1", "chr2", "chr1", "chr3"), c(1, 3, 2, 4)), ranges = IRanges(seq(1, 100, by=10), end = seq(30, 120, by=10)), strand = Rle(strand(c("-", "+", "-")), c(1, 7, 2)))
grs <- shift(grq[c(2,5,6)], 5)
## Run olRanges function
olRanges(query=grq, subject=grs, output="df") 
olRanges(query=grq, subject=grs, output="gr") 

tgirke/systemPipeR documentation built on July 20, 2021, 10:45 p.m.