Skip to main content
Topic: error of xset2 <- retcor(xset, family="s", plottype="m") (Read 5427 times) previous topic - next topic

error of xset2 <- retcor(xset, family="s", plottype="m")

hi,I have a error message of the step" xset2 <- retcor(xset, family="s", plottype="m")",I can not find the result,please help me ,thanks so much.the problem as follows:
> xset2<-retcor(xset,family="s",plottype="m")
Retention Time Correction Groups: 83
Error in simpleLoess(y, x, w, span, degree, parametric, drop.square, normalize,  :
  NA/NaN/Inf in foreign function call (arg 1)
>

 

Re: error of xset2 <- retcor(xset, family="s", plottype="m")

Reply #1
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