I have been fumbling around to become familiar with the set-all-var-ids command in plink 2.0 to update rsids in a .bim file based on chrome end position but it doesn't seem to be working. Would somebody point me towards a better direction? I have tried....
system("./plink2 --bim originalFile.bim --set-all-var-ids @_# --make-just-bim -out newBim")
...but it seems to overwrite the rsid column with the chrome end positions so the newBim file now has 2 chrome end position columns with no rsid column. I have tried swapping the columns of both the file containing the updated rsids and chrome end positions and I have tried swapping the columns of the original bim file. The first swap doesn't change how --set-all-var-ids updates. The second swap doesn't do anything as it forces the column swapped .bim file back into its original column order.
Additionally, I have tried plink 1.9's command: system("./plink --bim oldBim --update-name updateRSIDsChrome.txt 2 4 --make-just-bim -out newBim")
...but it's not updating any rsids. Again any help would be greatly appreciated.