# 'Internal frequency' in Hail

**URL:** <https://discuss.hail.is/t/internal-frequency-in-hail/432>\
**Category:** Help \[0.1\]\
**Created:** [February 28, 2018, 5:26pm UTC](https://discuss.hail.is/t/internal-frequency-in-hail/432 "2018-02-28T17:26:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![enriquea](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/enriquea/32/237_2.png) [@enriquea](https://discuss.hail.is/u/enriquea)\
**Post date:** [February 28, 2018, 5:26pm UTC](https://discuss.hail.is/t/internal-frequency-in-hail/432/1 "2018-02-28T17:26:20Z")

</div>

Hi all,

I cant find a consensus in the literature for the term “internal frequency” in large-scale genomic studies. I’m new in this topic and I would like to be sure that people refer to ‘internal’ allele frequency as the specific frequency for the population/cohort under study, which is different to the allele frequencies annotated from external source/dataset like ExAC, 1000Genomes, etc.

When using ‘variant\_qc()’ method in Hail I get AF among the QC metrics. From the source code ([https://github.com/hail-is/hail/blob/b226e1f70f338dea953d58c8706ff42fd74f4992/src/main/scala/is/hail/methods/VariantQC.scala](https://github.com/hail-is/hail/blob/b226e1f70f338dea953d58c8706ff42fd74f4992/src/main/scala/is/hail/methods/VariantQC.scala)) I can see that the AF’s formula is:

_AF = (nHet + 2(nHomVar)) / 2(nCalled)_, where

_nCalled = nHomRef + nHet + nHomVar_

So, Can this AF be interpreted as ‘internal allele frequency’?

Thanks

---

<div class="post-metadata">

**Author:** ![jbloom](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/jbloom/32/109_2.png) [@jbloom](https://discuss.hail.is/u/jbloom)\
**Post date:** [February 28, 2018, 6:34pm UTC](https://discuss.hail.is/t/internal-frequency-in-hail/432/2 "2018-02-28T18:34:21Z")

</div>

In short, yes. Longer answer: I don’t think “internal frequency” is standardized terminology in the field, but that’s how I would interpret it if I heard it: the allele’s frequency in the dataset being analyzed, as opposed to the allele’s frequency in some (external) reference dataset like [gnomAD](http://gnomad.broadinstitute.org/). Your formulae are correct. (I don’t see “internal frequency” used in our docs, let me know if I’m overlooking it).
