I have the standard vcf file (VCFv4.2) and would like to replace the ID column of vcf file with the column in the other text file. The text file (without header) is like below:
1 56782 1:56782:T:C
I used the below codes to edit the vcf file:
grep -P '^#' file.vcf > new.vcf grep -v -P '^#' file.vcf | cut -f3- | paste newpos.txt - >> new.vcf
Although it worked and didn’t return any error, vcf-validator gave me the error. Could you please kindly tell me your way to do such an edit on the vcf file?