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
        Strategies for Sequencing Challenging Samples
        by seqadmin


        Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
        03-22-2024, 06:39 AM
      • seqadmin
        Techniques and Challenges in Conservation Genomics
        by seqadmin



        The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

        Avian Conservation
        Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
        03-08-2024, 10:41 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, Yesterday, 06:37 PM
      0 responses
      11 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, Yesterday, 06:07 PM
      0 responses
      10 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 03-22-2024, 10:03 AM
      0 responses
      51 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 03-21-2024, 07:32 AM
      0 responses
      68 views
      0 likes
      Last Post seqadmin  
      Working...
      X