Here are the first few columns of my VCF v4.2 file. As you can see, the alt allele is missing. The VCF's refs and alts don't correspond to the reference genome.
#CHROM | POS | ID | REF | ALT |
---|---|---|---|---|
9 | 77051 | rs9408670 | T | C |
9 | 114350 | rs12685480 | A | . |
9 | 116581 | rs558835286 | G | . |
9 | 117550 | rs267602077 | A | . |
9 | 117720 | rs10959293 | T | . |
9 | 126903 | rs62533602 | G | A |
9 | 133828 | rs78804900 | C | T |
9 | 154736 | rs200683662 | T | . |
9 | 154933 | rs17795008 | T | G |
9 | 174425 | rs2998944 | T | C |
9 | 174500 | rs142581442 | G | . |
9 | 175050 | rs62532020 | G | A |
9 | 185632 | rs2992854 | C | A |
9 | 188894 | rs3951559 | G | A |
9 | 191843 | rs3008128 | G | A |
9 | 202061 | rs117675283 | T | . |
9 | 204201 | rs10964134 | G | A |
The missing alt allele happens when the genotype is 0/0. The VCF file isn't saying anything incorrect. However, there is a tool I'm trying to use that filters out "0/."genotypes.
A better way of formatting them (which I'm trying to achieve) would have the ref/alt alleles correspond to the reference genome, and just have a redundant letter in the case of a homozygous genotype.
I'd like my VCF to display the correct alt/ref for that position even if there are no samples with a genotype corresponding to the alt allele. How do I do this? I'm not sure what this process is called.
Ideal output:
#CHROM | POS | ID | REF | ALT |
---|---|---|---|---|
9 | 77051 | rs9408670 | T | C |
9 | 114350 | rs12685480 | A | G |
9 | 116581 | rs558835286 | G | A |