Skip to content
Snippets Groups Projects
Commit 2de8ef3b authored by Steffen Neumann's avatar Steffen Neumann
Browse files

Use an empty peaklist if XCMS does not detect any peak to avoid an error...

Use an empty peaklist if XCMS does not detect any peak to avoid an error message downstream in the workflow
parent 7ed24d03
No related branches found
No related tags found
No related merge requests found
......@@ -318,6 +318,12 @@ findMsMsHRperxcms.direct <- function(fileName, cpdID, mode="pH", findPeaksArgs =
for(i in 1:length(xrs)){
peaks(xsmsms[[i]]) <- do.call(findPeaks,c(findPeaksArgs, object = xrs[[i]]))
if (nrow(peaks(xsmsms[[i]])) == 0) {
spectra[[i]] <- matrix(0,2,7)
next
}
## Get pspec
pl <- peaks(xsmsms[[i]])[,c("mz", "rt"), drop=FALSE]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment