[BioC] IRanges: setting score() on RangedData drops rownames

Patrick Aboyoun paboyoun at fhcrc.org
Thu Mar 18 17:49:18 CET 2010


Michael,
Thanks for the bug report! The issue was that the [[<-,RangedData 
method, which is called by score<-,RangedData, dropped row.names. This 
issue has been fixed in the BioC 2.5 IRanges (>= 1.4.15) and BioC 2.6 
IRanges (>= 1.5.63) code lines and will be available at bioconductor.org 
within the next 36 hours.


Patrick



On 3/18/10 7:30 AM, Michael Dondrup wrote:
> 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
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>



More information about the Bioconductor mailing list