<p>You can use <a href="https://github.com/brentp/vcfanno" rel="nofollow noreferrer">vcfanno</a> to annotate your vcf with the gnomad vcf file. There's an example config file for annotating with gnomad (along with other databases such as dbSNP) <a href="https://github.com/brentp/vcfanno/blob/master/example/gnomad.conf" rel="nofollow noreferrer">here</a>.</p>

CC BY-SA 4.0
2022-06-07T15:53:27.080Z
2022-06-07T15:53:27.080Z
helrick
<p>I haven't checked how fast this is but you could try using <a href="https://hail.is" rel="nofollow noreferrer">Hail</a> (disclaimer: I'm a maintainer). You'll need to install the GCS connector first to read from Google Cloud Storage:</p>
<pre><code>curl https://broad.io/install-gcs-connector | python3
</code></pre>
<pre class="lang-py prettyprint-override"><code>import hail as hl

mt = hl.import_vcf('your.vcf')
mt = hl.split_multi_hts(mt)  # use the same biallelic representation that gnomAD uses
mt.write('data.mt')  # store in Hail's native format for faster queries
mt = hl.read_matrix_table('data.mt')
sites = hl.read_table(
    'gs://gcp-public-data--gnomad/release/3.1.2/ht/genomes/gnomad.genomes.v3.1.2.sites.ht'
)
mt = mt.anti_join_rows(sites)
</code></pre>
<p>That'll filter down to just those variants (defined by chromosome, position, and alleles) which are not present in gnomAD v3.</p>

CC BY-SA 4.0
2023-01-07T00:51:58.393Z
2023-01-07T00:51:58.393Z
Daniel King
<p>If you have sufficient available disk space, you could download the files from the <a href="https://gnomad.broadinstitute.org/downloads" rel="nofollow noreferrer">gnomad downloads page</a> and use a <a href="https://bedtools.readthedocs.io/en/latest/content/tools/intersect.html" rel="nofollow noreferrer">bedtools intersect</a> command to find the overlapping variants.</p>
<p>However, the recommended platforms for gnomAD are to use <a href="https://github.com/broadinstitute/gnomad_methods" rel="nofollow noreferrer">hail utilities</a> developed by them and others, due to the constraints of working with ~1TB of data.</p>
<p>I am not an expert but potentially someone else knows more about using the site hail data.</p>

CC BY-SA 4.0
2022-06-06T23:02:37.107Z
2022-06-06T23:02:37.107Z
Maximilian Press
<p>I have a VCF with small variant calls against HG38 and I would like to determine which of those calls are present in the gnomAD database.</p>
<p>Is there an existing tool that can do this? Should I be looking at variant annotation tools? or is this something that I would look at BCFtools for?</p>

<vcf>
Compare my VCF to gnomAD variants
# Compare my VCF to gnomAD variants

(Asked by: username_0 on 2022-06-06)

I have a VCF with small variant calls against HG38 and I would like to determine which of those calls are present in the gnomAD database.

Is there an existing tool that can do this? Should I be looking at variant annotation tools? or is this something that I would look at BCFtools for?

**Tags:** vcf

---

## 3 answers

### Answer by username_1 on 2022-06-07. Score: 3 | Accepted answer

You can use [vcfanno](https://github.com/brentp/vcfanno) to annotate your vcf with the gnomad vcf file. There's an example config file for annotating with gnomad (along with other databases such as dbSNP) [here](https://github.com/brentp/vcfanno/blob/master/example/gnomad.conf).


---

### Answer by username_2 on 2023-01-07. Score: 2

I haven't checked how fast this is but you could try using Hail (disclaimer: I'm a maintainer). You'll need to install the GCS connector first to read from Google Cloud Storage:
curl https://broad.io/install-gcs-connector | python3

import hail as hl

mt = hl.import_vcf('your.vcf')
mt = hl.split_multi_hts(mt)  # use the same biallelic representation that gnomAD uses
mt.write('data.mt')  # store in Hail's native format for faster queries
mt = hl.read_matrix_table('data.mt')
sites = hl.read_table(
    'gs://gcp-public-data--gnomad/release/3.1.2/ht/genomes/gnomad.genomes.v3.1.2.sites.ht'
)
mt = mt.anti_join_rows(sites)

That'll filter down to just those variants (defined by chromosome, position, and alleles) which are not present in gnomAD v3.


---

### Answer by username_3 on 2022-06-06. Score: 1

If you have sufficient available disk space, you could download the files from the [gnomad downloads page](https://gnomad.broadinstitute.org/downloads) and use a [bedtools intersect](https://bedtools.readthedocs.io/en/latest/content/tools/intersect.html) command to find the overlapping variants.

However, the recommended platforms for gnomAD are to use [hail utilities](https://github.com/broadinstitute/gnomad_methods) developed by them and others, due to the constraints of working with ~1TB of data.

I am not an expert but potentially someone else knows more about using the site hail data.


---

