Seqanswers Leaderboard Ad

Collapse

Announcement

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

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

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


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


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

        Comment


        • #5
          No, I have only used samtools.

          Comment


          • #6
            Which version are you using?

            Comment


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


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


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


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

                    Comment

                    Latest Articles

                    Collapse

                    • seqadmin
                      Current Approaches to Protein Sequencing
                      by seqadmin


                      Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
                      04-04-2024, 04:25 PM
                    • seqadmin
                      Strategies for Sequencing Challenging Samples
                      by seqadmin


                      Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                      03-22-2024, 06:39 AM

                    ad_right_rmr

                    Collapse

                    News

                    Collapse

                    Topics Statistics Last Post
                    Started by seqadmin, 04-11-2024, 12:08 PM
                    0 responses
                    22 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 04-10-2024, 10:19 PM
                    0 responses
                    24 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 04-10-2024, 09:21 AM
                    0 responses
                    19 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 04-04-2024, 09:00 AM
                    0 responses
                    50 views
                    0 likes
                    Last Post seqadmin  
                    Working...
                    X