Metabolomics Society Forum

Software => R => XCMS => Topic started by: kraigkraig on September 20, 2011, 11:15:39 AM

Title: visualizing SNRthresh
Post by: kraigkraig on September 20, 2011, 11:15:39 AM
Hi,

Recently I have been toying around with setting a sensible signal-to-noise threshold. I have a data set where the concentration of the samples was excessive.  The chemical noise of these samples is high, but the data seems usable (I hope). I would like to set the filter in such a way that reliable peaks are conserved and noise is reduced, but I'm not sure of the best way forward. 

Is there way to visualize the outcome of the SNR-threshold on the raw data on a known peak?  Is there a good way to set this criteria in a non-arbitrary manner?  I may be missing some more obvious or graceful solution, so I would appreciate any input!

Cheers,

Kraig Worrall    :|
Title: Re: visualizing SNRthresh
Post by: Ralf on September 21, 2011, 11:09:07 AM
Setting "sleep=2" (2 seconds or more) will visualize detected features including the calculated baseline.
This might help to estimate a S/N threshold for "reliable" features.

It might also be helpful to look at the distribution of S/N and intensity, e.g. by using scatterplots (feature intensity vs S/N) and histograms.
Based on that you can try to establish a threshold based on intensity (better use maxo than into) and S/N.
Use the plotPeaks function to plot the resulting features simultaneously.
Title: Re: visualizing SNRthresh
Post by: kraigkraig on September 21, 2011, 12:21:47 PM
Wow, there sure is a lot to learn about this great software.  Setting sleep=2 made for a fairly painful slideshow, but it does accomplish what I was looking to do.
Do you recommend the use of Gaussian fitting to eliminate bad features? 

Thanks for answering my novice questions...

Kraig
Title: Re: visualizing SNRthresh
Post by: kraigkraig on September 21, 2011, 01:45:53 PM
Hi Ralf,

Another novice question:

How do I go about appending the maxo, into, intb, and sn columns to the diffreport?  I tried:
diffreport1 <- diffreport(xset,"class1","class2",eicmax=300,eicwidth=200,value=c("into","maxo","intb"))
This gives the diffreport without errors, but does not add columns.

K :(
Title: Re: visualizing SNRthresh
Post by: Ralf on September 21, 2011, 02:31:38 PM
You can try the Gaussian fit, followed by egauss (RMSE of Gaussian fit) filtering (there should be a related thread in the mailing list archive).

Only one intensity value can be selected for methods like peakTable or diffreport
e.g. diffreport1 <- diffreport(xset,"class1","class2",eicmax=300,eicwidth=200,value="maxo")
Title: Re: visualizing SNRthresh
Post by: kraigkraig on September 21, 2011, 03:06:47 PM
Thanks Ralf!  This is great.