BWA error [bns_restore_core] Parse error reading
3
2
Entering edit mode
7.9 years ago
Picasa ▴ 650

Hi,

I have downloaded some bacteria genomes on ncbi and then I cat them.

I have built an index with these genome after trying to map my reads I got this error:

[bns_restore_core] Parse error reading db/contaminants.amb

Someone know what is going on ? Thanks

bwa index • 9.2k views
ADD COMMENT
0
Entering edit mode

I have the same problem with bwa-0.7.12 (I tried 0.7.4 and it works). Did you find a solution? my genome file does not contain spaces.

ADD REPLY
2
Entering edit mode
7.9 years ago

Based on previous encounters with such issues, please check if your genome file contains any spaces. Remove using sed or tr (if you find any).

ADD COMMENT
2
Entering edit mode
6.7 years ago
said3427 ▴ 120

sed -i 's/\s*$//g' db/contaminants

bwa index db/contaminants

ADD COMMENT
2
Entering edit mode

If you have spaces in your header, use this instead:

sed -i 's/^[^>]\s*$//g' db/contaminants
ADD REPLY
1
Entering edit mode
7.4 years ago
tshtatland ▴ 190

See the answer from Vijay Lakhujani above. More specifically, remove whitespace from the fasta reference sequences (whitespace in fasta header is okay). See also: Burrows-Wheeler Aligner / Mailing Lists

https://sourceforge.net/p/bio-bwa/mailman/message/33230220/

https://sourceforge.net/p/bio-bwa/mailman/message/34430833/

ADD COMMENT

Login before adding your answer.

Traffic: 2269 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