To celebrate the release of GATK 4.0, we are giving away free credits for running the GATK4 Best Practices pipelines in FireCloud, our secure online analysis portal. It’s first come first serve, so sign up now to claim your free credits worth $250. Sponsored by Google Cloud. Learn more at

convert hapmap to vcf format

blueskypyblueskypy Member
edited February 2014 in Ask the GATK team

I’d like to convert a hapmap file to vcf. The hapmap file is from

A few questions about the following command at

java -Xmx2g -jar GenomeAnalysisTK.jar \
   -R ref.fasta \
   -T VariantsToVCF \
   -o output.vcf \
   --variant:RawHapMap input.hapmap \
   --dbsnp dbsnp.vcf
  1. Since the hapmap is in reference genome b36, should the ref.fasta be b36 as well? While b37 is everywhere, the only place I can find b36 is b36.3 at, is this OK?
  2. What’s the usage of “-–dbsnp” here, should it be dbSNP built upon b36 as well?
  3. How do I use the codec at, is it already built in VariantsToVCF or I have to download a codec file somewhere?



  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie

    1 and 2: Yes, all other files should be based on the same build, and after that you can liftover the resulting VCF to a different build if you want. Which I think is what you are doing now in your other thread...

    3: It's built-in, you don't need to invoke it yourself.

  • Thanks, Geraldine. It runs successfully even with the r28 of hapmap. I noticed a few other similar posts complaining errors used different built between the hapmap file and the ref genome, so that might be the source for those errors. Just to point it out so others can avoid similar errors.

Sign In or Register to comment.