Spaces:
Sleeping
Sleeping
fatmacankara
commited on
Commit
·
e130079
1
Parent(s):
f2540fb
Update code/add_3Dalignment.py
Browse files- code/add_3Dalignment.py +6 -1
code/add_3Dalignment.py
CHANGED
@@ -226,19 +226,24 @@ def get_alignments_3D(identifier, model_num, pdb_path, pdbSequence, source, chai
|
|
226 |
print(pdb_url)
|
227 |
response = requests.get(pdb_url)
|
228 |
response.raise_for_status() # Check for a successful response
|
229 |
-
print(response)
|
230 |
# Step 2: Parse the PDB file from memory
|
231 |
atoms = [i for i in response.text.split('\n') if i.startswith('ATOM')]
|
|
|
232 |
print(atoms)
|
233 |
atoms = [i.split() for i in atoms]
|
234 |
atoms = [i for i in atoms if (i[2] == 'CA' and i[4] == chain)]
|
|
|
235 |
print(atoms)
|
236 |
|
|
|
237 |
atomSequence = ''.join([three_to_one(i[3]) for i in atoms])
|
|
|
238 |
print(atomSequence)
|
239 |
coords = [[i[6] ,i[7] ,i[8]] for i in atoms]
|
|
|
240 |
print(coords)
|
241 |
resnums_for_sasa = [i[5] for i in atoms]
|
|
|
242 |
print(resnums_for_sasa)
|
243 |
elif source == 'SWISSMODEL':
|
244 |
atomSequence = ''
|
|
|
226 |
print(pdb_url)
|
227 |
response = requests.get(pdb_url)
|
228 |
response.raise_for_status() # Check for a successful response
|
|
|
229 |
# Step 2: Parse the PDB file from memory
|
230 |
atoms = [i for i in response.text.split('\n') if i.startswith('ATOM')]
|
231 |
+
print('ATOMS')
|
232 |
print(atoms)
|
233 |
atoms = [i.split() for i in atoms]
|
234 |
atoms = [i for i in atoms if (i[2] == 'CA' and i[4] == chain)]
|
235 |
+
print('ATOMS 2')
|
236 |
print(atoms)
|
237 |
|
238 |
+
|
239 |
atomSequence = ''.join([three_to_one(i[3]) for i in atoms])
|
240 |
+
print('atomSequence')
|
241 |
print(atomSequence)
|
242 |
coords = [[i[6] ,i[7] ,i[8]] for i in atoms]
|
243 |
+
print('coords')
|
244 |
print(coords)
|
245 |
resnums_for_sasa = [i[5] for i in atoms]
|
246 |
+
print('resnums_for_sasa')
|
247 |
print(resnums_for_sasa)
|
248 |
elif source == 'SWISSMODEL':
|
249 |
atomSequence = ''
|