#!/bin/bash
#SBATCH --job-name=gatk-4.3.0-case.sh
#SBATCH --partition=batch
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=4
#SBATCH --time=1:00:00

module load gcc/12.2.0 gatk/4.3.0
# gcc/9.4.0 may be used instead of gcc/12.2.0

# for this example, we shall use samtools to prepare the indexed reference file
# replace samtools with your preferred software
module load samtools/1.16

# create reference.fasta.fai
samtools faidx reference.fasta

# create dictionary reference.dict
gatk CreateSequenceDictionary -R reference.fasta

# call germline SNPs and indels via local re-assembly of haplotypes
# write output to variants.vcf
gatk HaplotypeCaller --native-pair-hmm-threads $SLURM_NTASKS_PER_NODE -R reference.fasta -I sample1.bam -O variants.vcf
