Question: bwa: fail to locate the index files
0
gravatar for raf.marcondes
15 months ago by
raf.marcondes30 wrote:

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
bwa alignment • 3.3k views
ADD COMMENTlink modified 15 months ago by Benn8.0k • written 15 months ago by raf.marcondes30

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

ADD REPLYlink written 15 months ago by raf.marcondes30

Did you try myref.fasta instead of just myref?

ADD REPLYlink modified 15 months ago • written 15 months ago by Benn8.0k
1
gravatar for h.mon
15 months ago by
h.mon29k
Brazil
h.mon29k wrote:

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 written 15 months ago by h.mon29k

Yup, that was it! Thank you!!!

ADD REPLYlink written 15 months ago by raf.marcondes30

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

ADD REPLYlink written 15 months ago by Benn8.0k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1522 users visited in the last hour