Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • samtools sort running extremely slow

    Hi,

    I am a new samtools user. I am trying to sort a bam file of the size 5 GB

    using command

    ./samtools sort myFile.bam myFile.sorted

    Apparently it is stuck at the merging phase:

    saying
    [bam_sort_core] merging from 49 files...

    It has already been 8 hours and still the program is running. My Top command shows extremely low cpu usage by this program. The machine is a 64 bit dual core with 8 GB chip in it.

    Any reason why this should be so slow?

    Thanks

    Sucheta

  • #2
    Bump. I'm also a bit confused by this message, in my case it reports merging 6 files. I use 3 lanes labeled with 5 barcodes each. To be sure I put each barcode-specific alignment in a separate directory and rerun, but it seems the "merging" isn't about that, only the .bam file you specify is processed...

    This is a bit intransparent. In case anyone wants to investigate further, the source for bam_sort_core can be found here:



    And some of the code in question:
    Code:
    for (;;) {
                if (buf[k] == 0) buf[k] = (bam1_t*)calloc(1, sizeof(bam1_t));
                [B]b = buf[k];[/B]
                if ((ret = bam_read1([B]fp, b[/B])) < 0) [B]break;[/B]
                mem += ret;
                ++k;
                if (mem >= max_mem) {
                      sort_blocks([B]n++[/B], k, [B]buf[/B], prefix, header);
                      mem = 0; k = 0;
                }
          }
    Without taking apart bam_read1, it seems that the same file, fp, is read multiple times...

    Comment


    • #3
      Probably because your file system is slow.

      Comment

      Latest Articles

      Collapse

      • seqadmin
        Advancing Precision Medicine for Rare Diseases in Children
        by seqadmin




        Many organizations study rare diseases, but few have a mission as impactful as Rady Children’s Institute for Genomic Medicine (RCIGM). “We are all about changing outcomes for children,” explained Dr. Stephen Kingsmore, President and CEO of the group. The institute’s initial goal was to provide rapid diagnoses for critically ill children and shorten their diagnostic odyssey, a term used to describe the long and arduous process it takes patients to obtain an accurate...
        12-16-2024, 07:57 AM
      • seqadmin
        Recent Advances in Sequencing Technologies
        by seqadmin



        Innovations in next-generation sequencing technologies and techniques are driving more precise and comprehensive exploration of complex biological systems. Current advancements include improved accessibility for long-read sequencing and significant progress in single-cell and 3D genomics. This article explores some of the most impactful developments in the field over the past year.

        Long-Read Sequencing
        Long-read sequencing has seen remarkable advancements,...
        12-02-2024, 01:49 PM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, 12-17-2024, 10:28 AM
      0 responses
      27 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 12-13-2024, 08:24 AM
      0 responses
      43 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 12-12-2024, 07:41 AM
      0 responses
      29 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 12-11-2024, 07:45 AM
      0 responses
      42 views
      0 likes
      Last Post seqadmin  
      Working...
      X