Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • bcftools issue

    Folks:

    I have a mouse sequencing project with multiple .bam files generated.

    samtools version 0.1.19-44428cd
    bcftools version 1.1-137-g1f79bbd (using htslib 1.1-124-g9b1cb94)

    I tried to do the following:

    samtools mpileup -g -f mm10.fa mybam.bam > mybam.bcf

    The program runs for several hours then generated a 5Gb file mybam.bcf

    However,when I tried to use
    bcftools view mybam.bcf

    it has error:

    [E::hts_hopen] fail to open file 'mybam.bcf'
    [E::hts_open] fail to open file 'mybam.bcf'
    Failed to open mybam.bcf: Success

    same error message if I use 'bcftools call -v mybam.bcf' command

    anyone has the same issue and is there a solution? the file is just there but seems the program fail to see it

  • #2
    Can you try one of the following?

    Code:
    $ bcftools view ./mybam.bcf
    or

    Code:
    $ bcftools view /path_to/mybam.bcf
    Use the bcftools included in samtools v.0.1.19.
    Last edited by GenoMax; 01-20-2015, 07:33 AM. Reason: version mismatch by OP

    Comment


    • #3
      Mixing different versions of samtools and vcftools is usually a bad idea. If you're going to use a new version of bcftools, use a new version of samtools too. That resolves problems like this most of the time.

      Comment


      • #4
        Missed the fact that OP was mixing samtools versions. Good catch Devon.

        Comment


        • #5
          Thanks for the replies, I think this is due to issue with different version and potentially different htslib ...

          downloading latest samtools and building it now...

          NGS is a beast given all process takes long time to finish

          Comment


          • #6
            using latest samtools:

            samtools mpileup -g -f mm10.fa mybam.bam > mybam.bcf

            got message: [fai_fetch_seq] The sequence "1" not found
            [fai_fetch_seq] The sequence "10" not found

            googled the error message but got no informative information, should I be concerned? mybam.bam has its mybam.bai file in the same folder...

            Comment


            • #7
              Are you sure the chromosome names in the BAM file and fasta file match?

              Comment


              • #8
                BTW, if the answer is yes, then try remaking the fasta index (samtools faidx).

                Comment


                • #9
                  Thanks, I think that is the issue here... will look into it and get back to you
                  Originally posted by dpryan View Post
                  BTW, if the answer is yes, then try remaking the fasta index (samtools faidx).

                  Comment


                  • #10
                    I'm having the same issue with
                    "[fai_fetch_seq] The sequence "1" not found"
                    across all human chromosomes when I'm running mpileup. I am about 99% certain that chr names aren't identical in both files, but I'm not sure how to fix that. Editing my human genome fasta file isn't really an option...

                    I'm on a linux system, using samtools/bcftools v1.2 and I tried remaking the fasta index already. Has anyone else had this problem before?

                    Comment


                    • #11
                      If you're fairly certain that the chromosome names differ between the files then you'll need to change one of them. Changing them in the BAM file just require "samtools view -H foo.bam", changing the names (but not the order!) to be correct, and using "samtools reheader". Alternatively, just download the matching fasta file (presumably from Ensembl or Gencode, given the error message).

                      Comment


                      • #12
                        Originally posted by dpryan View Post
                        If you're fairly certain that the chromosome names differ between the files then you'll need to change one of them. Changing them in the BAM file just require "samtools view -H foo.bam", changing the names (but not the order!) to be correct, and using "samtools reheader". Alternatively, just download the matching fasta file (presumably from Ensembl or Gencode, given the error message).
                        Thanks! I'm going to give the samtools reheader a try first!

                        Comment

                        Latest Articles

                        Collapse

                        • seqadmin
                          Essential Discoveries and Tools in Epitranscriptomics
                          by seqadmin


                          The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist on Modified Bases...
                          Yesterday, 07:01 AM
                        • 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

                        ad_right_rmr

                        Collapse

                        News

                        Collapse

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