Unconfigured Ad

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

    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

                          • 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:08 AM
                          0 responses
                          7 views
                          0 reactions
                          Last Post SEQadmin2  
                          Started by SEQadmin2, 06-30-2026, 05:37 AM
                          0 responses
                          12 views
                          0 reactions
                          Last Post SEQadmin2  
                          Started by SEQadmin2, 06-26-2026, 11:10 AM
                          0 responses
                          20 views
                          0 reactions
                          Last Post SEQadmin2  
                          Started by SEQadmin2, 06-17-2026, 06:09 AM
                          0 responses
                          54 views
                          0 reactions
                          Last Post SEQadmin2  
                          Working...