Seqanswers Leaderboard Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • hanleng
    Member
    • Mar 2012
    • 15

    Segmentation fault (core dumped) in Samtools

    Hi, All,

    I want to map the RNA-seq BMA files back to the reference, and I used the samtools pileup command. It always shows the error "Segmentation fault (core dumped)".

    It should not be the problem in the reference genome, because I have tried "fold" command to format the reference genome, as well as the "faidx" in samtools. They did not work. Strangely, for different BAM files, the pileup sometimes shows the error at the very beginning, some times stopped at chr6, while some other times shows the errors at chr10 or later chromosomes.

    My command is "samtools view -u Inputfile (BAM) | samtools pileup -vcf hg19.fa - > output". However, when I tried Partek, it runs very well.

    Anyone has any idea what is the problem with these BAM files? What I should do to fix these bugs/modify the BAM files?

    Thanks a lot.
  • swbarnes2
    Senior Member
    • May 2008
    • 910

    #2
    I'm not sure quite what you want to do here. If you have a .bam file, isn't it already mapped? Pileup won't map anything for you, and I'm not sure it takes .sam files, which is what you are giving it.

    Pileup is also deprecated. mpileup is the current version of that bit of code.

    Comment

    • hanleng
      Member
      • Mar 2012
      • 15

      #3
      Thanks for the reply.

      Actually, I want to call mutations from BAM files against reference genome, and pileup/mpileup can generate a list of positions that is different between samples and reference genome.

      No matter I used pileup or mpileup, the problem is always there.

      My command in pileup is "samtools view -u Inputfile (BAM) | samtools pileup -vcf hg19.fa - > output ", while the command for mpileup is "samtools mpileup -uf hg19.fa BAM | bcftools view -bvcg -> output".

      Thanks again.

      Comment

      • dpryan
        Devon Ryan
        • Jul 2011
        • 3478

        #4
        With pileup, is your BAM file sorted? If so, try outputing the samtools view command to a file to ensure that the problem isn't there. If that completes properly, run the samtools pileup in gdb to get an idea where the segfault is (you might also compile samtools with debugging). That way you can provide a proper bug report if this is an issue with samtools.

        Comment

        • swbarnes2
          Senior Member
          • May 2008
          • 910

          #5
          Originally posted by hanleng View Post
          Thanks for the reply.

          Actually, I want to call mutations from BAM files against reference genome, and pileup/mpileup can generate a list of positions that is different between samples and reference genome.
          Sure, but that's not mapping.

          My command in pileup is "samtools view -u Inputfile (BAM) | samtools pileup -vcf hg19.fa - > output ", while the command for mpileup is "samtools mpileup -uf hg19.fa BAM | bcftools view -bvcg -> output".
          Forget pileup. First thing to check with mpileup is that it made the fasta index properly. You can make it yourself with samtools faidx. Does samtools faidx finish without an error? Compare chromosome names in your .sam with those in your fasta file. Are they the same?

          Comment

          • hanleng
            Member
            • Mar 2012
            • 15

            #6
            Thanks for the reply. The samtools view completes properly. What do you mean by "samtools pileup in gdb"?

            Comment

            • hanleng
              Member
              • Mar 2012
              • 15

              #7
              Originally posted by swbarnes2 View Post
              Sure, but that's not mapping.



              Forget pileup. First thing to check with mpileup is that it made the fasta index properly. You can make it yourself with samtools faidx. Does samtools faidx finish without an error? Compare chromosome names in your .sam with those in your fasta file. Are they the same?
              fadix works well, and chromosome name is the same between reference genomes and BAM files.

              Comment

              Latest Articles

              Collapse

              • seqadmin
                Pathogen Surveillance with Advanced Genomic Tools
                by seqadmin




                The COVID-19 pandemic highlighted the need for proactive pathogen surveillance systems. As ongoing threats like avian influenza and newly emerging infections continue to pose risks, researchers are working to improve how quickly and accurately pathogens can be identified and tracked. In a recent SEQanswers webinar, two experts discussed how next-generation sequencing (NGS) and machine learning are shaping efforts to monitor viral variation and trace the origins of infectious...
                03-24-2025, 11:48 AM
              • seqadmin
                New Genomics Tools and Methods Shared at AGBT 2025
                by seqadmin


                This year’s Advances in Genome Biology and Technology (AGBT) General Meeting commemorated the 25th anniversary of the event at its original venue on Marco Island, Florida. While this year’s event didn’t include high-profile musical performances, the industry announcements and cutting-edge research still drew the attention of leading scientists.

                The Headliner
                The biggest announcement was Roche stepping back into the sequencing platform market. In the years since...
                03-03-2025, 01:39 PM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by seqadmin, 03-20-2025, 05:03 AM
              0 responses
              41 views
              0 reactions
              Last Post seqadmin  
              Started by seqadmin, 03-19-2025, 07:27 AM
              0 responses
              51 views
              0 reactions
              Last Post seqadmin  
              Started by seqadmin, 03-18-2025, 12:50 PM
              0 responses
              38 views
              0 reactions
              Last Post seqadmin  
              Started by seqadmin, 03-03-2025, 01:15 PM
              0 responses
              193 views
              0 reactions
              Last Post seqadmin  
              Working...