Spaces:
Running
Running
ThorbenFroehlking
commited on
Commit
·
ff689ae
1
Parent(s):
f506fb3
Update
Browse files- .ipynb_checkpoints/app-checkpoint.py +4 -4
- app.py +4 -4
.ipynb_checkpoints/app-checkpoint.py
CHANGED
@@ -92,10 +92,10 @@ def process_pdb(pdb_id, segment):
|
|
92 |
scores = expit(outputs[:, 1] - outputs[:, 0])
|
93 |
normalized_scores = normalize_scores(scores)
|
94 |
|
95 |
-
result_str = "\n".join(
|
96 |
-
f"{
|
97 |
-
for
|
98 |
-
)
|
99 |
|
100 |
# Save the predictions to a file
|
101 |
prediction_file = f"{pdb_id}_predictions.txt"
|
|
|
92 |
scores = expit(outputs[:, 1] - outputs[:, 0])
|
93 |
normalized_scores = normalize_scores(scores)
|
94 |
|
95 |
+
result_str = "\n".join([
|
96 |
+
f"{res.get_resname()} {res.id[1]} {sequence[i]} {normalized_scores[i]:.2f}"
|
97 |
+
for i, res in enumerate(chain) if res.get_resname().strip() in aa_dict
|
98 |
+
])
|
99 |
|
100 |
# Save the predictions to a file
|
101 |
prediction_file = f"{pdb_id}_predictions.txt"
|
app.py
CHANGED
@@ -92,10 +92,10 @@ def process_pdb(pdb_id, segment):
|
|
92 |
scores = expit(outputs[:, 1] - outputs[:, 0])
|
93 |
normalized_scores = normalize_scores(scores)
|
94 |
|
95 |
-
result_str = "\n".join(
|
96 |
-
f"{
|
97 |
-
for
|
98 |
-
)
|
99 |
|
100 |
# Save the predictions to a file
|
101 |
prediction_file = f"{pdb_id}_predictions.txt"
|
|
|
92 |
scores = expit(outputs[:, 1] - outputs[:, 0])
|
93 |
normalized_scores = normalize_scores(scores)
|
94 |
|
95 |
+
result_str = "\n".join([
|
96 |
+
f"{res.get_resname()} {res.id[1]} {sequence[i]} {normalized_scores[i]:.2f}"
|
97 |
+
for i, res in enumerate(chain) if res.get_resname().strip() in aa_dict
|
98 |
+
])
|
99 |
|
100 |
# Save the predictions to a file
|
101 |
prediction_file = f"{pdb_id}_predictions.txt"
|