xdomingoal / erah-devel

eRah development version. For downloads, please use CRAN
http://xdomingoal.github.io/erah-devel/
GNU General Public License v3.0
5 stars 5 forks source link

alignComp(..) -- Error in matrix(..): Data is too long #8

Open antonwnk opened 5 years ago

antonwnk commented 5 years ago

When attempting to align (with the alignComp function) a set of 100 chromatograms ( ~19MB/chromatogram [14MB-31MB] ), after deconvolution and selecting a suitable block.size parameter the following happens:

All the blocks align successfully to 100% but when the final step reaches 100% (Aligning factors into blocks...) the following error occurs:
Error in matrix(0, nrow = length(x$ID)) : data is too long

block.size=19 on my 16GB RAM laptop running under Ubuntu 19.04 is the largest I can go before getting memory allocation errors (lower than normally expected?). The alignment parameters used are the following:

ex.al.par <- erah::setAlPar(min.spectra.cor = 0.90,
                            max.time.dist = 3,
                            mz.range = 35:350)

The output of the traceback() function:

5: matrix(0, nrow = length(x$ID))
4: cbind(x, matrix(0, nrow = length(x$ID)))
3: FUN(X[[i]], ...)
2: lapply(factors.list, function(x) {
       outp <- cbind(x, matrix(0, nrow = length(x$ID)))
       colnames(outp)[ncol(outp)] <- "AlignID"
       outp
   })
1: erah::alignComp(ex, alParameters = ex.al.par, blocks.size = 9)
xdomingoal commented 5 years ago

Hi Anton, please send me an email (you'll find it in the eRah's documentation). I might need you to send me some data.