Hi,
I'm basically trying to extract the TIC for each single MS/MS scan from my data file.
I tried using the xcmsRaw class, loading the MSMS data to the "main level" and looking at the TIC slot, but it appears to be empty (see code below; all other information seems to be correct.) Also, I don't understand what the warning message is telling me - is the function supposed to be used differently? Using mslevel=2 without includeMSn=TRUE returns NULL.
> xrmsms <- xcmsRaw(fileName, includeMSn=TRUE,mslevel=2)
Warnmeldung: In split.xcmsRaw(object, f = object@msnLevel == mslevel) : MSn information will be dropped
> length(xrmsms@tic)
[1] 2562
> which(xrmsms@tic != 0)
integer(0)
> which(xrmsms@scantime != 0)
[1] 1 2 3 4 5 6 etc etc until 2562
I would need this data to merge it with a dataframe generated from @msnScanindex and @msnPrecursorMz so that I could then filter out the intensity of the tandem spectra for one selected mass.
Any suggestions?
Hi meow,
The split(xcmsRaw, factor) function is intended to split the "normal" MS1 scans.
How should it know which MSn goes to which of the split'ed new xcmsRaws ?
(Actually, it could possibly do so if the parent scan is properly annotated).
But it is not intended to split those MSn scans into several xcmsRaw's .
Instead, I'd suggest to do some sapply(), getMsnScan() and sum().
I have just started to fix getMsnScan(), in xcms 1.31.1 and will keep you posted.
Yours,
Steffen
Hi Steffen,
I looked into the source code to understand the issue.
Actually, my actual "problem" is caused by
msn2ms (xcmsRaw.R, line 1873):
object@tic <- rep(0, length(object@msnAcquisitionNum)) ##
msn2ms just fills my TIC data with zeroes... apparently this is because the data is never read into xcmsRaw in the first place. Is there a special reason for this? The mzXML files themselves do contain the information.
---------------------------------------------
Concerning
split.xcmsRaw: I now see why the function gives this warning in general. However, I did not call the
split function myself; it is called by
xcmsRaw(..., mslevel=2), xcmsRaw.R, line 85, where the xcmsRaw object is split into the TRUE and FALSE datasets (TRUE being all entries which have the correct @msnLevel).
The warning additionally confused me because MSn data is actually never dropped; it is just copied over verbatim without being split. (xcmsRaw.R, line 1809). Is this intended?
From an user perspective, it is not obvious why calling a method which is meant to transfer MSn data to MS1 slots (i.e.
xcmsRaw(..., msLevel = n) results in a warning about MSn data being dropped (irrespective of whether or not the data is actually dropped)... Would it maybe make sense to suppress the warning in this case?
Best,
-Michael