# Combine multiple vcf files

**URL:** <https://discuss.hail.is/t/combine-multiple-vcf-files/1821>\
**Category:** Hail Query & hailctl\
**Created:** [November 30, 2020, 9:25am UTC](https://discuss.hail.is/t/combine-multiple-vcf-files/1821 "2020-11-30T09:25:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arwa](https://avatars.discourse-cdn.com/v4/letter/a/ccd318/32.png) [@Arwa](https://discuss.hail.is/u/Arwa)\
**Post date:** [November 30, 2020, 9:25am UTC](https://discuss.hail.is/t/combine-multiple-vcf-files/1821/1 "2020-11-30T09:25:04Z")

</div>

Hello.  
I want to ask how can I combine multiple vcf files into one vcf file  
and saving the sample name for each file? how?  
because I used before Hail a package and it’s combine to one vcf file but it’s combine also the name of sample to the first file!  
I want to do a genotype matrix after that, So I need to put each variants for it’s sample.  
Can U help me please 😭

---

<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:** [November 30, 2020, 3:01pm UTC](https://discuss.hail.is/t/combine-multiple-vcf-files/1821/2 "2020-11-30T15:01:46Z")

</div>

Unless you have “gVCF” style VCFs this is generally not possible. If you have multiple gVCFs that you want to join, you should investigate GATK’s combine gvcf: [https://gatk.broadinstitute.org/hc/en-us/articles/360037053272-CombineGVCFs](https://gatk.broadinstitute.org/hc/en-us/articles/360037053272-CombineGVCFs)
