[BioC] IRanges::Rle and missing values

Patrick Aboyoun paboyoun at fhcrc.org
Fri Aug 20 18:43:41 CEST 2010


  Kasper,
I'll take a look into this. The Rle constructor issue seems to be 
isolated to 'numeric' and 'complex' Rles. I'll have an update out soon.


Patrick


On 8/20/10 8:53 AM, Kasper Daniel Hansen wrote:
> Would it make sense to allow missing values in Rle objects and also to
> incorporate removal of missing values in running summaries (and
> possibly other functions)?
>
> Example:
>
>> tmp = Rle(c(1,2,2,2,3,NA,NA,NA,NA,2,3,3,3,3,3,2))
>> tmp
> 'numeric' Rle of length 16 with 10 runs
>    Lengths:  1  3  1  1  1  1  1  1  5  1
>    Values :  1  2  3 NA NA NA NA  2  3  2
>
> Seems like the run of 4 NA's is treated differently
>
>> runsum(tmp, k = 2)
> 'numeric' Rle of length 15 with 11 runs
>    Lengths:  1  2  1  1  1  1  1  1  1  4  1
>    Values :  3  4  5 NA NA NA NA NA NA NA NA
>
> And there is no way to do runsum(..., na.rm = TRUE) like in sum (as
> far as I can see).
>
> Kasper
>
>> sessionInfo()
> R version 2.12.0 Under development (unstable) (2010-08-20 r52790)
> Platform: x86_64-unknown-linux-gnu (64-bit)
>
> locale:
>   [1] LC_CTYPE=en_US.iso885915       LC_NUMERIC=C
>   [3] LC_TIME=en_US.iso885915        LC_COLLATE=en_US.iso885915
>   [5] LC_MONETARY=C                  LC_MESSAGES=en_US.iso885915
>   [7] LC_PAPER=en_US.iso885915       LC_NAME=C
>   [9] LC_ADDRESS=C                   LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_US.iso885915 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] grid      stats     graphics  grDevices datasets  utils     methods
> [8] base
>
> other attached packages:
> [1] multicore_0.1-3   IRanges_1.7.19    matrixStats_0.2.1 R.methodsS3_1.2.0
> [5] ggplot2_0.8.8     proto_0.3-8       reshape_0.8.3     plyr_1.1
>
> loaded via a namespace (and not attached):
> [1] tools_2.12.0
>
> _______________________________________________
> 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