#!/bin/bash -Ceuo pipefail INDEX=`find -L ./ -name "*.amb" | sed 's/\.amb$//'` export bwt_max_mem=112G sentieon bwa mem \ -K 100000000 -Y -R '@RG\tID:20260529_LH00995_0049_B23YT2HLT4.SH032_HG514.L007\tPU:L007\tSM:SH032_HG514\tLB:SH032_HG514\tDS:s3://natera-platform-sandbox/pipeline-resources/ngi-igenomes/igenomes/Homo_sapiens/GATK/GRCh38/Sequence/WholeGenomeFasta/Homo_sapiens_assembly38.fasta\tPL:ILLUMINA' \ -t 31 \ $INDEX \ 0003.SH032_HG514_R1.fastq.gz 0003.SH032_HG514_R2.fastq.gz \ | sentieon util sort \ -r Homo_sapiens_assembly38.fasta \ -t 31 \ -o SH032_HG514.bam \ --sam2bam \ - # When outputting CRAM, sentieon util sort may create a spurious .bai index. # Remove it since CRAM uses .crai indices. if [ "bam" = "cram" ] && [ -f "SH032_HG514.cram.bai" ]; then rm -f SH032_HG514.cram.bai fi cat <<-END_VERSIONS > versions.yml "DAQ:SENTIEON_BWAMEM": sentieon: $(echo $(sentieon driver --version 2>&1) | sed -e "s/sentieon-genomics-//g") END_VERSIONS