Hello,
I am trying to make a awk code that will take 2 files, a txt file like this :
1 1 88 c(1:38, 42, 102)
2 2 128 c(39:41, 43:101, 103:105, 153, 155:189, 292, 344:369)
3 3 84 c(190:249, 603, 606:607, 609:629)
4 4 12 c(250:251, 253:262)
5 6 51 c(263, 265:291, 293:313, 315:316)
6 8 28 c(314, 317:343)
7 9 60 c(370:385, 561:587, 589:602, 604:605, 608)
8 10 39 386:424
and if the numbers in blue match with the numbers in red of the 2nd column of a pdb file 2
ATOM 1 N PRO 889 24.289 17.277 -19.912 1.00 0.00 N
ATOM 2 CA PRO 889 25.072 18.509 -19.702 1.00 0.00 C
ATOM 3 C PRO 889 24.200 19.747 -19.486 1.00 0.00 C
ATOM 4 O PRO 889 24.602 20.661 -18.749 1.00 0.00 O
ATOM 5 N THR 890 23.002 19.770 -20.124 1.00 0.00 N
ATOM 6 CA THR 890 22.044 20.878 -20.060 1.00 0.00 C
ATOM 7 C THR 890 21.613 21.209 -18.629 1.00 0.00 C
ATOM 8 O THR 890 21.429 20.303 -17.812 1.00 0.00 O
ATOM 9 N VAL 891 21.484 22.513 -18.332 1.00 0.00 N
will be replaced from the 5th column (in green) for example the output has to be like this:
1 1 88 c(889:898 , 899, 914)
...
Thank you for your time :)