Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • CNVboy
    Member
    • Jun 2011
    • 27

    CNV core dump problem

    HI I'm using CNVnator to do some CNV analysis but came across problems of core dump

    Basically I first generated .root files from .bam files; then merged those small .root files into larger ones. See below:

    Code:
      total 139G
            6.5G NA12878_10.root   3.7G NA12878_18.root   9.1G NA12878_4.root
             16K NA12878_1_1.root  2.8G NA12878_19.root   8.8G NA12878_5.root
            6.6G NA12878_11.root    11G NA12878_1.root    8.3G NA12878_6.root
            6.5G NA12878_12.root   3.1G NA12878_20.root   7.7G NA12878_7.root
            4.6G NA12878_13.root    16K NA12878_2_1.root  7.1G NA12878_8.root
            4.4G NA12878_14.root   1.8G NA12878_21.root   6.1G NA12878_9.root
            4.1G NA12878_15.root   1.8G NA12878_22.root   7.2G NA12878_X.root
            4.1G NA12878_16.root    11G NA12878_2.root    253M NA12878_Y.root
            4.0G NA12878_17.root   9.7G NA12878_3.root
    This _1, _2, _3 ....represents chromosome number. The interesting here is, for NA12878_1.root and NA12878_2.root, the two largest files (11GB each), somehow two additional files are generated named as NA12878_1_1.root and NA12878_2_1.root (16K). I think this is core dump problem because core.* files are also generated (which I don't show here)

    Is it because these two files are too large?

    The part of the errors go like this:
    And the werid error report about NA12878_1_1 and NA12878_2_1 and dumped core


    Code:
    Fill: Switching to new file: /home/xug/nearline/NA12878root/NA12878_2_1.root
        Filling and saving tree for 'chr19' ...
        *** glibc detected *** /home/xug/CNVnator/src/cnvnator: double free or corruption (out): 0xDone with the tree.
        
        ======= Backtrace: =========
        /share/bin/intel/cc/10.1.015/lib/tls/x86_64/libc.so.6[0x3a17e71834]
        /share/bin/intel/cc/10.1.015/lib/tls/x86_64/libc.so.6(cfree+0x8c)[0x3a17e74e7c]
        /home/xug/root/lib/libCore.so(_ZN8TStorage13ObjectDeallocEPv+0x68)[0x2b2e6c2239f8]
        /home/xug/root/lib/libRIO.so(_ZN5TFileD0Ev+0x217)[0x2b2e6d41cf97]
        /home/xug/root/lib/libTree.so(_ZN5TTree10ChangeFileEP5TFile+0x449)[0x2b2e6ec35d89]
        /home/xug/root/lib/libTree.so(_ZN5TTree4FillEv+0x5b2)[0x2b2e6ec31a82]
        /home/xug/CNVnator/src/cnvnator[0x40aa58]
        /home/xug/CNVnator/src/cnvnator[0x40e02d]
        /home/xug/CNVnator/src/cnvnator[0x40782d]
        /share/bin/intel/cc/10.1.015/lib/tls/x86_64/libc.so.6(__libc_start_main+0xf4)[0x3a17e1d8b4]
        /home/xug/CNVnator/src/cnvnator[0x4063e9]
        ======= Memory map: ========
        00400000-0043c000 r-xp 00000000 00:17 2189064480                         /home/xug/CNVnator/src/cnvnator
        0063c000-0063d000 rw-p 0003c000 00:17 2189064480                         /home/xug/CNVnator/src/cnvnator
        0063d000-00645000 rw-p 0063d000 00:00 0 
        19cd6000-1a29b000 rw-p 19cd6000 00:00 0 
        3a17a00000-3a17a1a000 r-xp 00000000 08:01 6864978                        /lib64/ld-2.5.so
        3a17c1a000-3a17c1b000 r--p 0001a000 08:01 6864978                        /lib64/ld-2.5.so
        3a17c1b000-3a17c1c000 rw-p 0001b000 08:01 6864978                        /lib64/ld-2.5.so
        3a17e00000-3a17f4a000 r-xp 00000000 08:01 6864988                        /lib64/libc-2.5.so
        3a17f4a000-3a1814a000 ---p 0014a000 08:01 6864988                        /lib64/libc-2.5.so
        3a1814a000-3a1814e000 r--p 0014a000 08:01 6864988                        /lib64/libc-2.5.so
    I then used the generated .root files for further step like make histogram, there are errors (not surprisingly) but not only for NA12878_1 or _2, but also for others like _6
    part of errors are shown below:
    Code:
    SysError in <TFile::Seek>: cannot seek to position -1857646445 in file NA12878_chr6.root, retpos=-1 (Invalid argument)
        Calculating histogram with bin size of 100 for chromosome 'chr6' ...
        Calculating histogram with bin size of 100 for chromosome 'chr5' ...
        Warning in <TFile::Init>: file NA12878_chr6.root probably not closed, cannot read free segments
        SysError in <TFile::Seek>: cannot seek to position -1857646445 in file NA12878_chr6.root, retpos=-1 (Invalid argument)
        Error in <TKey::Create>: Cannot allocate 60031 bytes for ID = his_rd_u_chr6_100 Title = Unique read depth for chr6
        Error in <TKey::Create>: Cannot allocate 2590048 bytes for ID = his_rd_p_chr6_100 Title =  read depth for chr6
        Making GC histogram for 'chr6' ...
        SysError in <TFile::Seek>: cannot seek to position -1857646445 in file NA12878_chr6.root, retpos=-1 (Invalid argument)
        Making GC histogram for 'chr5' ...

    Anyone has encountered such problems? thx
  • lambda3388
    Junior Member
    • Jun 2012
    • 3

    #2
    I am trying to run CNVnator.The command I used is as follows:
    cnvnator -root NA12878.root -chrom 1 2 3 4 5 6 7 8 9 10 -tree aln.bam
    but it gives an error about bad allocation.I think there is some problem with the memory.

    Parsing file aln.bam ...
    Assuming BAM file for aln.bam
    Allocating memory ...
    terminate called after throwing an instance of 'std::bad_alloc'
    what(): std::bad_alloc
    Aborted

    I am using an external hard drive with sufficiently large memory.Could anyone please tell me how to get rid of this error?

    Comment

    • kenietz
      Member
      • Nov 2011
      • 86

      #3
      Hi guys,
      i am sorry to revive this thread after long time but i also encountered this problem while trying to generate histograms on merged root file with CNVnator_0.3. Wrote to the author and awaiting reply.

      However i was digging the net and found only this thread. But no info how to solve. So i started digging in the software. Seems that the problem is not in the ROOT package but CNVnator itself.
      Why? Cos i found that for example the size of the genome is hardcoded:

      from HisMaker.hh:
      const static double GENOME_SIZE = 2.9e+9; // Excluding gaps

      Another problems is that in Genome.cpp there are also hardcoded lengths of chromosomes for hg18 and hg19. Also there are only the standard chromosomes so is not the full hg18 or hg19. However even the sizes/lengths of the hg19 i have and the ones encoded in CNVnator differ. For example chr1:
      CNVnator - 247249719
      My hg19 - 249250621

      So its not fun. The problem is i am not really C++ programmer so its kind of tough for me to figure out the whole procedure but i will try to solve that problem somehow. IF someone who is more proficient in C++ wants to help it will be really appreciated.

      Cheers
      D.

      Comment

      Latest Articles

      Collapse

      • SEQadmin2
        Nine Things a Sample Prep Scientist Thinks About Before Sequencing
        by SEQadmin2


        I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

        Here are nine questions we think about, in roughly the order they matter, before...
        06-18-2026, 07:11 AM
      • SEQadmin2
        From Collection to Sequencing: Why Sample Preparation and Preservation Define Sequencing Data
        by SEQadmin2


        Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.


        The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
        ...
        06-02-2026, 10:05 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, Today, 05:37 AM
      0 responses
      5 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 06-26-2026, 11:10 AM
      0 responses
      16 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 06-17-2026, 06:09 AM
      0 responses
      50 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 06-09-2026, 11:58 AM
      0 responses
      109 views
      0 reactions
      Last Post SEQadmin2  
      Working...