I have seen several threads on here in relation to receiving the java error: java.lang.OutOfMemoryError: Requested array size exceeds VM limit but I have tried the recommendations and none have worked for me. Below is the script that I have used:
#!/bin/bash
#$ -cwd
#$ -N Sample_S06-9841_A4_primary
#$ -S /bin/bash
module load picard/1.130
java -Xmx12g -XX:MaxPermSize=8192m -XX:+UseCompressedOops -Djava.io.tmpdir=/mnt/work1/users/home2/loldfiel/tmp -jar $picard_dir/picard.jar AddOrReplaceReadGroups INPUT=/mnt/work1/users/roehrlgroup/GCT_2/star_aligner/final_alignment/Sample_S06-9841_A4_primary/Aligned.out.sam OUTPUT=./Sample_S06-9841_A4_primary/S06-9841_A4_primary_rg.bam SORT_ORDER=coordinate RGID=S06-9841_A4_primary RGLB=lib RGPL=Illumina RGPU=none RGSM=Sample_S06-9841_A4_primary
I have tried various different options such as increasing -Xmx argument to 20g and removing the MaxPermSize argument (I've also tried lowering it to 256m). I've run it without using the UseCompressedOops argument.
I've run this script before (without the MaxPermSize and the UsedCompressedOops arguments) and have had no problem at all so I'm not to sure why on this one sample it will not run.
Does anyone have any other ideas as to what the problem could be? Do you think there is an issue with my bam file?
Note: I do receive a file within the output directory but it is empty.
Thank you,
Leslie