Spaces:
Sleeping
Sleeping
Commit
·
7465dfc
1
Parent(s):
11ae51f
Update code/pdb_featureVector.py
Browse files- code/pdb_featureVector.py +11 -7
code/pdb_featureVector.py
CHANGED
@@ -222,7 +222,7 @@ def pdb(input_set, mode, impute):
|
|
222 |
data = response.json()
|
223 |
st.write(list(list(list(data.values())[0].values())[0].keys()))
|
224 |
return list(list(list(data.values())[0].values())[0].keys())
|
225 |
-
|
226 |
for search in pdbs:
|
227 |
# Step 1: Fetch the PDB file
|
228 |
pdb_url = f"https://files.rcsb.org/download/{search}.pdb"
|
@@ -274,12 +274,12 @@ def pdb(input_set, mode, impute):
|
|
274 |
if chain_id in pdb_data_list:
|
275 |
# Print UniProt IDs, chain ID, and resolution for the current model
|
276 |
chain_id = chain.get_id()
|
277 |
-
st.write(f"---- Information for Chain {chain_id} in Model {i} ----")
|
278 |
-
st.write(f"UniProt IDs: {', '.join(uniprot_ids)}")
|
279 |
-
st.write(f"Chain ID: {chain_id}")
|
280 |
-
st.write(f"PDB ID: {search.upper()}")
|
281 |
-
st.write(f"Resolution: {resolution}")
|
282 |
-
st.write(f"Sequence: {sequence}")
|
283 |
pdb_fasta.at[index, 'pdbID'] = search
|
284 |
pdb_fasta.at[index, 'chain'] = chain_id
|
285 |
pdb_fasta.at[index, 'pdbSequence'] = str(seqs[chain_id])
|
@@ -437,6 +437,10 @@ def pdb(input_set, mode, impute):
|
|
437 |
print('Aligning sequences...\n')
|
438 |
aligned_m = final_stage(dfM, annotation_list, Path(path_to_output_files / 'alignment_files'))
|
439 |
aligned_nm = final_stage(dfNM, annotation_list, Path(path_to_output_files / 'alignment_files'))
|
|
|
|
|
|
|
|
|
440 |
# When PDB sequence is nan, it is wrongly aligned to the UniProt sequence. Fix them.
|
441 |
for i in aligned_m.index:
|
442 |
if aligned_m.at[i, 'pdbSequence'] == 'nan':
|
|
|
222 |
data = response.json()
|
223 |
st.write(list(list(list(data.values())[0].values())[0].keys()))
|
224 |
return list(list(list(data.values())[0].values())[0].keys())
|
225 |
+
|
226 |
for search in pdbs:
|
227 |
# Step 1: Fetch the PDB file
|
228 |
pdb_url = f"https://files.rcsb.org/download/{search}.pdb"
|
|
|
274 |
if chain_id in pdb_data_list:
|
275 |
# Print UniProt IDs, chain ID, and resolution for the current model
|
276 |
chain_id = chain.get_id()
|
277 |
+
#st.write(f"---- Information for Chain {chain_id} in Model {i} ----")
|
278 |
+
#st.write(f"UniProt IDs: {', '.join(uniprot_ids)}")
|
279 |
+
#st.write(f"Chain ID: {chain_id}")
|
280 |
+
#st.write(f"PDB ID: {search.upper()}")
|
281 |
+
#st.write(f"Resolution: {resolution}")
|
282 |
+
#st.write(f"Sequence: {sequence}")
|
283 |
pdb_fasta.at[index, 'pdbID'] = search
|
284 |
pdb_fasta.at[index, 'chain'] = chain_id
|
285 |
pdb_fasta.at[index, 'pdbSequence'] = str(seqs[chain_id])
|
|
|
437 |
print('Aligning sequences...\n')
|
438 |
aligned_m = final_stage(dfM, annotation_list, Path(path_to_output_files / 'alignment_files'))
|
439 |
aligned_nm = final_stage(dfNM, annotation_list, Path(path_to_output_files / 'alignment_files'))
|
440 |
+
st.write('aligned_m')
|
441 |
+
st.write(aligned_m)
|
442 |
+
st.write('aligned_nm')
|
443 |
+
st.write(aligned_nm)
|
444 |
# When PDB sequence is nan, it is wrongly aligned to the UniProt sequence. Fix them.
|
445 |
for i in aligned_m.index:
|
446 |
if aligned_m.at[i, 'pdbSequence'] == 'nan':
|