Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tomato2
    Junior Member
    • Sep 2011
    • 2

    #1

    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, 01:56 AM.
  • seq_GA
    Senior Member
    • Feb 2009
    • 124

    #2
    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
    [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

    Comment

    Latest Articles

    Collapse

    • SEQadmin2
      Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
      by SEQadmin2



      Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

      Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
      ...
      10-14-2026, 09:55 AM
    • SEQadmin2
      New Genomics Technologies Take Aim at Long-Standing Limits
      by SEQadmin2


      Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

      We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
      ...
      09-28-2026, 10:25 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by SEQadmin2, 10-15-2026, 10:52 AM
    0 responses
    17 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 10-14-2026, 05:39 AM
    0 responses
    26 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 10-13-2026, 09:56 AM
    0 responses
    22 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 10-09-2026, 11:14 AM
    0 responses
    28 views
    0 reactions
    Last Post SEQadmin2  
    Working...