Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bair
    Member
    • Jan 2010
    • 65

    #1

    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
  • lh3
    Senior Member
    • Feb 2008
    • 686

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

    Comment

    • bair
      Member
      • Jan 2010
      • 65

      #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

      • rahilsethi
        Member
        • May 2010
        • 22

        #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

        • rahilsethi
          Member
          • May 2010
          • 22

          #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

          • swbarnes2
            Senior Member
            • May 2008
            • 910

            #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

            • SEQadmin2
              New Genomics Technologies Take Aim at Long-Standing Limits
              by SEQadmin2


              Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

              We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
              ...
              Today, 10:25 AM
            • SEQadmin2
              How Immunogenomics Decodes Immunity’s Genetic Blueprint
              by SEQadmin2




              The immune system’s power comes from its genetic diversity, allowing myriad threats to be neutralized through first recognizing foreign antigens. That diversity is also what makes the immune system so difficult to study. Recent advances in sequencing technology and computational biology, however, are giving researchers new tools to understand immune responses and immune-related diseases in greater detail.

              This convergence of genetics, immunology, and computation...
              09-01-2026, 05:41 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, 09-25-2026, 09:06 AM
            0 responses
            26 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 09-23-2026, 11:05 AM
            0 responses
            22 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 09-18-2026, 11:37 AM
            1 response
            45 views
            0 reactions
            Last Post pekgio
            by pekgio
             
            Started by SEQadmin2, 09-16-2026, 10:23 AM
            1 response
            55 views
            0 reactions
            Last Post pekgio
            by pekgio
             
            Working...