BWA mem error: [bwt_restore_sa] SA-BWT inconsistency: seq_len is not the same. Abort!
4
0
Entering edit mode
9.7 years ago
kdeere ▴ 10

I have already mapped my data with STAMPY/ However, I'm trying to map with BWA in order to use GATK. I am running BWA 0.7.12 on a linux cluster.

I first built my reference index:

bwa index reference.fa

Then I tried to run the alignment:

bwa mem -M - reference.fa single_end_read_file.fq > test_aligned_reads.sam

And receive the following error:

[bwt_restore_sa] SA-BWT inconsistency: seq_len is not the same. Abort!

I'm not quite sure what to do as BWA created the indices it says don't work together. Any suggestions would be helpful. Thanks.

software error • 8.7k views
ADD COMMENT
3
Entering edit mode
5.8 years ago

I had the same issue. Solved by creating the reference index using the same version of bwa that I used for alignment (bwa mem). Before I was using the reference index created by the older version of bwa and I was getting the above mentioned error while running bwa mem.

ADD COMMENT
1
Entering edit mode

I also had the same problem and solved by using the same version of BWA to create the index.

ADD REPLY
1
Entering edit mode
9.7 years ago
kdeere ▴ 10

I've rerun with the suggestion:

bwa index reference.fa && echo "OK. Done."

Output:

[bwa_index] Pack FASTA... 11.30 sec
[bwa_index] Reverse the packed sequence... 3.07 sec
[bwa_index] Construct BWT for the packed sequence...
[bwa_index] 280.36 seconds elapse.
[bwa_index] Construct BWT for the reverse packed sequence...
[bwa_index] 279.26 seconds elapse.
[bwa_index] Update BWT... 3.47 sec
[bwa_index] Update reverse BWT... 3.42 sec
[bwa_index] Construct SA from BWT and Occ... 97.42 sec
[bwa_index] Construct SA from reverse BWT and Occ... 97.71 sec
OK. Done.

Then I tried to rerun my mapping again and got the same error:

bwa mem -M - reference.fa single_end_read_file.fq > test_aligned_reads.sam

Output:

[bwt_restore_sa] SA-BWT inconsistency: seq_len is not the same. Abort!
/var/spool/slurmd/job4200029/slurm_script: line 14: 34491 Aborted
ADD COMMENT
0
Entering edit mode

Did you were able to fix this issue. I'm now having the same problem.

Thanks!

Alejandro

ADD REPLY
1
Entering edit mode
2.8 years ago
Ari ▴ 10

In my case the issue was due to a bug in a script that copies index files - it was duplicating the same file multiple times with different names so the error message does not necessarily mean that the bwa version used is incorrect but that the content of the files that were used as input are just not the ones that you expected

ADD COMMENT
0
Entering edit mode
9.7 years ago

there is something wrong in your bwa index :

https://github.com/lh3/bwa/blob/af606fc31a76eb02d3ef88c3056f53b4c915a743/bwt.c#L433

you should re-run

bwa index reference.fa && echo "OK. Done."
ADD COMMENT
0
Entering edit mode

Hi Pierre,

I'm facing the same issue but I can't figure out a way to fix this. I have re-run the bwa index in all the possible ways but is not working. Surprisingly for is that I have done this many other times with other sequencing data. Any other idea Pierre?

Thanks Alejandro

ADD REPLY

Login before adding your answer.

Traffic: 2034 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6