#!/bin/bash
set -euo pipefail
# Path to DRAGEN hashtable
DRAGEN_HASH_TABLE=<REF_DIR>
# Path to output directory for the DRAGEN run
OUTPUT=<OUT_DIR>
# File prefix for DRAGEN output files
PREFIX=<OUT_PREFIX>
# Define the input sources, select fastq list, fastq, bam, or cram.
INPUT_FASTQ_LIST="
--fastq-list $FASTQ_LIST \
--fastq-list-sample-id $FASTQ_LIST_SAMPLE_ID \
"
INPUT_FASTQ="
--fastq-file1 $FASTQ1 \
--fastq-file2 $FASTQ2 \
--RGSM $RGSM \
--RGID $RGID \
"
INPUT_BAM="
--bam-input $BAM \
"
INPUT_CRAM="
--cram-input $CRAM \
"
# Select input source, here in this example we use INPUT_FASTQ_LIST
INPUT_OPTIONS="
--ref-dir $DRAGEN_HASH_TABLE \
$INPUT_FASTQ_LIST \
"
OUTPUT_OPTIONS="
--output-directory $OUTPUT \
--output-file-prefix $PREFIX \
"
MA_OPTIONS="
--enable-map-align true \
--enable-sort true \
--enable-duplicate-marking true \
"
CNV_OPTIONS="
--enable-cnv true \
--cnv-target-bed $CNV_TARGET_BED \
--cnv-normals-list $CNV_PANEL_OF_NORMALS \
"
SNV_OPTIONS="
--enable-variant-caller true \
--vc-target-bed $VC_TARGET_BED \
"
SV_OPTIONS="
--enable-sv true \
--sv-exome true \
--sv-call-regions-bed $SV_TARGET_BED \
"
# Construct final command line
CMD="
dragen \
$INPUT_OPTIONS \
$OUTPUT_OPTIONS \
$MA_OPTIONS \
$CNV_OPTIONS \
$SNV_OPTIONS \
$SV_OPTIONS \
"
# Execute
echo $CMD
bash -c $CMD