Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • samtools mpileup floating point error

    Hi All,
    I am having trouble with mpileup today on samtools.

    $ samtools mpileup -uf human_g1k_v37.fasta input.recal.bam > input.variants.raw

    [mpileup] 1 samples in 1 input files
    <mpileup> Set max per-file depth to 8000
    Floating point exception


    Any ideas on this floating point exception error?

  • #2
    Hi,

    I experienced the same error recently on our linux server with samtools 0.1.16 and 0.1.17 (including the lates build). The bam files are ok (checked with Picard). Interestingly, this command (again different samtools versions) runs smoothly on an iMac machine? Can someone give a hint to a solution? Any help appreciated!

    The bam files were created as follows (on the linux/red hat server):
    bwa aln -I -n 1 -t 10 g1k.fasta in.fastq > out.sai
    bwa samse g1k.fasta out.sai in.fastq -f myfile.sam
    samtools view -bhS myfile.sam -o myfile.bam
    samtools sort myfile.bam myfile_sorted
    samtools index myfile_sorted.bam

    bwa-0.5.9-r16
    samtools-0.1.17 (0.1.17)

    Comment


    • #3
      I encountered the same problem with samtools version 1.13 to 1.17.

      I found it can be solved by replacing the numeric chromosome names 1..22 in GRCh37 with chr1..chr22 within the bam file header.

      Comment


      • #4
        Also getting this error with samtools 0.1.17 and 0.1.18

        Hi,
        I'm running samtools on a 64bit linux server after compiling the tool on this server using make (no issues during the compilation).

        I'm getting the float point error and it happens even if I don't provide any input .bam files:

        samtools mpileup -f Libraries/hg19/hg19.fa
        [mpileup] 0 samples in 0 input files
        Floating point exception

        It does also happen when I provide .bam files - making the tool unusable.

        The hg19.fa has chromosome names "chr1", "chr2", etc. so the chromosome name work-around mentioned above didn't work in my case.

        However, samtools vs. 0.1.12 does work both with and without input .bam files (it was compiled on this same server).

        Any help or work arounds would be much appreciated.

        -Ben

        Ps. I also tried regenerating the .fai file but it didn't help, and also checked for dependency issues but at first glance things look alright:

        ldd ./samtools
        libncurses.so.5 => /usr/lib64/libncurses.so.5 (0x00000039a8600000)
        libm.so.6 => /lib64/libm.so.6 (0x0000003995800000)
        libz.so.1 => /usr/lib64/libz.so.1 (0x0000003996400000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003995400000)
        libdl.so.2 => /lib64/libdl.so.2 (0x0000003995c00000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003995000000)

        Comment


        • #5
          Wonderful

          I encountered the same problem and I solved it with the help of the thread posted by Xueya Zhou. Thank you very much


          Originally posted by Xueya Zhou View Post
          I encountered the same problem with samtools version 1.13 to 1.17.

          I found it can be solved by replacing the numeric chromosome names 1..22 in GRCh37 with chr1..chr22 within the bam file header.

          Comment


          • #6
            I met the same error. I found it may be caused by the incorrect index file (.fai). Use 'samtools index' to re-build index for the reference file solved the problem in my case.

            Comment


            • #7
              mpileup floating point error gatk fai file problem

              Yes it seems to be fai problem for me too. ie when i use new fai file it works ok . I think it has something to do with the format of the Fai file GATK builds automatically if you let it.

              Comment


              • #8
                Originally posted by yanlinlin82 View Post
                I met the same error. I found it may be caused by the incorrect index file (.fai). Use 'samtools index' to re-build index for the reference file solved the problem in my case.
                Thanks a lot for this solution. Only I think you mean "samtools faidx" and not "samtools index".

                Comment


                • #9
                  samtools mpileup floating point error

                  Originally posted by genomicist View Post
                  Thanks a lot for this solution. Only I think you mean "samtools faidx" and not "samtools index".
                  Thank you, that saved me a lot of consternation when it came time for me to re-index my BAM files.

                  Comment


                  • #10
                    Hi
                    I am having trouble with vcfutils.pl command

                    I used the follwing command

                    samtools view mpileup -uf ref.fa aln.bam | bcftools view -bvcg - > raw.bcf

                    and I have the raw.bcf

                    But when I used the following command to build concensus

                    bcftools view raw.bcf | vcfutils.pl vcf2fq > cons.fq

                    Then I have the fowwing error message

                    vcfutils.pl command not found

                    I need help
                    Ashutosh Das
                    PhD fellow
                    Molecular Genetics and System Biology
                    Department of Molecular Biology and Genetics
                    Aarhus University, Blichers Alle 20, Postbox 50
                    8830, Tjele, Denmark

                    Comment


                    • #11
                      Originally posted by drashu_11 View Post
                      Hi
                      I am having trouble with vcfutils.pl command

                      I used the follwing command

                      samtools view mpileup -uf ref.fa aln.bam | bcftools view -bvcg - > raw.bcf

                      and I have the raw.bcf

                      But when I used the following command to build concensus

                      bcftools view raw.bcf | vcfutils.pl vcf2fq > cons.fq

                      Then I have the fowwing error message

                      vcfutils.pl command not found

                      I need help

                      Ignore the quoted message I could manage that problem
                      Ashutosh Das
                      PhD fellow
                      Molecular Genetics and System Biology
                      Department of Molecular Biology and Genetics
                      Aarhus University, Blichers Alle 20, Postbox 50
                      8830, Tjele, Denmark

                      Comment


                      • #12
                        Originally posted by Xueya Zhou View Post
                        I encountered the same problem with samtools version 1.13 to 1.17.

                        I found it can be solved by replacing the numeric chromosome names 1..22 in GRCh37 with chr1..chr22 within the bam file header.
                        This may be a silly question, but I don't get how you would change the chromosome names in bam files...they are binary, did you mean you changed the headers in the sam files?

                        Comment


                        • #13
                          Originally posted by drashu_11 View Post
                          Ignore the quoted message I could manage that problem
                          Hi,
                          I am new to bioinformatics and have run into the same problem. Could you tell me how you solved it?

                          Thanks!

                          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