I have 3 large textfiles that are in tab seperated column format:
textfile1:
index1 YAL001C index2 YAL011W-Aindex3 YHR048......
textfile2:
G1 YHR048G2 YER109C-AG3 YDR496C-K......
textfile3:
G1 G15 0.9 G8 G19 0.8G2 G20 0.6......
I want to read every word in textfile3 that starts with G (for example G1) then find its corresponding word at column 2 in textfile2 (i.e YHR048) , then find its corresponding index in textfile1(i.e index3) , next modify textfile3 and replace G1 with index3 ; and do that for all of the words that start with G in textfile3.
is there any way to do so?
Best Answer