I have .g.vcf file generated by HaplotypeCaller and want to convert to hap map format. Please suggest me on this.
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
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.
The above command seem to be wrong, the output file similar like a VCF.
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.
It turns out there is no way to do this with GATK tools. I am sorry for the confusion.
Thank you Sheila for confirmation.
If anyone has script, please do share !
Where is the "hap map" format documented? Possibly this can be accomplished with awk.