-
Notifications
You must be signed in to change notification settings - Fork 0
/
R3DAlignToCorrespondences.py
40 lines (29 loc) · 1.1 KB
/
R3DAlignToCorrespondences.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from R3DAlignToID import R3DAlignToID
# Put a R3D Align output filename here:
# Put the desired output filename here:
R3DAlignfilename = "2QBD_2AW7_correspondences_5147462ca4e64.csv"
Outputfilename = "2QBD_2AW7_correspondences_5147462ca4e64.txt"
R3DAlignfilename = "2QBD_3I8H_correspondences_514313b142ec5.csv"
Outputfilename = "2QBD_3I8H_correspondences_514313b142ec5.txt"
R3DAlignfilename = "2QBG_3V2F_correspondences_50dd09ef4f614.csv"
Outputfilename = "2QBG_3V2F_correspondences_50dd09ef4f614.txt"
R3DAlignfilename = "3V2F_3U5H_correspondences_511bdbc4dc920.csv"
Outputfilename = "3V2F_3U5H_correspondences_511bdbc4dc920.txt"
R3DAlignfilename = "2QBG_3U5H_correspondences_511bdafa59aa6.csv"
Outputfilename = "2QBG_3U5H_correspondences_511bdafa59aa6.txt"
f = open(R3DAlignfilename,'r')
g = open(Outputfilename,'w')
c = 0
for line in f:
t = line.split(",")
if c == 0:
PDB1 = t[1]
PDB2 = t[4]
else:
if t[0].find(":") > 0 and t[3].find(":") > 0:
ID1 = R3DAlignToID(PDB1,t[0])
ID2 = R3DAlignToID(PDB2,t[3])
g.write(ID1 + " corresponds_to " + ID2 + "\n")
c += 1
f.close()
g.close()