I have a total of 50 mzXML ms files (20 treated, 30 un-treated organized into two different subfolders). Then, i have successfully performed LCMS analysis according the the guide huntil when i execute mzs the error as below appeared.
path <- "H:/mzxml"
files <- list.files(path, full.names=TRUE, pattern="mzXML", recursive = TRUE)
## Create a phenodata data.frame
pd <- data.frame(sample_name = sub(basename(files), pattern = ".mzXML",
replacement = "", fixed = TRUE),
sample_group = c(rep("TREATED", 20), rep("UNTREATED", 30)),
stringsAsFactors = FALSE)
raw_data <- readMSData(files = files, pdata = new("NAnnotatedDataFrame", pd),
mode = "onDisk")
> mzs <- mz(raw_data)
Error in names(res) <- nms :
'names' attribute  must be the same length as the vector 
In addition: Warning message:
stop worker failed:
'clear_cluster' receive data failed:
reached elapsed time limit
I understand the error occurs because the attribute/number of mzXML files is not same as the vector.
Therefore, under the environments tab i checked the number of mzXML in the 'files' is 50.
Then i check the pd data.frame, correctly assigns my mzXML files into TREATED and UNTREATED.
I have also ran the faahKO data and there is no error appeared.
Any advice ? Does anyone face this problem before ?