Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • lizzi
    Junior Member
    • Apr 2014
    • 7

    samtools mpileup multiple bam files

    Hi,
    I am trying to run samtools mpileup on multiple bam files but for some reason I am getting the error "view: invalid option -- 'b'" and I end up with an empty bcf file.

    This is my code:
    samtools mpileup -uf ref.fa sample1_sorted.bam sample2_sorted.bam sample3_sorted.bam | bcftools view -bvcg - > group_var.raw.bcf

    I have indexed the reference and all bam files using samtools and all files are in the same directory. Why would the b option be invalid? If I remove all bam files except one, the analysis works.

    Thank you!
    Last edited by lizzi; 04-08-2014, 03:59 AM.
  • lizzi
    Junior Member
    • Apr 2014
    • 7

    #2
    I cannot figure out what is wrong. I get the same error if I use a single bam file as well so that is not the problem.

    Again, this is the error I get,
    " view: invalid option -- 'b'

    About: VCF/BCF conversion, view, subset and filter VCF/BCF files.
    Usage: bcftools view [options] <in.vcf.gz> [region1 [...]]"

    I have done this before with the same files and there was no issue. I cannot figure out what the problem could be. If anyone has any ideas, it would be greatly appreciated.

    Comment

    • lizzi
      Junior Member
      • Apr 2014
      • 7

      #3
      I just tried something very simple - converting a bcf file to vcf.
      bcftools view file.bcf > file.vcf and received this error
      [vcf.c:643 bcf_hdr_read] invalid BCF2 magic string: only BCFv2.2 is supported.
      Failed to open or the file not indexed: file.bcf
      Is there a problem with bcftools? All of this worked for me just yesterday, the files are all the same, so I cannot figure out what is wrong. If anyone has any idea what this could mean or what could be wrong, it would help me a lot.

      Thank you!

      Comment

      • Nilaksha
        Member
        • Mar 2014
        • 18

        #4
        Did you use picard tools at any of the steps in your workflow?

        Comment

        • lizzi
          Junior Member
          • Apr 2014
          • 7

          #5
          No, I have only used samtools.

          Comment

          • dpryan
            Devon Ryan
            • Jul 2011
            • 3478

            #6
            Which version are you using?

            Comment

            • lizzi
              Junior Member
              • Apr 2014
              • 7

              #7
              I am using version 0.1.18 on the university supercomputer. We also have 0.1.16 and 0.1.8. I have tried repeating these tasks with the other versions too, but I get the same errors.

              Comment

              • dpryan
                Devon Ryan
                • Jul 2011
                • 3478

                #8
                Strange, I can't find that error in the source code anywhere. You might try the command on a computer with a single known version of samtools (preferably the latest version, 0.1.19) to see if you can reproduce the problem.

                Comment

                • lizzi
                  Junior Member
                  • Apr 2014
                  • 7

                  #9
                  Thank you for checking for me and trying to help.
                  I actually just did that, downloaded the latest version to my computer and don't have any trouble with those commands. Perhaps the program on the supercomputer has been corrupted in some way.

                  Thank you again.

                  Comment

                  • Kulvait
                    Member
                    • Aug 2012
                    • 11

                    #10
                    Se my answer here https://www.biostars.org/p/122528/
                    Data analysis www.persmed.eu

                    Comment

                    Latest Articles

                    Collapse

                    • SEQadmin2
                      Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                      by SEQadmin2


                      I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.


                      Here are nine questions we think about, in roughly the order they matter, before...
                      Yesterday, 07:11 AM
                    • 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.
                      ...
                      06-02-2026, 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

                    ad_right_rmr

                    Collapse

                    News

                    Collapse

                    Topics Statistics Last Post
                    Started by SEQadmin2, 06-17-2026, 06:09 AM
                    0 responses
                    20 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 06-09-2026, 11:58 AM
                    0 responses
                    38 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 06-05-2026, 10:09 AM
                    0 responses
                    44 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 06-04-2026, 08:59 AM
                    0 responses
                    49 views
                    0 reactions
                    Last Post SEQadmin2  
                    Working...