Hello,

When I try to run the example code in the saveHDF5SummarizedExperiment 
function, I get the error "Error: C stack usage  7969416 is too close to the 
limit”. I am working with development R and have incorporated HDF5 
functionality in my package. I did so many weeks ago on earlier versions of the 
packages and didn’t use to get this error, but now my tests are failing, etc, 
since I can’t create a basic object.

Perhaps I’m unknowingly using the wrong version or some other problem? 
Otherwise, I expect this is already known by authors since its their own 
example, but in that case I am also wondering if I should roll back to an 
earlier version for now, and if so which one so that I’m still reasonably 
current?

Thanks,
Elizabeth Purdom

Following example from the help pages of saveHDF5SummarizedExperiment:
> library(HDF5Array)
> library(SummarizedExperiment)
> nrows <- 200; ncols <- 6
> counts <- matrix(runif(nrows * ncols, 1, 1e4), nrows)
> colData <- DataFrame(Treatment=rep(c("ChIP", "Input"), 3),
+                      row.names=LETTERS[1:6])
> se0 <- SummarizedExperiment(assays=SimpleList(counts=counts),
+                             colData=colData)
> se0
class: SummarizedExperiment 
dim: 200 6 
metadata(0):
assays(1): counts
rownames: NULL
rowData names(0):
colnames(6): A B ... E F
colData names(1): Treatment
> 
> ## Save 'se0' as an HDF5-based SummarizedExperiment object:
> dir <- sub("file", "h5_se0_", tempfile())
> h5_se0 <- saveHDF5SummarizedExperiment(se0, dir)
Error: C stack usage  7969416 is too close to the limit
#only showing part of traceback, because as expected by error, hitting some 
kind of loop
> traceback()
…..
28: nrow(x)
27: nrow(x)
26: dim(x)
25: dim(x)
24: nrow(x)
23: nrow(x)
22: dim(x)
21: dim(x)
20: nrow(x)
19: nrow(x)
18: dim(assay)
17: dim(assay)
16: FUN(X[[i]], ...)
15: lapply(as.list(X), match.fun(FUN), ...)
14: lapply(as.list(X), match.fun(FUN), ...)
13: lapply(X = X, FUN = FUN, ...)
12: lapply(X = X, FUN = FUN, ...)
11: sapply(assays, function(assay) dim(assay)[1:2])
10: sapply(assays, function(assay) dim(assay)[1:2])
9: valid.func(object)
8: validityMethod(as(object, superClass))
7: isTRUE(x)
6: anyStrings(validityMethod(as(object, superClass)))
5: validObject(ans)
4: `[[<-`(`*tmp*`, i, value = new("HDF5Matrix", seed = new("HDF5ArraySeed", 
       filepath = 
"/private/var/folders/h4/xtpbyfq55qd3rc882bm4zfjw0000gn/T/RtmpKIQALa/h5_se0_7d29f927618/assays.h5",
 
       name = "assay001", dim = c(200L, 6L), first_val = 2481.95574347652, 
       chunkdim = c(200L, 6L))))
3: `[[<-`(`*tmp*`, i, value = new("HDF5Matrix", seed = new("HDF5ArraySeed", 
       filepath = 
"/private/var/folders/h4/xtpbyfq55qd3rc882bm4zfjw0000gn/T/RtmpKIQALa/h5_se0_7d29f927618/assays.h5",
 
       name = "assay001", dim = c(200L, 6L), first_val = 2481.95574347652, 
       chunkdim = c(200L, 6L))))
2: .write_h5_assays(x@assays, h5_path, chunkdim, level, verbose)
1: saveHDF5SummarizedExperiment(se0, dir)
> sessionInfo()
R Under development (unstable) (2018-03-22 r74446)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6

Matrix products: default
BLAS: 
/Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
LAPACK: 
/Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] SummarizedExperiment_1.9.16 Biobase_2.39.2              
GenomicRanges_1.31.23       GenomeInfoDb_1.15.5        
 [5] HDF5Array_1.7.10            rhdf5_2.23.8                
DelayedArray_0.5.30         BiocParallel_1.13.3        
 [9] IRanges_2.13.28             S4Vectors_0.17.42           
BiocGenerics_0.25.3         matrixStats_0.53.1         

loaded via a namespace (and not attached):
 [1] lattice_0.20-35        bitops_1.0-6           grid_3.5.0             
zlibbioc_1.25.0        XVector_0.19.9        
 [6] Matrix_1.2-14          Rhdf5lib_1.1.5         tools_3.5.0            
RCurl_1.95-4.10        compiler_3.5.0        
[11] GenomeInfoDbData_1.1.0
> 
_______________________________________________
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

Reply via email to