Error when using BWA with ABySS

203 views
Skip to first unread message

Adrian Carr

unread,
May 13, 2011, 11:41:02 AM5/13/11
to ABySS
Hi,

I've just been trying to use BWA with ABySS but I keep getting the
following error.

ABySS is version 1.2.7. I've tried both BWA 0.5.9-r16 and 0.5.8 both
give the same error.

Any ideas how to fix it?

Thanks

Adrian


bwa aln -t24 sym_map_3_5_v2-3.fa ../s_3_1_sequence.fq ../
s_3_2_sequence.fq ../s_5_1_sequence.fq ../s_5_2_sequence.fq
[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... [bam_header_read] invalid
BAM binary header (this is not a BAM file).
/usr/local/bin/abyss-bwa: line 57: 16795 Broken pipe exec
abyss-tofastq "${query[@]}"
16796 Segmentation fault | $bwa_aln $target -
16797 Segmentation fault | bwa samse $target - <(abyss-
tofastq "${query[@]}")
Read 0 alignments
Mateless 0
Unaligned 0
Singleton 0
FR 0
RF 0
FF 0
Different 0
Total 0
Stats mean: -nan median: 0 sd: -nan n: 0 min: 0 max: 0

DistanceEst: DistanceEst.cpp:241: void
readContigLengths(std::istream&, std::vector<unsigned int,
std::allocator<unsigned int> >&): Assertion `tag == "LN"' failed.
Aborted

Shaun Jackman

unread,
May 13, 2011, 2:49:20 PM5/13/11
to Adrian Carr, ABySS
Hi Adrian,

When reporting an error, please specify the exact command line that you
used. Did you use align=bwa? Try aligner=bwa instead. align is an
internal variable. I may change its name in the future to prevent this
confusion.

Cheers,
Shaun

Shaun Jackman

unread,
May 17, 2011, 8:12:59 PM5/17/11
to Adrian Carr, ABySS
Hi Adrian, (cc'ed to abyss-users)

You can edit the file bin/abyss-bwa, which is a shell script, and add
the -a bwtsw option to bwa index. Otherwise, you could run a single-end
assembly (abyss-pe se-contigs), manually index the file ${name}-3.fa,
and then resume the paired-end assembly. I'll think about making it an
option in the future, probably through an environment variable.

Cheers,
Shaun

On Tue, 2011-05-17 at 06:04 -0700, Adrian Carr wrote:
> Hi Shaun,
>
> It looks like it is a problem with BWA...
>
>
> If I run this command 'bwa index sym_map_3_5_v2-3.fa
> sym_map_3_5_v2-3.fa && bwa aln -t24 sym_map_3_5_v2-3.fa
> ../s_3_1_sequence.fq ../s_3_2_sequence.fq ../s_5_1_sequence.fq
> ../s_5_2_sequence.fq'
>
> Here is the output
> [bwa_index] Pack FASTA... 70.15 sec
> [bwa_index] Reverse the packed sequence... 9.39 sec
> [bwa_index] Construct BWT for the packed sequence...
> [bwa_index] 15.43 seconds elapse.
> [bwa_index] Construct BWT for the reverse packed sequence...
> [bwa_index] 15.44 seconds elapse.
> [bwa_index] Update BWT... 9.78 sec
> [bwa_index] Update reverse BWT... 9.81 sec
> [bwa_index] Construct SA from BWT and Occ... 11.53 sec
> [bwa_index] Construct SA from reverse BWT and Occ... 11.50 sec


> [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... Segmentation fault
>
> I did a search for BWA segmentation faults and found the following link:
> http://i.seqanswers.com/questions/277/bwa-segmentation-fault
>
> It suggests building the index using a different method '-a bwtsw'.
>
> When I run the following it seems to work fine.
> bwa index -a bwtsw sym_map_3_5_v2-3.fa sym_map_3_5_v2-3.fa && bwa aln


> -t24 sym_map_3_5_v2-3.fa ../s_3_1_sequence.fq ../s_3_2_sequence.fq
> ../s_5_1_sequence.fq ../s_5_2_sequence.fq
>

> Would it be possible to have the option to use '-a bwtsw' in
> abyss-pe/abyss-bwa? bwtsw is much slower than the default index
> builder so people wouldn't want to use it by default...
>
> Adrian
>
>
>
> On 16 May 2011 23:49, Shaun Jackman <sjac...@bcgsc.ca> wrote:
> > Hi Adrian,
> >
> > Could you try using BWA to align your reads to the file
> > sym_map_3_5_v2-3.fa? A few different programs failed in your log, and I
> > can't tell which one failed first. I'm trying to figure out if it's BWA
> > or DistanceEst that's failing.
> >
> > Cheers,
> > Shaun
> >
> > On Fri, 2011-05-13 at 15:46 -0700, Adrian Carr wrote:
> >> Hi Shaun,
> >>
> >> Sorry for not being clearer
> >>
> >> The command I ran was...
> >>
> >> abyss-pe -j8 b=10000 aligner=bwa p=0.9 POPBUBBLES_OPTIONS=--scaffold
> >> s=300 d=35 k=32 n=6 np=24 q=20 v=-v name=sym_map_3_5_v2 lib='lib1'
> >> lib1='../s_3_1_sequence.fq ../s_3_2_sequence.fq ../s_5_1_sequence.fq
> >> ../s_5_2_sequence.fq'
> >>
> >> The index builds fine, but then it fails at the 'bwa aln' stage.
> >>
> >> The same command, but instead with bowtie, works ok
> >> abyss-pe -j8 b=10000 aligner=bowtie p=0.9
> >> POPBUBBLES_OPTIONS=--scaffold s=300 d=35 k=32 n=6 np=24 q=20 v=-v
> >> name=sym_map_3_5_v2 lib='lib1' lib1='../s_3_1_sequence.fq
> >> ../s_3_2_sequence.fq ../s_5_1_sequence.fq ../s_5_2_sequence.fq'
> >>
> >> Using KAligner works fine
> >> abyss-pe -j8 b=10000 p=0.9 POPBUBBLES_OPTIONS=--scaffold s=300 d=35
> >> k=32 n=6 np=24 q=20 v=-v name=sym_map_3_5_v2 lib='lib1'
> >> lib1='../s_3_1_sequence.fq ../s_3_2_sequence.fq ../s_5_1_sequence.fq
> >> ../s_5_2_sequence.fq'
> >>
> >> Adrian


> >>
> >>
> >> On 13 May 2011 19:49, Shaun Jackman <sjac...@bcgsc.ca> wrote:
> >> > Hi Adrian,
> >> >
> >> > When reporting an error, please specify the exact command line that you
> >> > used. Did you use align=bwa? Try aligner=bwa instead. align is an
> >> > internal variable. I may change its name in the future to prevent this
> >> > confusion.
> >> >
> >> > Cheers,
> >> > Shaun
> >> >
> >> > On Fri, 2011-05-13 at 08:41 -0700, Adrian Carr wrote:
> >> >> Hi,
> >> >>
> >> >> I've just been trying to use BWA with ABySS but I keep getting the
> >> >> following error.
> >> >>
> >> >> ABySS is version 1.2.7. I've tried both BWA 0.5.9-r16 and 0.5.8 both
> >> >> give the same error.
> >> >>
> >> >> Any ideas how to fix it?
> >> >>
> >> >> Thanks
> >> >>
> >> >> Adrian
> >> >>
> >> >>

> >> >> bwa aln -t24 ../s_3_1_sequence.fq ../

Adrian Carr

unread,
May 18, 2011, 8:22:21 AM5/18/11
to Shaun Jackman, ABySS
Thanks Shaun,

I found the abyss-bwa shell script yesterday and added the -a bwtsw
option. It seemed to run as expected.

Cheers

Adrian

Reply all
Reply to author
Forward
0 new messages