Question: Call missing variants in VCF as reference allele
gravatar for olavur
18 months ago by
T├│rshavn, Faroe Islands
olavur70 wrote:

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?


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


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


Using --ref-for-missing flag in vcf-merge does of course not give the variants any annotation, like depth and genotype quality.

snp vcf genome • 1.2k views
ADD COMMENTlink modified 18 months ago • written 18 months ago by olavur70
gravatar for Pierre Lindenbaum
18 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum119k wrote:

( 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:

ADD COMMENTlink written 18 months ago by Pierre Lindenbaum119k

I think vcf-merge with the --ref-for-missing flag should solve the problem your VcfNoCallToHomRef solves. Your FixVcfMissingGenotypes tool sounds really useful though.

I didn't try your solution because annotating the depth only isn't enough for me. I accepted the answer anyway, as it solves the problem I stated.

ADD REPLYlink written 18 months ago by olavur70
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1002 users visited in the last hour