#!/bin/bash -Ceuo pipefail set -euo pipefail RG=$(printf '@RG\tID:%s\tSM:%s\tPL:ILLUMINA\tLB:%s' 'four' 'four' 'four') bwa-mem2 mem -t 4 -K 50000000 -R "$RG" 'hg38.fa' 'nf_gui_test_four.1.fastp.fq.gz' 'nf_gui_test_four.2.fastp.fq.gz' \ | samtools sort -@4 -m 768M --no-PG -o four.sorted.bam - samtools index -@ 4 four.sorted.bam four.sorted.bam.bai