We've moved!
This site is now read-only. You can find our new documentation site and support forum for posting questions here.
Be sure to read our welcome blog!

[E::bwa_idx_load_from_disk] fail to locate the index files

kimm5503kimm5503 south koreaMember


I tried to execute the command line in putty (linux) as follows:
$ bwa mem -M -t 8 Homo_sapiens_assembly38.fasta SRR1517898_1.fastq SRR1517898_2.fastq > SRR1517898.sam

but this appears:
[E::bwa_idx_load_from_disk] fail to locate the index files

I already created the following files using bwa_index, samtools_faidx, and picard_createsequencedictionary without any error.
I have tried putting all my files (Homo_sapiens_assembly38.dict, Homo_sapiens_assembly38.fasta, Homo_sapiens_assembly38.fasta.amb, Homo_sapiens_assembly38.fasta.ann, Homo_sapiens_assembly38.fasta.pac, Homo_sapiens_assembly38.fasta.fai) all together in my home directory and also tried to put them inside the folder in which bwa-0.7.15 is installed (where bwa command resides), but still it doesn't work.
Is there something more than just putting them altogether in one directory...?

I'm new to the scene, and I don't understand why linux cannot find the index files.
And the manual says download hg38.fa too. Can you please tell me what use does this file have..? Is it the same file as Homo_sapiens_assembly38.fasta?

Thank you. Waiting for kind professionals that can give an advice..



  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin
    Putting them all in the same directory together should be sufficient. Are you running the command from the same directory where your data is? If not you need to provide complete paths.

    The Hg38.fa mentioned in the manual is just an example; your .fasta file is equivalent.
  • kimm55038kimm55038 south koreaMember

    Thanks for your response.

    Can you please take another look at this command line...?
    I removed the environment variable $ export PATH=$PATH:~/bwa/bwa-0.7.15 from the ~/.bash_profile I had written.. and put all of the index files inside the same folder where bwa* (the command) is.
    Still it doesn't work...

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin
    Your command looks fine, I don't know what's wrong. Try asking on the BWA help mailing list; it's not our software so we may be missing something they would catch.
  • wenfu_liwenfu_li Member
    edited September 2017

    Have the same problem from my wdl.
    I can run my bwa command in terminal without any problem.
    bwa mem -m -r /home/cytolab/Software/bwa/hg19.fa /home/cytolab/Software/bwa/1.fastq /home/cytolab/Software/bwa/2.fastq
    But when i trying to run wdl it gave me same error
    [E::bwa_idx_load_from_disk] fail to locate the index files


    `workflow WES {
    call bwamem

    task bwamem {
    File bwa
    File RefFasta
    String sampleName
    File inputBAM1
    File inputBAM2
    command {
    ${bwa} mem -m -r ${RefFasta} ${inputBAM1} ${inputBAM2} > ${sampleName}.sam
    output {
    File rawsam = "${sampleName}.sam"

    { "WES.bwamem.bwa": "/home/cytolab/Software/bwa/bwa", "WES.bwamem.inputBAM1": "/home/cytolab/Software/WDL/Sand/1.fastq.gz", "WES.bwamem.sampleName": "170148", "WES.bwamem.RefFasta": "/home/cytolab/Software/bwa/hg19.fa", "WES.bwamem.inputBAM2": "/home/cytolab/Software/WDL/Sand/2.fastq.gz" }

    Can you help me find where is the problem?

  • FYI, problem solved.

    I've tried add indexFile (.fai) without luck.
    Turn out it will need all other indexfiles (.bwt,.sa,.pac,.amb,.ann ) as well.
    Hope it helps for others.

Sign In or Register to comment.