SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
samtools faidx Segmentation fault baohua100 Bioinformatics 19 04-19-2016 07:09 AM
Segmentation fault with samtools rmdup Azazel Bioinformatics 1 09-05-2013 08:48 AM
Segmentation fault (core dumped) at contig step during SOAP denovo assembly tangzhonghui Bioinformatics 1 10-09-2012 05:32 PM
samtools mpileup segmentation fault adrian Bioinformatics 8 10-05-2012 07:17 AM
[Velvet,assembly] core dumped occured by runnning velvet matador3000 De novo discovery 0 12-17-2011 07:31 AM

Reply
 
Thread Tools
Old 03-12-2012, 01:26 PM   #1
hanleng
Member
 
Location: Houston, TX

Join Date: Mar 2012
Posts: 15
Default 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.
hanleng is offline   Reply With Quote
Old 03-12-2012, 02:09 PM   #2
swbarnes2
Senior Member
 
Location: San Diego

Join Date: May 2008
Posts: 912
Default

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.
swbarnes2 is offline   Reply With Quote
Old 03-12-2012, 02:52 PM   #3
hanleng
Member
 
Location: Houston, TX

Join Date: Mar 2012
Posts: 15
Default

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.
hanleng is offline   Reply With Quote
Old 03-12-2012, 03:22 PM   #4
dpryan
Devon Ryan
 
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,480
Default

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.
dpryan is offline   Reply With Quote
Old 03-12-2012, 03:49 PM   #5
swbarnes2
Senior Member
 
Location: San Diego

Join Date: May 2008
Posts: 912
Default

Quote:
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.

Quote:
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?
swbarnes2 is offline   Reply With Quote
Old 03-23-2012, 02:37 PM   #6
hanleng
Member
 
Location: Houston, TX

Join Date: Mar 2012
Posts: 15
Default

Thanks for the reply. The samtools view completes properly. What do you mean by "samtools pileup in gdb"?
hanleng is offline   Reply With Quote
Old 03-23-2012, 02:42 PM   #7
hanleng
Member
 
Location: Houston, TX

Join Date: Mar 2012
Posts: 15
Default

Quote:
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.
hanleng is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 06:25 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO