Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
BWA: Should Sai/Sam sequences processed match jomaco Bioinformatics 1 03-21-2013 11:42 AM
too small output .sai file created by bwa aln? ..leads to bwa sampe hanging? Stina Bioinformatics 12 12-05-2012 08:32 AM
Merge multiple *.sai files in bwa ? hosseinv Bioinformatics 4 09-15-2012 06:50 PM
how to check integrity/completeness of bwa sai files ? mccullocha Bioinformatics 0 09-04-2012 02:55 AM
SAM file for paired-end ECHo RNA Sequencing 0 04-21-2011 11:55 PM

Thread Tools
Old 06-03-2013, 09:56 AM   #1
Junior Member
Location: California

Join Date: Jun 2013
Posts: 1
Default [bwa] generating paired end sam file from sai files

Hi all,

I was aligning paired end reads in two fastq files: read_1.fq and read_2.fq generated from the grinder simulation program and kept the alignments in read_1.sai and read_2.sai files. Then I tried to combine them into one bam file by:

bwa sampe ../../CP000948.fna read_1.sai read_2.sai read_1.fq read_2.fq >read_12.sam

It will be a success when read_1.fq and read_2.fq are all properly paired (every read in 1 has a mate in 2) but it will report following error when I artificially remove one read from 1 (making one pair missing an end):

[bwa_sai2sam_pe_core] convert to sequence coordinate...
[fread] Unexpected end of file

My purpose of doing this is the fq files generated from grinder behave this way. Although their paper don't touch on this, I guess its one of the possible error mechansims they try to simulate. But this is causing trouble in the downstream bwa pipeline. Just wonder if this is a normal bwa sampe behavior and is there any mature tools out there for taking care of this. It is probably better than I manually write a more error-prone script to fix it myself.

Thanks a lot!
insular is offline   Reply With Quote
Old 06-04-2013, 05:55 AM   #2
Senior Member
Location: Boston area

Join Date: Nov 2007
Posts: 747

Yes, the convention is that your files must have properly paired reads & bwa is assuming your file is corrupted if that is not the case.

There is a good need for a tool to fix this, though actually implementing it isn't trivial (in particular, what assumptions & memory requirements would such a tool have?).
krobison is offline   Reply With Quote

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:24 PM.

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