> For the complete documentation index, see [llms.txt](https://cmo-ci.gitbook.io/access-quality-control-v1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cmo-ci.gitbook.io/access-quality-control-v1/major-contamination.md).

# Major Contamination

![](https://2763969089-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M52gq1rRSDQOKMQGEuR%2F-MA6eB1Txh080CV4Myt2%2F-MA6eNDPx0dczNUlzMpp%2FScreen%20Shot%202020-06-18%20at%209.40.55%20AM.png?alt=media\&token=b7f51292-e3fa-47e6-a88d-6ec9e08be799)

**Theoretical Method**

Major contamination plot is a bar plot of the fraction of heterozygous positions per sample and is done to see if a patient’s sample is contaminated with DNA from an unrelated individual. This analysis also done using the ‘fingerprint’ SNPs in the panel. A SNP is considered heterozygous if the minor allele fraction is > 0.1.

The fraction of heterozygous positions in the sample is found using the formula below:

$$
Fraction heterozygous positions=(Number of Heterozygous Sites)/(Total Number of Fingerprint SNPs)
$$

{% hint style="info" %}
These calculations were done using All Unique (unfiltered) bams. Allele counts are measured from waltz pileups from Pool A and B
{% endhint %}

**Technical Methods**

* Tool Used:
  * Waltz PileupMetrics
  * fingerprinting.py
* Input
  * output\_dir : Directory to write the Output files to
  * waltz\_dir\_A: Directory with waltz pileup files for target set A
  * waltz\_dir\_B: Directory with waltz pileup files for target set B
  * waltz\_dir\_A\_duplex: Directory with waltz pileup files for Duplex target set A
  * waltz\_dir\_B\_duplex: Directory with waltz pileup files for Duplex target set B
  * fp\_config: File with information about the SNPs for analysis (MSK-ACCESS-v1\_0-TilingaAndFpSNPs.txt)
  * title\_file: Title File for the run
* Output
  * FPResults/majorContamination.txt
  * MajorContaminationRate.pdf

**Interpretations**

The fraction of heterozygous positions should be around 0.5. If the fraction is greater than 0.6, it is is considered to have major contamination.
