Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • linp5
    Member
    • Aug 2014
    • 14

    error when running samtools mpileup and bcftools

    Hi all

    I run the code below which is modified from [1]

    samtools mpileup -uf wg.fa ERR000589.srt.bam | /home/linp/linpDisk4/DataSeq/bcftools/bcftools call -mv -Oz

    But I encounter such a error:

    [mpileup] 1 samples in 1 input files
    <mpileup> Set max per-file depth to 8000
    [vcf.c:753 bcf_hdr_read] invalid BCF2 magic string: only BCFv2.2 is supported.
    Failed to open: -


    but I can successfully run samtools mpileup separately:
    samtools mpileup -f wg.fa ERR000589.srt.bam > ERR000589.bcf

    the ERR000589.bcf file looks as:
    chr10 60173 T 1 ^Z. H
    chr10 60174 T 1 . H
    chr10 60175 G 0
    chr10 60176 G 1 . /
    chr10 60177 G 1 . I
    chr10 60178 T 1 . .
    chr10 60179 T 1 . 8
    chr10 60180 G 1 . G
    chr10 60181 G 1 . I

    Could anyone please give me some tips about what happened?


    [1] https://github.com/samtools/bcftools/wiki/HOWTOs
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    Try:
    Code:
     samtools mpileup -ugf wg.fa ERR000589.srt.bam | /home/linp/linpDisk4/DataSeq/bcftools/bcftools call -mv -Oz

    Comment

    • linp5
      Member
      • Aug 2014
      • 14

      #3
      Thank you dpryan!

      But the problem still exists:

      linp@wuserver:~/linpDisk4/DataSeq$ samtools mpileup -ugf wg.fa ERR000589.srt.bam | /home/linp/linpDisk4/DataSeq/bcftools/bcftools call -mv -Oz
      [mpileup] 1 samples in 1 input files
      <mpileup> Set max per-file depth to 8000
      [vcf.c:753 bcf_hdr_read] invalid BCF2 magic string: only BCFv2.2 is supported.
      Failed to open: -

      Comment

      • dpryan
        Devon Ryan
        • Jul 2011
        • 3478

        #4
        My only guess is that you have different versions of samtools and bcftools (make sure you're using the tagged 1.0 version of both if you got this from github). If that's not the case and no one else is able to give you an answer here then you should post this to the samtools-help email list.

        Comment

        • linp5
          Member
          • Aug 2014
          • 14

          #5
          Thank you dpryan!

          the versions are:

          Program: bcftools (Tools for variant calling and manipulating VCFs and BCFs)
          Version: 1.0-15-gc15888a (using htslib 1.0-2-g1903fd4)
          Program: samtools (Tools for alignments in the SAM format)
          Version: 0.1.19-44428cd


          Do you think they are in-compatible ?

          Comment

          • dpryan
            Devon Ryan
            • Jul 2011
            • 3478

            #6
            Ah, yeah, you need to either use the version of bcftools that came with samtools 0.1.19 or use the newer version of samtools available here.

            Comment

            Latest Articles

            Collapse

            • SEQadmin2
              From Collection to Sequencing: Why Sample Preparation and Preservation Define Sequencing Data
              by SEQadmin2


              Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.


              The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
              ...
              Yesterday, 10:05 AM
            • SEQadmin2
              Single-Cell Sequencing at an Inflection Point: Early Impacts of New Platforms and Emerging Trends
              by SEQadmin2


              With the launch of new single-cell sequencing platforms in 2026, the field stands at an exciting inflection point. This article surveys the most impactful advances in the field and discusses how they’re reshaping research in cancer, immunology, and beyond.


              Introduction

              Single-cell sequencing technologies have undergone remarkable advances over the past decade, transitioning from low-throughput experimental approaches to highly scalable platforms capable of...
              05-22-2026, 06:42 AM
            • SEQadmin2
              Environmental Genomics in the Age of NGS: From Microbes to Conservation Strategies
              by SEQadmin2

              Studying ecosystems means dealing with complex, multi-species communities that are hard to observe at scale. This complexity, however, hides many important questions to be answered, from how biogeochemical cycles work and how climate change can affect species distribution to how conservation strategies can work best.


              Genomics, particularly since the expansion of NGS, has transformed ecosystem ecology. By sequencing environmental DNA, we can now assess biodiversity without direct...
              05-06-2026, 09:04 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, Yesterday, 12:03 PM
            0 responses
            19 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, Yesterday, 11:40 AM
            0 responses
            14 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 05-28-2026, 11:40 AM
            0 responses
            29 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 05-26-2026, 10:12 AM
            0 responses
            31 views
            0 reactions
            Last Post SEQadmin2  
            Working...