[E::bwa_idx_load_from_disk] fail to locate the index files [main_samview] fail to read the header from "-"
1
0
Entering edit mode
2.4 years ago

Hi! I'm new in this world and I need help to understand how to overcome the problem that I have. I used bwa mem for the alignment of a sample with hg38 reference genome and got this error, can't really understand why. The code that I'm running is this one:

bwa mem \
  /home/arturo/Documenti/hg38.fa /home/arturo/Documenti/PATIENT/PATIENT_TRIMMED/PATIENT-BM_S7_L001_R1_001_trimmed.fastq.gz \
  /home/arturo/Documenti/PATIENT/PATIENT_TRIMMED/PATIENT-BM_S7_L001_R2_001_trimmed.fastq.gz | \
    samtools view -bS - > /home/arturo/Documenti/PATIENT/PATIENT_BAM/PATIENT_BM_unsorted.bam

The output is:

[E::bwa_idx_load_from_disk] fail to locate the index files [main_samview] fail to read the header from "-".

What could be wrong here?

I have also another question: the hg38 reference genome should be unzipped once downloaded or not?

samtools bwa • 1.7k views
ADD COMMENT
1
Entering edit mode
2.4 years ago
Paul ★ 1.5k

Hi,

before you start alignemnt you need to create BWA index of your reference FASTA file.

Go to folder located your reference fasta and run command:

cd /home/arturo/Documenti/

bwa index hg38.fa

It create in current directory ne files (takes some time):

*amp, *ann, *bwt, *pac, *sa 

Those files are use for alignment step. Then re-run your command.

Best,

Paul

ADD COMMENT
1
Entering edit mode

Please use for reference input fasta no .amb:

bwa mem /home/arturo/Documenti/hg38.fasta .......

Not to use

bwa mem /home/arturo/Documenti/hg38.amb .......

Le me know if it works.

Best,

Paul

ADD REPLY
0
Entering edit mode

First of all Thank you for the answer! I have already created the BWA index of my FASTA file which are the same as you listed above (i think you were ment to write amb instead of amp). I've tried to run the code also with those files but still getting the same error.

bwa mem /home/arturo/Documenti/hg38.amb /home/arturo/Documenti/PATIENT/PATIENT_TRIMMED/PATIENT-BM_S7_L001_R1_001_trimmed.fastq.gz /home/arturo/Documenti/PATIENT/PATIENT_TRIMMED/PATIENT-BM_S7_L001_R2_001_trimmed.fastq.gz | samtools view -bS - > /home/arturo/Documenti/PATIENT/PATIENT_BAM/PATIENT_BM_unsorted.bam

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

[main_samview] fail to read the header from "-"

Could also be a problem of where my BWA index files are? I have it in the same directory of the hg38 FASTA file

ADD REPLY

Login before adding your answer.

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