text: user1250: We all have used freemix score at some stage to check contamination or swaps in our sequencing experiment, but can anyone once for all explain how the score is calculated? 
  
  user1302: Here's my current understanding of the freemix metric output by verifyBamID. The freemix score is a measure of contamination that is calculated without knowing the genotypes of the individuals. In the paper it is equation (2), and the authors refer to it as the "sequence-only" method. However, in addition to the sequencing reads, it requires some knowledge of SNPs and their allele frequency from the population. They demonstrate in the paper that using the SNPs and allele frequency estimates from a different population actually reduces the estimated level of contamination.
  As for intuition for what equation (2) is measuring, imagine what would happen to the number of heterozygous sites detected if DNA from two different individuals was sequenced together. The total number of heterozygous sites would increase because it would count all sites where the two individuals are homozygous for opposite alleles or at least one of the two individuals is heterozygous. This would lead to an increased fraction of heterozygous sites over that expected from Hardy-Weinberg Equilibrium (i.e. 2pq).
  Here's the explanation of freemix directly from the author, Hyun Min Kang:
  
  The key idea of FREEMIX estimate is to use excessive heterozygosity to estimate the level of contamination. Especially for common SNPs, you will observe higher fraction of heterozygous alleles than 2*p*(1-p), and it turns out that you can quantify the contamination very well if you know the population allele frequency already. If you do not have accurate population allele frequency information, than it would be harder to estimate FREEMIX parameters using verifyBamID.
  
  Additional sources:
  
  Verifying Sample Identities - Implementation
  Interpreting output files
  verifyBamID Google Group
  
  
original_text: 1250: <p>We all have used freemix score at some stage to check contamination or swaps in our sequencing experiment, but can anyone once for all explain how the score is calculated? </p>
   1302: <p>Here's my current understanding of the freemix metric output by verifyBamID. The freemix score is a measure of contamination that is calculated without knowing the genotypes of the individuals. In the paper it is equation (2), and the authors refer to it as the "sequence-only" method. However, in addition to the sequencing reads, it requires some knowledge of SNPs and their allele frequency from the population. They demonstrate in the paper that using the SNPs and allele frequency estimates from a different population actually reduces the estimated level of contamination.</p>
  
  <p>As for intuition for what equation (2) is measuring, imagine what would happen to the number of heterozygous sites detected if DNA from two different individuals was sequenced together. The total number of heterozygous sites would increase because it would count all sites where the two individuals are homozygous for opposite alleles or at least one of the two individuals is heterozygous. This would lead to an increased fraction of heterozygous sites over that expected from <a href="https://en.wikipedia.org/wiki/Hardy%E2%80%93Weinberg_principle" rel="nofollow noreferrer">Hardy-Weinberg Equilibrium</a> (i.e. 2pq).</p>
  
  <p>Here's the <a href="https://groups.google.com/d/msg/verifybamid/oNMOfEZDwE4/AbVP_D-mbBEJ" rel="nofollow noreferrer">explanation of freemix</a> directly from the author, Hyun Min Kang:</p>
  
  <blockquote>
    <p>The key idea of FREEMIX estimate is to use excessive heterozygosity to estimate the level of contamination. Especially for common SNPs, you will observe higher fraction of heterozygous alleles than 2*p*(1-p), and it turns out that you can quantify the contamination very well if you know the population allele frequency already. If you do not have accurate population allele frequency information, than it would be harder to estimate FREEMIX parameters using verifyBamID.</p>
  </blockquote>
  
  <p>Additional sources:</p>
  
  <ul>
  <li><a href="http://genome.sph.umich.edu/wiki/Verifying_Sample_Identities_-_Implementation" rel="nofollow noreferrer">Verifying Sample Identities - Implementation</a></li>
  <li><a href="http://genome.sph.umich.edu/wiki/VerifyBamID#Interpreting_output_files" rel="nofollow noreferrer">Interpreting output files</a></li>
  <li><a href="https://groups.google.com/forum/#!forum/verifybamid" rel="nofollow noreferrer">verifyBamID Google Group</a></li>
  </ul>
  