Skip to main content
Topic: xcmsRaw and obiwarp (Read 6367 times) previous topic - next topic

xcmsRaw and obiwarp

Hi, I have several xcmsRaw object that I would like to align using the obiwarp method. Is there a way to do this without using xcmsSet?

Best Regards
Riccardo

Re: xcmsRaw and obiwarp

Reply #1
Hi,

the quick answer is "no". What's wrong with an xcmsSet ?

Yours,
Steffen
--
IPB Halle                          Mass spectrometry & Bioinformatics
Dr. Steffen Neumann         http://www.IPB-Halle.DE
Weinberg 3 06120 Halle     Tel. +49 (0) 345 5582 - 1470
sneumann(at)IPB-Halle.DE

Re: xcmsRaw and obiwarp

Reply #2
Hi,
I generally use the xcmsSet approach but, in some cases, I have to perform some specific operation to the raw data so I prefear to use the xcmsRaw approach.

What about a slow answer?  ;)

 Best Regards, Riccardo

Re: xcmsRaw and obiwarp

Reply #3
Hm, in that case I'd have to check the source myself:
Look out for the retcorr.obiwarp() function
and see where it iterates over the raw files
and applies the obiwarp()ing.

Yours,
Steffen
--
IPB Halle                          Mass spectrometry & Bioinformatics
Dr. Steffen Neumann         http://www.IPB-Halle.DE
Weinberg 3 06120 Halle     Tel. +49 (0) 345 5582 - 1470
sneumann(at)IPB-Halle.DE

Re: xcmsRaw and obiwarp

Reply #4
Hi,
thanks for your suggestion. I tried retcor.obiwarp() in the R console but I get the following error:

> retcor.obiwarp()
Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function ‘retcor.obiwarp’ for signature ‘"missing"’

Any suggestion?

Best Regards,
Riccardo

Re: xcmsRaw and obiwarp

Reply #5
If you really want to apply obiwarp without doing feature detection first, you could implement a simple "dummy" feature detection method, that does nothing but returns an empty peak matrix.
That way you could call xcmsSet(method="dummy",...) to create an xcmsSet that has all the meta-information and could be used to apply obiwarp.
The xcmsSet will then contain the new retention time vectors (but no peaks).

 

Re: xcmsRaw and obiwarp

Reply #6
The fact is that I do the feature detection using several xcmsRaw object. I would like to understand which slot should I use to perform retcor.obiwarp() 'by hand'.

Riccardo

Re: xcmsRaw and obiwarp

Reply #7
Maybe you can describe what you are trying to do in some more detail. 

obiwarp can only be applied to pairs of samples, retcor.obiwarp calculates retention time correction as a center-star alignment, based on the samples in the xcmsSet.
It creates the corrected retention time vectors (xcmsSet@rt$corrected) and eventually updates the the retention times in the @peaks table.

Re: xcmsRaw and obiwarp

Reply #8
My intent is to apply the obiwarp time correction to a several GCMS samples. I can not use use a xcmsSet object to apply the time warp because, as a previous step, I do some pre-treatment/corrections to each chromatogram. 

Quote
[...]obiwarp can only be applied to pairs of samples, retcor.obiwarp calculates retention time correction as a center-star alignment, [...]

As a next step I will write some piece of code to loop the correction to all my data-set and update the retention times of each chromatogram.