I have two different files i.e
with following data in first file
1VYW, 2.3, A, B, C, D,
1W98, 2.15, A, B, PHOSPHOTHREONINE
1H4L, 2.65, A, B, D, E,
1GII, 2.00, A,
1JST, 2.6, A, B, C, D, PHOSPHORYLATED
1GII, 2.00, A,
1OIR, 1.91, A,
and following data in 2nd file
pdb|1VYW|A Chain A, Structure Of Cdk2CYCLIN A WITH PNU-292137 >g... 605 e-174
pdb|1W98|A Chain A, Human Cyclin-Dependent Kinase 2 >gi|4139570|... 605 e-174
pdb|1H4L|A Chain A, Cyclin A - Cyclin-Dependent Kinase 2 Complex... 605 e-174
pdb|1OIT|A Chain A, Imidazopyridines: A Potent And Selective Cla... 603 e-173
pdb|1PF8|A Chain A, Crystal Structure Of Human Cyclin-Dependent ... 603 e-173
pdb|1OIR|A Chain A, Imidazopyridines: A Potent And Selective Cla... 602 e-173
pdb|1OGU|A Chain A, Structure Of Human Thr160-Phospho Cdk2CYCLIN... 602 e-173
pdb|1H01|A Chain A, Cdk2 In Complex With A Disubstituted 2, 4-Bi... 602 e-173
pdb|1JST|A Chain A, Phosphorylated Cyclin-Dependent Kinase-2 Bou... 602 e-173
Here 1VYW, 1W98, 1H4L are common PDB identifier in both files
1. Now i want to read 2nd file and where ever identifier from the 1st file match the identifier in the 2nd It should extract these last two [\S]+$ i.e 602 e-173 and write this in a third file
I.e I want that
After running the script
The 3rd File will become like this
1VYW, 2.3, A, B, C, D, 605, e-174
1W98, 2.15, A, B, PHOSPHOTHREONINE. 605,e-174
Here 605, e-174 is obtained from the 2nd file from the corresponding identifier
with following data in first file
1VYW, 2.3, A, B, C, D,
1W98, 2.15, A, B, PHOSPHOTHREONINE
1H4L, 2.65, A, B, D, E,
1GII, 2.00, A,
1JST, 2.6, A, B, C, D, PHOSPHORYLATED
1GII, 2.00, A,
1OIR, 1.91, A,
and following data in 2nd file
pdb|1VYW|A Chain A, Structure Of Cdk2CYCLIN A WITH PNU-292137 >g... 605 e-174
pdb|1W98|A Chain A, Human Cyclin-Dependent Kinase 2 >gi|4139570|... 605 e-174
pdb|1H4L|A Chain A, Cyclin A - Cyclin-Dependent Kinase 2 Complex... 605 e-174
pdb|1OIT|A Chain A, Imidazopyridines: A Potent And Selective Cla... 603 e-173
pdb|1PF8|A Chain A, Crystal Structure Of Human Cyclin-Dependent ... 603 e-173
pdb|1OIR|A Chain A, Imidazopyridines: A Potent And Selective Cla... 602 e-173
pdb|1OGU|A Chain A, Structure Of Human Thr160-Phospho Cdk2CYCLIN... 602 e-173
pdb|1H01|A Chain A, Cdk2 In Complex With A Disubstituted 2, 4-Bi... 602 e-173
pdb|1JST|A Chain A, Phosphorylated Cyclin-Dependent Kinase-2 Bou... 602 e-173
Here 1VYW, 1W98, 1H4L are common PDB identifier in both files
1. Now i want to read 2nd file and where ever identifier from the 1st file match the identifier in the 2nd It should extract these last two [\S]+$ i.e 602 e-173 and write this in a third file
I.e I want that
After running the script
The 3rd File will become like this
1VYW, 2.3, A, B, C, D, 605, e-174
1W98, 2.15, A, B, PHOSPHOTHREONINE. 605,e-174
Here 605, e-174 is obtained from the 2nd file from the corresponding identifier