I need to convert my CRAM files to FASTQ to complete an analysis. I have been trying to do this via GATK and Picard, but I have repeatedly been getting an "out of memory" error even as I have increased allocated memory and processors.
gatk SamToFastq -I $FQ_FILE_PATH -F working/sample.1.fastq.gz -F2 working/sample.2.fastq.gz -R $REF_FILE
Picked up JAVA_TOOL_OPTIONS: -Xmx2g
Runtime.totalMemory()=109051904
To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space: failed reallocation of scalar replaced objects
Given that this avenue is not working, would converting via samtools produce a comparable result, ie something that could still be relied on?
CRAM format is maintained by group that develops
samtools
.This is why I never use GATK unless I absolutely have to. Managing memory in Java is an absolute nightmare.