Spaces:
Sleeping
Sleeping
Commit
·
b12804e
1
Parent(s):
5f5b698
Update code/modbaseModelAdd.py
Browse files- code/modbaseModelAdd.py +3 -6
code/modbaseModelAdd.py
CHANGED
|
@@ -217,14 +217,8 @@ def addModbaseModels(dataframe, path_to_input_files, path_to_output_files):
|
|
| 217 |
include_hetatms=True,
|
| 218 |
outdir=None, force_rerun=False, file_type='pdb')
|
| 219 |
filename = Path(path_to_output_files / 'freesasa_files' / f'{model_id.lower()}.txt')
|
| 220 |
-
st.write('filename', filename)
|
| 221 |
-
st.write('varPos', varPos)
|
| 222 |
-
st.write('wt', wt)
|
| 223 |
-
st.write('protein', protein)
|
| 224 |
st.write('path_to_output_files', path_to_output_files)
|
| 225 |
sasa_val = sasa(protein, varPos, wt, 1, filename, path_to_output_files, file_type='pdb')
|
| 226 |
-
st.write('sasa', sasa_val)
|
| 227 |
-
st.write('model_id', model_id)
|
| 228 |
with open(path_to_output_files / 'modbase_structures_individual'/ f'{model_id}.txt', encoding="utf8") as m:
|
| 229 |
|
| 230 |
lines = m.readlines()
|
|
@@ -263,6 +257,8 @@ def addModbaseModels(dataframe, path_to_input_files, path_to_output_files):
|
|
| 263 |
'model_id': model_id, 'coordinates': coordDict,
|
| 264 |
'AAonPDB': AAonPDB, 'coordVAR': coordVAR, 'sasa':sasa_val}
|
| 265 |
modbase_reduced = modbase_reduced.append(new_row, ignore_index=True)
|
|
|
|
|
|
|
| 266 |
modbase_reduced = modbase_reduced[['uniprotID', 'quality_score', 'model_id', 'coordinates', 'AAonPDB', 'coordVAR', 'sasa']]
|
| 267 |
st.write('DF')
|
| 268 |
st.write(dataframe)
|
|
@@ -296,6 +292,7 @@ def addModbaseModels(dataframe, path_to_input_files, path_to_output_files):
|
|
| 296 |
no_modbase_no_Coord = modbase[pd.isna(modbase['coordVAR'])]
|
| 297 |
no_modbase = pd.concat([no_modbase, no_modbase_no_Coord])
|
| 298 |
modbase = modbase[~pd.isna(modbase['coordVAR'])]
|
|
|
|
| 299 |
st.write(modbase[['datapoint', 'model_id', 'sasa']])
|
| 300 |
no_modbase = no_modbase[keep_cols]
|
| 301 |
return modbase, no_modbase
|
|
|
|
| 217 |
include_hetatms=True,
|
| 218 |
outdir=None, force_rerun=False, file_type='pdb')
|
| 219 |
filename = Path(path_to_output_files / 'freesasa_files' / f'{model_id.lower()}.txt')
|
|
|
|
|
|
|
|
|
|
|
|
|
| 220 |
st.write('path_to_output_files', path_to_output_files)
|
| 221 |
sasa_val = sasa(protein, varPos, wt, 1, filename, path_to_output_files, file_type='pdb')
|
|
|
|
|
|
|
| 222 |
with open(path_to_output_files / 'modbase_structures_individual'/ f'{model_id}.txt', encoding="utf8") as m:
|
| 223 |
|
| 224 |
lines = m.readlines()
|
|
|
|
| 257 |
'model_id': model_id, 'coordinates': coordDict,
|
| 258 |
'AAonPDB': AAonPDB, 'coordVAR': coordVAR, 'sasa':sasa_val}
|
| 259 |
modbase_reduced = modbase_reduced.append(new_row, ignore_index=True)
|
| 260 |
+
st.write('modbase_reduced')
|
| 261 |
+
st.write(modbase_reduced)
|
| 262 |
modbase_reduced = modbase_reduced[['uniprotID', 'quality_score', 'model_id', 'coordinates', 'AAonPDB', 'coordVAR', 'sasa']]
|
| 263 |
st.write('DF')
|
| 264 |
st.write(dataframe)
|
|
|
|
| 292 |
no_modbase_no_Coord = modbase[pd.isna(modbase['coordVAR'])]
|
| 293 |
no_modbase = pd.concat([no_modbase, no_modbase_no_Coord])
|
| 294 |
modbase = modbase[~pd.isna(modbase['coordVAR'])]
|
| 295 |
+
st.write('FINAL MODBASE BEFORE LEAVING')
|
| 296 |
st.write(modbase[['datapoint', 'model_id', 'sasa']])
|
| 297 |
no_modbase = no_modbase[keep_cols]
|
| 298 |
return modbase, no_modbase
|