Skip to main content
Topic: GroupCorr algorithm error (Read 9994 times) previous topic - next topic

GroupCorr algorithm error

I am trying to annotate adducts using CAMERA from urinary data acquired using an UPLC-Agilent 'ifunnel' QTOF 6550 in centroid mode (converted to mzXML using msconvert)and I am having difficulty grouping correlated peaks with the groupCorr algorithm. I would really appreciate any help as I am a little bit stuck. Sorry for all the information but I thought it best to provide as much as possible. :)

I recieve this error message and believe it might be due to my memory usage: -

>xsIC <- groupCorr(xsI, cor_eic_th = 0.75)
Start grouping after correlation.
Generating EIC's ..
Error: cannot allocate vector of size 3.6 Gb

where xsl is an xsAnnotate object of: -

With 1028 groups (pseudospectra)
With 18 samples and 62755 peaks
Polarity mode is set to: 
Using automatic sample selection
Annotated isotopes: 8739
Memory usage: 177 MB

Prior to this
> xsF <- groupFWHM(xsa, perfwhm = 0.6)
Start grouping after retention time.
Created 1028 pseudospectra.
and....
xsI <- findIsotopes(xsF, mzabs = 0.01)
Generating peak matrix!
Run isotope peak annotation
Found isotopes: 8739


I am using a virtual machine with the following characteristics and I hoped these would be sufficient

Windows 7 64 bit
8GB of RAM
2 CPUs
1 System disk of 40GB
1 Data disk of 1TB

I wonder if the number of peaks picked using XCMS is rather a lofty figure? I put this down to being very high resolution spectra, (as there were some peak insertion problems using ppm values of 30 and 20) long gradient and EICs from the diffreport appeared satisfactory, perhaps I have gone wrong somewhere with my peak picking, peak grouping and retention time correction prior to using CAMERA.

My XCMS workflow consisted of: -

>peakmatrix <- xcmsSet(method="centWave", peakwidth=c(3,20), ppm=15, snthresh=10);
An "xcmsSet" object with 18 samples
Time range: 3.4-1500.1 seconds (0.1-25 minutes)
Mass range: 100.0022-1049.6504 m/z
Peaks: 836770 (about 46487 per sample)
Peak Groups: 0
Sample classes: A1, A2, B1, B2, J1, J2
Profile settings: method = bin
                  step = 0.1
Memory usage: 72.3 MB

>gs<-group(peakmatrix,bw=10)
gs
Peaks: 836770 (about 46487 per sample)
Peak Groups: 38072
Memory usage: 81.4 MB

Retention  time correction 1st pass
ret<-retcor(gs, p="m", f="s", missing=1, extra=1, span=0.2)
Retention Time Correction Groups: 855
ret
Peaks: 836770 (about 46487 per sample)
Memory usage: 79.7 MB
[attachment=1:2o7a2vxc]Retention_time_correction_1st_pass.jpg[/attachment:2o7a2vxc]

2nd Grouping
gret<-group(ret, bw=5)

gret
Peaks: 836770 (about 46487 per sample)
Peak Groups: 53400
Memory usage: 91.2 MB

Retention time correction 2nd pass
Ret2nd<-retcor(gret, p="m", f="s", missing=1, extra=1, span=0.2)

Retention Time Correction Groups: 1552
Peaks: 836770 (about 46487 per sample)
Memory usage: 79.7 MB
[attachment=0:2o7a2vxc]Retention_time_correction_2nd_pass.jpg[/attachment:2o7a2vxc]

3rd Grouping
gret2nd<-group(ret2nd,bw=3)

Peaks: 836770 (about 46487 per sample)
Peak Groups: 62755
Memory usage: 92.6 MB

Zero filling
fill<-fillPeaks(gret2nd)

Many thanks for your help!

[attachment deleted by admin]

 

Re: GroupCorr algorithm error

Reply #1
You could check memory.limit() to see how much memory R can actually use on your system. And check the task manager in windows to see how much is free. Since there should be enough memory for what it is asking maybe it is a matter of cleaning up you R workspace before doing this command. As far as I know R needs continues memory allocation. So saving the xsl object, restarting the computer, load the object and running that command might help.
Blog: stanstrup.github.io

Re: GroupCorr algorithm error

Reply #2
Quote
I am using a virtual machine with the following characteristics and I hoped these would be sufficient
Windows 7 64 bit

I don't understand why you are running it in a Windows virtual machine.
Running it natively on an OS or in a Unix VM should work much better.

Re: GroupCorr algorithm error

Reply #3
Thanks for your advice, I have tried saving as seperate objects and increasing the memory limit with no luck. Is there also a way to increase the maximum allowable vector size? I read that it is possible to do this in the target field in the R shortcut but it does not seem to work either. I also tried updating my copy of R to 2.15 it was previously 2.14.2 (both 64 bit). I have noticed in many threads here that R does not run as well on windows I will see if an alternative operating system can be installed on the server with our IT, if you think that may solve the problem.


Re: GroupCorr algorithm error

Reply #5
Thanks Jan I tried that forum advice and the --max-mem-size=6000M (as I believe Windows reserves 2GB for itself) seemed to work however the --max-vsize command in the 'target' box was not compatible with the current version of R. I think better understanding of the use of R, good habits and switching to a different operating system is the best way forward particularly for larger datasets I am acquiring. Thanks for your help. :)

Re: GroupCorr algorithm error

Reply #6
Hi,

If you have y friendly bioinformatics or IT staff around,
you could suggest to set up a real (or virtual) Linux machine
somewhere, and check out the Rstudio server (http://www.rstudio.org/docs/)

Typically, such a real or virtual Linux machine would be closer to the central file storage
compared to a normal windows machine in the office, which
also helps file read/write performance.

Yours,
Steffen
--
IPB Halle                          Mass spectrometry & Bioinformatics
Dr. Steffen Neumann         http://www.IPB-Halle.DE
Weinberg 3 06120 Halle     Tel. +49 (0) 345 5582 - 1470
sneumann(at)IPB-Halle.DE