[BioC] IRanges: RangedData.values() deletes rownames

Michael Dondrup Michael.Dondrup at uni.no
Wed Nov 3 17:06:09 CET 2010


Hi,

I remember having posted something like this earlier. 

calling values on a RangedData object deletes the ranges names, if the DataFrame doesn't have names, is 
that intentional?

> rd = RangedData(ranges=IRanges(start=1:2, width=1, names=c("A","B")), space=1)
> rownames(rd)
[1] "A" "B"
> values(rd) = DataFrame(somedata=1:2)
> rownames(rd)
NULL

I can work around this by setting them again: 

values(rd) = DataFrame(somedata=1:2, row.names=c("A","B"))
 but that's still a glitch...

Michael
R version 2.12.0 (2010-10-15)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

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] rtracklayer_1.10.0 RCurl_1.4-3        bitops_1.0-4.1     IRanges_1.8.0   



More information about the Bioconductor mailing list