Entering edit mode
3.0 years ago
L_to_the_m
▴
10
Hi, I have PLINK files with SNP IDs like this:
AX-14233402__rs35404821
AX-37499887__rs74704183
AX-36783275__rs11997571
I would like to change the SNP IDs to have only the IDs without the AX-...
term:
rs35404821
rs74704183
rs74704183
For the .pvar
file it wouldn't be a problem, but then I also need to change it within the .pgen
file. Is there any solution for this?
For the .pvar
file it would be:
awk '{$3=A[split($3,A,"_")]}1' datafile.pvar > datafile_ID.pvar
Don't think the SNP ID is stored within the pgen file, so you should be good to go after modifying the pvar