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.*
What is the output of
echo $ref
?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)
This here suggests that something went wrong during the indexing. How much memory du you have on your machine?
My system specs: 1 TB storage and 16GB RAM, i7 12 gen processor and dedicated NIVIDIA GEFORCE GPU
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.
The error is repeated again.
Could you also check that you have enough disk space on your machine ?
I have enough disk space.
path to reference genome file and outputted files after indexing must be same