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
                      Cancer Drug Resistance: The Lingering Barrier to Rising Survival
                      by SEQadmin2



                      Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

                      There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
                      Today, 05:17 AM
                    • GATTACAT
                      Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                      by GATTACAT
                      Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
                      07-01-2026, 11:43 AM
                    • 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...
                      06-18-2026, 07:11 AM

                    ad_right_rmr

                    Collapse

                    News

                    Collapse

                    Topics Statistics Last Post
                    Started by SEQadmin2, Yesterday, 11:05 AM
                    0 responses
                    7 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 07-02-2026, 11:08 AM
                    0 responses
                    29 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 06-30-2026, 05:37 AM
                    0 responses
                    28 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 06-26-2026, 11:10 AM
                    0 responses
                    27 views
                    0 reactions
                    Last Post SEQadmin2  
                    Working...