Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • michalkovac
    Member
    • Nov 2010
    • 13

    SAMTOOLS mpileup crash

    Hi,

    anyone has an indea why I'm getting this error message?
    In-----
    samtools mpileup -gf ./Reference_Indexed/Human36.fa ./2007.0214 B.normal.merged.out.bam > normal.test.bcf

    It generates sort of 3GB of data when the crash comes in.
    Out----
    mpileup] 1 samples in 1 input files
    <mpileup> Set max per-sample depth to 8000
    sh: line 24: 7723 Segmentation fault

    It also does not parse the whole bam file when mpileup is piped into bcftools command as is suggested in the manual:
    samtools mpileup -ugf ref.fa aln.bam | bcftools view -bvcg - > var.raw.bcf

    BTW, pileup does not have any problems with the bam file. It has been generated by SAMTOOLS using SAM output of Stampy-BWA aligners.

    Many thanks for any suggestions.
  • KNS
    Member
    • Aug 2010
    • 17

    #2
    There has been a few issues with the output generated by samtools mpileup - see a couple of recent threads including my post "Unstable output from mpileup/samtools" here in the bioinformatics forum. There do not seem to be good answers to this issue for now, but I am hopeful the developer is having a look.

    Comment

    • lh3
      Senior Member
      • Feb 2008
      • 686

      #3
      @michalkovac

      try 0.1.11; if that does not help, could you send me the alignment around the point it breaks? Thanks.

      @KNS

      It is thanksgivings in US. Please give me time. Mpileup has been used for tera bytes of data. It has not segfaulted so far at my hand. There must be something I have not considered in your data. But I can only help if you share me with your data (I cannot reproduce the problem with zee's example). Thank you.
      Last edited by lh3; 11-25-2010, 08:02 PM.

      Comment

      • michalkovac
        Member
        • Nov 2010
        • 13

        #4
        Thanks lh3. I've updated samtools to the latest version though is still crashing. As to the point where the crash actually happens: It completes chr13_random, but does not start assembling chr14.

        Should it help if I send you the link to my bam file?

        Many thanks for you time.
        M.

        Comment

        • lh3
          Senior Member
          • Feb 2008
          • 686

          #5
          Yes. That would be great. Many thanks.

          Comment

          • michalkovac
            Member
            • Nov 2010
            • 13

            #6
            Originally posted by lh3 View Post
            Yes. That would be great. Many thanks.
            Link has been posted to your mail. Many thanks.
            M.

            Comment

            • lh3
              Senior Member
              • Feb 2008
              • 686

              #7
              Please try the latest SVN:

              svn co https://samtools.svn.sourceforge.net...trunk/samtools

              Your example is really helpful. Thank you very much!

              Comment

              • lh3
                Senior Member
                • Feb 2008
                • 686

                #8
                0.1.12 is released, mainly for this bug fix.

                Comment

                • michalkovac
                  Member
                  • Nov 2010
                  • 13

                  #9
                  ^^ many thanks. now it seems to work.

                  Comment

                  • LisaM
                    Junior Member
                    • Jan 2011
                    • 2

                    #10
                    Hi,

                    I'm having a similar problem with mpileup on the newest revision (397).

                    In:
                    samtools mpileup -C50 -gf ref.fasta in.bam > out.bcf

                    Out:
                    [mpileup] 1 samples in 1 input files
                    <mpileup> Set max per-sample depth to 8000
                    Segmentation fault

                    The tool has no problem with the bam file if the fasta file is not included (ie. no -f), so the bam file is ok.

                    However, the default instructions provided in the mpileup manual does work:
                    samtools mpileup -ugf ref.fasta in.bam | bcftools view -bvcg - > var.raw.bcf

                    Any help on this would be much appreciated. Please let me know if you need any additional information.

                    Thanks in advance,
                    Lisa


                    -- UPDATE --

                    I've rerun mpileup a couple of times since, and it looks like it's just the -g or -u tag that's seg faulting. At mpileup -C50 -f, everything seems to run fine. And I also realized that although the default command ran, it did not complete properly, as the resulting .bcf file was not complete.

                    Hope this helps!
                    Last edited by LisaM; 01-14-2011, 04:58 PM.

                    Comment

                    • jmt
                      Junior Member
                      • Jun 2011
                      • 5

                      #11
                      segmentation fault for mpileup

                      I am having troubles getting 'mpileup' to run correctly w/o a segmentation fault.

                      I would like to run 'mpileup' on 2 bam files on a set of sites.

                      I ran the following and got the following error.

                      samtools mpileup -f $INDEX -l $LIST_OF_SITES $BAM1 $BAM2
                      [bam_header_read] EOF marker is absent. The input is probably truncated.
                      [mpileup] 1 samples in 2 input files
                      <mpileup> Set max per-file depth to 8000
                      Segmentation fault

                      However, when I ran on just 1 bam file, it seems to work just fine.

                      samtools mpileup -f $INDEX -l $LIST_OF_SITES $BAM1
                      [mpileup] 1 samples in 1 input files
                      <mpileup> Set max per-file depth to 8000
                      Y 10645915 T 2 Aa IF
                      Y 10646057 G 3 Aaa A>,
                      Y 11726507 T 1 . <
                      Y 11771361 G 1 a F
                      Y 11929118 T 34 ..,,,,,,.,.......,..,.,..,,...,... B?IIA?DFFAFI6DFFFFFF8FDEBAGFHI9IFI
                      Y 19612396 G 1 . 3
                      Y 19612484 G 1 A 3
                      Y 19612796 G 1 . I

                      Could someone tell me what stupid mistake I'm making?

                      Thanks in advance!

                      Comment

                      • michalkovac
                        Member
                        • Nov 2010
                        • 13

                        #12
                        Originally posted by jmt View Post
                        samtools mpileup -f $INDEX -l $LIST_OF_SITES $BAM1 $BAM2
                        [bam_header_read] EOF marker is absent. The input is probably truncated.
                        [mpileup] 1 samples in 2 input files
                        <mpileup> Set max per-file depth to 8000
                        Segmentation fault
                        I'd suggest you run Picard ValidateSamFile on your BAMs. If it doesn't find EOF, some of your SAM/BAM processing steps have not been fully completed.

                        Comment

                        • jmt
                          Junior Member
                          • Jun 2011
                          • 5

                          #13
                          Hi michalkovac,

                          These bam files are the 1000G alignment files from the pilot study. Will running Picard ValidateSamFile correct the EOF error?

                          At the moment I've resorted to running mpileup on the bam files individually one by one and then writing my own script to combine the pileup output. This way seems to work thus far.

                          Comment

                          • rna-analys
                            Junior Member
                            • Nov 2011
                            • 1

                            #14
                            samtools mpileup -d8000 will solve the problem

                            Comment

                            • Idon_Sokolov
                              Junior Member
                              • Jan 2017
                              • 2

                              #15
                              Hello, I´m having the same problem. I´m analysing exome data obtained from exome sequencing. The only step in order to finish my analysis is getting the consensus calls from my samples. This is the command that I´m putting in the console:

                              samtools mpileup -ugf Homo_sapiens.GRCh38.dna.alt.fa.gz Illumina9.0.0_bwamem.sort.rmdup.bam Illumina9.0.0_bwamem.sort.rmdup.readfiltered.bam | bcftools call -vmO z -o illumina9

                              But this is my result:

                              [main] Unrecognized command.
                              [mpileup] 1 samples in 2 input files
                              <mpileup> Set max per-file depth to 8000

                              Please, help me.

                              Thank you for your time.
                              Best regard.

                              Comment

                              Latest Articles

                              Collapse

                              • 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...
                                Today, 07:11 AM
                              • SEQadmin2
                                From Collection to Sequencing: Why Sample Preparation and Preservation Define Sequencing Data
                                by SEQadmin2


                                Data variability is still an issue in sequencing technologies despite the advances in reproducibility and accuracy of these platforms. But the problem does not originate in the sequencing itself, but in the previous steps, before the sample reaches the sequencer.


                                The first step is collection, followed by preservation and sample preparation for analysis. Most scientists overlook those steps, but not being careful might just be skewing the experiment’s results.
                                ...
                                06-02-2026, 10:05 AM
                              • SEQadmin2
                                Single-Cell Sequencing at an Inflection Point: Early Impacts of New Platforms and Emerging Trends
                                by SEQadmin2


                                With the launch of new single-cell sequencing platforms in 2026, the field stands at an exciting inflection point. This article surveys the most impactful advances in the field and discusses how they’re reshaping research in cancer, immunology, and beyond.


                                Introduction

                                Single-cell sequencing technologies have undergone remarkable advances over the past decade, transitioning from low-throughput experimental approaches to highly scalable platforms capable of...
                                05-22-2026, 06:42 AM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by SEQadmin2, Yesterday, 06:09 AM
                              0 responses
                              16 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-09-2026, 11:58 AM
                              0 responses
                              37 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-05-2026, 10:09 AM
                              0 responses
                              42 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-04-2026, 08:59 AM
                              0 responses
                              49 views
                              0 reactions
                              Last Post SEQadmin2  
                              Working...