Skip to main content

Show Posts

This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.

Messages - Cole Wunderlich

2
XCMS / Re: error of xset2 <- retcor(xset, family="s", plottype="m")
As far as I can tell, retcor.peakgroups should be calling loess() for its loess calculations, NOT simpleLoess().  There are two possibilities I can think of that may be causing this.  The first would be you are running an older version of Xcms (which I would think wouldn't cause any problems, but you never know).  If you could post your current version of R and of Xcms that would help.  The other (and more probable cause) is that you have another package loaded before/on top of Xcms in the search path and so R is finding simpleLoess() before its finding Loess().  Did you have any other packages loaded at the time?  Posting the results of a call to search() would also help.

Another thing worth mentioning is that retcor.Obiwarp is going to be superior to retcor.peakgroups for most applications.  I personally prefer to run obiwarp with the creator's recommended default settings (distFunc="cor_opt", gapInit=0.3, gapExtend=2.4) and a response of between 5 and 10 depending on the data set I'm working with (check your fit by setting plottype = "deviation").  I have found this method to be more robust as well as more accurate than the other Rt correction methods available.  The other major plus (in my mind) is that it allows you to do grouping AFTER Rt correction.  This way there is no more iterative group, correct, group, correct; simply correct accurately once, and then perform peak grouping.

If you are interested in learning more about how obiwarp works and how it stacks up against other methods,  I would recommend reading the original paper: http://http://tinyurl.com/obiwarp
Another useful reference on the general principle of dynamic time warping (which is the underlying principle of obiwarp) can be found in chapter four of this book: http://http://tinyurl.com/DTWchapter4
(here's another link in case that one doesn't work: http://http://tinyurl.com/DTWrefScholarSearch).  I found this reference to be very straight forward and easy to understand.

I would highly recommend reading the reference material before reading the paper.  I couldn't fully understand the paper until I gained a general understanding of DTW and its related terminology.

Good luck,
Cole
3
XCMS / Re: error in R package
Quote from: "Arissa"
I have tried to install new version or R: 3.1 but still got the same error.
Arissa

I am a little confused, did you actually upgrade R to version 3.1 or are you considering upgrading? Because you are going to need to for it to work. Since, as stated in the DESCRIPTION file, xcms depends on R 2.14 or higher. I would recommend going with a fairly new version of R for best results.

Cole
4
XCMS / Re: Get Spectra using xcmsSet object instead of xcmsRaw obje
True, but if you split the analysis up into batches I think the performance gains would probably be worth it.  I suppose the only instance it wouldn't work would be for Rt alignment since you need all the data loaded at once, but then I suppose you could probably just convert back to a regular xcmsSet object.  I might submit a pull request if I have time to convert the rest of the code, right now I have only set it up to work for the select methods I require.

Cole
5
XCMS / Re: Get Spectra using xcmsSet object instead of xcmsRaw obje
I ended up rewriting some of the source code so that xcmsSet objects now retain the xcmsRaw objects used to generate them.  I have found this is highly useful because almost every method involving xcmsSet objects seems to want to regenerate the xcmsRaw objects (e.g. retcor.obiwarp, fillPeaks(), getEIC()).  By keeping the raw objects in memory and rewriting the aforementioned functions to operate on them (instead of generating new ones every time)  I have significantly reduced the run time of my code.  Perhaps the devs might consider implementing this functionality as an option for the current xcmsSet class.
6
XCMS / Re: centwave: prefilter = c(K,I) or noise
The noise parameter is going to affect your entire analysis.  Some specific areas include identification of peak boundaries (if integrate=2 is chosen), subsequent integration of identified peaks, and calculation of signal to noise ratio.  Since noise tends to vary in a nonlinear fashion over the entirety of a run, however, I personally prefer to either not use the noise parameter (since it is pretty much guaranteed to be inaccurate at some point in the chromatographic domain) or to set it very conservatively to ensure that I do not inadvertently filter out valid data.

The prefilter parameter, however, exists solely to ensure the quality of your regions of interest that are then searched for peaks.

So, one is about the overall quality of your data and the other is about the overall quality of the ROI's picked in the first step.  As such, I would consider these parameters to be completely distinct rather than almost redundant.

Take, for example, a data set that has an average noise level of 100 count.  Let's also say that valid regions of interest tend to have at least 4 'peaks'  that are of intensity 400 or greater.  If you were to simply set the noise parameter to 100, you would get a lot of unwanted ROIs from the first step that contained 'peaks' between 100 and 400 count (which, based on our definition, end up not containing any actual peaks). Conversely, if you were to set the noise parameter to 400, you would get only valid/desired ROI's from the first step, but would get inaccurate results from the second step where peaks are identified and quantified (since the true noise is at 100 and not 400).  So, for optimal results, you would need to set the noise level to 100 AND  prefilter = c(4,400).  This gives you optimal/accurate ROIs and accurate identification+quantification.

Sorry if I seem like I am repeating myself, but I hope this makes things a little more clear.

Cole
7
XCMS / Re: Get Spectra using xcmsSet object instead of xcmsRaw obje
Quote from: "Jan Stanstrup"
Why do you do the peak picking again on the xcmsRaw object?
I don't, that is what I am trying to avoid.  I do peak picking when I generate the xcmsSet object and now want to be able to generate MS without having to instantiate any more objects.

Cole
8
XCMS / Re: Get Spectra using xcmsSet object instead of xcmsRaw obje
Quote from: "Jan Stanstrup"
Is it really that slow to make the xcmsRaw objects? Usually it is pretty fast... How big is your files? How many files do you need to do it on? Do you have enough memory? 

Yeah, it's pretty darn slow.  While I have never timed it, i'd say it definitely takes over an hour to process 8 samples. The getEIC() method is fairly slow as well.  My files are in the mzXML format and tend to be around 660 MB a piece (after converting from profile to centroid).  I'm using a reverse phase column and a chromatographic method with a run time of about 60 min on a high-res TOF to generate the data.  Memory and processing speed also shouldn't be a concern since I'm working on a windows box with 16G of ram and an i7-3770 CPU (quad core running at 3.40 GHz per core).  The number of files I need to process is variable, but usually the minimum is around 12 (3 control unlabeled, 3 control labeled, 3 mutant unlabeled, 3 mutant labeled, ect.).

Quote from: "Jan Stanstrup"
Quote
Generate multiple extracted ion chromatograms for m/z values of interest. For xcmsSet objects, reread original raw data and apply precomputed retention time correction, if applicable.
I forgot about that, good catch!  I think what I might be looking for then is some way to read the raw data and generate MS without having to go through the peak picking step involved in generating an xcmsRaw object (since, at the point I need the MS in my script, the peak picking would be redundant)

Let me know if there is any other info I can provide you,
Cole
9
XCMS / Re: centwave: prefilter = c(K,I) or noise
While I am not entirely sure, I think the prefilter parameter only applies during the ROI generation step, while the noise parameter applies to the entire centWave analysis.  So, when generating ROIs, centWave will totally ignore anything under the noise parameter and will only keep ROIs that pass the prefilter parameter.  Once the ROIs are picked, however, centWave will also use the noise parameter when performing peak detection and integration within those ROIs, while the prefilter parameter is not used for the duration of the analysis.

Hope this helps,
Cole
10
XCMS / Re: Get Spectra using xcmsSet object instead of xcmsRaw obje
Unfortunately I am interested in the actual spectra from the raw data (ie. entire scans).  I use centWave for generating my xcmsSet objects as well as for my xcmsRaw objects (although in this particular script I am trying to avoid having to create any xcmsRaw objects, if at all possible).  I was under the impression that xcmsSet objects at least contain some information regarding the raw data, since I believe that information is used to generate EICs when calling getEIC().  I was hoping there might also be a way to use the same data source to generate mass spectra instead of EICs, but it sounds like that might not be the case....

Cole
11
XCMS / Get Spectra using xcmsSet object instead of xcmsRaw object
Hello all,

I am writing a script and need to generate several mass spectra based on a group of peaks that I have in an xcmsSet object.  As far as I can tell, however, there only exist methods for generating mass spectra using an xcmsRaw object.  I really would like to not have to create additional xcmsRaw objects if at all possible since it takes a LOT of time (especially when processing more than 4 samples and picking peaks using centWave).  So, does anyone know how to generate mass spectra using an xcmsSet object or am I out of luck?

Thanks,
Cole Wunderlich
13
XCMS / rawEIC return in seconds
Is there any way to get rawEIC() to return Rt time in seconds instead of scan number?

Thanks,
Cole
14
Other metabolomics resources / Phenlyalanine Derived Compound Database?
Hello all,

I am doing metabolomics work on the phenylpropanoid pathway in At Col-0 using LC-MS and was wondering if any of you know of a good metabolite database (aside from knapsack) for At metabolites or for phenylpropanoids in general.

Thanks,
Cole