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