Question: solving heap size problem in linux
0
gravatar for Liftedkris
19 months ago by
Liftedkris20
Germany
Liftedkris20 wrote:

hi. i am trying to remove contaminants from my fastq files using bbduk but it gives the following error. it says invalid maximum heapn size. i am using a linux system and do not know how to change the heap size or how to solve the problem. any help would be appreciated. thanks

bbduk.sh in1=D1C180_1.fastq in2=D1C180_2.fastq out1=cleanD1C180_1.fastq out2=D1C180_2 \
  ref=host_reference.fa k=31 mm=f
/home/s358309/bin/bbduk.sh: line 340: /home/s358309/bin//calcmem.sh: No such file or directory
/home/s358309/bin/bbduk.sh: line 341: parseXmx: command not found
/home/s358309/bin/bbduk.sh: line 345: freeRam: command not found
java -ea -Xmxm -Xmsm -cp /home/s358309/bin/current/ jgi.BBDuk in1=D1C180_1.fastq in2=D1C180_2.fastq out1=cleanD1C180_1.fastq out2=D1C180_2 ref=host_reference.fa k=31 mm=f

Invalid maximum heap size: -Xmxm
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
  
rna-seq • 890 views
ADD COMMENTlink modified 19 months ago by h.mon31k • written 19 months ago by Liftedkris20
1

How are you running this? compute cluster?

This is usually caused by a a lack of memory, try giving it much more memory to work with.

and is java available on your system?

ADD REPLYlink modified 19 months ago • written 19 months ago by lieven.sterck8.7k
2

Are those flags correct? -Xmxm -Xmsm

I'm no Java expert, but I think the flags don't normally have the last m? They should also be followed by a number for how much memory you want to use

ADD REPLYlink written 19 months ago by Joe18k
1

The parameters should be e.g. -Xmx 128M -Xms 16M. These are allocating respectively the maximum and initial heap size for the JVM.

ADD REPLYlink written 19 months ago by Jean-Karim Heriche23k

For bbduk.sh you should need not much RAM. Even a couple of gigs would be enough. Assign it explicitly in your command like this:

bbduk.sh -Xmx2g in1=D1C180_1.fastq in2=D1C180_2.fastq out1=cleanD1C180_1.fastq out2=D1C180_2 ref=host_reference.fa k=31 mm=f
ADD REPLYlink written 19 months ago by genomax91k
2
gravatar for h.mon
19 months ago by
h.mon31k
Brazil
h.mon31k wrote:

Somehow the installation of the BBMap / BBTools suite is botched. BBTools programs in general dynamically calculate the memory available at the computer they are running, and set (if I remember correctly) 85% of that memory to the Java virtual machine. But bbduk.sh is not finding calcmem.sh, hence it can't calculate the memory it should reserve and is using an empty string to build the actual java command, thus the odd-looking -Xmxm -Xmsm.

Did you add the base BBTools directory to the PATH? Supposing BBTools scripts are located at /home/s358309/bin/, do:

export PATH=/home/s358309/bin:$PATH
ADD COMMENTlink modified 19 months ago • written 19 months ago by h.mon31k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1002 users visited in the last hour