Question: Split a GRanges into one GRanges per chromosome/strand pair and put in GRangesList?
0
endrebak852 • 110 wrote:
I want to find the coverage for each chromosome/strand pair, but unfortunately, the coverage-function takes no ìgnore.strand=FALSE` argument. Therefore I want to split a GRanges into the constituent chromosome/strand pairs and run coverage on the GRangesList. How do I do that?
Example data:
library(GenomicRanges)
gr <- GRanges( seqnames=Rle(c("chr1", "chr2", "chr1", "chr3"), c(1, 3, 2, 4)),
ranges=IRanges(1:10, end=10),
strand=Rle(strand(c("-", "+", "*", "+", "-")), c(1, 2, 2, 3, 2)),
seqlengths=c(chr1=11, chr2=12, chr3=13))
ADD COMMENT
• link
•
modified 2.2 years ago
by
ATpoint ♦ 44k
•
written
2.2 years ago by
endrebak852 • 110