vadimzalunin/crammer — Issue #10: empty output from ViewSam2 on windows32 machines
Author: vadimzalunin
Created: 2012-01-24 16:51:43+00:00
State: open

Seems to be due to an exception inside of 'System.out':
java.io.IOException: Not enough storage is available to process this command
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:260)
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105)
at java.io.PrintStream.write(PrintStream.java:446)
at net.sf.samtools.util.AsciiWriter.write(AsciiWriter.java:76)
at java.io.Writer.write(Writer.java:175)
at java.io.Writer.write(Writer.java:140)
at net.sf.samtools.SAMTextWriter.writeAlignment(SAMTextWriter.java:114)
at net.sf.samtools.SAMFileWriterImpl.addAlignment(SAMFileWriterImpl.java:152)
at net.sf.picard.sam.ViewSam2.doWork(ViewSam2.java:131)
at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:175)
at net.sf.picard.sam.ViewSam2.main(ViewSam2.java:82)

Looks like the default buffer size in Picard is too big for Windows32 machines: IoUtil.STANDARD_BUFFER_SIZE = 1024 * 128

The fix:
IoUtil.STANDARD_BUFFER_SIZE = 1024 * 32;

or redirect the output to a file.