convert hapmap to vcf format

blueskypyblueskypy Posts: 261Member ✭✭
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?


Post edited by blueskypy on


  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 9,962Administrator, Dev admin

    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.

    Geraldine Van der Auwera, PhD

  • blueskypyblueskypy Posts: 261Member ✭✭

    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.