I have many VCFs from different samples. If I merge these into a single VCF using `vcftools` (`vcf-merge`), the samples where a variant wasn't called are labeled as missing that variant. Instead, I want the VCF to show that the sample has the reference allele (safe to assume in my application).

Is there a way to call missing variants in a VCF as the reference allele? What tools can I use to do this?

**EDIT:**

The sequences were originally variant called using FreeBayes (through the LongRanger pipeline).

**RE-EDIT:**

Turns out I can simply use the `--ref-for-missing` flag in `vcf-merge` to achieve this. Problem solved.

**RE-RE-EDIT:**

Using `--ref-for-missing` flag in `vcf-merge` does of course not give the variants any annotation, like depth and genotype quality.
( The best way is to call all the BAMs in the same command, to get a multi-sample VCF)

I've written two tools related to your question:

* **VcfNoCallToHomRef** http://lindenb.github.io/jvarkit/VcfNoCallToHomRef.html will arbitrarily convert the `./.` to `0/0` .

* **FixVcfMissingGenotypes** http://lindenb.github.io/jvarkit/FixVcfMissingGenotypes.html : will re-use the BAM to test the depth at each NO-CALL site. It's slow;

