How to choose BWA-MEM2 settings
1
1
Entering edit mode
9 months ago
mgranada3 ▴ 30

I am trying to run a BWA-MEM2 script to align DNA-seq data. But I am following this guide.

How did they come up with the -t, -T, and -R information? In the manual, -t is threads, -T says "Don’t output alignment with score lower than INT. This option only affects output," and -R read group header line.

#!/bin/bash
#SBATCH -J BWA-MEM
#SBATCH -A gts-xxxxxx
#SBATCH -N 1 --ntasks-per-node=4
#SBATCH --mem-per-cpu=8G
#SBATCH -t 4:00:00
#SBATCH -o Report-%j.out

cd $PBS_O_WORKDIR
ml anaconda3
conda activate bwa-mem2
ml samtools

bwa mem \
-t 8 \ 
-T 0 \ 
-R \
/C_glabrata_index_mg.fa /SC_0_L001.fastq.gz /SC_0_L002.fastq.gz \
| samtools sort -o SC_0_output.bam
BWA-MEM2 DNA-seq bash • 1.0k views
ADD COMMENT
0
Entering edit mode

You need to be clear about where you got this script - it's not in that guide. Also, your command is wrong and it won't work because the -R is empty. And you seem to have undeclared aliases which will not play well with slurm since slurm doesn't read necessarily know aliases while starting up a shell to run your job.

ADD REPLY
0
Entering edit mode
9 months ago
Ram 43k

They did not "come up" with these recommendations, they're using sensible defaults. They're essentially asking to not ignore any alignments and use a sensible default of 8 threads while leaving the read group info up to you. You're free to change them and see what happens; generally, developers set conservative defaults on optional parameters and you can change only those that you need to change. In this case, you can feel free to ignore all 3 of those parameters except that you'll face some problems downstream if you don't have a read group, so make sure you set that.

ADD COMMENT

Login before adding your answer.

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