BWA Index Referencing Failed. Possible Reason and Solutions?
1
0
Entering edit mode
11 months ago
Tundup • 0

Script:

echo "STEP 2: Map to reference using BWA-MEM"

#BWA index reference 

bwa index ${ref}              *#Path for ref variable has been defined*            


#BWA alignment

bwa mem -t 4 -R "@RG\tID:SRR062634\tPL:ILLUMINA\tSM:SRR062634" ${ref} ${reads}/SRR062634_1.filt.fastq.gz ${reads}/SRR062634_2.filt.fastq.gz > ${aligned_reads}/SRR062634.paired.sam


**Error:** 
.
.
.
.
[BWTIncConstructFromPacked] 690 iterations done. 6374612482 characters processed.
[BWTIncConstructFromPacked] 700 iterations done. 6398716386 characters processed.
[BWTIncConstructFromPacked] 710 iterations done. 6418572210 characters processed.
[bwt_gen] Finished constructing BWT in 710 iterations.
[bwa_index] 5659.83 seconds elapse.
[bwa_index] Update BWT... ./variant_calling.sh: line 69:  2591 Killed                  bwa index "/home/nanam/supporting_files/hg38/hg38.fa"
[E::bwa_idx_load_from_disk] fail to locate the index files

*What errors I am getting exactly? '2591 Killed' means system killed the process. System limitation?

The line 69 in script is: bwa index ${ref}

And for the error 'fail to locate the index files error', the path is correct and file exist there when I open file explorer.*

BWA • 1.5k views
ADD COMMENT
0
Entering edit mode

What is the output of echo $ref?

ADD REPLY
0
Entering edit mode

After execution of bwa index ${ref}, there should be five files generated viz

hg38.fa.bwt

hg38.fa.amb

hg38.fa.ann

hg38.fa.pac

hg38.fa.sa

The first four files have been generated. But the last one did not (hg38.fa.sa)

ADD REPLY
0
Entering edit mode

[bwa_index] Update BWT... ./variant_calling.sh: line 69: 2591 Killed bwa index "/home/nanam/supporting_files/hg38/hg38.fa"

This here suggests that something went wrong during the indexing. How much memory du you have on your machine?

ADD REPLY
0
Entering edit mode

My system specs: 1 TB storage and 16GB RAM, i7 12 gen processor and dedicated NIVIDIA GEFORCE GPU

ADD REPLY
0
Entering edit mode

Should be enough. My recommendation is to run the indexing manually outside of this script and see that it completes properly without errors. If that is true and the error still comes up we can see whatelse to do.

ADD REPLY
0
Entering edit mode

The error is repeated again.

ADD REPLY
0
Entering edit mode

Could you also check that you have enough disk space on your machine ?

ADD REPLY
0
Entering edit mode

I have enough disk space.

ADD REPLY
0
Entering edit mode

And for the error 'fail to locate the index files error', the path is correct and file exist there when I open file explorer.*

path to reference genome file and outputted files after indexing must be same

ADD REPLY
0
Entering edit mode
11 months ago

Hi Tundup,

try to index your reference genome like :

bwa index -a bwtsw  <PahtToRef>

I suggest testing it manually after indexing the reference, rather than using the script. let us know how things go.

ADD COMMENT
0
Entering edit mode

After that, it again shows the same error:

[BWTIncConstructFromPacked] 690 iterations done. 6374612482 characters processed. [BWTIncConstructFromPacked] 700 iterations done. 6398716386 characters processed. [BWTIncConstructFromPacked] 710 iterations done. 6418572210 characters processed.

[bwt_gen] Finished constructing BWT in 710 iterations.

[bwa_index] 4553.84 seconds elapse.

[bwa_index] Update BWT... Killed

ADD REPLY
0
Entering edit mode

16 GB of RAM should be more than sufficient for indexing the human genome. If the command syntax is correct and storage is not an issue, I recommend checking your installation of BWA. It might be worthwhile to re-install the latest version. Personally, I use BWA regularly and have not encountered any issues with it.

Alternatively, you could consider using a pre-indexed reference genome, although I prefer not to use this method myself."

ADD REPLY

Login before adding your answer.

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