Open grangel0955 opened 4 years ago
There are some issues with gaps in retention times in xcms-obiwarp. Some of the problems should have fixed in the more recent version of xcms
(3.10.1, which can be installed on R version >= 4 with BiocManager::install("xcms")
) - but whether this also fixes the problem you see with your data I don't know.
Alternatively, you could always fall back to the peak groups alignment approach which is more robust against gaps in retention times.
I am getting the following errors when trying to run the following xcms_3.8.2 script on data generated by a Lumos Fusion instrument in rapid polarity switching mode. I separated data on polarity and am focusing on the positive subset (xdata_pos). I have success running the xcms vignette (http://bioconductor.org/packages/3.10/bioc/vignettes/xcms/inst/doc/xcms.html) nearly as-is up until the alignment, when I get this error:
The script is as below:
library(xcms) library(RColorBrewer) library(pander) library(magrittr) library(pheatmap) library(SummarizedExperiment) library(MSnbase)
register(SerialParam())
mzMLfiles <- dir(path=".../mzML_files/", full.names = TRUE, recursive = TRUE) pd <- data.frame(sample_name = sub(basename(mzMLfiles), pattern = ".mzML", replacement = "", fixed = TRUE), sample_group = c(rep("Blank", 5), rep("Pool", 7), rep('RBCs', 12), rep("Day0", 3), rep("Day1", 18), rep("Day2", 6), rep("Day3", 6), rep("Day4", 6), rep("Day5", 6), rep("Day6", 3), rep("Day7", 3), rep("Day8", 2), rep('Day9', 3) ), stringsAsFactors = FALSE) raw_data <- readMSData(files = mzMLfiles, pdata = new("NAnnotatedDataFrame", pd), mode = "onDisk", centroided=T ) raw_data_pos <- filterPolarity(raw_data, 1) cwp_pos <- CentWaveParam(peakwidth = c(20, 80), noise = 5000, ppm=70) xdata_pos <- findChromPeaks(raw_data_pos, param = cwp_pos)
samples 1:5 are blanks
xdata_pos <- adjustRtime(xdata_pos, param = ObiwarpParam(binSize = 0.6, subset=c(6:80)))
Any help would be greatly appreciated!