Skip to content

Commit c194556

Browse files
authored
Merge pull request #64 from DeepRank/issue63_capriclass
Update compute_CapriClass conditions
2 parents d7db1c2 + 35617af commit c194556

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

pdb2sql/StructureSimilarity.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,11 @@ def compute_CapriClass(fnat, lrmsd, irmsd, system='protein-protein'):
11631163
"""Compute CAPRI ranking classes.
11641164
11651165
Note:
1166-
Criteira of CAPRI classes https://doi.org/10.1002/prot.10393
1166+
Criteria of CAPRI classes:
1167+
https://doi.org/10.1371/journal.pone.0161879
1168+
https://doi.org/10.1002/prot.21804
1169+
The protocol for classifying predicted model into the four CAPRI
1170+
categories should start with those defining incorrect predictions.
11671171
11681172
Args:
11691173
fnat(float): fnat
@@ -1177,14 +1181,16 @@ def compute_CapriClass(fnat, lrmsd, irmsd, system='protein-protein'):
11771181
"""
11781182

11791183
if system == 'protein-protein':
1180-
if (fnat >= 0.5 and lrmsd <= 1.0) or irmsd <= 1.0:
1181-
label = 'high'
1182-
elif (fnat >= 0.3 and 1.0 < lrmsd <= 5.0) or 1.0 < irmsd <= 2.0:
1183-
label = 'medium'
1184-
elif (fnat >= 0.1 and 5.0 < lrmsd <= 10.0) or 2.0 < irmsd <= 4.0:
1185-
label = 'acceptable'
1186-
else:
1184+
if fnat < 0.1 or (lrmsd > 10.0 and irmsd > 4.0):
11871185
label = 'incorrect'
1186+
elif 0.1 <= fnat < 0.3 and (lrmsd <= 10.0 or irmsd <= 4.0) or \
1187+
(fnat >= 0.3 and lrmsd > 5.0 and irmsd > 2.0):
1188+
label = 'acceptable'
1189+
elif 0.3 <= fnat < 0.5 and (lrmsd <= 5.0 or irmsd <= 2.0) or \
1190+
(fnat >= 0.5 and lrmsd > 1.0 and irmsd > 1.0):
1191+
label = 'medium'
1192+
elif fnat >= 0.5 and (lrmsd <= 1.0 or irmsd <= 1.0):
1193+
label = 'high'
11881194
else:
11891195
warnings.warn(
11901196
f'Invalid complex type {system} for CAPRI class calculation')

0 commit comments

Comments
 (0)