utilsDeStrand: Utility: Split Genomic Ranges by strand

Description Usage Arguments Value See Also Examples

View source: R/utils.R

Description

Utility function that attemps to split genomic ranges by strand with split(object, strand(object))

Usage

1
utilsDeStrand(object)

Arguments

object

Any object with a split and strand method, e.g. GRanges/GPos

Value

Object split by strand, e.g. GRangesList.

See Also

Other Utility functions: utilsAggregateRows(), utilsScoreOverlaps(), utilsSimplifyTxDb()

Examples

1
2
3
4
5
6
gp <- GPos(seqnames=Rle(c("chr1", "chr2", "chr1"), c(10, 6, 4)),
            pos=c(44:53, 5:10, 2:5),
            strand=c(rep("+", 10), rep("-", 10)))
gr <- as(gp, "GRanges")
utilsDeStrand(gp)
utilsDeStrand(gr)

MalteThodberg/CAGEfightR documentation built on Sept. 11, 2021, 4:42 a.m.