Hi,
On a similar subject, the following. I have two files:
file1.txt
dbSNP_rsID,Chromosome,Position,Gene
rs10399749,chr. 01,45162,?
rs4030303,chr. 01,72434,?
rs4030300,chr. 01,72515,?
rs940550,chr. 01,78032,?
rs13328714,chr. 01,81468,?
rs11490937,chr. 01,222077,?
rs6683466,chr. 01,524446,"OR4F29, OR4F16, OR4F3"
rs12025928,chr. 01,536560,"OR4F29, OR4F16, OR4F3"
file2.txt
dbSNP_rsID R_square
rs6650104 0.000
rs9629043 0.000
rs11497407 0.000
rs12565286 0.332
rs11804171 0.338
rs2977670 0.352
rs2977656 0.000
And now I would like to match the files (file1 to file2) on dbSNP_rsID so that I get a new file:
file_new.txt
dbSNP_rsID,R_square,Chromosome,Position,Gene
rs12565286,0.332,chr. 01,711153,"OR4F29, OR4F16, OR4F3"
I've really tried to understand the code you guys have supplied, but I really don't understand. Could you please help me with a code?
Thanks!
Sander