Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • 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

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

    Comment


    • #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


      • #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


        • #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


          • #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

            • seqadmin
              Techniques and Challenges in Conservation Genomics
              by seqadmin



              The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

              Avian Conservation
              Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
              03-08-2024, 10:41 AM
            • seqadmin
              The Impact of AI in Genomic Medicine
              by seqadmin



              Artificial intelligence (AI) has evolved from a futuristic vision to a mainstream technology, highlighted by the introduction of tools like OpenAI's ChatGPT and Google's Gemini. In recent years, AI has become increasingly integrated into the field of genomics. This integration has enabled new scientific discoveries while simultaneously raising important ethical questions1. Interviews with two researchers at the center of this intersection provide insightful perspectives into...
              02-26-2024, 02:07 PM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by seqadmin, 03-14-2024, 06:13 AM
            0 responses
            32 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 03-08-2024, 08:03 AM
            0 responses
            71 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 03-07-2024, 08:13 AM
            0 responses
            80 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 03-06-2024, 09:51 AM
            0 responses
            68 views
            0 likes
            Last Post seqadmin  
            Working...
            X