Hello,
I tried to sort a merged bam file (70Gb) from whole genome sequnecing, but got an error as below. I guess the problem is related to TMP_DIR. Is TMP_DIR option necessary?
Here's the command I used.
SortSam \
SORT_ORDER=coordinate TMP_DIR=/home/yunjungk/span_wgs/tmp_spa5w/ \
VERBOSITY=ERROR \
INPUT=$1.bam \
OUTPUT=$1v1.bam
Any advice would be appreciated.
****Error message***********************************
Exception in thread "main" net.sf.samtools.util.RuntimeIOException: java.io.FileNotFoundException: /home/yunjungk/span_wgs/tmp_spa5w/sortingcollection.9063505166460361303.tmp (Too many open files)
at net.sf.samtools.util.SortingCollection$FileRecordIterator.<init>(SortingCollection.java:386)
at net.sf.samtools.util.SortingCollection$MergingIterator.<init>(SortingCollection.java:325)
at net.sf.samtools.util.SortingCollection.iterator(SortingCollection.java:221)
at net.sf.samtools.util.SortingCollection.iterator(SortingCollection.java:42)
at net.sf.samtools.SAMFileWriterImpl.close(SAMFileWriterImpl.java:177)
at net.sf.picard.sam.SortSam.doWork(SortSam.java:61)
at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:150)
at net.sf.picard.cmdline.CommandLineProgram.instanceMainWithExit(CommandLineProgram.java:117)
at net.sf.picard.sam.SortSam.main(SortSam.java:66)
Caused by: java.io.FileNotFoundException: /home/yunjungk/span_wgs/tmp_spa5w/sortingcollection.9063505166460361303.tmp (Too many open files)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at net.sf.samtools.util.SortingCollection$FileRecordIterator.<init>(SortingCollection.java:380)
... 8 more
I tried to sort a merged bam file (70Gb) from whole genome sequnecing, but got an error as below. I guess the problem is related to TMP_DIR. Is TMP_DIR option necessary?
Here's the command I used.
SortSam \
SORT_ORDER=coordinate TMP_DIR=/home/yunjungk/span_wgs/tmp_spa5w/ \
VERBOSITY=ERROR \
INPUT=$1.bam \
OUTPUT=$1v1.bam
Any advice would be appreciated.
****Error message***********************************
Exception in thread "main" net.sf.samtools.util.RuntimeIOException: java.io.FileNotFoundException: /home/yunjungk/span_wgs/tmp_spa5w/sortingcollection.9063505166460361303.tmp (Too many open files)
at net.sf.samtools.util.SortingCollection$FileRecordIterator.<init>(SortingCollection.java:386)
at net.sf.samtools.util.SortingCollection$MergingIterator.<init>(SortingCollection.java:325)
at net.sf.samtools.util.SortingCollection.iterator(SortingCollection.java:221)
at net.sf.samtools.util.SortingCollection.iterator(SortingCollection.java:42)
at net.sf.samtools.SAMFileWriterImpl.close(SAMFileWriterImpl.java:177)
at net.sf.picard.sam.SortSam.doWork(SortSam.java:61)
at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:150)
at net.sf.picard.cmdline.CommandLineProgram.instanceMainWithExit(CommandLineProgram.java:117)
at net.sf.picard.sam.SortSam.main(SortSam.java:66)
Caused by: java.io.FileNotFoundException: /home/yunjungk/span_wgs/tmp_spa5w/sortingcollection.9063505166460361303.tmp (Too many open files)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at net.sf.samtools.util.SortingCollection$FileRecordIterator.<init>(SortingCollection.java:380)
... 8 more
Comment