Can mclapply work with a CompressedRleList?
For example, I have a vector of cigars (a), and the cigarToRleList returns CompressedRleList given that vector:
a = c("44M","44M","9S35M","44M","40M4S")
b = cigarToRleList(a)
If I try to run mclapply on b I get this error:
mclapply(b,function(x) class(x))
Error in as.list.default(X) :
no method for coercing this S4 class to a vector
Coercing b to a list doesn't seem to help as this list is of length 1:
mclapply(list(b),function(x) class(x))
[[1]]
[1] "CompressedRleList"
attr(,"package")
[1] "IRanges"
Any idea how to get mclapply work with the CompressedRleList structure?