# Combining VCFs from gnomAD

**URL:** <https://discuss.hail.is/t/combining-vcfs-from-gnomad/2910>\
**Category:** Hail Batch & General Cloud\
**Created:** [October 20, 2022, 5:58pm UTC](https://discuss.hail.is/t/combining-vcfs-from-gnomad/2910 "2022-10-20T17:58:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rye335](https://avatars.discourse-cdn.com/v4/letter/r/e47c2d/32.png) [@rye335](https://discuss.hail.is/u/rye335)\
**Post date:** [October 20, 2022, 5:58pm UTC](https://discuss.hail.is/t/combining-vcfs-from-gnomad/2910/1 "2022-10-20T17:58:26Z")

</div>

Hi,  
I’m interested in combining VCFs from gnomAD and was wondering if there’s an efficient way to do this in Hail (for example, parallelizing the operation by chromosome).

Thanks!

---

<div class="post-metadata">

**Author:** ![danking](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/danking/32/43_2.png) [@danking](https://discuss.hail.is/u/danking)\
**Post date:** [October 20, 2022, 6:04pm UTC](https://discuss.hail.is/t/combining-vcfs-from-gnomad/2910/2 "2022-10-20T18:04:50Z")

</div>

Hey @rye335

I need more context about your end goal. Almost all the gnomAD data should be internally and externally available in native Hail format (see [here](https://gnomad.broadinstitute.org/downloads)). What data is in this VCF that you are producing and for what purpose are you creating it?

---

<div class="post-metadata">

**Author:** ![rye335](https://avatars.discourse-cdn.com/v4/letter/r/e47c2d/32.png) [@rye335](https://discuss.hail.is/u/rye335)\
**Post date:** [October 21, 2022, 2:20pm UTC](https://discuss.hail.is/t/combining-vcfs-from-gnomad/2910/3 "2022-10-21T14:20:48Z")

</div>

We have several gnomAD v4 subsets that are in .vds format, that we want to combine with GVCFs generated at the Broad. Then we want to eventually add ~2000 GVCFs, and then subsequently calculate VQSR for the new combined dataset (vds1 + vds2 + 2000 GVCF). Afterwards, we would be doing downstream QC and rare variant analyses with the dataset.

---

<div class="post-metadata">

**Author:** ![chrisvittal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/chrisvittal/32/327_2.png) [@chrisvittal](https://discuss.hail.is/u/chrisvittal)\
**Post date:** [October 21, 2022, 3:28pm UTC](https://discuss.hail.is/t/combining-vcfs-from-gnomad/2910/4 "2022-10-21T15:28:13Z")

</div>

It is not the best documented, but you’ll want to use the vds combiner. [Docs Here](https://hail.is/docs/0.2/vds/hail.vds.combiner.VariantDatasetCombiner.html)

You will want to do something like this

```python
vdses = [
    # list of the subset datasets
    ...
]

gvcfs = [
    # list of your samples
    ...
]

combiner = hl.vds.new_combiner(
    output_path='gs://bucket/dataset.vds',
    temp_path='gs://temp-bucket/vds-combiner',
    gvcf_paths=gvcfs,
    vds_paths=vdses,
    use_exome_default_intervals=True,
)

combiner.run()

vds = hl.read_vds('gs://bucket/dataset.vds')

```
