| extendRanges {htSeqTools} | R Documentation |
This function allows to extend ranges up to a user-specified length, which can be helpful in ChIP-seq analysis.
extendRanges(x, seqLen = 200, chrlength, mc.cores=1)
x |
Object containing reads. |
seqLen |
Desired sequence length after extension. |
chrlength |
Integer vector indicating the length of each
chromosome. |
mc.cores |
Number of cores to use in parallel computations
(passed on to |
A list of IRanges objects with extended sequence length.
signature(x = "RangedData")space(x) indicates the
chromosome, start(x) and end(x) the start/end positions of
each read.
signature(x = "list")Each element in x
is assumed to correspond to a different sample.
David Rossell
set.seed(1)
st <- round(rnorm(1000,500,100))
st[st>2000] <- 2000
strand <- rep(c('+','-'),each=500)
space <- rep('chr1',length(st))
sample1 <- RangedData(IRanges(st,st+38),strand=strand,space=space)
extendRanges(sample1, seqLen=200, chrlength=c(chr1=2000))