Spaces:
Running
Running
Commit
·
2ec6e97
1
Parent(s):
5e445fa
Update code/add_structure.py
Browse files- code/add_structure.py +7 -0
code/add_structure.py
CHANGED
@@ -302,6 +302,7 @@ def match3DModels(data):
|
|
302 |
for i in data.index:
|
303 |
pos = int(data.at[i, 'pos'])
|
304 |
coords = data.at[i, 'coordinates']
|
|
|
305 |
if type(coords) != dict:
|
306 |
coordinates = ast.literal_eval(coords)
|
307 |
else:
|
@@ -311,9 +312,13 @@ def match3DModels(data):
|
|
311 |
if data.at[i, 'distance'] == -1000:
|
312 |
domStart = data.at[i, 'domStart']
|
313 |
domEnd = data.at[i, 'domEnd']
|
|
|
|
|
|
|
314 |
data.at[i, 'distance'] = domainDistanceModels(domStart, domEnd, coordinates, pos)
|
315 |
for col in UNIPROT_ANNOTATION_COLS[0:30]:
|
316 |
allDist = []
|
|
|
317 |
if (data.at[i, col] != np.NaN) & (data.at[i, col] != 'hit') & (data.at[i, col] != '[]')& (data.at[i, col] != []):
|
318 |
annotation_list = ast.literal_eval(data.at[i, col])
|
319 |
integer_list = [int(element) for element in annotation_list]
|
@@ -323,6 +328,8 @@ def match3DModels(data):
|
|
323 |
except KeyError:
|
324 |
coordAnnot = []
|
325 |
distance = find_distance(coordMut, coordAnnot)
|
|
|
|
|
326 |
allDist.append(distance)
|
327 |
|
328 |
if len(allDist)>0:
|
|
|
302 |
for i in data.index:
|
303 |
pos = int(data.at[i, 'pos'])
|
304 |
coords = data.at[i, 'coordinates']
|
305 |
+
st.write('POS', pos, type(pos))
|
306 |
if type(coords) != dict:
|
307 |
coordinates = ast.literal_eval(coords)
|
308 |
else:
|
|
|
312 |
if data.at[i, 'distance'] == -1000:
|
313 |
domStart = data.at[i, 'domStart']
|
314 |
domEnd = data.at[i, 'domEnd']
|
315 |
+
st.write('domStart', domStart, type(domStart))
|
316 |
+
st.write('domEnd', domEnd, type(domEnd))
|
317 |
+
st.write(domainDistanceModels(domStart, domEnd, coordinates, pos))
|
318 |
data.at[i, 'distance'] = domainDistanceModels(domStart, domEnd, coordinates, pos)
|
319 |
for col in UNIPROT_ANNOTATION_COLS[0:30]:
|
320 |
allDist = []
|
321 |
+
st.write('col', col, data.at[i, col], type(data.at[i, col]), len(data.at[i, col]))
|
322 |
if (data.at[i, col] != np.NaN) & (data.at[i, col] != 'hit') & (data.at[i, col] != '[]')& (data.at[i, col] != []):
|
323 |
annotation_list = ast.literal_eval(data.at[i, col])
|
324 |
integer_list = [int(element) for element in annotation_list]
|
|
|
328 |
except KeyError:
|
329 |
coordAnnot = []
|
330 |
distance = find_distance(coordMut, coordAnnot)
|
331 |
+
st.write('DISTANCE')
|
332 |
+
st.write(distance)
|
333 |
allDist.append(distance)
|
334 |
|
335 |
if len(allDist)>0:
|