Picard vs Samtools converting CRAM to FASTQ
1
0
Entering edit mode
2.5 years ago
J ▴ 20

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?

samtools picard • 1.3k views
ADD COMMENT
1
Entering edit mode

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.

ADD REPLY
1
Entering edit mode

This is why I never use GATK unless I absolutely have to. Managing memory in Java is an absolute nightmare.

ADD REPLY
1
Entering edit mode
2.4 years ago
aw7 ▴ 270

As GenoMax says we (the samtools developers) maintain CRAM though the spec comes under the governance of the Global Alliance for Genomics and Health (GA4GH). So yes, the CRAM that we produce can still be relied on.

If you try something like this:

samtools fastq --threads 4 -1 sample.1.fastq.gz -2 sample.2.fastq.gz in_file.cram

It should work and should not use that much memory.

ADD COMMENT

Login before adding your answer.

Traffic: 1800 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6