Question: bwa: fail to locate the index files
0
gravatar for raf.marcondes
12 months ago by
raf.marcondes20 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 • 2.6k views
ADD COMMENTlink modified 12 months ago by Benn7.9k • written 12 months ago by raf.marcondes20

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

ADD REPLYlink written 12 months ago by raf.marcondes20

Did you try myref.fasta instead of just myref?

ADD REPLYlink modified 12 months ago • written 12 months ago by Benn7.9k
1
gravatar for h.mon
12 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 12 months ago by h.mon29k

Yup, that was it! Thank you!!!

ADD REPLYlink written 12 months ago by raf.marcondes20

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

ADD REPLYlink written 12 months ago by Benn7.9k
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: 1779 users visited in the last hour