# Mosaic Detection

The default mode of the small variant caller has been optimized to detect germline variants with typical AFs of 0%, 50% or 100%. Non-cancer post-zygotic mosaic variants have typical allele fraction (AFs) lower than 50% and therefore more challenging to find with the default small variant caller. To improve sensitivity of low AF calls, a new machine learning (ML) model trained using read and context evidence from low AF calls is used. This allows the model to identify variants down to approximately 5% AF on 35x WGS and 3% AF on 300x WGS. The mosaic ML model is applied to all calls that are rejected by the germline model and variants detected with the mosaic detection are identified by a `MOSAIC` flag in the VCF INFO field.

![](https://3555446211-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MflHs6hPlQAu-m5s2h_%2Fuploads%2Fgit-blob-393fa9efdb87ecd1ad6385a69ab28f47a5388173%2Fmosaic-model-application.png?alt=media)

`MOSAIC` tagged variants with `QUAL` smaller than `3.0103` are filtered with the `MosaicHardQUAL` filter.

We provide an optional `MosaicLowAF` filtering option to filter `MOSAIC` tagged variants with `AF` smaller than the `AF` threshold. The threshold for this filter can be set with the `--vc-mosaic-af-filter-threshold` option. The default value for the mosaic `AF` filter threshold is set to `0.2` if the median depth of the sample detected by the ploidy caller is `<= 100x` and `0.1` if the detected depth is `>100x`. All `MOSAIC` variants can be reported, regardless of their `AF`, with the `--vc-mosaic-af-filter-threshold=0` option. For haploid regions, we apply separate handling that uses a threshold of `0.75` for assigning `MOSAIC` tags. Please refer to the [Ploidy Support](https://help.dragen.illumina.com/dragen-v4.4/product-guide/dragen-v4.4/dragen-dna-pipeline/small-variant-calling/..#ploidy-support) section for more details.

Furthermore, the output of `MOSAIC` tagged calls can be restricted using an optional target BED provided with the `--vc-mosaic-target-bed` option.

## High Sensitivity Mosaic detection (Alpha)

The DRAGEN high sensitivity mosaic detection is designed to lower the limit of detection in high-depth datasets to approximately 1.5% AF and it can be enabled with `--vc-enable-high-sensitivity-mosaic-detection=true`. We suggest enabling the high hensitivity mosaic detection when interested in finding very low AF variants in high-depth samples (>=200x). Enabling high-sensitivity mosaic detection in DRAGEN will increase runtime by approximately 20–25%.

**Note:** Internal parameters of DRAGEN are changed from the default settings when the high sensitivity mosaic detection is enabled. This directly affects both the germline and mosaic small variant calling pipelines. Therefore, a direct comparison of the VCF files generated could highlight differences in the variant calls scores, as well as variants private to one VCF (even among non `MOSAIC` tagged calls).

## Command line options

* `--vc-enable-mosaic-detection`

  Set to true to enable mosaic detection. Set to false to disable mosaic detection.
* `--vc-mosaic-af-filter-threshold`

  Set the allele fraction threshold for the application of the `MosaicLowAF` filter to mosaic calls. All `MOSAIC` tagged variants with `AF` smaller than the `AF` threshold are filtered with the `MosaicLowAF` filter. The default mosaic `AF` filter threshold is set to `0.2` if the median depth of the sample detected by the ploidy caller is `<= 100x` and `0.1` if the detected depth is `> 100x`.
* `--vc-mosaic-qual-filter-threshold`

  Set the `QUAL` threshold for the application of the `MosaicHardQUAL` filter to mosaic calls. All `MOSAIC` tagged variants with `QUAL` smaller than the threshold `QUAL` are filtered with the `MosaicHardQUAL` filter. The default mosaic `QUAL` filter threshold is set to `3.0103`.
* `--vc-mosaic-target-bed`

  Optional target BED file to restrict the output of `MOSAIC` tagged variant calls only in the specified regions.

## Comparison with DRAGEN 4.2 High Sensitivity Mode and DRAGEN v4.3 Mosaic

Small variant calling features comparison between default germline small variant caller and mosaic detection mode in DRAGEN 4.2, DRAGEN 4.3 and DRAGEN 4.4

| Tag        | Name                                    | Command line options                                                                             | QUAL threshold | MAPQ0 | Mosaic Detection | Mosaic AF filter threshold         |
| ---------- | --------------------------------------- | ------------------------------------------------------------------------------------------------ | -------------- | ----- | ---------------- | ---------------------------------- |
| 4.2        | DRAGEN 4.2 default Small Variant Caller | --enable-variant-caller=true                                                                     | 3              | No    | No               | N/A                                |
| 4.2 HSM    | DRAGEN 4.2 High Sensitivity Mode        | --enable-variant-caller=true --vc-enable-high-sensitivity-mode=true                              | 0.4            | Yes   | Yes (Alpha)      | N/A                                |
| 4.3        | DRAGEN 4.3 default Small Variant Caller | --enable-variant-caller=true                                                                     | 3              | Yes   | Yes (Full)       | 20%                                |
| 4.3 Mosaic | DRAGEN 4.3 Mosaic Detection Mode        | --enable-variant-caller=true --vc-enable-mosaic-detection=true                                   | 0.4            | Yes   | Yes (Full)       | 0%                                 |
| 4.4        | DRAGEN 4.4 default Small Variant Caller | --enable-variant-caller=true                                                                     | 3.0103         | Yes   | Yes (Full)       | 20% if depth <=100x, 10% otherwise |
| 4.4        | DRAGEN 4.4 default Small Variant Caller | --enable-variant-caller=true --vc-enable-mosaic-detection=true                                   | 3.0103         | Yes   | Yes (Full)       | 20% if depth <=100x, 10% otherwise |
| 4.4 Mosaic | DRAGEN 4.4 Mosaic Detection Mode        | --enable-variant-caller=true --vc-enable-mosaic-detection=true --vc-mosaic-af-filter-threshold=0 | 3.0103         | Yes   | Yes (Full)       | 0%                                 |

## Comparison with DRAGEN 4.3 command line behavior

The command line behavior of `--vc-enable-mosaic-detection=true` has changed between DRAGEN 4.3 and DRAGEN 4.4. In DRAGEN 4.3, explicitly setting `--vc-enable-mosaic-detection=true` caused two changes to default behavior:

1. The hard filter `QUAL` threshold for both SNPs and INDELs is lowered to `0.4` in this mode to allow low AF calls to be set as `PASS` in the FILTER field.
2. The mosaic `AF` filter threshold is set to `0.0`.

In DRAGEN 4.4, to improve the user experience, both these changes have been decoupled from the `--vc-enable-mosaic-detection=true` option, therefore the user can report all `MOSAIC` variants, regardless of their `AF`, with the `--vc-mosaic-af-filter-threshold=0` option.
