Spaces:
Sleeping
Sleeping
Commit
·
832880b
1
Parent(s):
b99df6a
Update code/pdb_featureVector.py
Browse files
code/pdb_featureVector.py
CHANGED
|
@@ -227,6 +227,8 @@ def pdb(input_set, mode, impute):
|
|
| 227 |
existing_pdb = [i.split('/')[-1].split('.')[0].lower() for i in existing_pdb]
|
| 228 |
cnt = 0
|
| 229 |
for search in pdbs:
|
|
|
|
|
|
|
| 230 |
try:
|
| 231 |
if search.lower() not in existing_pdb:
|
| 232 |
file = pdbl.retrieve_pdb_file(search, pdir=Path(path_to_output_files / 'pdb_structures'), file_format="pdb")
|
|
@@ -367,7 +369,7 @@ def pdb(input_set, mode, impute):
|
|
| 367 |
with_pdb.replace({'[]': 'nan'}, inplace=True)
|
| 368 |
with_pdb.replace({'nan-nan': 'nan'}, inplace=True)
|
| 369 |
with_pdb.replace({'': 'nan'}, inplace=True)
|
| 370 |
-
|
| 371 |
"""
|
| 372 |
STEP 7
|
| 373 |
Do alignment for PDB
|
|
@@ -406,7 +408,7 @@ def pdb(input_set, mode, impute):
|
|
| 406 |
print('Aligning sequences...\n')
|
| 407 |
aligned_m = final_stage(dfM, annotation_list, Path(path_to_output_files / 'alignment_files'))
|
| 408 |
aligned_nm = final_stage(dfNM, annotation_list, Path(path_to_output_files / 'alignment_files'))
|
| 409 |
-
|
| 410 |
# When PDB sequence is nan, it is wrongly aligned to the UniProt sequence. Fix them.
|
| 411 |
for i in aligned_m.index:
|
| 412 |
if aligned_m.at[i, 'pdbSequence'] == 'nan':
|
|
@@ -448,6 +450,7 @@ def pdb(input_set, mode, impute):
|
|
| 448 |
yes_pdb_no_match = after_up_pdb_alignment[
|
| 449 |
(after_up_pdb_alignment.pdbID != 'nan') & (after_up_pdb_alignment.mutationPositionOnPDB == 'nan')]
|
| 450 |
no_pdb = no_pdb.copy()
|
|
|
|
| 451 |
|
| 452 |
|
| 453 |
print('PDB matching is completed...\n')
|
|
|
|
| 227 |
existing_pdb = [i.split('/')[-1].split('.')[0].lower() for i in existing_pdb]
|
| 228 |
cnt = 0
|
| 229 |
for search in pdbs:
|
| 230 |
+
st.write('PDBS', search)
|
| 231 |
+
|
| 232 |
try:
|
| 233 |
if search.lower() not in existing_pdb:
|
| 234 |
file = pdbl.retrieve_pdb_file(search, pdir=Path(path_to_output_files / 'pdb_structures'), file_format="pdb")
|
|
|
|
| 369 |
with_pdb.replace({'[]': 'nan'}, inplace=True)
|
| 370 |
with_pdb.replace({'nan-nan': 'nan'}, inplace=True)
|
| 371 |
with_pdb.replace({'': 'nan'}, inplace=True)
|
| 372 |
+
|
| 373 |
"""
|
| 374 |
STEP 7
|
| 375 |
Do alignment for PDB
|
|
|
|
| 408 |
print('Aligning sequences...\n')
|
| 409 |
aligned_m = final_stage(dfM, annotation_list, Path(path_to_output_files / 'alignment_files'))
|
| 410 |
aligned_nm = final_stage(dfNM, annotation_list, Path(path_to_output_files / 'alignment_files'))
|
| 411 |
+
st.write('aligned', aligned_m)
|
| 412 |
# When PDB sequence is nan, it is wrongly aligned to the UniProt sequence. Fix them.
|
| 413 |
for i in aligned_m.index:
|
| 414 |
if aligned_m.at[i, 'pdbSequence'] == 'nan':
|
|
|
|
| 450 |
yes_pdb_no_match = after_up_pdb_alignment[
|
| 451 |
(after_up_pdb_alignment.pdbID != 'nan') & (after_up_pdb_alignment.mutationPositionOnPDB == 'nan')]
|
| 452 |
no_pdb = no_pdb.copy()
|
| 453 |
+
st.write('pdb_aligned', pdb_aligned)
|
| 454 |
|
| 455 |
|
| 456 |
print('PDB matching is completed...\n')
|