Skip to main content
Topic: centWave with LC FT-ICR MS (Read 8921 times) previous topic - next topic

centWave with LC FT-ICR MS

Hello,

I am trying to use the centWave algorithm to look at LC FT-ICR MS data. The data are collected on a 7 Tesla Thermo LTQ FT. I have been using two different ways to convert the data from RAW files to mzXML files: (1) ReAdW.exe and (2) MSconverter. However, I am getting different behavior with each converter, and am having downstream problems with centwave (which may or may not be related to the format conversion).

When I try to run xcmsSet with method = "centWave" with ppm of 3 on the data converted with the MSConverter, I get 722 data insertion errors, and 291 features. The ReAdW converter results in 0 data insertion errors, but also only finds 5 features. If I look at the individual scans (in Matlab), the ReAdW converter seems to have peaks heights that are too high based on what I see in XCalibur and the ReAdW converter misses peaks that are visible in XCalibur.

In reading through the Google groups forum, it seems that one of the possibilities is that the data are 'poorly centroided' so I went back and collected data in centroid and profile mode, and I still get data insertion errors with the data coming off the instrument in centroid mode (though the actual number of errors does vary). If I lower the ppm to 2, I do get rid of the data insertion errors, but that seems awfully low given the recommendation to use a higher ppm than the instrument is capable of obtaining. Also ,the features visualized using plotPeaks with the ppm = 2, are not all nice peaks since some of the peaks look like one section picked out of an apparently random section of the TIC data.

I tried implementing Tony's peakShape method (Google Groups, 12/3/2009) to remove noise peaks, but it comes back with an error and my R is not good enough to figure out where the problem lies.

Any thoughts?

xr <-xcmsRaw(mzdatafile,profmethod ="bin",profstep=0.1)

xd <- xcmsSet(xr,method = "centWave", snthresh = 10,ppm=3,prefilter = c(3,150),
  peakwidth=c(5,60),mzCenterFun="wMean",integrate = 1,fitgauss= TRUE,noise = 100)

sessionInfo() : R 2.13.1 ; xcms_1.26.1

Thanks,
Krista

Re: centWave with LC FT-ICR MS

Reply #1
krista,

The xcmsSet method takes files as the first input. You don't' need to load the file into a xcmsRaw structure first. You want to be running centWave in the following way:
Code: [Select]
xs<-xcmsSet(method="centWave")
If getwd() reports the directory with your files. Otherwise you can change your directory to where you need to be with R using the file menu. If you need to specify which files you need then use something like the following:

Code: [Select]
files<-list.files(pattern="mzData", recursive=TRUE, ignore.case=TRUE)
files
xs<-xcmsSet(files, method="centWave")
You can change pattern to be anything you need just include the mzData/mzXML/cdf ending.
If you only have one file then you can use the xcmsRaw method and findPeaks separately:
Code: [Select]
xr<-xcmsRaw(file, profstep=0
peaks<-findPeaks.centWave(xr, snthresh = 10,ppm=3,prefilter = c(3,150),peakwidth=c(5,60),mzCenterFun="wMean",integrate = 1,fitgauss= TRUE,noise = 100)
head(peaks)
~~
H. Paul Benton
Scripps Research Institute
If you have an error with XCMS Online please send me the JOBID and submit an error via the XCMS Online contact page

Re: centWave with LC FT-ICR MS

Reply #2
Thanks for the prompt reply.

Sorry for the confusion. I was loading the data into an xcmsRaw structure first so that I could plot the peaks I found with xcmsSet using: plotPeaks(xraw,xset@peaks)

When I use the last section of code you provided for one file, I still have the data insertion errors. So, my question is really whether there are known issue with the ReAdW converter and/or the MSConverter with LC FT-MS data and the centWave algorithm? And/or is there something else  I am missing about how to use the centWave algorithm with FT data?

Krista

Re: centWave with LC FT-ICR MS

Reply #3
Krista,

A while ago I ran some Bruker HPLC-FTICR data through xcms without much trouble. If I remember correctly though we converted using the Bruker converter and converted to netCDF. It might be worth a try and see if that fixes it (I know another converter, another parameter, yuck). I haven't heard from other uses that there are specific problems with the converters, however I have heard of crazy things happening with some converters. As far as the specific problem to FTICR data, I just don't know as I don't have enough experience the data and haven't heard of any specific problems from other users. I'll ask Steffen to chime in, as I believe they have a Bruker FT-ICR.
It's with testing the matchedFilter algorithm on the data to check that everything is ok there.

Code: [Select]
xr<-xcmsRaw(file, profstep=0.01)##note this will require a lot of memory
peaks<-findPeaks.matchedFilter(xr)

Also if you could post the exact error you get that would be helpful along with a traceback() .
~~
H. Paul Benton
Scripps Research Institute
If you have an error with XCMS Online please send me the JOBID and submit an error via the XCMS Online contact page

Re: centWave with LC FT-ICR MS

Reply #4
Hello,

I tried the CDF converter from Thermo, and that is causing new and fun errors (unrelated to the data insertion problems). When I try to run findPeaks.centWave on the CDF file, I get an error message "Error: cannot allocate vector of size 285.8 Mb" ...However, when I use the method that manually finds the ROIs (using the code you described for 'My Peaks are not picked') I get the following (quite ugly) image:
[attachment=2:3j1fku0y]cdf.png[/attachment:3j1fku0y]

For comparison...this is the figure when I try to use the ReAdW converter:
[attachment=1:3j1fku0y]raw.png[/attachment:3j1fku0y]

While this version is the one with the MSConvert tool:
[attachment=0:3j1fku0y]MSConvert.png[/attachment:3j1fku0y]

I have tested out findPeaks.matchedFilter and I get what I consider more normal looking peaks using plotPeaks. However, I am concerned about the loss of resolution because of the binning steps.

The complete error message I get when running findPeaks.centWave is 'There were [some number] peak data insertion problems. Please try lowering the "ppm" parameter' ... However, as I originally noted, whether or not this message appears varies depending on how I have converted the data to mzXML files.

I tried traceback() after getting this message, and I get 'No traceback available' ...however, I should note that I am quite new to R and I might have misunderstood.

Thanks for your help.
Krista

[attachment deleted by admin]

Re: centWave with LC FT-ICR MS

Reply #5
Krista,

Oh ok.. Orbitrap data is notoriously strange. I thought you had FT-ICR data.

The first error : "cannot allocate vector of size..." basically means that you have run out of memory, as I'm sure you guessed. If you have a 64 bit machine this will help. Also if you have other things open close them so that only R is running.

From the images its pretty clear that the converts are doing something to the data. Tony Larson has a lot of experience with orbitrap data and what parameters to use. It might be worth sending him a quick email. Also, what happens if you leave your ppm value at the default?
~~
H. Paul Benton
Scripps Research Institute
If you have an error with XCMS Online please send me the JOBID and submit an error via the XCMS Online contact page

Re: centWave with LC FT-ICR MS

Reply #6
This is FT-ICR data, not Obitrap data.

I did in fact figure out that the error was a memory problem. However, given the figure for the CDF data, I think that it might be best if I put the XConvert/CDF aside for the moment.

Thanks,
Krista

Re: centWave with LC FT-ICR MS

Reply #7
Sorry, forgot to answer the second question. If I leave the centWave parameters at the defaults, I get the following:

65555 peak data insertion errors for the data converted with MSConvert
0 peak data insertion errors for the data converted with ReAdW.

So, the number of peak data insertion errors increases. While the ReAdW file is not giving data insertion errors, these are the peaks I am getting:
[attachment=0:11e5y6w7]RAWpp.png[/attachment:11e5y6w7]

for plotPeaks:
xr <-xcmsRaw(mzdatafile)
> profStep(xr) <-0.05
> plotPeaks(xr,xC@peaks[1:25,])

[attachment deleted by admin]

Re: centWave with LC FT-ICR MS

Reply #8
Krista,

Sorry I saw that you used thermo converter and assumed it was orbi data. Didn't know that themo made a FT-ICR, just looked up the specs sheet, cool! :)

The difference between the converts is concerning, but I don't have enough knowledge on how either of the converters work to comment. 

Ralf, (who developed centWave) quote on insertion problems is ...
Quote
If that number is higher, (hundreds or thousands), it will indicate that
either your ppm parameter is too high, or that your spectra are poorly
centroided.
old google groups archive

Which, would suggest that MSconvert is either poorly centroiding the peaks or that it's doing a far better job and your ppm value needs to be lower. It's difficult to tell from the images which converter is better (other than the netCDF, looks like it's done less preprocessing on the data). I would try decreasing the ppm value on the MSconvert data and see if the insertion warnings decrease. If however, they don't then it looks like its back to the readW data.

Hope it helped,

Paul
~~
H. Paul Benton
Scripps Research Institute
If you have an error with XCMS Online please send me the JOBID and submit an error via the XCMS Online contact page

 

Re: centWave with LC FT-ICR MS

Reply #9
Paul,

Thanks for helping me think this through. I will keep working with the different converters and see what I find. I had not thought about the fact that the MSConverter might be doing a *better* job and would therefore allow me to decrease the ppm. If I lower the ppm to 2, the data insertion errors go away with the MSConverter. Since the FT should be at 1 ppm error, perhaps that is enough of a 'generous multiple' as recommended in the Tautenhahn centWave paper for this instrument.

Krista