Skip to main content
Topic: CentWave feature detection with LC-MS/MS (tandem) data (Read 6514 times) previous topic - next topic

CentWave feature detection with LC-MS/MS (tandem) data

Hi XCMS community,

I am doing analysis on some LC-MS/MS data where both the MS1 and MS2 are in the same mzML file. I have followed the tutorial [1] where the option 'method = "MS1' is used for the xcmsSet object but I was wondering whether it was possible to use centWave feature detection?

I have tried the following, where mzdatafiles contains the location of 3 mzML files:

Code: [Select]
xs <- xcmsSet(mzdatafiles, method="centWave")
xfrag <- xcmsFragments(xs)

Should the the centWave method work be performing as normal in this situation? When I perform this on my data the xcmsFragments peak table seems to have incorrectly called the corresponding parent peaks, where the retention times seem to be drastically different between parent and fragment peaks (I can provide more information if needed)

It seems that the centWave method has been used sucessfully with XCMS online for LC-MS/MS in the paper [2], so hopefully it is possible.  Any help would be greatly appreciated.

Kind regards,
Tom

1: http://http://www.bioconductor.org/packages/release/bioc/vignettes/xcms/inst/doc/xcmsMSn.pdf
2: http://http://masspec.scripps.edu/publications/public_pdf/Autonomous_Metabolomics.pdf

Few more details:
Q-Exactive MS used
MSConvert used to convert raw to centroid data

Re: CentWave feature detection with LC-MS/MS (tandem) data

Reply #1
Hi,

I thought I would just provide a bit more information about the problem. If I run the following

Code: [Select]
library(xcms)

dpth = '~/Desktop/xcmstest/' # Folder contains 3 mzML files centroided using MS Convert

mzdatafiles <- list.files(dpth, pattern=".mzML", recursive = FALSE, full.names = TRUE)

xfrag <- xcmsFragments(xs1) # Output: 25552 Peaks picked, 6625 MSn-Specs ignored.

Then I look  the peak data and it looks like some of the fragmentation data has the incorrect parent peak id. See:

Code: [Select]
xfragpeaks <- data.frame(xfrag@peaks)

subset(xfragpeaks,xfragpeaks$MSnParentPeakID==16255)
Output:
peakID MSnParentPeakID msLevel      rt      mz intensity Sample GroupPeakMSn CollisionEnergy
25482  25482          16255      2 1767.356 112.9843  109630.2      3            0            27.5
25500  25500          16255      2 1776.102 112.9844  133552.3      3            0            27.5
25505  25505          16255      2 1776.800 112.9843  114205.6      3            0            27.5
25527  25527          16255      2 1787.289 112.9844  124085.6      3            0            27.5
25536  25536          16255      2 1793.579 112.9844  136962.9      3            0            27.5
25550  25550          16255      2 1797.635 112.9844  133570.4      3            0            27.5

This is strange as the RT is quite different between peaks that have the same MSnParentPeakID. The other reason this seems odd is that they have the same m/z as well.

I don't see this occuring with the option 'method = 'MS1'"

Other details:

traceback()
No traceback available

sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_GB.UTF-8      LC_NUMERIC=C              LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8    LC_MONETARY=en_GB.UTF-8 
 [6] LC_MESSAGES=en_GB.UTF-8    LC_PAPER=en_GB.UTF-8      LC_NAME=C                  LC_ADDRESS=C              LC_TELEPHONE=C           
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C     

attached base packages:
[1] parallel  stats    graphics  grDevices utils    datasets  methods  base   

other attached packages:
[1] xcms_1.42.0        Biobase_2.26.0      BiocGenerics_0.12.1 mzR_2.0.0          Rcpp_0.11.4       

loaded via a namespace (and not attached):
[1] codetools_0.2-10 tools_3.1.2

Re: CentWave feature detection with LC-MS/MS (tandem) data

Reply #2
Hi Tom,

I had a look at what the data looks like:

Code: [Select]
xr <- xcmsRaw(file, includeMSn=TRUE)

## detect MS1 peaks
p1 <- findPeaks(xr, method="centWave", ppm=10)

precursors <- findPeaks(xr, method="MS1")

## Plot precursor distribution
plotRaw(xr, log=TRUE)
points(p1@.Data[, c("rt","mz")], pch="x")
points(precursors@.Data[, c("rt","mz")], pch=".")

So you have data-dependent MS2 acquisition, and there are potentially
many MS2 spectra acquired could match an MS1 peak. Similarly, several MS1 peaks
could be "isolated" and fragmented for an MS2 spectrum.

So the default xcmsFragments() tries to find these matches, and was written
for a nominal mass ion trap. So for your Orbitrap data there should be
some debugging and double-checking of the results.

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: CentWave feature detection with LC-MS/MS (tandem) data

Reply #3
Hi Steffen,

Thank you very much for having a look at the data I sent. The figure for the precursor distribution was very useful, thank you.

It is also interesting to hear that there may be some debugging required when using Orbitrap data. I was wondering though if you would know the reason I would get the following results:

Using the centWave method and the xcmsFragments method, a parent peak of rtmed 25 sec, rtmax 11 sec and rtmax 57 sec has been assigned to fragmentation data with retention times all greater than 1206 sec. To me it looks like MS2 precursor m/z is matching the feature m/z but the retention time is not being taken into account correctly.

See below code:

Standard xcms stuff
Code: [Select]
# xcms feature detetection and fragmentation methods
file <- "/path/2/file/example.mzML"
xs <- xcmsSet(file, method="centWave",ppm=10)
xfrag <- xcmsFragments(xs,snthresh=1) 
xfragpeaks <- data.frame(xfrag@peaks)

Looking at parent peak 1
Code: [Select]
# Get all the fragmentation peaks witht the parent peak 1
sub <- xfragpeaks[xfragpeaks$MSnParentPeakID==1,]

# Plot the extracted ion chromatogram of the parent scan ion charge for the whole run
xeic <- getEIC(xs, rtrange= matrix(c(1,1800),nrow=1), mzrange= matrix(c(376.87,376.88),nrow=1))
plot(xeic)

# Draw a line where the fragmentation occurs
abline(v = sub$rt, col = "red")

# Draw a line where the rtmedian of the feature is
p1 <- data.frame(xs@peaks[1,])
abline(v = xs@peaks[1,][1], col = "blue")

Any further help would be really appreciated.

Kind regards,
Tom

Re: CentWave feature detection with LC-MS/MS (tandem) data

Reply #4
Hi,

Quote
a parent peak of rtmed 25 sec, rtmax 11 sec and rtmax 57

which mass is that, and at which RT (and scan number) do you see the MS2 ?

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: CentWave feature detection with LC-MS/MS (tandem) data

Reply #5
Hi Steffen,

Thanks again for your time.

Quote from: "sneumann"
which mass is that

For the parent feature mentioned (centWave determined peak 1): The mass is 376.8766  with rtmed 25 sec, rtmax 11 sec and rtmax 57.

Quote from: "sneumann"
at which RT (and scan number) do you see the MS2 ?

The RT for the MS2 data are all greater than 1205.59 sec. The scan numbers are 7319, 7850, 8329, 8573, 9115, 9181, 9312 and 9551. See bottom of this post for summary table, I have also included the relevant precursor scan information.

Code for getting table
Code: [Select]
# get the MS2 data with MSnParentPeak 1
sub <- xfragpeaks[xfragpeaks$MSnParentPeakID==1,]

# Parse through the file with mzR
mr <- openMSfile(file)
mrdf <- header(mr)
mrdf$precursorRT <- NA

# get the precursor scan RT
mrdf[mrdf$msLevel==2,]$precursorRT <- mrdf[mrdf$precursorScanNum,]$retentionTime
scans <-mrdf[mrdf$retentionTime %in% sub$rt,]

# Get a summary of the MS2 data with relavent scan numbers and precursor info
colnames(scans)[7] <- "rt"
keeps <- c("precursorScanNum","precursorMZ","precursorRT","rt","seqNum")
scans <- scans[keeps]
summary_table <- merge(x = scans, y =sub,  by = "rt", all.x=TRUE)

table.png

[attachment deleted by admin]