Entering edit mode
Michael Dondrup
▴
550
@michael-dondrup-3849
Last seen 10.2 years ago
Hi,
I observed this possibly unintended behavior of the score function in
package IRanges:
using 'score()<-' drops the rownames.
Reproducible example.
> rd1 = RangedData(ranges=IRanges(start=runif(4, min=1, max=10E8),
width=runif(4, min=1, max=10E5), names=paste("bla",1:4)), space=1:2)
> rownames(rd1)
[1] "bla 1" "bla 3" "bla 2" "bla 4"
> sessionInfo()
R version 2.10.1 (2009-12-14)
x86_64-apple-darwin9.8.0
locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] IRanges_1.4.9
loaded via a namespace (and not attached):
[1] tools_2.10.1
> > rd1
RangedData with 4 rows and 0 value columns across 2 spaces
space ranges |
<character> <iranges> |
bla 1 1 [623833301, 624400493] |
bla 3 1 [505448873, 505904729] |
bla 2 2 [924959706, 925681728] |
bla 4 2 [503293070, 504033700] |
> rd1
RangedData with 4 rows and 1 value column across 2 spaces
space ranges | score
<character> <iranges> | <numeric>
1 1 [623833301, 624400493] | 0.2912978
2 1 [505448873, 505904729] | -0.5158529
3 2 [924959706, 925681728] | 0.7401251
4 2 [503293070, 504033700] | 1.1659967
> rownames(rd1)
NULL