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
        Essential Discoveries and Tools in Epitranscriptomics
        by seqadmin




        The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
        04-22-2024, 07:01 AM
      • 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

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, 04-25-2024, 11:49 AM
      0 responses
      19 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-24-2024, 08:47 AM
      0 responses
      17 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-11-2024, 12:08 PM
      0 responses
      62 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 04-10-2024, 10:19 PM
      0 responses
      60 views
      0 likes
      Last Post seqadmin  
      Working...
      X