This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Bwa-mem2 indexing not working down stream

I am using bwa-mem2 to create my index and to map my reads to the reference genome.

This is my indexing code

#!/bin/bash
#SBATCH -J index
#SBATCH -A gts-rro3
#SBATCH -N 1 --ntasks-per-node=24
#SBATCH --mem-per-cpu=8G
#SBATCH -t 1:00:00
#SBATCH -o index.out

cd $SLURM_SUBMIT_DIR
ml intel/20.0.4
export PATH=/storage/home/programs/bwa-mem2:$PATH

bwa-mem2 index -p index CgGenome_chromosomes.fasta.gz

I get 5 files as an output and no error in my outfile.

bwa-mem2 index output

However, when I continue downstream to map my first read I get this error: "ERROR! Unable to open the file: /storage/home/scratch/BwaMem/index.bwt.2bit.64"

I am assuming the problem is starting at the indexing step but I have tried reinstalling bwa-mem2 on our cluster and re-running the complier. Any insight on what could be going on?

bwa-mem2 index fasta

Please show code for the downstream analysis. Did the indexing succeed properly, anything odd in the logs? How big is the genome in terms of basepairs.

About 13k bp. I suspect the indexing never worked. I have seen some posts saying that indexing takes a long time but mine takes like 10 seconds.

Downstream code to use bwa-mem2 to map reads:

#!/bin/bash
#SBATCH -J aligntest
#SBATCH -A gts-rros3
#SBATCH -N 1 --ntasks-per-node=24
#SBATCH --mem-per-cpu=8G
#SBATCH -t 1:00:00
#SBATCH -o align_test.out

cd $SLURM_SUBMIT_DIR
ml intel/20.0.4
export PATH=/storage/programs/bwa-mem2:$PATH

bwa-mem2 mem -t 24 /index /FR04_0_S1.paired1.fq.gz /FR04_0_S1.paired2.fq.gz -o FR04_SC_0.sam

Links edited to remove my school information

0 answers

No answers yet.

Log in to answer this question.