Skip to main content

Topic: Split xcmsRaw objects (Read 2219 times) previous topic - next topic

  • hpbenton
  • [*][*][*]
Split xcmsRaw objects
You might have a file measured with complex MS2 of different precursor masses possibly even with different collision energies. Now you want to separate those into individual xcmsRaw objects, based on the MS2 parameters.

Code: [Select]
 filename <- system.file('iontrap/extracted.mzData', package = "msdata")
 x1 <- xcmsRaw(filename, includeMSn=TRUE)

 ## Catenate the (nominal) precursor mass and collision energy
 index <- paste(round(x1@msnPrecursorMz),x1@msnCollisionEnergy, sep="@")

 ## and split x1 into multiple xraws with data in the "normal" MS1 slots
 xraws <- split(x1, f=index)

 ## Access the resulting data:
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