Skip to main content
Topic: "Directed" feature detection and EIC/area generation (Read 4605 times) previous topic - next topic

"Directed" feature detection and EIC/area generation

Hello everyone,

I am trying to develop a tool (in C#/.NET, accessing R through rscproxy) for use in analyzing dilution series data from a experimental high-resolution GC/MS instrument (Thermo-esque) for which no existing software (that I have access to) can process in any high-throughput manner.  Basically, I have a standard mix of compounds (~100) that I've spiked at various concentrations into some matrix.  For each compound, I know a retention time range and the ions I want to use for quantitation.  For each ion, I want to extract an EIC, integrate the extracted peak, and export this information so that I can build calibration curves and calculate linearity statistics, etc.

So far, I have been able to import my files into XCMS after conversion and centroiding of the proprietary .RAW files into .mzXML files using proteoWizard's msconvert.  If I consider each file individually as an xcmsRaw object, I can kind of get the info I want just by extracting an EIC:

Code: [Select]
list.files(path, recursive = TRUE)
files <- list.files(path, recursive = TRUE, full.names = TRUE)

#Create a xcmsRaw object for the first file in the list
xr <- xcmsRaw(files[1])

#Create xcmxEIC object for first compound mzrange and rtrange, and plot or write rt/int (@eic) to a file or object
eic <- getEIC(xr, mzrange = cbind(161.96287 ,161.96367), rtrange = cbind(239.4, 246.6))
plot(eic)

#Get the area for the peak with getPeaks
rawPeak <- getPeaks(xr, peakrange = cbind(161.96287, 161.96367, 239.4, 246.6), step = 0.001)
area <- rawPeak[7]

But, what I'd really like to do is analyze all (or sets of) the input files as a set and use retention time correction like shown in the documentation examples (retcor) and feature detection via centWave of only the features I'm interested in (as dictated by my list of ions and retention time ranges).  When I've created xcmsSet objects, my peaks of interest are generally not found by the undirected peak detection methods, i.e. by specifying:

Code: [Select]
xset <- xcmsSet(files, method = "centWave", prefilter = c(3,100), ppm = 5, peakwidth = c(1,10), snthresh = 6)

so, is there a way to do "directed" peak detection or undirected detection given some (tight) constraits to force the algorithm to find only what I am looking for?  I'm assuming (perhaps incorrectly) that the peak area returned by getPeaks() above is less accurate/reliable over multiple samples than the integrated areas returned by the centWave peak detection algorithm?  Maybe there is a much better approached that I'm overlooking (I'm quite new to this)? 

I'd appreciate any advice or assistance you might have.  I apologize in advance if my description is unclear.

Thanks!

Re: "Directed" feature detection and EIC/area generation

Reply #1
Ideally you would follow the "regular" XCMS workflow and then simply extract your features of interest from the result.

Any idea why your features of interests are not detected ? Have you tried increasing the ppm ? How wide are your peaks? Can you show an EIC of a feature that has not been detected ?