[bwa_idx_build] fail to open file 'bwtsw' : No such file or directory
0
0
Entering edit mode
15 months ago
efan18808 • 0

I'm trying to run bwa index, but I keep getting this error:

[bwa_idx_build] fail to open file 'bwtsw' : No such file or directory. 

My code is:

for ref in *.fa; do\
bwa index $ref -p $ref -a bwtsw\
done

The files in *.fa are: Mix1_S1_CNS.fa Mix2_S2_CNS.fa Mix3_S3_CNS.fa. They are consensus sequence fasta files generated by using samtools consensus on previously aligned bam files. I suspect these files I'm trying to use as references are causing the issue, but I don't understand why the error is related to the algorithm tag.

bwa • 734 views
ADD COMMENT
0
Entering edit mode

bwa index expects the fasta file to be provided at the end of the command line.

Usage: bwa index [options] <in.fasta>

Try changing

bwa index $ref -p $ref -a bwtsw

to

bwa index -p $ref -a bwtsw $ref
ADD REPLY
0
Entering edit mode

The order doesn't seem to matter. I get the same error.

ADD REPLY
0
Entering edit mode

Your files have any non-ACTGN characters?

ADD REPLY

Login before adding your answer.

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