2013-09-27 66 views
1

mclapply可以使用CompressedRleList嗎?mclapply可以使用CompressedRleList嗎?

例如,我有雪茄(A)的載體,以及cigarToRleList返回CompressedRleList因爲向量:

a = c("44M","44M","9S35M","44M","40M4S") 
b = cigarToRleList(a) 

如果我嘗試的b mclapply運行我得到這個錯誤:

mclapply(b,function(x) class(x)) 
Error in as.list.default(X) : 
    no method for coercing this S4 class to a vector 

強迫b到A列表似乎並沒有幫助,因爲這名單是長度爲1:

mclapply(list(b),function(x) class(x)) 
[[1]] 
[1] "CompressedRleList" 
attr(,"package") 
[1] "IRanges" 

任何想法如何讓mclapply與CompressedRleList結構一起工作?

回答

2

這是一個Bioconductor問題,所以應該寄給Bioconductor郵件列表。過去有問題,所以請提供sessionInfo()的輸出;我相信與現在的Bioc一樣,它與

> library(GenomicRanges) 
> library(parallel) 
> a = c("44M","44M","9S35M","44M","40M4S") 
> b = cigarToRleList(a) 
> unlist(mclapply(b, class)) 
[1] "Rle" "Rle" "Rle" "Rle" "Rle" 
> sessionInfo() 
R version 3.0.2 RC (2013-09-23 r63972) 
Platform: x86_64-unknown-linux-gnu (64-bit) 

locale: 
[1] LC_CTYPE=en_US.UTF-8  LC_NUMERIC=C    
[3] LC_TIME=en_US.UTF-8  LC_COLLATE=en_US.UTF-8  
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 
[7] LC_PAPER=en_US.UTF-8  LC_NAME=C     
[9] LC_ADDRESS=C    LC_TELEPHONE=C    
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C  

attached base packages: 
[1] parallel stats  graphics grDevices utils  datasets methods 
[8] base  

other attached packages: 
[1] GenomicRanges_1.12.5 IRanges_1.18.3  BiocGenerics_0.6.0 

loaded via a namespace (and not attached): 
[1] stats4_3.0.2 


library(GenomicRanges) 
library(parallel) 
> unlist(mclapply(b, class)) 
[1] "Rle" "Rle" "Rle" "Rle" "Rle" 
> sessionInfo() 
R version 3.0.2 RC (2013-09-23 r63972) 
Platform: x86_64-unknown-linux-gnu (64-bit) 

locale: 
[1] LC_CTYPE=en_US.UTF-8  LC_NUMERIC=C    
[3] LC_TIME=en_US.UTF-8  LC_COLLATE=en_US.UTF-8  
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 
[7] LC_PAPER=en_US.UTF-8  LC_NAME=C     
[9] LC_ADDRESS=C    LC_TELEPHONE=C    
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C  

attached base packages: 
[1] parallel stats  graphics grDevices utils  datasets methods 
[8] base  

other attached packages: 
[1] GenomicRanges_1.12.5 IRanges_1.18.3  BiocGenerics_0.6.0 

loaded via a namespace (and not attached): 
[1] stats4_3.0.2