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
        Current Approaches to Protein Sequencing
        by seqadmin


        Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
        04-04-2024, 04:25 PM
      • 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

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, 04-11-2024, 12:08 PM
      0 responses
      25 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-10-2024, 10:19 PM
      0 responses
      29 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-10-2024, 09:21 AM
      0 responses
      25 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-04-2024, 09:00 AM
      0 responses
      52 views
      0 likes
      Last Post seqadmin  
      Working...
      X