Skip to main content
Topic: Sample without detected peak has high intensity (Read 5025 times) previous topic - next topic

Sample without detected peak has high intensity

Dear all,
I am somewhat confounded by the following issue: In the usual XCMS workflow, peaks are grouped, then the intensities of missing peaks are filled in via fillPeaks. However, I have one dataset where, for some compounds, let's say for compound X, some samples that have no detected peaks before fillPeaks actually end up with higher intensities than other samples that have detected peaks before the fillPeaks. If xsetF is the object obtained after the fillPeaks step, then looking at the values for a specific peak group via
xsetF@peaks[xsetF@groupidx[[5093]],]
gives, for sample 7, which had a detected peak:
            mz    mzmin    mzmax      rt  rtmin    rtmax      into      intb      maxo  sn sample
397.2064 397.2038 397.2075 368.1870 366.261 371.8750  1310.6402  1305.0792  589.0000  55      7
but for sample 32, which did not have a detected peak:
397.2000 397.2026 397.2077 369.0551 366.473 373.9375 12554.8083        NA 4445.0000  NA    32

What could be going on here? The integrated peak intensity (into) for sample 32 (12554.8083) is over 9.5 times larger than that for sample 7 (1310.6402), despite the peak not being detected in it... In fact that sample has one of the highest intensities for this peak group...

Thanks so much for your help!
Maria

Re: Sample without detected peak has high intensity

Reply #1
You probably need to supply a reproducible example to get an answer for this. My guess would be that your peaks got separated in the grouping step. Does the sample with missing data have an equivalent peak with same approx. m/z and retention time? Another problem could be the peak-picking. The peak might be big... but ugly. If you have few scans per peak peak-picking can be very random. Especially with centwave.

The first thing I would do is look at the raw data. Is the gapfilling correct about a larger peak being there or not?
Blog: stanstrup.github.io

Re: Sample without detected peak has high intensity

Reply #2
Thanks so much Jan! I am a newbie to both XCMS and LC-MS raw data in general (coming from a biostat background) so I appreciate your suggestions and your patience. Upon your recommendation, I did look at the raw data, but I am still pretty confused. First, I looked at the raw EIC for an rt range of 360 to 380 and an mzrange of 396 to 398 for 3 of the samples:
Code: [Select]
> xcmsRawSamp7 <- xcmsRaw(negFiles[7], profstep=1)
> xcmsRawSamp32 <- xcmsRaw(negFiles[32], profstep=1)
> xcmsRawSamp51 <- xcmsRaw(negFiles[51], profstep=1)
>
> par(mfrow=c(1,3))
> plotEIC(xcmsRawSamp7, rtrange=c(360,380), mzrange=c(396,398))
> plotEIC(xcmsRawSamp32, rtrange=c(360,380), mzrange=c(396,398))
> plotEIC(xcmsRawSamp51, rtrange=c(360,380), mzrange=c(396,398))

[attachment=0:20l8tcvj]rawEIC_neg_397_small.png[/attachment:20l8tcvj]

So it seems like all 3 samples would have a peak in that region, with the peak in the leftmost sample (#7 in dataset) being less clear than the other two and, of course, having a lower intensity...

However, it seems like no peak in that region is getting detected in the middle sample (#32 in the dataset) anywhere close to that m/z value:
Code: [Select]
> peaks32 <- findPeaks(xcmsRawSamp32,
+ method="centWave",ppm=10,snthr=10,peakwidth=c(5,10))

 Detecting mass traces at 10 ppm ...
 % finished: 0 10 20 30 40 50 60 70 80 90 100
 4357 m/z ROI's.

 Detecting chromatographic peaks ...
 % finished: 0 10 20 30 40 50 60 70 80 90 100
 802  Peaks.
> peaks32[abs(peaks32[,"rt"]-370) <= 10 &
+ abs(peaks32[,"mz"]-397) <= 10, ,drop=FALSE]
    mz mzmin mzmax rt rtmin rtmax into intb maxo sn

The other 2 samples do have a detected peak very close to m/z=397:
Code: [Select]
> peaks7 <- findPeaks(xcmsRawSamp7,
+                    method="centWave",ppm=10,snthr=10,peakwidth=c(5,10))

 Detecting mass traces at 10 ppm ...
 % finished: 0 10 20 30 40 50 60 70 80 90 100
 4574 m/z ROI's.

 Detecting chromatographic peaks ...
 % finished: 0 10 20 30 40 50 60 70 80 90 100
 810  Peaks.
> peaks7[abs(peaks7[,"rt"]-370) <= 10 &
+          abs(peaks7[,"mz"]-397) <= 10, ,drop=FALSE]
          mz    mzmin    mzmax      rt  rtmin  rtmax    into    intb maxo sn
[1,] 397.2064 397.2038 397.2075 368.427 366.541 372.055 1310.64 1305.079  589 55
>
>
> peaks51 <- findPeaks(xcmsRawSamp51,
+                      method="centWave",ppm=10,snthr=10,peakwidth=c(5,10))

 Detecting mass traces at 10 ppm ...
 % finished: 0 10 20 30 40 50 60 70 80 90 100
 4617 m/z ROI's.

 Detecting chromatographic peaks ...
 % finished: 0 10 20 30 40 50 60 70 80 90 100
 703  Peaks.
> peaks51[abs(peaks51[,"rt"]-370) <= 10 &
+          abs(peaks51[,"mz"]-397) <= 10, ,drop=FALSE]
          mz    mzmin    mzmax      rt  rtmin  rtmax      into      intb      maxo  sn
[1,] 397.2052 397.2014 397.2081 369.064 365.292 374.578 15936.530 15741.280 5662.1758  62
[2,] 393.0016 393.0013 393.0024 375.835 373.949 377.092  1223.008  1220.493  664.7559 664

The middle sample, which does not have a detected peak, had an integrated peak intensity > 9.5 higher than the leftmost sample and somewhat smaller than that of the rightmost sample (after fillPeaks). I just can't figure out why no peak is detected since it seems much clearer than in the leftmost sample...
It's possible that I'm missing something super-obvious about the parameters or whatnot though...

Thank you again!
Best,
Maria

[attachment deleted by admin]

Re: Sample without detected peak has high intensity

Reply #3
Ok so it is a peakpicking issue. I suggest the following tests:
  • Lowering the lower bound of peakwidth. Perhaps try 3.
  • Setting ppm higher. try 25.
  • Try integrate=2
Blog: stanstrup.github.io

Re: Sample without detected peak has high intensity

Reply #4
Thanks so much Jan! I checked your recommended parameters and the peak does indeed get detected now for the middle panel as well. In fact, if I keep the lower peakwidth bound at 5 and integrate=1, the peak still gets detected if I just increase ppm from 10 to 15.

I checked another peak that had the same issue and the situation was similarly resolved by this.

Would you recommended rerunning XCMS with ppm=15 then? Of course, I can't check every peak manually. The fillPeaks seems to take care of this in these examples, but other peak groups may be eliminated if the number of detected peaks is too low...

Thank you again!

Re: Sample without detected peak has high intensity

Reply #5
The ppm depends on your instrument. What instrument do you have? I have been using 15 ppm on a waters synapt q-tof. With an older generation waters q-tof I was using 30. Remember that this is inter-scan accuracy and also need to encompass the tails of your peak, so it has to be several times higher than the accuracy you expect at the top scan of your peaks. If 10 -> 15 made a difference I would consider using 30 ppm. I really doubt this will give you more "false positives" but it might give you better peak picking. You can compare the number of zeros before fillpeaks to get an idea of what is needed.
Blog: stanstrup.github.io

Re: Sample without detected peak has high intensity

Reply #6
It's a Waters XEVO G2 QTOF, so older generation.