Skip to main content
Topic: Correction of retention times 'by hand' (Read 1716 times) previous topic - next topic

Correction of retention times 'by hand'

Dear All,

I'm pretty new to LC-MS. I am using it to compare a sample/set of samples from chemical experiments (complex systems) looking for new/unique products compared to a single blank/control (usually just the HPLC derivitisation procedure). I thought the peak-picking in xcms might be rather good at picking up things that we haven't noticed 'by eye' (in the UV detector or TIC) as we build up complexity.

Unfortunately, we're using a less-than-pro LCMS setup: we lack the hardware to synch the the LC and MS, so we are synching by pausing the MS acquisition until the LC injects. As a result, the LC retention times are all skewed by a significant gap, which can be read as the gap between the first and second scan, minus the time taken for the scans (typically 30-60 seconds, minus 1 second). The retcor function of xcms seems to have problems dealing with this; I imagine understandably, as the blank contains very few of the peaks observed in the other samples (in contrast to a lot of metabolomics applications, where most things seem to be present, and you're looking for smaller percentage changes in intensity).

This brings me to ask two questions:

 - Is there a straightforward way to adjust the retention time 'by hand', either in the mzXML files, in original Waters .raw files, or after loading into xcms?

 - Can anyone experience suggest a better approach than xcms for this application (making a list of 'significant' peaks, ideally disregarding those present in the blank) that doesn't require a lot of very expensive proprietary software? Or, indeed, a better approach within xcms that deviates significantly from the workflow described in "LC/MS Preprocessing and Analysis with xcms" document at http://http://bioconductor.org/packages/release/bioc/vignettes/xcms/inst/doc/xcmsPreprocess.pdf.

Thanks for your help,

Andy


nb. MS is a Synapt, acquiring HRes continuum data (0.5s scans) with a lockmass; converting .raw files to mzXML using mzconvert at the command line (ordering wrt retention time to fold in lockmass scans).

[Disclaimer: I'm new to LC-MS and I've tried to look for the answers to my question, but my sincere apologies if I'm asking an astonishingly stupid question]

Re: Correction of retention times 'by hand'

Reply #1
Hi,

you could write a small script that loads the CDF or mzData,
and modify the xcmsRaw@scantime slot, and afterwards
write the data back with write.cdf() write.mzdata().

Alternatively, you could try the retcor(method="obiwarp")

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: Correction of retention times 'by hand'

Reply #2
If you know the shift, couldn't you also just modify the peaks slot of your xcmsSet object?

Code: [Select]
xs <- xcmsSet(whatever)
# see first peak
print(xs@peaks[1,])
# subtract a constant shift (30 sec) from all rt values:
shift <- 30
xs@peaks[,c("rt", "rtmin", "rtmax")] <- xs@peaks[,c("rt", "rtmin", "rtmax")] - shift
# print the modified peak
print(xs@peaks[1,])

# then there's also the xs@rt which one could shift,
# but I don't know whether that's needed for the remaining workflow -
# I believe all further calculations start from xs@peaks.
xs@rt <- xs@rt - shift


What I don't know is, what will happen downstream if you want to extract chromatograms or whatnot.

Re: Correction of retention times 'by hand'

Reply #3
Thank you both very much. I will have a crack and report back...

Cheers,

Andy