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.
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?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 useThe parameters should be e.g. -Xmx 128M -Xms 16M. These are allocating respectively the maximum and initial heap size for the JVM.
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: