Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • samtools merge

    I'm going to merge > 50 alignment bam files (is it possible to merge this number of bam files?), it's too big,
    thus I want to merge by chromosome.

    1. samtools view -u file1.bam chr1 > chr1.file1.bam
    2. samtools view -u file2.bam chr1 > chr1.file2.bam

    no problem to create the above two files.

    3. samtools merge chr1.bam chr1.file1.bam chr1.bam


    [bam_header_read] EOF marker is absent.


    Since the merged file looks ok,

    What does this information mean?

    thanks

  • #2
    It means either a) you BAM is generated by an old version of samtools; or b) your BAM is truncated.

    Comment


    • #3
      Originally posted by lh3 View Post
      It means either a) you BAM is generated by an old version of samtools; or b) your BAM is truncated.
      I uased bowtie for alignment, and convert it's sam output to bam by samtools.

      Thanks.

      Comment


      • #4
        samtools merge problem

        Hi,

        I am having the same problem as blair had when used samtools merge:

        [bam_header_read] EOF marker is absent. The input is probably truncated.

        I also followed the same steps

        1. Files: bam1_sorted_indexed.bam, bam2_sorted_indexed.bam
        2. Merge: samtools merge -u output.bam bam1_sorted.bam bam2_sorted.bam

        Merge files with no problem, but further running samtools on merged bam file such as samtools sort or samtools depth gives the above "EOF marker absent" warning, though it does produce the output.

        When using Picard I did not have such problem, but Picard seems to be not able to handle large eg. if bam1 >= 8G or bam2 >= 8G, where it breaks and gives runtime error. In those cases one might have to rely on samtools merge. Should I be concerned about the above warning samtools gives?

        Comment


        • #5
          to add to the above
          a) my bam files are generated by the same samtools version as the merged file and also for the sort and depth activities (0.1.18)
          b) my bam files are also not truncated since Picard can run fine

          Comment


          • #6
            It might be the -u in your command line.

            If you do something like this:

            samtools view -bShu file.sam > file.bam
            samtools sort file.bam sort
            samtools will complain that there is no EOF marker. But it still works fine.

            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 on Modified Bases...
              Yesterday, 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-11-2024, 12:08 PM
            0 responses
            39 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 04-10-2024, 10:19 PM
            0 responses
            41 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 04-10-2024, 09:21 AM
            0 responses
            35 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 04-04-2024, 09:00 AM
            0 responses
            55 views
            0 likes
            Last Post seqadmin  
            Working...
            X