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

%_%R Documentation

BiocGenerics::setdiff shortcut (strand agnostic)

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

x %_% ...

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

Arguments

x

GRanges object to to

...

arguments to be passed to gr.findoverlaps

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)

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 June 6, 2023, 12:08 a.m.