Spaces:
Sleeping
Sleeping
Commit
·
f37d05e
1
Parent(s):
06faac0
Update code/add_3Dalignment.py
Browse files- code/add_3Dalignment.py +4 -0
code/add_3Dalignment.py
CHANGED
@@ -275,10 +275,13 @@ def get_alignments_3D(identifier, model_num, pdb_path, pdbSequence, source, chai
|
|
275 |
|
276 |
return alignments, coords, resnums_for_sasa
|
277 |
elif mode==2:
|
|
|
|
|
278 |
atomSequence = ''
|
279 |
coords = []
|
280 |
resnums_for_sasa = []
|
281 |
if file_format == 'txt':
|
|
|
282 |
with open(name, encoding="utf8") as f:
|
283 |
for line in f.readlines():
|
284 |
if line[0:4].strip() == 'ATOM' and line[13:15].strip() == 'CA':
|
@@ -290,6 +293,7 @@ def get_alignments_3D(identifier, model_num, pdb_path, pdbSequence, source, chai
|
|
290 |
coords.append([line[31:38].strip(), line[39:46].strip(), line[47:54].strip()])
|
291 |
resnums_for_sasa.append(line[22:26].strip())
|
292 |
elif file_format == 'gzip':
|
|
|
293 |
with gzip.open(pdb_path, mode='rb') as f:
|
294 |
for line in f:
|
295 |
line = line.decode()
|
|
|
275 |
|
276 |
return alignments, coords, resnums_for_sasa
|
277 |
elif mode==2:
|
278 |
+
st.write('Hello I am in 3Dalignment')
|
279 |
+
|
280 |
atomSequence = ''
|
281 |
coords = []
|
282 |
resnums_for_sasa = []
|
283 |
if file_format == 'txt':
|
284 |
+
st.write('Hello I am in 3Dalignment TXT')
|
285 |
with open(name, encoding="utf8") as f:
|
286 |
for line in f.readlines():
|
287 |
if line[0:4].strip() == 'ATOM' and line[13:15].strip() == 'CA':
|
|
|
293 |
coords.append([line[31:38].strip(), line[39:46].strip(), line[47:54].strip()])
|
294 |
resnums_for_sasa.append(line[22:26].strip())
|
295 |
elif file_format == 'gzip':
|
296 |
+
st.write('Hello I am in 3Dalignment GZIP')
|
297 |
with gzip.open(pdb_path, mode='rb') as f:
|
298 |
for line in f:
|
299 |
line = line.decode()
|