positionSequence {EpiTxDb} | R Documentation |
Ranges
positionSequence
generates sequences of integer values
along the range information of x
. This can be used for navigating
specific positions on a range information.
positionSequence(x, order = FALSE, decreasing = FALSE) ## S4 method for signature 'Ranges' positionSequence(x, order = FALSE, decreasing = FALSE) ## S4 method for signature 'RangesList' positionSequence(x, order = FALSE, decreasing = FALSE) ## S4 method for signature 'Ranges' as.integer(x)
x |
a |
order |
|
decreasing |
|
a integer
vector if x is a
GRanges
object and a
IntegerList
if x is a
GRangesList
library(GenomicRanges) # Returns an integer vector gr <- GRanges("chr1:1-5:+") positionSequence(gr) gr2 <- GRanges("chr1:1-5:-") positionSequence(gr) # returns an IntegerList grl <- GRangesList("1" = gr,"2" = gr,"3" = gr2) # must be named positionSequence(grl)