Spaces:
Sleeping
Sleeping
fatmacankara
commited on
Commit
·
4b25e7e
1
Parent(s):
bb579bd
Update code/add_3Dalignment.py
Browse files- code/add_3Dalignment.py +2 -15
code/add_3Dalignment.py
CHANGED
@@ -215,10 +215,8 @@ def get_coords(annot, alignments, coords, resnums_for_sasa, mode):
|
|
215 |
|
216 |
|
217 |
def get_alignments_3D(identifier, model_num, pdb_path, pdbSequence, source, chain, pdbID, mode, path_3D_alignment,file_format = 'gzip'):
|
218 |
-
print('In Function')
|
219 |
pdbSequence = convert_non_standard_amino_acids(pdbSequence)
|
220 |
-
|
221 |
-
print(mode, source)
|
222 |
if mode == 1:
|
223 |
if source == 'PDB':
|
224 |
# Step 1: Fetch the PDB file
|
@@ -265,16 +263,8 @@ def get_alignments_3D(identifier, model_num, pdb_path, pdbSequence, source, chai
|
|
265 |
aligner.substitution_matrix = substitution_matrices.load("BLOSUM62")
|
266 |
aligner.open_gap_score = -11
|
267 |
aligner.extend_gap_score = -1
|
268 |
-
st.write('I wanna sleep')
|
269 |
-
st.write(pdbSequence)
|
270 |
-
st.write(atomSequence)
|
271 |
-
st.write(aligner.align(pdbSequence, atomSequence))
|
272 |
alignments = aligner.align(pdbSequence, atomSequence)
|
273 |
alignments = (list(alignments))
|
274 |
-
print('IN FUNC')
|
275 |
-
print(alignments)
|
276 |
-
print(coords)
|
277 |
-
print(resnums_for_sasa)
|
278 |
return alignments, coords, resnums_for_sasa
|
279 |
elif mode==2:
|
280 |
atomSequence = ''
|
@@ -310,8 +300,5 @@ def get_alignments_3D(identifier, model_num, pdb_path, pdbSequence, source, chai
|
|
310 |
aligner.extend_gap_score = -1
|
311 |
alignments = aligner.align(pdbSequence, atomSequence)
|
312 |
alignments = (list(alignments))
|
313 |
-
|
314 |
-
# f.write(str(alignment))
|
315 |
-
# f.write('\n')
|
316 |
-
# f.write('\n')
|
317 |
return alignments, coords, resnums_for_sasa
|
|
|
215 |
|
216 |
|
217 |
def get_alignments_3D(identifier, model_num, pdb_path, pdbSequence, source, chain, pdbID, mode, path_3D_alignment,file_format = 'gzip'):
|
|
|
218 |
pdbSequence = convert_non_standard_amino_acids(pdbSequence)
|
219 |
+
|
|
|
220 |
if mode == 1:
|
221 |
if source == 'PDB':
|
222 |
# Step 1: Fetch the PDB file
|
|
|
263 |
aligner.substitution_matrix = substitution_matrices.load("BLOSUM62")
|
264 |
aligner.open_gap_score = -11
|
265 |
aligner.extend_gap_score = -1
|
|
|
|
|
|
|
|
|
266 |
alignments = aligner.align(pdbSequence, atomSequence)
|
267 |
alignments = (list(alignments))
|
|
|
|
|
|
|
|
|
268 |
return alignments, coords, resnums_for_sasa
|
269 |
elif mode==2:
|
270 |
atomSequence = ''
|
|
|
300 |
aligner.extend_gap_score = -1
|
301 |
alignments = aligner.align(pdbSequence, atomSequence)
|
302 |
alignments = (list(alignments))
|
303 |
+
|
|
|
|
|
|
|
304 |
return alignments, coords, resnums_for_sasa
|