Closed cdinter closed 5 years ago
This is indeed an interesting error. Can you please call traceback()
after you get the error?
Sry for the late answer.
After the described error message there is also a warning.
In addition: Warning message: stop worker failed: 'clear_cluster' receive data failed: reached elapsed time limit
I don't know if this might effect the traceback, but here is the traceback after the error and warning.
11: bplapply(X, FUN, ..., BPREDO = BPREDO, BPPARAM = BPPARAM) 10: bplapply(X, FUN, ..., BPREDO = BPREDO, BPPARAM = BPPARAM) 9: 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) 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) 8: 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) 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) 7: xcms:::.obiwarp(object_sub, param = param) 6: .local(object, param, ...) 5: adjustRtime(as(object, "OnDiskMSnExp"), param = param, msLevel = msLevel) 4: adjustRtime(as(object, "OnDiskMSnExp"), param = param, msLevel = msLevel) 3: .local(object, param, ...) 2: adjustRtime(chromData, param = owp) 1: adjustRtime(chromData, param = owp)
Hey I just changed changed the end of my code to:
register(SerialParam())
adjData <- adjustRtime(chromData, param = owp)
The output I receive is:
Sample number 4 used as center sample. Aligning 50 mul 10 muM AS Std Mix + 50 mul C. glut U-13C ISTD_0.mzML against 50 mul 10 muM AS Std Mix + 50 mul C. glut U-13C ISTD_3.mzML ... OK Aligning 50 mul 10 muM AS Std Mix + 50 mul C. glut U-13C ISTD_1.mzML against 50 mul 10 muM AS Std Mix + 50 mul C. glut U-13C ISTD_3.mzML ... Error in binYonX(mz, int, breaks = brks, fromIdx = fromIdx, toIdx = toIdx, : 'fromIdx' and 'toIdx' have to be >= 0!
Now the first alignment works, but in the second alignment I receive a different error message. Here is the traceback to this error:
19: stop(e) 18: value[3L] 17: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 16: tryCatchList(expr, classes, parentenv, handlers) 15: tryCatch({ FUN(...) }, error = handle_error) 14: withCallingHandlers({ tryCatch({ FUN(...) }, error = handle_error) }, warning = handle_warning) 13: FUN(X[[i]], ...) 12: lapply(X, FUN, ...) 11: bplapply(X, FUN, ..., BPREDO = BPREDO, BPPARAM = BPPARAM) 10: bplapply(X, FUN, ..., BPREDO = BPREDO, BPPARAM = BPPARAM) 9: 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) 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) 8: 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) 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) 7: xcms:::.obiwarp(object_sub, param = param) 6: .local(object, param, ...) 5: adjustRtime(as(object, "OnDiskMSnExp"), param = param, msLevel = msLevel) 4: adjustRtime(as(object, "OnDiskMSnExp"), param = param, msLevel = msLevel) 3: .local(object, param, ...) 2: adjustRtime(chromData, param = owp) 1: adjustRtime(chromData, param = owp)
What happens when you call
pm <- profMat(filterFile(chromData, 2), binSize = 1, returnBreaks = TRUE)
does this throw an error?
Ah I was on the right track, was just reading 'profMat' and '.createProfileMatrix'.
Yes this does indeed return the same error as above, but I dont understand why. To calculate 'toIdx' and 'fromIdx' this is what happens in 'profMat'
sps <- spectra(filterFile(chromData, 2))
mzs <- lapply(sps, mz)
vps <- lengths(mzs, use.names = FALSE)
vps is then supplied to '.createProfileMatrix' as valsPerSpect, where this happens
valsPerSpect <- vps
toIdx <- cumsum(valsPerSpect)
fromIdx <- c(1L, toIdx[-length(toIdx)] + 1L)
# test if indices are empty
length(toIdx) #13041
length(fromIdx) #13041
Wild guess: My first spectrum is apparently empty and therefor toIdx[1] is 0. Is this my problem?
sps[1]
$F2.S00001
Object of class "Spectrum1"
Retention time: 0:0
MSn level: 1
Total ion count: 0
Polarity: 1
toIdx[1]
[1] 0
That could indeed be a problem. You could try to filter the object by retention time, using the retention time of the first non-empty spectrum as the lower boundary and try again.
Ah thanks for the tip. Following code runs without error.
spl <- filterFile(chromData, 2)
spl <- filterRt(spl, rt = c(rtime(spl[[2]]), rtime(spl)[length(spl)]))
pm <- profMat(spl, binSize = 1, returnBreaks = TRUE)
I guess for now I will snip off empty spectra by filterRt on all my files if needed.
Idea for fix in xcms: In method 'profMat' this happens:
sps <- spectra(z, BPPARAM = SerialParam())
mzs <- lapply(sps, mz)
vps <- lengths(mzs, use.names = FALSE)
return(.createProfileMatrix(mz = unlist(mzs, use.names = FALSE),
int = unlist(lapply(sps, intensity),
use.names = FALSE),
valsPerSpect = vps,
method = bmethod,
step = bstep,
baselevel = bbaselevel,
basespace = bbasespace,
mzrange. = bmzrange.,
returnBreaks = breturnBreaks)
Simply adding vps <- vps[-which(vps == 0)]
should remove the empty spectras for creation of the profile matrix and fix the problem? Hestiant to just try this, because I am not sure about any conflicts
with the acutal alignment step.
Edit: This would obviously also remove emtpy spectras which are not at the beginning of the rtime.
Not sure if this is even desirable behaviour. It should probably atleast throw a warning?
thanks for digging into this! nice work @cdinter! I'll check whether we could use your proposed solution.
The problem is fixed now in the master branch. I'm closing the issue now. Feel free to reopen if needed. Thanks!
Hey I downloaded the new github version of xcms, but my problem persists. Simply applying obiwarp to my data still leads to the following error.
Error in names(res) <- nms : 'names' attribute [7] must be the same length as the vector [3]
When I use the following function on my data, then 'filterRT' with the new retention time range obiwarp runs without error.
rtNoEmpSpec <- function(object) {
newRtRange <- range(rtime(object))
for (fileIdx in seq_along(fileNames(object))) {
file <- filterFile(object, fileIdx)
flag <- TRUE
specIdx <- 1
while (flag) {
if (length(mz(file[[specIdx]])) == 0) {
specIdx <- specIdx + 1
newRtRange[1] <- rtime(file[[specIdx]])
} else {
flag <- FALSE
}
}
}
return(newRtRange)
}
Strange that the error still persists. Would it be possible for you to share one or two of the files on which obiwarp (or profMat
) fails so I can check? I did manually remove signal from some spectra in order to build a unit test for this bug, but apparently there's something more...
Hey, sry for the late answer, I had to check with my supervisor. Link: https://fz-juelich.sciebo.de/s/SCG5g2DFJs00sUh The link is valid until the first of november.
Just running this with xcms leads to the descirbed error, removing the first spectra in each file and then running obiwarp works. I tried replicating the error with just two files. One file with an empty first spectrum and 2nd one with a non-empty one. This changed the error message to something along the lines of 'profMat dimension dont fit'. (I didnt save the error message for this one though. DUH!):
Thanks for the data! this was such an elusive bug, but now I'm pretty sure we can fix!
Hey Johannes!
I'm having the same "'fromIdx' and 'toIdx' have to be >= 0!" issue myself. Please let me know if you end up finding a good fix for it. Thanks!
The fix is in: it finally settles any problems related to files with empty spectra and ensures that obiwarp doesn't crash if files with different numbers of spectra are aligned.
@cdinter xcms
is now sucessfully aligning the 4 test files you provided. Could you eventually also check this for other files you have?
@hhabra it should fix also the problem you report. Can you also please check?
Reminder: you would have to install the latest xcms
from github and that requires R-3.5.1 and Bioconductor 3.8 (the current devel). To install, in R install first install.packages("BiocManager")
, then run BiocManager::install()
followed by BiocManager::install("xcms", version = "devel")
. With that you should have the current development versions of MSnbase
and other required packages. The you can install xcms
from github: devtools::install_github("sneumann/xcms")
.
Hey, is this fix included in the new xms release in bioconductor 3.8?
Yes it is. I've just verified by aligning the 4 test files you provided with Bioconductor 3.8.
Please close the issue after verifying with your data.
No longer throws errors. Thanks again for your help!
Hi, Can someone help me? I am an amateur in coding. I am facing error in xsg2 part (below) says: Dimensions of profile matrices do not match ! when I run my samples. Among samples, there is one with a higher number of features, when I remove that one, then the code works. How can I solve it while keeping that sample as well? since that one is a pooled sample. Here are my codes:
xset <- xcmsSet (profmethod= "binlin", method="centWave", ppm = 20, peakwidth = c(3, 15 ), snthresh = 20, prefilter = c(3,1000), polarity = "negative", mzCenterFun="wMean", integrate = 2, mzdiff = 0.05, noise = 1000) xsg <- group(xset, bw = 5 , minfrac= 0.5 ) xsg2 <- retcor(xsg, method="obiwarp", plottype="deviation")
Thank you in advance
Hallo again, I have encountered an error during obiwarp that has me stumped.
First the code I am using:
During the first alignment I get the following error:
In xcms itself I could not even find a line which reads names(res) <- nms. So I checked out msnbase and there is indeed a function called 'commonFeatureNames' which has the specified line. But this function is nowhere called in msnbase or xcms. I hope you can help.
Thank you very much again.