libokj commited on
Commit
dbd89d1
·
1 Parent(s): 942a4e3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1104,7 +1104,7 @@ def update_df(file, progress=gr.Progress(track_tqdm=True)):
1104
  lambda smiles: PandasTools._MolPlusFingerprint(Chem.MolFromSmiles(smiles)))
1105
  df['Scaffold'] = df['Compound'].parallel_apply(MurckoScaffold.GetScaffoldForMol)
1106
  df['Scaffold SMILES'] = df['Scaffold'].parallel_apply(lambda x: Chem.MolToSmiles(x))
1107
-
1108
  if task == 'Compound-Protein Binding Affinity':
1109
  # Convert Y^ from pIC50 to IC50
1110
  if 'Y^' in df.columns:
@@ -1223,6 +1223,8 @@ def create_html_report(df, file=None, task=None, opts=(), progress=gr.Progress(t
1223
  # FIXME: Temporarily drop pharmacophore column before an image solution is found
1224
  if 'Pharmacophore' in df_html.columns:
1225
  df_html.drop(['Pharmacophore'], axis=1, inplace=True)
 
 
1226
 
1227
  styled_df = df_html.fillna('').style.format(precision=3)
1228
 
 
1104
  lambda smiles: PandasTools._MolPlusFingerprint(Chem.MolFromSmiles(smiles)))
1105
  df['Scaffold'] = df['Compound'].parallel_apply(MurckoScaffold.GetScaffoldForMol)
1106
  df['Scaffold SMILES'] = df['Scaffold'].parallel_apply(lambda x: Chem.MolToSmiles(x))
1107
+ df['Pharmacophore'] = None
1108
  if task == 'Compound-Protein Binding Affinity':
1109
  # Convert Y^ from pIC50 to IC50
1110
  if 'Y^' in df.columns:
 
1223
  # FIXME: Temporarily drop pharmacophore column before an image solution is found
1224
  if 'Pharmacophore' in df_html.columns:
1225
  df_html.drop(['Pharmacophore'], axis=1, inplace=True)
1226
+ if unique_df is not None and 'Pharmacophore' in unique_df.columns:
1227
+ unique_df.drop(['Pharmacophore'], axis=1, inplace=True)
1228
 
1229
  styled_df = df_html.fillna('').style.format(precision=3)
1230