Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Hkins552
    Member
    • Jun 2011
    • 18

    #1

    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?
  • DrDolittle
    Junior Member
    • Oct 2010
    • 3

    #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

    • Xueya Zhou
      Junior Member
      • Nov 2010
      • 1

      #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

      • bw.
        Member
        • Mar 2012
        • 21

        #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

        • wencanh
          Junior Member
          • Mar 2012
          • 5

          #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

          • yanlinlin82
            Junior Member
            • Nov 2010
            • 1

            #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

            • kingsalex
              member
              • Nov 2010
              • 4

              #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

              • genomicist
                Member
                • Jan 2011
                • 12

                #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

                • chung2000
                  Junior Member
                  • Jan 2013
                  • 1

                  #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

                  • drashu_11
                    Junior Member
                    • Jan 2013
                    • 2

                    #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

                    • drashu_11
                      Junior Member
                      • Jan 2013
                      • 2

                      #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

                      • dGho
                        Member
                        • Jan 2013
                        • 43

                        #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

                        • patrickc01
                          Junior Member
                          • Mar 2014
                          • 1

                          #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

                          • SEQadmin2
                            Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
                            by SEQadmin2



                            CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

                            Despite this, “CRISPR helped turn genome editing from a specialized technique into
                            ...
                            07-31-2026, 11:01 AM
                          • SEQadmin2
                            Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
                            by SEQadmin2


                            Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

                            The systematic characterization of the human proteome has
                            ...
                            07-20-2026, 11:48 AM
                          • SEQadmin2
                            Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
                            by SEQadmin2



                            Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
                            ...
                            07-09-2026, 11:10 AM

                          ad_right_rmr

                          Collapse

                          News

                          Collapse

                          Topics Statistics Last Post
                          Started by SEQadmin2, 07-31-2026, 02:55 AM
                          0 responses
                          17 views
                          0 reactions
                          Last Post SEQadmin2  
                          Started by SEQadmin2, 07-24-2026, 12:17 PM
                          0 responses
                          15 views
                          0 reactions
                          Last Post SEQadmin2  
                          Started by SEQadmin2, 07-23-2026, 11:41 AM
                          0 responses
                          13 views
                          0 reactions
                          Last Post SEQadmin2  
                          Started by SEQadmin2, 07-20-2026, 11:10 AM
                          0 responses
                          25 views
                          0 reactions
                          Last Post SEQadmin2  
                          Working...