Spaces:
Sleeping
Sleeping
Commit
·
9737d13
1
Parent(s):
52172a4
Update code/pdb_featureVector.py
Browse files- code/pdb_featureVector.py +2 -15
code/pdb_featureVector.py
CHANGED
|
@@ -208,7 +208,7 @@ def pdb(input_set, mode, impute):
|
|
| 208 |
swiss = isZeroDistance(swiss)
|
| 209 |
swiss = match3DModels(swiss)
|
| 210 |
swiss = selectMaxAnnot(swiss)
|
| 211 |
-
swiss = swiss.sort_values(by=['datapoint', 'qmean_norm', 'distance', 'hitTotal', 'annotTotal'], ascending=[True,
|
| 212 |
swiss = swiss.drop_duplicates(['datapoint'])
|
| 213 |
swiss.replace({'[]': np.NaN, 'hit': 0.0}, inplace=True)
|
| 214 |
else:
|
|
@@ -238,10 +238,6 @@ def pdb(input_set, mode, impute):
|
|
| 238 |
modbase_simple = modbase[['uniprotID', 'wt', 'pos', 'mut','datapoint']]
|
| 239 |
modbase_simple = modbase_simple.drop_duplicates(['uniprotID', 'wt', 'pos' ,'mut','datapoint'])
|
| 240 |
modbaseOut, no_modbase_models_updated = addModbaseModels(modbase_simple, path_to_input_files, path_to_output_files)
|
| 241 |
-
st.write('modbaseOut')
|
| 242 |
-
st.write(modbaseOut)
|
| 243 |
-
st.write('no_modbase_models_updated')
|
| 244 |
-
st.write(no_modbase_models_updated)
|
| 245 |
|
| 246 |
if len(modbaseOut) > 0:
|
| 247 |
modbase = modbase.merge(modbaseOut, on = ['uniprotID', 'wt', 'pos', 'mut','datapoint'], how = 'left')
|
|
@@ -256,19 +252,10 @@ def pdb(input_set, mode, impute):
|
|
| 256 |
modbase = isZeroDistance(modbase)
|
| 257 |
modbase = match3DModels(modbase)
|
| 258 |
modbase = selectMaxAnnot(modbase)
|
| 259 |
-
modbase['quality_score'] = modbase['quality_score'].astype(float)
|
| 260 |
-
modbase['distance'] = modbase['distance'].astype(float)
|
| 261 |
-
modbase['hitTotal'] = modbase['hitTotal'].astype(float)
|
| 262 |
-
modbase['annotTotal'] = modbase['annotTotal'].astype(float)
|
| 263 |
-
st.write('UALITY')
|
| 264 |
-
st.write(modbase['quality_score'])
|
| 265 |
modbase = modbase.sort_values(by=['datapoint', 'quality_score', 'distance','hitTotal', 'annotTotal'], ascending=[True, False, True, False, True])
|
| 266 |
-
st.write('SORTED')
|
| 267 |
-
st.write(modbase)
|
| 268 |
modbase = modbase.drop_duplicates(['datapoint'])
|
| 269 |
modbase.replace({'[]': np.NaN, 'hit': 0.0}, inplace=True)
|
| 270 |
-
|
| 271 |
-
st.write(modbase)
|
| 272 |
else:
|
| 273 |
modbase = pd.DataFrame(columns = SIMPLE_COLS)
|
| 274 |
|
|
|
|
| 208 |
swiss = isZeroDistance(swiss)
|
| 209 |
swiss = match3DModels(swiss)
|
| 210 |
swiss = selectMaxAnnot(swiss)
|
| 211 |
+
swiss = swiss.sort_values(by=['datapoint', 'qmean_norm', 'distance', 'hitTotal', 'annotTotal'], ascending=[True, False, True, False, True])
|
| 212 |
swiss = swiss.drop_duplicates(['datapoint'])
|
| 213 |
swiss.replace({'[]': np.NaN, 'hit': 0.0}, inplace=True)
|
| 214 |
else:
|
|
|
|
| 238 |
modbase_simple = modbase[['uniprotID', 'wt', 'pos', 'mut','datapoint']]
|
| 239 |
modbase_simple = modbase_simple.drop_duplicates(['uniprotID', 'wt', 'pos' ,'mut','datapoint'])
|
| 240 |
modbaseOut, no_modbase_models_updated = addModbaseModels(modbase_simple, path_to_input_files, path_to_output_files)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 241 |
|
| 242 |
if len(modbaseOut) > 0:
|
| 243 |
modbase = modbase.merge(modbaseOut, on = ['uniprotID', 'wt', 'pos', 'mut','datapoint'], how = 'left')
|
|
|
|
| 252 |
modbase = isZeroDistance(modbase)
|
| 253 |
modbase = match3DModels(modbase)
|
| 254 |
modbase = selectMaxAnnot(modbase)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 255 |
modbase = modbase.sort_values(by=['datapoint', 'quality_score', 'distance','hitTotal', 'annotTotal'], ascending=[True, False, True, False, True])
|
|
|
|
|
|
|
| 256 |
modbase = modbase.drop_duplicates(['datapoint'])
|
| 257 |
modbase.replace({'[]': np.NaN, 'hit': 0.0}, inplace=True)
|
| 258 |
+
|
|
|
|
| 259 |
else:
|
| 260 |
modbase = pd.DataFrame(columns = SIMPLE_COLS)
|
| 261 |
|