gr.setdiff: 'BiocGenerics::setdiff' shortcut (strand agnostic)

Description Usage Arguments Value Author(s)

View source: R/gUtils.R

Description

Shortcut for BiocGenerics::setdiff

gr1 <- GRanges(1, IRanges(10,20), strand="+") gr2 <- GRanges(1, IRanges(15,25), strand="-") gr3 <- "1:1-15" gr1 gr1

More robust and faster implementation of GenomicRanges::setdiff()

Robust to common edge cases of setdiff(gr1, gr2) where gr2 ranges are contained inside gr1's (yieldings setdiffs yield two output ranges for some of the input gr1 intervals.

Usage

1
2
3
x %_% ...

gr.setdiff(query, subject, ignore.strand = TRUE, by = NULL, ...)

Arguments

x

GRanges object to to

...

A GRanges or a character to be parsed into a GRanges

query

GRanges object as query

subject

GRanges object as subject

ignore.strand

boolean Flag to ignore strands. Refer to 'gr.findoverlaps()'. (default = TRUE)

by

vector Meta-data column to consider when performing overlaps. Refer to 'gr.findoverlaps()' documentation (default = NULL)

...

arguments to be passed to gr.findoverlaps

Value

GRanges representing setdiff of input interval

Returns indices of query in subject. If none found, NA

Author(s)

Marcin Imielinski


mskilab/gUtils documentation built on Sept. 1, 2018, 8:21 p.m.