Skip to main content
Topic: XCMS: group() Problem (Read 88 times) previous topic - next topic

XCMS: group() Problem

Hi all,

I am working on a mzML dataset.
I run the following script, but all the generated csv files, almost are identical.
It seems that the group() function can not group the samples (dim(xset2) == NULL).
According to a suggestion, I put the files in subfolders, but xcmsSet can not find them now. I am not sure if I have get the meaning correctly.

Any help?




path <- "/mzML/Split/xinb3_4h"
datafiles <- list.files(path, full.names=T, pattern='.mzML')

xcmsSet(files=datafiles, recursive = TRUE, method="centWave", ppm=20, snthr=10, peakwidth=c(5,25), integrate=1)
write.csv(xset1@peaks, "all_peaks.csv")
print("all_peaks.csv generated")

xset2 <- group(xset_cent20, method="density", bw=4, minfrac=0, minsamp=1, mzwid=0.007, max=100)
write.csv(xset2@peaks, "grouped_peaks.csv")
print("grouped_peaks.csv generated")
print("Dimention of grouped_peak:")

xset3 <- retcor(xset2)
write.csv(xset3@peaks, "retcor_peaks.csv")
print("retcor_peaks.csv generated")

xset4 <- group(xset3)
write.csv(xset4@peaks, "regrouped_peaks.csv")
print("regrouped_peaks.csv generated")

xset5 <- fillPeaks(xset4, method="chrom")
write.csv(xset5@peaks, "filled_peaks.csv")
print("filled_peaks.csv generated")

an <- xsAnnotate(xset5, sample=NA)
anF <- groupFWHM(an, perfwhm = 0.6)
anI <- findIsotopes(anF, mzabs=0.01)
anIC <- groupCorr(anI, cor_eic_th=0.75)
anFA <- findAdducts(anIC, polarity="positive")
write.csv(getPeaklist(anFA), file="annotated_peaks.csv")
print("annotated_peaks.csv generated")