Skip to main content
Topic: xcms vs xcms online (Read 13509 times) previous topic - next topic

xcms vs xcms online

Hi,

I use xcms online a lot lately. As it is not yet possible to compare 4 groups yet, I have also used the regular version of xcms on my PC. This alloows me to get EIC's in which the data of 4 groups is plotted. I do, however, not get the same (order of) results using both approaches. I initially thought that this might be due to the fact that I included additional samples to the obiwarp retention time correction step, but also analysing exactly the same two groups, I do not get the same results. I checked the settings of both methods, but did not find differences. The only thing I am not sure of is the the Alignment settings: xcms used "peakgroups", I thought this was the "density" algoritm.
I expect I am overlooking something. Maybe someone else can find what I am doing wrong here:

in XCMS I use the following setup:

xset<-xcmsSet(method="centWave", ppm=5, peakwidth=c(10,120), snthresh=50, mzdiff=0.01, prefilter=c(3,5000))
save(xset, file="IPLCM_results")
xset2<-retcor(xset, method="obiwarp",profStep=0.1)
xset2<-group(xset2, method="density", bw=5, mzwid=0.015, minfrac=1, minsamp=1)
xset3<-fillPeaks(xset2)
save(xset3, file="IPLCMS_results_fp.RData")
reporttab<-diffreport(xset3, "Wildtype", "KO", filebase="IPLCMS_plasma_WTvsKO", eicmax=4200, eicwidth=200, classeic=c("Wildtype", "KO"))

And this is the xcms online log file:

General parameters
polarity negative
retention time format minutes
2. Feature detection
method : centWave
ppm 5
snthr 50
peakwidth 10 120
mzdiff 0.01
prefilter peaks 3
prefilter intensity 5000
Feature detection results :
FVB-1.mzXML [IPLCMS_Wildtype_plasma] --> 4642 Features.
FVB-2.mzXML [IPLCMS_Wildtype_plasma] --> 3905 Features.
FVB-3.mzXML [IPLCMS_Wildtype_plasma] --> 4107 Features.
FVB-4.mzXML [IPLCMS_Wildtype_plasma] --> 3224 Features.
FVB-5.mzXML [IPLCMS_Wildtype_plasma] --> 4269 Features.
Slco-1.mzXML [IPLCMS_SlcoKO_plasma] --> 5155 Features.
Slco-2.mzXML [IPLCMS_SlcoKO_plasma] --> 5185 Features.
Slco-3.mzXML [IPLCMS_SlcoKO_plasma] --> 5310 Features.
Slco-4.mzXML [IPLCMS_SlcoKO_plasma] --> 5068 Features.
Slco-5.mzXML [IPLCMS_SlcoKO_plasma] --> 5317 Features.
3. Retention time correction
method : obiwarp
profStep 0.1
4. Alignment
method : peakgroups
bw 5
mzwid 0.015
minfrac 1
minsamp 1
5. FillPeaks
6. Diffreport
class1 IPLCMS_Wildtype_plasma
class2 IPLCMS_SlcoKO_plasma
statistics.threshold.pvalue 0.05
statistics.diffReport.value into
7. Additional Plots & Statistics
8. Annotation (isotopes & adducts)
featureAnnotation.CAMERA.annotate isotopes + adducts
featureAnnotation.CAMERA.mzabs 0.015
featureAnnotation.CAMERA.ppm 5
featureAnnotation.CAMERA.sigma 6
featureAnnotation.CAMERA.perfwhm 0.6
featureAnnotation.CAMERA.maxcharge 3
featureAnnotation.CAMERA.maxiso 4
featureAnnotation.CAMERA.intensity into
9. Putative ID's (METLIN)
identification.METLIN.ppm 5
identification.METLIN.adducts M-H, M-H2O-H, M+Na-2H, M+Cl, M+K-2H, M+FA-H, M-2H, M-3H

Thanks!
Koen

Re: xcms vs xcms online

Reply #1
You are right, it should say "density" and not "peakgroups" in the alignment section of the log file.

The difference is likely caused by a different XCMS version or a difference in the parameter settings.

What differences do you see?  Are the numbers of detected features per file the same?
Are the number of dysregulated features identical ?

Re: xcms vs xcms online

Reply #2
Hi Ralf,

I do not exactly know whether the same number of features were detected per sample (what would be the script for getting this information out of XCMS?). The total number of peaks (features) detected in the 10 samples analysed was however slightly different. (XCMS online 46182 versus XCMS 46174). That is also a bit of a surprise to me as I thought that if I would use the same parameters in both versions, I would get the same outcome. The number of disregulated features was also not identical:
features p < 0.05
XCMS: 320.
XCMS online: 192.
Maybe it's good to mention that I have used the latest version of XCMS.

Which different parameters do you refer to, as I tried to exactly copy those used in XCMS online to XCMS?

Koen

Re: xcms vs xcms online

Reply #3
Quote
Maybe it's good to mention that I have used the latest version of XCMS.
Latest as in stable or development version ?

sessionInfo()

This is how you can find out if you get different numbers of features per sample :

Code: [Select]
for (i in 1:length(filepaths(xset))) {
        cat(basename(filepaths(xset)[i]), length(which(peaks(xset)[,"sample"] == i)), "n")

}

Another thing to compare would be the retention time correction curves.
XCMS Online uses profStepPad() as the profiling method for OBIWarp.

Re: xcms vs xcms online

Reply #4
Hi Ralf,

I used xcms 1.26.1, which I thought is the latest stable version.
The number of peaks detected by xcms are:
Slco-1.mzXML 5160
Slco-2.mzXML 5190
Slco-3.mzXML 5300
Slco-4.mzXML 5070
Slco-5.mzXML 5306
FVB-1.mzXML 4641
FVB-2.mzXML 3905
FVB-3.mzXML 4116
FVB-4.mzXML 3214
FVB-5.mzXML 4272

So the number of features detected per sample differs slightly from those detected by XCMS online.
The retention time deviation curves are however remarkably similar.Is it possible to use the ProfStepPad() instead of the Obiwarp? What exactly is the difference?

Do you have an idea about the cause of the large difference in differentially regulated features between XCMS and XCMS online? In addition, does the way in which XCMS does the peak picking changes from version to version?

Koen 

Koen

Re: xcms vs xcms online

Reply #5
The latest stable version (from the BioC 2.9) branch is 1.30.3.
http://www.bioconductor.org/packages/release/bioc/html/xcms.html

Installation with biocLite() is always tied to the R version, this is why you might not get the latest XCMS version when installing/updating that way.
Depending on which version of R you are running, you have to either upgrade you R or install XCMS manually (R CMD INSTALL ..).

I don't remember significant changes in centWave during the last release cycle, but some details might have changed.
The change log can be found here:
http://metlin.scripps.edu/xcms/xcms/CHANGELOG

Now that I look at the change log, I remember that profStepPad is used per default for OBIWarp since 1.25.6

Quote
2011-03-29: 1.25.6
retcor.obiwarp: Fixed problems with retcor.obiwarp when profile matrices have different m/z ranges
by calculating the profile matrix with whole-number limits (profStepPad)

If you look at the additional "dysregulated" features, you probably find that they have very low intensity.
False positive dysregulated features can easily be caused by incorrect alignment or slightly different retention time correction.
Depending on the retention time window used by fillPeaks() to fill in those peaks,  you might end up comparing low intensity vs low noise ("dysregulated") or low intensity vs. slightly more noise (not dysregulated).
However, these low intensity features are often ignored anyway for subsequent analysis since you can't do MS/MS on them.
We usually filter (beside p-value and fold change) on maxInt (e.g. > 2000).

If you find differences for features that have high intensity then we should definitely dig deeper into this.

Re: xcms vs xcms online

Reply #6
Hi Ralf,

I just checked the intensity of the additional disregulated features. These do not have a low intensity. If you want I could send the two .csv files.

Koen

Re: xcms vs xcms online

Reply #7
Are you getting the same result with an updated XCMS version (1.30.3) ?

Re: xcms vs xcms online

Reply #8
I just updated to version 1.30.3 and got the same results as with version 1.26.1.

Re: xcms vs xcms online

Reply #9
Is the number of features that were detected in the individual samples still different after upgrading XCMS ?

Re: xcms vs xcms online

Reply #10
Yes, the number of features detected still slightly differs from those detected by XCMS online. They do actually not differ from those detected by XCMS version 1.26.1.

Re: xcms vs xcms online

Reply #11
I cannot reproduce the problem.

Can you send me one of those files together with the exact parameters that you used, XCMS version, and the number of features that you get ?

Re: xcms vs xcms online

Reply #12
Solution:
Noise Filter = 5000 was used in the XCMS Online options, but not defined as a parameter for XCMS (noise=0 per default).

Edit: Another problem is that results can be different depending on the system architecture (32 vs. 64 bit)
for more details see here.