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