Skip to main content

Topic: sequential addition of files to an xcms object (Read 485 times) previous topic - next topic

  • cbroeckl
  • [*][*]
sequential addition of files to an xcms object
I am interested to know whether there is a way to sequentially add files to an xcms object.  for example, I am running XCMS, I have completed feature finding on 10 files, and have the features grouped with retention time correction.  I now want to add file 11 to this xcms object.  From what I can tell, adding file 11 basically means that all the grouping and retention time correction are wiped from the xcms object to enable addition of an 11th file.  Is this accurate, or is there a way to do this that I am not thinking of?  Thanks,Corey

  • edmandsw
  • [*]
Re: sequential addition of files to an xcms object
Reply #1
As far as I'm aware this isn't possible. The retention time correction using the obiwarp method for example has to be reassessed with a new centre sample.
See the help file
Code: [Select]
?retcor.obiwarp
#center
#the index of the sample all others will be aligned to. If center==NULL, the sample with the most peaks is chosen as default
So the retention time deviation for each file has to be re-calculated.
Additionally for grouping the minfrac and minsamp arguments will be affected by additional samples in each group as you concatenate.
Code: [Select]
?group.density
#minfrac
#minimum fraction of samples necessary in at least one of the sample groups for it to be a valid group
#minsamp
#minimum number of samples necessary in at least one of the sample groups for it to be a valid group

It shouldn't be (computationally speaking) too much of a big deal to re-do the retention time correction and grouping each time you peak-pick an additional file(s). The most time-consuming part is definitely the xcmsSet function.
  • UC Berkeley

  • edmandsw
  • [*]
Re: sequential addition of files to an xcms object
Reply #2
You might be interested in an R package simExTargId I have been developing for real-time metabolomic experiment monitoring (with email notification) and MS/MS target identification. It makes use of xcms and CAMERA and sequentially concatenates xcmsSet objects as data is collected. It is still in development and has a few rough edges but it has been used regularly in our lab (it currently works for Agilent .d and Thermo .raw/.RAW data files).
  • Last Edit: June 12, 2017, 04:59:11 PM by edmandsw
  • UC Berkeley

  • cbroeckl
  • [*][*]
Re: sequential addition of files to an xcms object
Reply #3
Thanks edmandsw,

I currently am using a custom script for feature grouping which simply assumes that if retention times overlap and mass windows (plus a given ppm error) overlap, the represent the same compound.  After each iteration, I apply a retention time adjustment  as well.  The tried-and-true XCMS functions are just much more well used and validated than my internal tools, so I was hoping there would be a way to utilize them that I had missed.   I will look at the package you are developing - it does look interesting! Are you aware of the skyline/panorama tool sets?  I know they are also working on vendor neutral QC monitoring.  Interested to see how yours compares.  

Corey