Description Usage Arguments Value Author(s) Examples
Sample ranges with same widths of input rannges from a set of subject ranges.
1 | sampleRanges(inputGRanges, subjectGRanges, ignore.strand=TRUE)
|
inputGRanges |
The input |
subjectGRanges |
The subject |
ignore.strand |
When set to |
A GRanges
object with the same length and widths of
inputGRanges
.
Ge Tan
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | library(GenomicRanges)
inputGRanges <- GRanges(seqnames=c("chr1", "chr2"),
range=IRanges(start=c(2L, 10L), end=c(6L, 15L)),
strand=c("+", "-"))
subjectGRanges <- GRanges(
seqnames=c("chr1", "chr1", "chr1", "chr1",
"chr2", "chr2"),
ranges=IRanges(start=c(20L, 20L, 30L, 30L, 7L, 25L),
end=c(50L, 50L, 32L, 32L,9L, 55L)),
strand=c("+","-", "+", "-", "+","-"))
set.seed(16)
sampleRanges(inputGRanges, subjectGRanges, ignore.strand=TRUE)
sampleRanges(inputGRanges, subjectGRanges, ignore.strand=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.