Indexing an RleList by GRanges
0
0
Entering edit mode
@jeff-johnston-6497
Last seen 7.0 years ago
United States
Hello, I really like this new ability to index into an RleList via a GRanges: rl <- RleList(chr1=1:100) gr <- GRanges(ranges=IRanges(10, 20), strand="+", seqnames="chr1") rl[gr] # RleList of length 1 # $chr1 # integer-Rle of length 11 with 11 runs # Lengths: 1 1 1 1 1 1 1 1 1 1 1 # Values : 10 11 12 13 14 15 16 17 18 19 20 Would it be possible to make it strand-aware so that the values are reversed for ranges on the negative strand? Currently, the strand of each range appears to have no effect: strand(gr) <- ?-? rl[gr] # RleList of length 1 # $chr1 # integer-Rle of length 11 with 11 runs # Lengths: 1 1 1 1 1 1 1 1 1 1 1 # Values : 10 11 12 13 14 15 16 17 18 19 20 This would make it more consistent with things like getSeq(), which are aware of negative-stranded GRanges. Thanks! Jeff > sessionInfo() R version 3.1.0 (2014-04-10) Platform: x86_64-apple-darwin10.8.0 (64-bit) locale: [1] C attached base packages: [1] parallel stats graphics grDevices utils datasets methods base other attached packages: [1] GenomicRanges_1.16.0 GenomeInfoDb_1.0.1 IRanges_1.22.2 BiocGenerics_0.10.0 setwidth_1.0-3 loaded via a namespace (and not attached): [1] XVector_0.4.0 stats4_3.1.0
• 1.2k views
ADD COMMENT

Login before adding your answer.

Traffic: 508 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6