I am running the somatic variant caller in VarScan on several files. On average, the input .pileup files are ~50 GB each (with both tumor and normal samples).
I've noticed that I've gotten the following error when running some samples:
Exception in thread "main" java.lang.OutOfMemoryError: Requested array size exceeds VM limit
It doesn't happen for all files, and there still SNP and indel calls produced for samples that show this error. So, I would have to parse the error log if I wanted to go back and figure out which samples might be missing some variants.
Does anybody have a recommendation about how much memory should be allocated to java when running VarScan (with two ~50 GB .pileup file as the input)? I'm hoping that this can help avoid getting the error message.
See, if this link is of any use OutofMemory in solving your issue
I don't think this error can be solved by memory allocation - it shows that the limit of the VM with respect of the size of the array not the actual amount of memory it uses up.
You may have plenty of memory around it is just the array is larger than Integer.MAX_INT. An array in Java can only contain that many elements.