#!/bin/bash -Ceuo pipefail
set -euo pipefail
gatk --java-options '-Xmx14g' Mutect2 \
-R 'hg38.fa' \
-I 'LS0882_tumor.bam' \
--tumor-sample 'LS0882' \
-L 'TST500C_manifest.bed' \
-O 'LS0882.mutect2.raw.vcf.gz' \
--native-pair-hmm-threads 4 \
--max-mnp-distance 0 \
--germline-resource 'af-only-gnomad.hg38.vcf.gz'
gatk --java-options '-Xmx14g' FilterMutectCalls \
-R 'hg38.fa' \
-V 'LS0882.mutect2.raw.vcf.gz' \
--stats 'LS0882.mutect2.raw.vcf.gz.stats' \
-O 'LS0882.mutect2.filtered.vcf.gz'
gatk --java-options '-Xmx14g' SelectVariants \
-R 'hg38.fa' \
-V 'LS0882.mutect2.filtered.vcf.gz' \
--exclude-filtered true \
-O 'LS0882.mutect2.pass.vcf.gz'