# Creating gnomadFreq.tsv file

**URL:** <https://discuss.hail.is/t/creating-gnomadfreq-tsv-file/1265>\
**Category:** Hail Query & hailctl\
**Created:** [January 31, 2020, 9:10pm UTC](https://discuss.hail.is/t/creating-gnomadfreq-tsv-file/1265 "2020-01-31T21:10:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![emauryg](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/emauryg/32/502_2.png) [@emauryg](https://discuss.hail.is/u/emauryg)\
**Post date:** [January 31, 2020, 9:10pm UTC](https://discuss.hail.is/t/creating-gnomadfreq-tsv-file/1265/1 "2020-01-31T21:10:04Z")

</div>

I’m trying to create the gnomadFreq.tsv file for the priors needed to run the de\_novo function on a vcf file that has trio calls.  
What is a way to create this file and what format does it have?

```
priors = hl.import_vcf('data/gnomadFreq.tsv', impute=True)
priors = priors.transmute(**hl.parse_variant(priors.Variant)).key_by('locus', 'alleles')

```

Thank you!

---

<div class="post-metadata">

**Author:** ![johnc1231](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/johnc1231/32/286_2.png) [@johnc1231](https://discuss.hail.is/u/johnc1231)\
**Post date:** [January 31, 2020, 9:27pm UTC](https://discuss.hail.is/t/creating-gnomadfreq-tsv-file/1265/2 "2020-01-31T21:27:02Z")

</div>

That’s just an example file that we use. You don’t need that particular file. If you want to see what’s in that particular file, it’s on our github here: [https://github.com/hail-is/hail/blob/master/hail/python/hail/docs/data/gnomadFreq.tsv](https://github.com/hail-is/hail/blob/master/hail/python/hail/docs/data/gnomadFreq.tsv)

---

<div class="post-metadata">

**Author:** ![emauryg](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/emauryg/32/502_2.png) [@emauryg](https://discuss.hail.is/u/emauryg)\
**Post date:** [January 31, 2020, 9:43pm UTC](https://discuss.hail.is/t/creating-gnomadfreq-tsv-file/1265/3 "2020-01-31T21:43:59Z")

</div>

But how do you generate a file like that to use the de\_novo method?

---

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [January 31, 2020, 9:51pm UTC](https://discuss.hail.is/t/creating-gnomadfreq-tsv-file/1265/4 "2020-01-31T21:51:45Z")

</div>

the thing you need is not a file, but a variant annotation that is the population frequency. Do you have something like that? Using the gnomad frequencies from [gnomad.broadinstitute.org](http://gnomad.broadinstitute.org) may be a good idea.

---

<div class="post-metadata">

**Author:** ![emauryg](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/emauryg/32/502_2.png) [@emauryg](https://discuss.hail.is/u/emauryg)\
**Post date:** [February 1, 2020, 6:36pm UTC](https://discuss.hail.is/t/creating-gnomadfreq-tsv-file/1265/5 "2020-02-01T18:36:48Z")

</div>

I see, how can I annotate the vcf with the population allele frequency from gnomad using hail? Sorry if this is a basic question.

---

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [February 3, 2020, 12:29pm UTC](https://discuss.hail.is/t/creating-gnomadfreq-tsv-file/1265/6 "2020-02-03T12:29:29Z")

</div>

How are you running Hail?

You can also get results immediately by using in-sample frequency as a baseline:

```python
mt = hl.split_multi_hts(mt)
mt = hl.variant_qc(mt)
pedigree = hl.Pedigree.read('data/trios.fam')
results = hl.de_novo(dataset, pedigree, mt.variant_qc.AF[1])

```

---

<div class="post-metadata">

**Author:** ![emauryg](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/emauryg/32/502_2.png) [@emauryg](https://discuss.hail.is/u/emauryg)\
**Post date:** [February 3, 2020, 8:14pm UTC](https://discuss.hail.is/t/creating-gnomadfreq-tsv-file/1265/7 "2020-02-03T20:14:43Z")

</div>

Thank you for the help.  
I’m running Hail after GATK best practices, and using just one trio so I guess I’d have to annotate with gnomad, but can’t find a way to do that from the tutorials.

---

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [February 3, 2020, 8:18pm UTC](https://discuss.hail.is/t/creating-gnomadfreq-tsv-file/1265/8 "2020-02-03T20:18:19Z")

</div>

Ah! I see.

In that case, this algorithm may not be the right one – it’s designed to work on cohorts, where there’s information from looking at frequencies across all your samples.

If think if you just set that parameter to 0 you’ll get mostly the results you expect, though the HIGH / MEDIUM / LOW confidence in calls should be taken with a grain of salt.
