Skip to main content
Topic: XCMS for UPLC-Waters G2-S Q-TOF (Read 6676 times) previous topic - next topic

XCMS for UPLC-Waters G2-S Q-TOF

Hi All,
Does anyone know how to set the parameters of XCMS for the data generated by UPLC-Waters G2-S Q-TOF?
My code is below, is it good for that data?
xset<-xcmsSet(cdffiles,
                        method="centWave",
                        ppm=15,
                        peakwidth=c(2,25),
                        snthresh=10,
                        prefilter=c(3,500),
                        mzCenterFun="wMean",
                        integrate=2,
                        mzdiff=0.01,
                        noise=0,
                        verbose.columns=TRUE,
                        fitgauss=FALSE,
                        sleep=0,
                        polarity="positive"
                        )
Best regards!
Bo

Re: XCMS for UPLC-Waters G2-S Q-TOF

Reply #1
Some impressions:
  • peakwidth depends on your chromatopgraphy. Inspect your chromatogram carefully and see what the most narrow and widest peak you can find is. Then add some wiggle room. I suspect you would have peaks, especially at the end of your run, that might be longer than what you set.
  • You prefilter seems very aggressive to me. I have been using c(3,10) which is granted very greedy but it doesn't seem to have bad effects apart from longer processing time. This is on the previous Synapt though.
  • An overlooked parameter is the step size. It can be set with profparam = list(step=0.005). The default of 0.1 (!?) is way too high. See http://metabolomics-forum.com/viewtopic.php?f=8&t=576 for a brief explanation.
  • Don't forget nSlaves if you have multiple processors!


edit: default step size is 0.1 not 1.
Blog: stanstrup.github.io

Re: XCMS for UPLC-Waters G2-S Q-TOF

Reply #2
Quote from: "Jan Stanstrup"
Some impressions:
  • An overlooked parameter is the step size. It can be set with profparam = list(step=0.005). The default of 1 (!?) is way too high. See http://metabolomics-forum.com/viewtopic.php?f=8&t=576 for a brief explanation.

    Hi Jan,
    Thank you very much for your answers.

    I have checked the parameter "profparam", it's only useful for profile data. If the data I provided is centroid, then I don't need to set the parameter. Is that true?

    Best regards!
    Bo

Re: XCMS for UPLC-Waters G2-S Q-TOF

Reply #3
No. The profparam has nothing to do with profile data.

The step size passed in profparam is used during fillPeaks. fillPeaks passes the parameter to getPeaks internally. getPeaks is responsible for integrating the peaks during fillPeaks. It does so by generating extracted ion chromatograms (EIC) with the width of the step argument. This means that closely eluting peaks with a mass difference of less than the "step" size could both fall into the same EIC and therefore be integrated together. Therefore it is preferable to lower the step size. What happens when the step size is set to something low is that the EICs are simply combined to correspond to the expected variation in the m/z that was observed in the initial peak picking.

To make life more complicated this can have some problematic consequences when your instrument is very accurate. Sometimes the observed deviation in the m/z in the initial peak picking is extremely low. This means that when you then look in other samples in this very narrow m/z range it might not be found even if it is clearly there.
Had we not altered the step size the range we would look for the peak in would have been a window of 0.1 Da and thus the observed deviation would be irrelevant. But that would have left the problem described above of not discriminating close masses.
For this reason I have suggested changes to fillPeaks, but they are not yet in the official xcms. You can read about that here: https://github.com/sneumann/xcms/pull/3 ... t-41792003
What my modification does is allow you to set a minimum width for the m/z range in which fillPeaks will look for the peak in the other samples. You can thus control yourself how close the m/z of peaks need to be to be considered the same.


Sorry for this long and complicated explanation but I thought it was better to fully explain how things work so you can better decide on your parameters.
Blog: stanstrup.github.io

Re: XCMS for UPLC-Waters G2-S Q-TOF

Reply #4
Hi Jan,
Thank you so much for your detailed reply.
Best regards!
Bo