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?
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:
> 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:
> 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:
> 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]
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
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!
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.