Anton Bushuiev commited on
Commit
1c84dba
·
1 Parent(s): 98b3032

Improve ddG format

Browse files
Files changed (2) hide show
  1. app.py +3 -1
  2. requirements.txt +1 -1
app.py CHANGED
@@ -6,6 +6,7 @@ from functools import partial
6
 
7
  import gradio as gr
8
  import torch
 
9
  from Bio.PDB.Polypeptide import protein_letters_3to1
10
  from biopandas.pdb import PandasPdb
11
  from colour import Color
@@ -225,6 +226,7 @@ def predict(models, temp_dir, *inputs):
225
 
226
  # Create dataframe
227
  ddg = ddg.detach().numpy().tolist()
 
228
  df = list(zip(muts, ddg))
229
 
230
  # Create 3DMol plot
@@ -284,7 +286,7 @@ with app:
284
  # Output GUI
285
  gr.Markdown("## Predictions")
286
  df = gr.Dataframe(
287
- headers=["Mutation", "ddG"],
288
  datatype=["str", "number"],
289
  col_count=(2, "fixed"),
290
  )
 
6
 
7
  import gradio as gr
8
  import torch
9
+ import numpy as np
10
  from Bio.PDB.Polypeptide import protein_letters_3to1
11
  from biopandas.pdb import PandasPdb
12
  from colour import Color
 
226
 
227
  # Create dataframe
228
  ddg = ddg.detach().numpy().tolist()
229
+ ddg = np.round(ddg, 3)
230
  df = list(zip(muts, ddg))
231
 
232
  # Create 3DMol plot
 
286
  # Output GUI
287
  gr.Markdown("## Predictions")
288
  df = gr.Dataframe(
289
+ headers=["Mutation", "ddG [kcal/mol]"],
290
  datatype=["str", "number"],
291
  col_count=(2, "fixed"),
292
  )
requirements.txt CHANGED
@@ -1,2 +1,2 @@
1
  ppiformer @ git+https://github.com/anton-bushuiev/ppiformer.git@main
2
- gradio
 
1
  ppiformer @ git+https://github.com/anton-bushuiev/ppiformer.git@main
2
+ gradio==4.17.0