Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pandu_sait
    Junior Member
    • Mar 2015
    • 1

    #1

    cramtools-2.1 out of memory error

    Hi all,
    I am new to compression of sequence data.
    when i am trying to compress the individual chromosome BAM file i am getting out of memory exception.
    Input file used is ~88MB in size.

    Code:
    java -jar cramtools-2.1.jar cram -I NA19240.chrom1.sorted.bam.bam -R c                               hr1.fa -O test.cram
    Exception in thread "main" java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:606)
         at net.sf.cram.CramTools.invoke(CramTools.java:93)
         at net.sf.cram.CramTools.main(CramTools.java:123)
    Caused by: java.lang.OutOfMemoryError: Java heap space
         at java.util.Arrays.copyOf(Arrays.java:2271)
         at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:118)
         at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
         at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:153)
         at net.sf.cram.io.ByteBufferUtils.copyLarge(ByteBufferUtils.java:615)
         at net.sf.cram.io.ByteBufferUtils.readFully(ByteBufferUtils.java:623)
         at net.sf.cram.ref.ReferenceSource.loadFromPath(ReferenceSource.java:253)
         at net.sf.cram.ref.ReferenceSource.findBasesByMD5(ReferenceSource.java:283)
         at net.sf.cram.ref.ReferenceSource.findBases(ReferenceSource.java:179)
         at net.sf.cram.ref.ReferenceSource.getReferenceBases(ReferenceSource.java:127)
         at net.sf.cram.FixBAMFileHeader.fixSequence(FixBAMFileHeader.java:54)
         at net.sf.cram.FixBAMFileHeader.fixSequences(FixBAMFileHeader.java:47)
         at net.sf.cram.Bam2Cram.main(Bam2Cram.java:307)
         ... 6 more
    Though, I could succesfully run cram by explicitly setting java memory size directives ( -Xms256m -Xmx2048m)
    if for smaller files itself cramtools reports "Out of memory", how to run cramtools for larger files

    Could anyone help me understand how to work with cramtools on larger files.

    Thanks,
    Pandu Kumar C
    Last edited by pandu_sait; 03-23-2015, 10:46 PM.
  • Brian Bushnell
    Super Moderator
    • Jan 2014
    • 2709

    #2
    The error you are getting is from running out of memory... so, I would assume that you need more than 2048MB. Note that you will get the best memory efficiency if you set -Xms and -Xmx to the same value. But you probably still need more. Bam files are already compressed, so you can get an idea of the upper limit of how much memory should be needed (excluding overhead) by converting them to sam. I don't know what kind of overhead cramtools needs.
    Last edited by Brian Bushnell; 03-24-2015, 12:13 AM.

    Comment

    Latest Articles

    Collapse

    • SEQadmin2
      Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
      by SEQadmin2



      CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

      Despite this, “CRISPR helped turn genome editing from a specialized technique into
      ...
      07-31-2026, 11:01 AM
    • SEQadmin2
      Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
      by SEQadmin2


      Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

      The systematic characterization of the human proteome has
      ...
      07-20-2026, 11:48 AM
    • SEQadmin2
      Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
      by SEQadmin2



      Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
      ...
      07-09-2026, 11:10 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by SEQadmin2, Today, 07:41 AM
    0 responses
    9 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 08-03-2026, 10:13 AM
    0 responses
    24 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 07-31-2026, 02:55 AM
    0 responses
    38 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 07-24-2026, 12:17 PM
    0 responses
    25 views
    0 reactions
    Last Post SEQadmin2  
    Working...