# DNA Germline Panel

A DRAGEN recipe, like this one, is a predefined set of analysis parameters and workflow settings tailored to a specific type of genomic analysis. For clarity, some default parameters are explicitly included and annotated with comments.

```
  
/opt/dragen/$VERSION/bin/dragen         #DRAGEN install path 
--ref-dir $REF_DIR                      #path to DRAGEN pangenome hashtable 
--output-directory $OUTPUT 
--intermediate-results-dir $PATH        #e.g. SSD /staging 
--output-file-prefix $PREFIX 
# Inputs 
--fastq-list $PATH                      #see 'Input Options' for FQ, BAM or CRAM 
--fastq-list-sample-id $STRING 
# Mapper 
--enable-map-align true                 #optional with BAM/CRAM input 
--enable-map-align-output true          #optionally save the output BAM 
--enable-sort true                      #default=true 
--enable-duplicate-marking true         #default=true 
# Small variant caller 
--enable-variant-caller true 
--vc-target-bed $VC_TARGET_BED 
# Annotation 
--variant-annotation-data $NIRVANA_PATH 
--enable-variant-annotation true 
# SV 
--enable-sv true 
--sv-exome true 
--sv-call-regions-bed $SV_TARGET_BED 
# CNV 
--enable-cnv true 
--cnv-target-bed $PATH 
--cnv-combined-counts $PATH             #CNV PON. See 'In-run PON' section below. 
# HLA genotyper 
--enable-hla true 
--hla-as-filter-min-threshold 29.0      #panel specific setting 
--hla-as-filter-ratio-threshold 0.85    #panel specific setting 
--hla-exome true                        #If panel contains only coding regions.  Sets HLA output to 3 field resolution (coding sequence only) 
```

## Notes and additional options

### Hashtable

For DRAGEN germline runs, it is recommended to use the pangenome hashtable.

See: [Product Files](https://support.illumina.com/sequencing/sequencing_software/dragen-bio-it-platform/product_files.html)

### Input options

DRAGEN input sources include: fastq list, fastq, bam, or cram. For BCL input, first create FASTQs using [BCL conversion](https://help.dragen.illumina.com/product-guides/dragen-v4.5/bcl-conversion).

FQ list Input

```
--fastq-list $PATH 
--fastq-list-sample-id $STRING 
```

FQ Input

```
--fastq-file1 $PATH 
--fastq-file2 $PATH 
--RGSM $STRING 
--RGID $STRING 
```

BAM Input

```
--bam-input $PATH 
```

CRAM Input

```
--cram-input $PATH 
```

### Mapping and Aligning

| Option                           | Description                                                                                          |
| -------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `--enable-map-align true`        | Optionally disable map & align (default=true).                                                       |
| `--enable-map-align-output true` | Optionally save the output BAM (default=false).                                                      |
| `--Aligner.clip-pe-overhang 2`   | Clean up any unwanted UMI indexes. Only use when reads contain UMIs, but UMI collapsing was not run. |

### Duplicate Marking

| Option                                | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--enable-duplicate-marking true`     | By default, DRAGEN marks duplicate reads and exclude them from variant calling.                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `--enable-positional-collapsing true` | Alternative to `--enable-duplicate-marking=true`. Instead of discarding duplicate reads, DRAGEN can optionally perform positional collapsing, merging them into higher-quality consensus reads. This is beneficial for small panels without UMIs and coverage between 300X and 1000X. However, it's slower than standard duplicate marking and less effective on samples with coverage lower than 300X. For very high coverage (1000X+), avoid it due to potential read collisions. For high-sensitivity panels with 1000X+ coverage, consider using UMIs. |

### SNV

DRAGEN SNV VC employs machine learning based variant recalibration (DRAGEN-ML). It processes read and other contextual evidence to remove false positives, recover false negatives and reduce zygosity errors. No additional setup is required. DRAGEN-ML is enabled by default as needed, when running the germline SNV VC on hg19 or hg38.

Note that we do not recommend changing the default QUAL thresholds of 3 for DRAGEN-ML and 10 for DRAGEN without ML. These values differ from each other because DRAGEN-ML improves the calibration of QUAL scores, leading to a change in the scoring range.

| Option                                      | Description                                                                                                                                  |
| ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `--vc-target-bed`                           | Limit variant calling to region of interest.                                                                                                 |
| `--vc-combine-phased-variants-distance INT` | Maximum distance in base pairs (BP) over which phased variants will be combined. Set to 0 to disable. Valid range is \[0; 15] BP (Default=2) |
| `--vc-emit-ref-confidence GVCF`             | To enable gVCF output.                                                                                                                       |
| `--vc-enable-vcf-output`                    | To enable VCF file output during a gVCF run, set to true. The default value is false.                                                        |

### Annotation

For instructions on how to download the Nirvana annotation database, please refer to [Nirvana](https://help.dragen.illumina.com/product-guides/dragen-v4.5/nirvana)

### HLA

| Option                            | Description                                                                                                                     |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `--enable-hla`                    | Enable HLA typer (this setting by default will only genotype class 1 genes)                                                     |
| `--hla-as-filter-min-threshold`   | Internal option to set min alignment score threshold. The default is 59 and works for WES and WGS. Set to 29 for panels.        |
| `--hla-as-filter-ratio-threshold` | Minimum Alignment score of a read mate to be considered. The default is 0.67 and works for WES and WES. Set to 0.85 for panels. |
| `--hla-enable-class-2`            | Extend genotyping to HLA class 2 genes (default=true).                                                                          |
| `--hla-exome`                     | Output HLA alleles at 3-field resolution (default 4-field resolution) for panels targeting only coding sequences or WES.        |

### CNV

| Option                                | Description                                                                                                                                               |
| ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--cnv-enable-gcbias-correction true` | Enable or disable GC bias correction when generating target counts.                                                                                       |
| `--cnv-segmentation-mode $SEG_MODE`   | Option to override the default segmentation algorithm. Defaults include `slm` for germline WGS, `aslm` for somatic WGS, and `hslm` for targeted analysis. |
| `--cnv-segmentation-bed $PATH`        | Specify a segmentation bed file to add pre-defined segments to be called.                                                                                 |

### In-run PON

For CNV PON requirements and generation options see [CNV Preprocessing | Panel of Normals](https://help.dragen.illumina.com/product-guides/dragen-dna-pipeline/cnv-overview/cnv-reference#panel-of-normals).

**Step 1. Generate CNV target counts of individual samples from the sequencing run.**

Any samples that should not be included in the final PON file can be excluded from this step. Any options used for CNV target counts generation (BED file, GC Bias Correction, etc.) should be matched when processing the case samples.

```
  
/opt/dragen/$VERSION/bin/dragen         #DRAGEN install path 
--ref-dir $REF_DIR                      #path to DRAGEN pangenome hashtable 
--output-directory $OUTPUT 
--intermediate-results-dir $PATH        #e.g. SSD /staging 
--output-file-prefix $PREFIX 
--fastq-list $PATH                      #see 'Input Options' for FQ, BAM or CRAM 
--fastq-list-sample-id $STRING 
# CNV 
--enable-cnv true 
--cnv-target-bed $PATH 
```

**Step 2. CNV combined counts file generation.**

```
  
/opt/dragen/$VERSION/bin/dragen         #DRAGEN install path 
--ref-dir $REF_DIR                      #path to DRAGEN pangenome hashtable 
--output-directory $OUTPUT 
--intermediate-results-dir $PATH        #e.g. SSD /staging 
--output-file-prefix $PREFIX 
--enable-cnv true 
--cnv-generate-combined-counts true 
--cnv-normals-list $CNV_NORMALS_LIST 
```

`$CNV_NORMALS_LIST` is a text file with one line for each path to a CNV target counts file generated in step 1 (either `<output-file-prefix>.target.counts.gz` or `<output-file-prefix>.target.counts.gc-corrected.gz`). Individual target counts files are merged into a single `<output-file-prefix>.combined.counts.txt.gz` PON file in the output directory. The PON file is used for each case sample run of DRAGEN CNV using the `--cnv-combined-counts` option.
