# DNA Germline WGS

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 
# Annotation 
--variant-annotation-data $NIRVANA_PATH 
--enable-variant-annotation true 
# SV 
--enable-sv true 
# CNV 
--enable-cnv true 
--cnv-population-b-allele-vcf $POP_VCF  #optional to enable germline ASCN 
--cnv-enable-self-normalization true 
# HLA genotyper 
--enable-hla true 
# Targeted caller 
--enable-targeted true 
# Star allele 
--enable-star-allele true 
# PGX 
--enable-pgx true                       #PGX 
# Short tandem repeats 
--repeat-genotype-enable true 
# Multi-Region Joint Detection (MRJD) 
--enable-mrjd true 
--mrjd-enable-high-sensitivity-mode true 
```

## 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.connected.illumina.com/dragen/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. |

### 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.connected.illumina.com/dragen/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.                                                                                 |
| `--cnv-population-b-allele-vcf $POP_VCF` | Specify a population SNP VCF to enable Germline ASCN.                                                                                                     |
| `--cnv-enable-cyto-output true`          | Enable Cytogenetics-compatible output (default true).                                                                                                     |
| `--cnv-enable-mosaic-calling true`       | Enable MOSAIC-calling mode (default true).                                                                                                                |

### Multi-Region Joint Detection (MRJD)

| Option                                | Description                                                                                                                                                                                                                     |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--enable-mrjd`                       | If set to true, MRJD is enabled for the DRAGEN pipeline.                                                                                                                                                                        |
| `--mrjd-enable-high-sensitivity-mode` | If set to true, MRJD high sensitivity mode is enabled for the DRAGEN pipeline. See the MRJD section in the user guide for information on variant types reported in MRJD default mode and high-sensitivity mode (default=false). |

For futher details refer to [MRJD](https://help.connected.illumina.com/dragen/product-guides/dragen-v4.5/dragen-dna-pipeline/small-variant-calling/multi-region-joint-detection).
