Dear Riccardo, I will look closer into this. In the meantime it might help if you try a different binSize in the ObiwarpParam. Also, could you please add an issue with this error on https://github.com/sneumann/xcms ? I can then track and relate all changes to the issue.
thanks, jo On 27 Jul 2017, at 12:56, Riccardo Romoli <riccardo.rom...@unifi.it<mailto:riccardo.rom...@unifi.it>> wrote: Dear xcms devel, running the latest stable xcms version I get the following error: > xod <- adjustRtime(xod, param = ObiwarpParam()) Sample number 3 used as center sample. Aligning pl55_06h_01.mzXML against pl55_03h_01.mzXML ... Error: BiocParallel errors element index: 1, 2, 3, 4, 5 first error: Dimensions of profile matrices of files pl55_03h_01.mzXML and pl4_01.mzXML do not match! This is the traceback: > traceback() 9: stop(.error_bplist(res)) 8: bplapply(X, FUN, ..., BPREDO = BPREDO, BPPARAM = BPPARAM) 7: bplapply(X, FUN, ..., BPREDO = BPREDO, BPPARAM = BPPARAM) 6: bplapply(objL, function(z, cntr, cntrPr, parms) { message("Aligning ", basename(fileNames(z)), " against ", basename(fileNames(cntr)), " ... ", appendLF = FALSE) suppressMessages(curP <- profMat(z, method = "bin", step = binSize(parms), returnBreaks = TRUE)[[1]]) scantime1 <- unname(rtime(cntr)) scantime2 <- unname(rtime(z)) mstdiff <- median(c(diff(scantime1), diff(scantime2))) mst1 <- which(diff(scantime1) > 5 * mstdiff)[1] if (!is.na(mst1)) { scantime1 <- scantime1[seq_len((mst1 - 1))] message("Found gaps in scan times of the center sample: cut ", "scantime-vector at ", scantime1[mst1], " seconds.") } mst2 <- which(diff(scantime2) > 5 * mstdiff)[1] if (!is.na(mst2)) { scantime2 <- scantime2[seq_len((mst2 - 1))] message("Found gaps in scan time of file ", basename(fileNames(z)), ": cut scantime-vector at ", scantime2[mst2], " seconds.") } rtmaxdiff <- abs(diff(c(scantime1[length(scantime1)], scantime2[length(scantime2)]))) if (rtmaxdiff > (5 * mstdiff)) { rtmax <- min(scantime1[length(scantime1)], scantime2[length(scantime2)]) scantime1 <- scantime1[scantime1 <= rtmax] scantime2 <- scantime2[scantime2 <= rtmax] } valscantime1 <- length(scantime1) valscantime2 <- length(scantime2) if (ncol(cntrPr$profMat) > valscantime1) { cntrPr$profMat <- cntrPr$profMat[, -c((valscantime1 + 1):ncol(cntrPr$profMat))] } if (ncol(curP$profMat) > valscantime2) { curP$profMat <- curP$profMat[, -c((valscantime2 + 1):ncol(curP$profMat))] } mzr1 <- c(cntrPr$breaks[1], cntrPr$breaks[length(cntrPr$breaks) - 1]) mzr2 <- c(curP$breaks[1], curP$breaks[length(curP$breaks) - 1]) mzmin <- min(c(mzr1[1], mzr2[1])) mzmax <- max(c(mzr1[2], mzr2[2])) mzs <- seq(mzmin, mzmax, by = binSize(parms)) if (mzmin < mzr1[1]) { tmp <- matrix(0, (length(seq(mzmin, mzr1[1], binSize(parms))) - 1), ncol = ncol(cntrPr$profMat)) cntrPr$profMat <- rbind(tmp, cntrPr$profMat) } if (mzmax > mzr1[2]) { tmp <- matrix(0, (length(seq(mzr1[2], mzmax, binSize(parms))) - 1), ncol = ncol(cntrPr$profMat)) cntrPr$profMat <- rbind(cntrPr$profMat, tmp) } if (mzmin < mzr2[1]) { tmp <- matrix(0, (length(seq(mzmin, mzr2[1], binSize(parms))) - 1), ncol = ncol(curP$profMat)) curP$profMat <- rbind(tmp, curP$profMat) } if (mzmax > mzr2[2]) { tmp <- matrix(0, (length(seq(mzr2[2], mzmax, binSize(parms))) - 1), ncol = ncol(curP$profMat)) curP$profMat <- rbind(curP$profMat, tmp) } mzvals <- length(mzs) cntrVals <- length(cntrPr$profMat) curVals <- length(curP$profMat) if ((mzvals * valscantime1) != cntrVals | (mzvals * valscantime2) != curVals | cntrVals != curVals) stop("Dimensions of profile matrices of files ", basename(fileNames(cntr)), " and ", basename(fileNames(z)), " do not match!") rtadj <- .Call("R_set_from_xcms", valscantime1, scantime1, mzvals, mzs, cntrPr$profMat, valscantime2, scantime2, mzvals, mzs, curP$profMat, response(parms), distFun(parms), gapInit(parms), gapExtend(parms), factorDiag(parms), factorGap(parms), as.numeric(localAlignment(parms)), initPenalty(parms)) if (length(rtime(z)) > valscantime2) { rtadj <- c(rtadj, rtime(z)[(valscantime2 + 1):length(rtime(z))]) warning(basename(fileNames(z)), " :could only align up to a ", "retention time of ", rtime(z)[valscantime2], " seconds. ", "After that raw retention times are reported.") } message("OK") return(rtadj) }, cntr = centerObject, cntrPr = profCtr, parms = param) 5: bplapply(objL, function(z, cntr, cntrPr, parms) { message("Aligning ", basename(fileNames(z)), " against ", basename(fileNames(cntr)), " ... ", appendLF = FALSE) suppressMessages(curP <- profMat(z, method = "bin", step = binSize(parms), returnBreaks = TRUE)[[1]]) scantime1 <- unname(rtime(cntr)) scantime2 <- unname(rtime(z)) mstdiff <- median(c(diff(scantime1), diff(scantime2))) mst1 <- which(diff(scantime1) > 5 * mstdiff)[1] if (!is.na(mst1)) { scantime1 <- scantime1[seq_len((mst1 - 1))] message("Found gaps in scan times of the center sample: cut ", "scantime-vector at ", scantime1[mst1], " seconds.") } mst2 <- which(diff(scantime2) > 5 * mstdiff)[1] if (!is.na(mst2)) { scantime2 <- scantime2[seq_len((mst2 - 1))] message("Found gaps in scan time of file ", basename(fileNames(z)), ": cut scantime-vector at ", scantime2[mst2], " seconds.") } rtmaxdiff <- abs(diff(c(scantime1[length(scantime1)], scantime2[length(scantime2)]))) if (rtmaxdiff > (5 * mstdiff)) { rtmax <- min(scantime1[length(scantime1)], scantime2[length(scantime2)]) scantime1 <- scantime1[scantime1 <= rtmax] scantime2 <- scantime2[scantime2 <= rtmax] } valscantime1 <- length(scantime1) valscantime2 <- length(scantime2) if (ncol(cntrPr$profMat) > valscantime1) { cntrPr$profMat <- cntrPr$profMat[, -c((valscantime1 + 1):ncol(cntrPr$profMat))] } if (ncol(curP$profMat) > valscantime2) { curP$profMat <- curP$profMat[, -c((valscantime2 + 1):ncol(curP$profMat))] } mzr1 <- c(cntrPr$breaks[1], cntrPr$breaks[length(cntrPr$breaks) - 1]) mzr2 <- c(curP$breaks[1], curP$breaks[length(curP$breaks) - 1]) mzmin <- min(c(mzr1[1], mzr2[1])) mzmax <- max(c(mzr1[2], mzr2[2])) mzs <- seq(mzmin, mzmax, by = binSize(parms)) if (mzmin < mzr1[1]) { tmp <- matrix(0, (length(seq(mzmin, mzr1[1], binSize(parms))) - 1), ncol = ncol(cntrPr$profMat)) cntrPr$profMat <- rbind(tmp, cntrPr$profMat) } if (mzmax > mzr1[2]) { tmp <- matrix(0, (length(seq(mzr1[2], mzmax, binSize(parms))) - 1), ncol = ncol(cntrPr$profMat)) cntrPr$profMat <- rbind(cntrPr$profMat, tmp) } if (mzmin < mzr2[1]) { tmp <- matrix(0, (length(seq(mzmin, mzr2[1], binSize(parms))) - 1), ncol = ncol(curP$profMat)) curP$profMat <- rbind(tmp, curP$profMat) } if (mzmax > mzr2[2]) { tmp <- matrix(0, (length(seq(mzr2[2], mzmax, binSize(parms))) - 1), ncol = ncol(curP$profMat)) curP$profMat <- rbind(curP$profMat, tmp) } mzvals <- length(mzs) cntrVals <- length(cntrPr$profMat) curVals <- length(curP$profMat) if ((mzvals * valscantime1) != cntrVals | (mzvals * valscantime2) != curVals | cntrVals != curVals) stop("Dimensions of profile matrices of files ", basename(fileNames(cntr)), " and ", basename(fileNames(z)), " do not match!") rtadj <- .Call("R_set_from_xcms", valscantime1, scantime1, mzvals, mzs, cntrPr$profMat, valscantime2, scantime2, mzvals, mzs, curP$profMat, response(parms), distFun(parms), gapInit(parms), gapExtend(parms), factorDiag(parms), factorGap(parms), as.numeric(localAlignment(parms)), initPenalty(parms)) if (length(rtime(z)) > valscantime2) { rtadj <- c(rtadj, rtime(z)[(valscantime2 + 1):length(rtime(z))]) warning(basename(fileNames(z)), " :could only align up to a ", "retention time of ", rtime(z)[valscantime2], " seconds. ", "After that raw retention times are reported.") } message("OK") return(rtadj) }, cntr = centerObject, cntrPr = profCtr, parms = param) 4: .obiwarp(as(object, "OnDiskMSnExp"), param = param) 3: .local(object, param, ...) 2: adjustRtime(xod, param = ObiwarpParam()) 1: adjustRtime(xod, param = ObiwarpParam()) > These are the sessionInfo(): > sessionInfo() R version 3.4.1 (2017-06-30) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Debian GNU/Linux 8 (jessie) Matrix products: default BLAS: /usr/lib/libblas/libblas.so.3.0 LAPACK: /usr/lib/lapack/liblapack.so.3.0 locale: [1] LC_CTYPE=en_US.utf8 LC_NUMERIC=C [3] LC_TIME=en_US.utf8 LC_COLLATE=en_US.utf8 [5] LC_MONETARY=en_US.utf8 LC_MESSAGES=en_US.utf8 [7] LC_PAPER=en_US.utf8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C attached base packages: [1] grDevices datasets parallel stats graphics utils methods [8] base other attached packages: [1] RColorBrewer_1.1-2 CAMERA_1.32.0 xcms_1.52.0 [4] MSnbase_2.2.0 ProtGenerics_1.8.0 mzR_2.10.0 [7] Rcpp_0.12.12 BiocParallel_1.10.1 Biobase_2.36.2 [10] BiocGenerics_0.22.0 loaded via a namespace (and not attached): [1] splines_3.4.1 lattice_0.20-35 colorspace_1.3-2 [4] htmltools_0.3.6 stats4_3.4.1 base64enc_0.1-3 [7] vsn_3.44.0 survival_2.41-3 XML_3.98-1.9 [10] RBGL_1.52.0 rlang_0.1.1 foreign_0.8-69 [13] affy_1.54.0 affyio_1.46.0 foreach_1.4.3 [16] plyr_1.8.4 stringr_1.2.0 mzID_1.14.0 [19] zlibbioc_1.22.0 munsell_0.4.3 pcaMethods_1.68.0 [22] gtable_0.2.0 htmlwidgets_0.9 codetools_0.2-15 [25] knitr_1.16 latticeExtra_0.6-28 IRanges_2.10.2 [28] doParallel_1.0.10 BiocInstaller_1.26.0 MassSpecWavelet_1.42.0 [31] preprocessCore_1.38.1 htmlTable_1.9 acepack_1.4.1 [34] backports_1.1.0 checkmate_1.8.3 scales_0.4.1 [37] limma_3.32.4 S4Vectors_0.14.3 Hmisc_4.0-3 [40] graph_1.54.0 gridExtra_2.2.1 RANN_2.5.1 [43] impute_1.50.1 ggplot2_2.2.1 digest_0.6.12 [46] stringi_1.1.5 grid_3.4.1 tools_3.4.1 [49] magrittr_1.5 lazyeval_0.2.0 tibble_1.3.3 [52] Formula_1.2-2 cluster_2.0.6 pkgconfig_2.0.1 [55] MASS_7.3-47 Matrix_1.2-10 data.table_1.10.4 [58] iterators_1.0.8 MALDIquant_1.16.2 rpart_4.1-11 [61] igraph_1.1.2 multtest_2.32.0 nnet_7.3-12 [64] compiler_3.4.1 > Hope you can help me and fix the issue. All the best, Riccardo -- Riccardo Romoli, PhD Mass Spectrometry Centre - CISM University of Florence Via Ugo Schiff 6, 50019 Sesto Fiorentino (FI), Italy Phone: +39 055 4573783/2 email: riccardo.rom...@unifi.it<mailto:riccardo.rom...@unifi.it> web site: www.cism.unifi.it<http://www.cism.unifi.it> _______________________________________________ Bioc-devel@r-project.org<mailto:Bioc-devel@r-project.org> mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel [[alternative HTML version deleted]] _______________________________________________ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel