Test-drive the GATK tools and Best Practices pipelines on Terra


Check out this blog post to learn how you can get started with GATK and try out the pipelines in preconfigured workspaces (with a user-friendly interface!) without having to install anything.

RevertSam Exception: File too large

When running RevertSam (4.0.1.2), I get the following "File to large" error.

The bam file is only 109GB. Any suggestions?

gatk --java-options "-Djava.io.tmpdir=tmp -Xmx64G"  RevertSam\
    -I $BAM_FILE \
    -O ubam/$BAM \
    --OUTPUT_BY_READGROUP true\
    --SANITIZE true \
    --MAX_DISCARD_FRACTION 0.005 \
    --ATTRIBUTE_TO_CLEAR XT \
    --ATTRIBUTE_TO_CLEAR XN \
    --ATTRIBUTE_TO_CLEAR AS \
    --ATTRIBUTE_TO_CLEAR OC \
    --ATTRIBUTE_TO_CLEAR OP \
    --SORT_ORDER=queryname \
    --RESTORE_ORIGINAL_QUALITIES true \
    --REMOVE_DUPLICATE_INFORMATION true \
    --REMOVE_ALIGNMENT_INFORMATION true


htsjdk.samtools.util.RuntimeIOException: java.io.IOException: File too large
        at htsjdk.samtools.util.SortingCollection.spillToDisk(SortingCollection.java:247)
        at htsjdk.samtools.util.SortingCollection.add(SortingCollection.java:167)
        at picard.sam.RevertSam$RevertSamSorter.add(RevertSam.java:706)
        at picard.sam.RevertSam.doWork(RevertSam.java:307)
        at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:269)
        at org.broadinstitute.hellbender.cmdline.PicardCommandLineProgramExecutor.instanceMain(PicardCommandLineProgramExecutor.java:25)
        at org.broadinstitute.hellbender.Main.runCommandLineProgram(Main.java:159)
        at org.broadinstitute.hellbender.Main.mainEntry(Main.java:202)
        at org.broadinstitute.hellbender.Main.main(Main.java:288)
Caused by: java.io.IOException: File too large
        at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
        at sun.nio.ch.FileDispatcherImpl.write(FileDispatcherImpl.java:60)
        at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
        at sun.nio.ch.IOUtil.write(IOUtil.java:65)
        at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:211)
        at java.nio.channels.Channels.writeFullyImpl(Channels.java:78)
        at java.nio.channels.Channels.writeFully(Channels.java:101)
        at java.nio.channels.Channels.access$000(Channels.java:61)
        at java.nio.channels.Channels$1.write(Channels.java:174)
        at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
        at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126)
        at org.xerial.snappy.SnappyOutputStream.dumpOutput(SnappyOutputStream.java:360)
        at org.xerial.snappy.SnappyOutputStream.compressInput(SnappyOutputStream.java:374)
        at org.xerial.snappy.SnappyOutputStream.flush(SnappyOutputStream.java:334)
        at org.xerial.snappy.SnappyOutputStream.close(SnappyOutputStream.java:397)
        at htsjdk.samtools.util.SortingCollection.spillToDisk(SortingCollection.java:238)
Tagged:

Best Answer

Answers

Sign In or Register to comment.