Biostar Beta. Not for public use.
bwa: fail to locate the index files
0
Entering edit mode
13 months ago

Hi all,

I'm trying to align a fastq file to a reference fasta file using bwa mem and for the life of me I keep getting the following error message. Any thoughts? Thanks!

bwa index -a bwtsw myref.fasta -p myref
ls
myref.amb  myref.bwt  myref.pac
myref.ann  myref.fasta    myref.sa
  
bwa mem -M 1 -R '@RG\tID:{foo}.{bar}\tPU:{foo}.{bar}.{999999}\tSM:{999999}\tPL:{foo}\tLB{bar}' myref myfastq.fastq.gz

[E::bwa_idx_load_from_disk] fail to locate the index files
alignment bwa • 621 views
ADD COMMENTlink
0
Entering edit mode

Sorry about the weird formatting; this is my first post to Biostars.

ADD REPLYlink
0
Entering edit mode

Did you try myref.fasta instead of just myref?

ADD REPLYlink
0
Entering edit mode
13 months ago
h.mon 25k
Brazil

I am not sure, but I think the cause of the error is the -M parameter doesn't take any values:

         -M        Mark shorter split hits as secondary (for Picard compatibility).
  

Try with:

bwa mem -M -R '@RG\tID:{foo}.{bar}\tPU:{foo}.{bar}.{999999}\tSM:{999999}\tPL:{foo}\tLB{bar}' myref myfastq.fastq.gz
ADD COMMENTlink
0
Entering edit mode

Yup, that was it! Thank you!!!

ADD REPLYlink
0
Entering edit mode

Nice, you can upvote (thumb up) an answer that was useful, or even accept that answer.

ADD REPLYlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.1