SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert merged BAM back to per lane BAM or FASTQ file danielsbrewer Bioinformatics 6 10-03-2013 08:29 AM
how to get number of records of bam file using picard jay2008 Bioinformatics 0 05-23-2011 04:11 PM
GATK pileup with merged BAM files yxl Bioinformatics 0 04-22-2011 08:07 PM
GATK calling Merged Bam files jayce_ocean Bioinformatics 3 03-16-2011 01:15 AM
Picard MarkDuplicates - How to identify duplicates in generated BAM file makarovv Bioinformatics 6 11-10-2010 09:02 AM

Reply
 
Thread Tools
Old 09-28-2011, 02:53 AM   #1
tomato2
Junior Member
 
Location: chapel hill

Join Date: Sep 2011
Posts: 2
Default Picard's SortSam error with a merged bam file

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

Last edited by tomato2; 09-28-2011 at 02:56 AM.
tomato2 is offline   Reply With Quote
Old 11-01-2011, 10:18 PM   #2
seq_GA
Senior Member
 
Location: Asiana

Join Date: Feb 2009
Posts: 124
Default

Hi,
Did you manage to soleve this issue? I am also getting the same error while trying ReOrder a bam file.
Code:
java -jar /picard-tools-1.48/ReorderSam.jar I=test_PCRremoved.bam O=test_PCRremoved_reOrder.bam R=/genome/hg19_full/hg19.fa
Quote:
[Wed Nov 02 13:02:30 SGT 2011] net.sf.picard.sam.ReorderSam done. Elapsed time: 53.56 minutes.
Runtime.totalMemory()=11474370560
Exception in thread "main" net.sf.samtools.util.RuntimeIOException: java.io.FileNotFoundException: /tmp/userrig/sortingcollection.6171299671671922515.tmp (Too many open files)
at net.sf.samtools.util.SortingCollection$FileRecordIterator.<init>(SortingCollection.java:410)
at net.sf.samtools.util.SortingCollection$MergingIterator.<init>(SortingCollection.java:349)
at net.sf.samtools.util.SortingCollection.iterator(SortingCollection.java:242)
at net.sf.samtools.util.SortingCollection.iterator(SortingCollection.java:43)
at net.sf.samtools.SAMFileWriterImpl.close(SAMFileWriterImpl.java:177)
at net.sf.picard.sam.ReorderSam.doWork(ReorderSam.java:119)
at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:158)
at net.sf.picard.cmdline.CommandLineProgram.instanceMainWithExit(CommandLineProgram.java:118)
at net.sf.picard.sam.ReorderSam.main(ReorderSam.java:76)
Caused by: java.io.FileNotFoundException: /tmp/userrig/sortingcollection.6171299671671922515.tmp (Too many open files)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:120)
at net.sf.samtools.util.SortingCollection$FileRecordIterator.<init>(SortingCollection.java:404)
... 8 more
seq_GA is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 04:45 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO