Entering edit mode
Hi,
The reduce function is very useful for joining neighboring ranges.
However, the score information is lost after applying reduce. Is it
possible to retain the score information after applying reduce?
Here is an example.
library(GenomicRanges)
rd <- RangedData(
RangesList(
chrA=IRanges(start=c(1, 4, 6), width=c(3, 2, 4)),
chrB=IRanges(start=c(1, 3, 6), width=c(3, 3, 4))),
score=c(2, 7, 3, 1, 1, 1))
rd
RangedData with 6 rows and 1 value column across 2 spaces
space ranges | score
<factor> <iranges> | <numeric>
1 chrA [1, 3] | 2
2 chrA [4, 5] | 7
3 chrA [6, 9] | 3
4 chrB [1, 3] | 1
5 chrB [3, 5] | 1
6 chrB [6, 9] | 1
reduce(rd, min.gap=1)
RangedData with 2 rows and 0 value columns across 2 spaces
space ranges |
<factor> <iranges> |
1 chrA [1, 9] |
2 chrB [1, 9] |
Please note that score column is missing after applying reduce. The
following is with score information.
space ranges | score
<factor> <iranges> | <numeric>
1 chrA [1, 9] | 12
2 chrB [1, 9] | 3
Many thanks!
Best regards,
Julie
[[alternative HTML version deleted]]