# Maximum Somatic VAF

The maximum somatic variant allele frequency (MSAF) is the highest VAF of a confirmed somatic mutation. The MSAF is often used as a surrogate for tumor fraction, especially when the ctDNA tumor fraction is high.

{% hint style="danger" %}
Use caution when using MSAF as a surrogate for ctDNA tumor fraction. The MSAF implementation in the DRAGEN TSO 500 ctDNA analysis software incorporates fragment size based analysis and filtering of germline and clonal hematopoiesis variants. However, taking into account additional factors, e.g., aneuploidy, and broader testing is needed to provide a more accurate representation of tumor fraction.
{% endhint %}

## MSAF algorithm

The MSAF is determined using the following steps:

1. Somatic variants determined by the TMB algorithm are used as an input (variants having Status *Somatic* in the `{SampleID}_tmb.trace.tsv` file). Variants that are not in coding regions, MNVs and variants with depth below 500 are filtered out.
2. The remaining variants are ranked by the VAF in descending order
3. The VAF for the highest ranked confident somatic variants is output as MSAF. "Confident somatic variants" are determined analyzing the fragment size of the reads supporting the variants. Circulating tumor DNA (ctDNA) molecules are expected to be shorter, when compared to the normal cell-free DNA (cfDNA) molecules. If the fragment sizes of the reads supporting a variant are significantly shorter than non-supporting reads (p-value < 1x10-5), the variant is considered to be a confident somatic variant.
4. If no such variant exists, the VAF for the highest ranked COSMIC hotspot variant (with COSMIC count > 50) is output as MSAF.
5. If no such variant exists, the VAF for the 4<sup>th</sup> highest ranked variant is output as MSAF.

<figure><img src="/files/ohO4s10Pvk7yIRXrK9sK" alt=""><figcaption><p>MSAF algorithm in DRAGEN TSO 500 ctDNA Analysis Software</p></figcaption></figure>

## MSAF output files

The MSAF algorithm outputs results in several files:

1. Metrics Output File, `{SampleID}_MetricsOutput.tsv` as Max\_Somatic\_AF
2. TMB Max Somatic VAF file, `{Sample_ID}.tmb.msaf.csv` as MaxSomaticAF, using the same file format as the [TMB Trace File](https://help.tso500software.illumina.com/dragen-tso-500-ctdna-guides/dragen-tso-500-ctdna-v2.6/analysis-methods/pages/XDUcm9V56hKd9obLJqTa#id-3.-tmb-trace-file).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.tso500software.illumina.com/dragen-tso-500-ctdna-guides/dragen-tso-500-ctdna-v2.6/analysis-methods/max-somatic-vaf.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
