SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
bwa sampe segmentation fault papori Bioinformatics 5 09-22-2013 11:05 PM
BWA Alignment Segmentation Fault adkostic Bioinformatics 24 09-09-2013 01:52 AM
segmentation fault in BWA sampe papori Illumina/Solexa 0 07-28-2011 09:12 AM
bwa aln Segmentation fault DNAjunk Bioinformatics 4 03-02-2011 07:28 AM
BWA Segmentation Fault (aln) raela Bioinformatics 0 05-18-2010 07:41 AM

Reply
 
Thread Tools
Old 02-24-2010, 12:14 AM   #41
seq_GA
Senior Member
 
Location: Asiana

Join Date: Feb 2009
Posts: 124
Default

Hi,
I am also trying to map about 12 million Illumina reads against human genome. bwa-0.5.6 version.

I could do ./bwa aln ....

But I get segmentation fault when I try to use ./bwa samse command. My input file is sequence.txt in fatsq format that comes from Solexa pipeline. How do I overcome this problem? Thanks.
seq_GA is offline   Reply With Quote
Old 02-24-2010, 12:20 AM   #42
francois.sabot
Member
 
Location: France

Join Date: Dec 2009
Posts: 41
Default

Quote:
Originally Posted by seq_GA View Post
Hi,
I am also trying to map about 12 million Illumina reads against human genome. bwa-0.5.6 version.

I could do ./bwa aln ....

But I get segmentation fault when I try to use ./bwa samse command. My input file is sequence.txt in fatsq format that comes from Solexa pipeline. How do I overcome this problem? Thanks.
What is your system ? Can you send the terminal output when you type 'dmesg' after the Seg fault ?
__________________
Francois Sabot, PhD

Be realistic. Demand the Impossible.
www.wikiposon.org
francois.sabot is offline   Reply With Quote
Old 02-25-2010, 10:40 AM   #43
javijevi
Member
 
Location: Spain

Join Date: Jan 2010
Posts: 38
Default

Quote:
Originally Posted by lh3 View Post
You may try solid2fastq.pl here. The "-1" issue should be resolved, although I have not tested this on real data and I do not know if segfault is caused by other issues.

http://bio-bwa.svn.sourceforge.net/v...pl?revision=29
I think I've found a minor bug in an error message raised by solid2fastq.pl script distributed with bwa when it founds a mismatching name in the .csfasta and .qual input files:

The following line

die(qq/** unmatched read name: '$_' != '$_'\n/) unless ($_ eq $t);

must be

die(qq/** unmatched read name: '$_' != '$t'\n/) unless ($_ eq $t);
javijevi is offline   Reply With Quote
Old 02-25-2010, 07:16 PM   #44
yenhuahuang1
Junior Member
 
Location: Taiwan

Join Date: Jan 2010
Posts: 7
Default solid2fastq.pl: The first -1 in the quality line is not resolved yet.

Quote:
Originally Posted by lh3 View Post
You may try solid2fastq.pl here. The "-1" issue should be resolved, although I have not tested this on real data and I do not know if segfault is caused by other issues.

http://bio-bwa.svn.sourceforge.net/v...pl?revision=29

In addition, there are bugs in bwa-0.5.5. You'd better use the SVN version, which will become 0.5.6 in the near future.

The new solid2fastq.pl may not be working when the first quality value is -1. I suggest that the order of the following two lines should reversed.

=========
s/^(\d+)\s*//;
s/-1\b/0/eg;
=========

Last edited by yenhuahuang1; 02-25-2010 at 07:22 PM.
yenhuahuang1 is offline   Reply With Quote
Old 11-25-2010, 10:03 PM   #45
Azazel
Member
 
Location: Japan

Join Date: Oct 2010
Posts: 52
Default convert to sequence coordinate... Segmentation fault

I am using bwa Version: 0.5.8 (r1442) on CentOS, a machine with lots of RAM.

I downloaded the unmasked mouse genome from
http://hgdownload.cse.ucsc.edu/golde...chromFa.tar.gz

I then created an index for bwa like this:
Code:
bwa index -a bwtsw mm9.fa
I then aligned my illumina short reads agains the genome and get sai files. My goal is bed files, so I want to convert sai -> sam -> bam -> bed to get there.

When I try to convert from sai to sam like this:
Code:
bwa samse SOMEPATH/mm9.fa stuff.sai stuff.fq > stuff.sam
I get:
convert to sequence coordinate... Segmentation fault

But, I have done the very same procedure with different illumina short read sequences (even higher amount of data) for a different organism (rat), and it went OK.

Any help would be very much appreciated. (I am afraid I am not able to patch bwa, though)
Azazel is offline   Reply With Quote
Old 12-06-2010, 12:22 AM   #46
xinwu
Member
 
Location: Beijing

Join Date: Jul 2010
Posts: 33
Default

Quote:
Originally Posted by Azazel View Post
I am using bwa Version: 0.5.8 (r1442) on CentOS, a machine with lots of RAM.

I downloaded the unmasked mouse genome from
http://hgdownload.cse.ucsc.edu/golde...chromFa.tar.gz

I then created an index for bwa like this:
Code:
bwa index -a bwtsw mm9.fa
I then aligned my illumina short reads agains the genome and get sai files. My goal is bed files, so I want to convert sai -> sam -> bam -> bed to get there.

When I try to convert from sai to sam like this:
Code:
bwa samse SOMEPATH/mm9.fa stuff.sai stuff.fq > stuff.sam
I get:
convert to sequence coordinate... Segmentation fault

But, I have done the very same procedure with different illumina short read sequences (even higher amount of data) for a different organism (rat), and it went OK.

Any help would be very much appreciated. (I am afraid I am not able to patch bwa, though)
I run into the same error with you when I use another genome. No ideas...
Another BWA run at background over 70 hours when generate SAM file from SAI file for transcriptome.
xinwu is offline   Reply With Quote
Old 02-20-2011, 07:40 PM   #47
hrajasim
Member
 
Location: DC Metro

Join Date: Aug 2009
Posts: 27
Default segmentation fault - solved for me

Folks, I came to this thread looking for an answer to the segmentation fault that I too encountered a couple weeks ago. However, I did not find an answer then - Upon investigation, here is what I found:

The bwa aln command when run with a "nohup" and &, inserted the bwa output trace such as:
Code:
[bwa_aln_core] convert to sequence coordinate... 0.43 sec
[bwa_aln_core] refine gapped alignments... 0.29 sec
[bwa_aln_core] print alignments...
into the sai file itself (rather than to nohup.out). WHen I deleted all lines containing these bwa_aln_core tags and the 0.29 sec from the files, it worked just fine. I came back to this thread to share this finding - hope it helps.
hrajasim is offline   Reply With Quote
Old 03-05-2011, 05:51 PM   #48
DrDolittle
Junior Member
 
Location: New York

Join Date: Oct 2010
Posts: 3
Default

I can confirm the report by harjasim (thanks for the hint!) trying to align Illumina 40 bp single end to the rat genome. I got two different errors, however: 1) "bwa samse" stalled at the exact same position, 2) most recently "bwa samse" complained about missing "*fa.nt.ann" files. I cannot recall why this changed, I didn't install new versions and had both errors on two different systems. The only settings I changed were the -n and -t options. Maybe Heng Li can advise on this or patch bwa?

Cheers
Top of *.sai file
[bwa_aln] 17bp reads: max_diff = 2
[bwa_aln] 38bp reads: max_diff = 3
[bwa_aln] 64bp reads: max_diff = 4
[bwa_aln] 93bp reads: max_diff = 5
[bwa_aln] 124bp reads: max_diff = 6
[bwa_aln] 157bp reads: max_diff = 7
[bwa_aln] 190bp reads: max_diff = 8
[bwa_aln] 225bp reads: max_diff = 9
[bwa_aln_core] calculate SA coordinate... 603.08 sec
[bwa_aln_core] write to the disk... ^C^@^@^@^K^@^@^@^D^@^@^@^C^B^@^@^E^@^@^@

used versions
cutadapt version 0.9
bwa version 0.5.9-r16
samtools version 0.1.12a (r862)
Mac OS X 10.6.6/Red Hat Enterprise Linux Server release 5.4 (Tikanga)
DrDolittle is offline   Reply With Quote
Old 03-11-2011, 02:25 PM   #49
fali
Junior Member
 
Location: Durham

Join Date: Mar 2011
Posts: 1
Default

Quote:
Originally Posted by hrajasim View Post
Folks, I came to this thread looking for an answer to the segmentation fault that I too encountered a couple weeks ago. However, I did not find an answer then - Upon investigation, here is what I found:

The bwa aln command when run with a "nohup" and &, inserted the bwa output trace such as:
Code:
[bwa_aln_core] convert to sequence coordinate... 0.43 sec
[bwa_aln_core] refine gapped alignments... 0.29 sec
[bwa_aln_core] print alignments...
into the sai file itself (rather than to nohup.out). WHen I deleted all lines containing these bwa_aln_core tags and the 0.29 sec from the files, it worked just fine. I came back to this thread to share this finding - hope it helps.
I am also having this problem. However, I am a beginner. How can I enter the sai file and delete these lines? Thanks!
fali is offline   Reply With Quote
Old 03-11-2011, 03:39 PM   #50
DrDolittle
Junior Member
 
Location: New York

Join Date: Oct 2010
Posts: 3
Default

I assume, you're running it with the nohup / background option? If you will start it without this, you shouldn't run into any problem. I hadn't at least. You could also try to just delete those lines with a texteditor, but the files are large! I have never tried this, but harjasim seemed to have gone that route.
DrDolittle is offline   Reply With Quote
Old 03-11-2011, 05:40 PM   #51
nilshomer
Nils Homer
 
nilshomer's Avatar
 
Location: Boston, MA, USA

Join Date: Nov 2008
Posts: 1,285
Default

Quote:
Originally Posted by fali View Post
I am also having this problem. However, I am a beginner. How can I enter the sai file and delete these lines? Thanks!
Try piping the stderr stream too. So "nohup bwa aln ... > out.sai 2> out.stderr &".
nilshomer is offline   Reply With Quote
Old 07-03-2012, 11:04 PM   #52
variadevang
Junior Member
 
Location: india

Join Date: Jun 2012
Posts: 7
Default

is a 24GB RAM machine alright for aligning the .sai files using bwa sampe?????????
variadevang is offline   Reply With Quote
Old 04-27-2013, 02:34 AM   #53
carolW
Senior Member
 
Location: US

Join Date: Apr 2013
Posts: 103
Default segmentation fault with bwa samse

Hi,
When I try to execute the following command:

../pgm/bwa-0.7.3a/bwa samse -f SRR062641.filt.sam -r "@RG\tID:Exome1\tLB:Exome1\tSM:Exome1\t:PL:ILLUMINA" ../hg19/Homo_sapiens/UCSC/hg19/Sequence/BWAIndex/version0.6.0/genome.fa SRR062641.filt.sai SRR062641.filt.fastq

I just get Segmentation fault (core dumped)

The data is 1000genomes data 255 bp, 109811 sequences.

Where did I do wrong?

Thanks,

Carol
carolW is offline   Reply With Quote
Old 04-27-2013, 04:30 AM   #54
mastal
Senior Member
 
Location: uk

Join Date: Mar 2009
Posts: 666
Default bwa samse segmentation fault

I'm not sure what is causing your segmentation fault, but if your reads are 250 bp long, you should be using the newer bwa mem algorithm. bwa backtrack (bwa aln, bwa samse) is designed for reads up to 100 bp.
mastal is offline   Reply With Quote
Old 04-27-2013, 11:10 AM   #55
carolW
Senior Member
 
Location: US

Join Date: Apr 2013
Posts: 103
Default

The number of reads comes from the output of bw aln (see below)

How to specify the index file with bwa mem?

Thanks
--------------------------------------------------------
[bwa_aln] 17bp reads: max_diff = 2
[bwa_aln] 38bp reads: max_diff = 3
[bwa_aln] 64bp reads: max_diff = 4
[bwa_aln] 93bp reads: max_diff = 5
[bwa_aln] 124bp reads: max_diff = 6
[bwa_aln] 157bp reads: max_diff = 7
[bwa_aln] 190bp reads: max_diff = 8
[bwa_aln] 225bp reads: max_diff = 9
[bwa_aln_core] calculate SA coordinate... 114.72 sec
[bwa_aln_core] write to the disk... 0.04 sec
[bwa_aln_core] 109811 sequences have been processed.
[main] Version: 0.6.1-r104
[main] CMD: bwa aln -t 4 -f SRR062641.filt.sai -I ../../hg19/Homo_sapiens/UCSC/hg19/Sequence/BWAIndex/version0.6.0/genome.fa ../../data/SRR062641.filt.fastq
[main] Real time: 111.442 sec; CPU: 119.167 sec
carolW is offline   Reply With Quote
Old 04-27-2013, 01:40 PM   #56
mastal
Senior Member
 
Location: uk

Join Date: Mar 2009
Posts: 666
Default bwa samse segmentation fault

Quote:
Originally Posted by carolW View Post
How to specify the index file with bwa mem?
I think it's the same as for bwa aln.
Have a look at the bwa manual page:

http://bio-bwa.sourceforge.net/bwa.shtml
mastal is offline   Reply With Quote
Old 04-28-2013, 01:39 AM   #57
carolW
Senior Member
 
Location: US

Join Date: Apr 2013
Posts: 103
Default

well, it doesn't work. I have used different combinations. The problem is that there is no parameter for the index file and on the command line, bwa mem can't recognize it.

../pgm/bwa-0.7.3a/bwa mem samse SRR062641.filt.sam -r "@RG\tID:Exome1\tLB:Exome1\tSM:Exome1\t:PL:ILLUMINA" ../hg19/Homo_sapiens/UCSC/hg19/Sequence/BWAIndex/version0.6.0/genome.fa SRR062641.filt.fastq SRR062641.filt.mem.sai
[E::bwa_idx_load] fail to locate the index files
carolW is offline   Reply With Quote
Old 04-28-2013, 06:57 AM   #58
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,138
Default

Quote:
Originally Posted by carolW View Post
well, it doesn't work. I have used different combinations. The problem is that there is no parameter for the index file and on the command line, bwa mem can't recognize it.

../pgm/bwa-0.7.3a/bwa mem samse SRR062641.filt.sam -r "@RG\tID:Exome1\tLB:Exome1\tSM:Exome1\t:PL:ILLUMINA" ../hg19/Homo_sapiens/UCSC/hg19/Sequence/BWAIndex/version0.6.0/genome.fa SRR062641.filt.fastq SRR062641.filt.mem.sai
[E::bwa_idx_load] fail to locate the index files
Correct order for the files for samse (as indicated in the manual page):

Code:
bwa samse ref.fa aln_sa.sai short_read.fq > aln-se.sam
Also this line from the same manual:
Quote:
Alignment algorithms are invoked with different sub-commands: aln/samse/sampe for BWA-backtrack, bwasw for BWA-SW and mem for the BWA-MEM algorithm.
GenoMax is offline   Reply With Quote
Old 04-28-2013, 12:19 PM   #59
carolW
Senior Member
 
Location: US

Join Date: Apr 2013
Posts: 103
Default

I have been using the parameters that were given in the tutorial

http://seqanswers.com/wiki/How-to/ex...ina_technology

If I use in the order that you indicated, I will get segmentation fault again

../pgm/bwa-0.7.3a/bwa samse ../hg19/Homo_sapiens/UCSC/hg19/Sequence/BWAIndex/version0.6.0/genome.fa SRR062641.filt.sai SRR062641.filt.fastq > SRR062641.filt.sam
Segmentation fault (core dumped)
carolW is offline   Reply With Quote
Old 04-28-2013, 01:07 PM   #60
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,138
Default

How much memory do you have on the machine you are using? Does the segmentation fault happen right away or after some time?
GenoMax 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 07:57 PM.


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