Hi,
I have a phased vcf file and I want to recode the reference allele according to be what is a specified in a list. The list is 2 columns: SNP id in the first, and the reference allele I want in the second. For example, if my REF and ALT alleles in the vcf are A and T respectively for SNP rs12345, and the REF allele in my list for rs12345 is T, I want to flip the encoding (0/1) for all samples and flip the ref and alt alleles. However, if the REF allele in my list for the above case is A, then nothing is changed. Is there a quick and easy way to do this on plink or vcf tools. My file is huge and any script I write myself to do this will take ages without efficiency exploits of these tools...
Thanks!