Heads up:
We’re moving the GATK website, docs and forum to a new platform. Read the full story and breakdown of key changes on this blog.
We’re moving the GATK website, docs and forum to a new platform. Read the full story and breakdown of key changes on this blog.
Notice:
If you happen to see a question you know the answer to, please do chime in and help your fellow community members. We encourage our fourm members to be more involved, jump in and help out your fellow researchers with their questions. GATK forum is a community forum and helping each other with using GATK tools and research is the cornerstone of our success as a genomics research community.We appreciate your help!
If you happen to see a question you know the answer to, please do chime in and help your fellow community members. We encourage our fourm members to be more involved, jump in and help out your fellow researchers with their questions. GATK forum is a community forum and helping each other with using GATK tools and research is the cornerstone of our success as a genomics research community.We appreciate your help!
Test-drive the GATK tools and Best Practices pipelines on Terra
Check out this blog post to learn how you can get started with GATK and try out the pipelines in preconfigured workspaces (with a user-friendly interface!) without having to install anything.
Converting g.vcf or .vcf files to hap map format

Hi Everyone,
I have .g.vcf file generated by HaplotypeCaller and want to convert to hap map format. Please suggest me on this.
Thanks
Mahesh HB
Answers
@mahesh
Hi Mahesh HB,
You can use VariantsToVCF. https://www.broadinstitute.org/gatk/guide/tooldocs/org_broadinstitute_gatk_tools_walkers_variantutils_VariantsToVCF.php
Please note, a GVCF is an intermediate file that should not be used as a final VCF. To get your final VCF, please run GenotypeGVCFs on your GVCFs. https://www.broadinstitute.org/gatk/guide/article?id=4017
-Sheila
@Sheila
Hi Sheila,
Thanks for the response.
I have genotyped g.vcf file into .vcf by using GenotypeGVCFs. Now I would like to convert this .vcf into .hapmap format for GWAS.
I am using following command in VariantsToVCF:
java -Xmx50g -Djava.io.tmpdir=gatk_tmp -jar /GATK3.4/GenomeAnalysisTK.jar -R reference_genome.fa -T VariantsToVCF -o SNP_genotyped_all_samples_conf_10.hapmap --variant:VCF SNP_genotyped_all_samples_conf_10.vcf --dbsnp 3k_filtered.vcf
Please specify, if the command used is correct.
Thanks
Mahesh HB
@Sheila ,
Hi Sheila,
The above command seem to be wrong, the output file similar like a VCF.
Thanks
Mahesh HB
@mahesh
Hi Mahesh HB,
I am sorry. I made a mistake in the format that is output by VariantsToVCF. Indeed a VCF is output. Let me ask the team if there is a different tool you can use.
-Sheila
@mahesh
Hi again,
It turns out there is no way to do this with GATK tools. I am sorry for the confusion.
-Sheila
@Sheila
Thank you Sheila for confirmation.
If anyone has script, please do share !
-Mahesh HB
Where is the "hap map" format documented? Possibly this can be accomplished with
awk
.