corrected foldx_outcome classification in combining_dfs.py as positive are Destabilising and neg as Stabilising
This commit is contained in:
parent
c1d9781cb2
commit
46ebed6b3e
1 changed files with 10 additions and 3 deletions
|
@ -190,6 +190,10 @@ foldx_max = foldx_df['ddg_foldx'].max()
|
||||||
foldx_min
|
foldx_min
|
||||||
foldx_max
|
foldx_max
|
||||||
|
|
||||||
|
# quick check
|
||||||
|
len(foldx_df.loc[foldx_df['ddg_foldx'] >= 0])
|
||||||
|
len(foldx_df.loc[foldx_df['ddg_foldx'] < 0])
|
||||||
|
|
||||||
foldx_scale = lambda x : x/abs(foldx_min) if x < 0 else (x/foldx_max if x >= 0 else 'failed')
|
foldx_scale = lambda x : x/abs(foldx_min) if x < 0 else (x/foldx_max if x >= 0 else 'failed')
|
||||||
|
|
||||||
foldx_df['foldx_scaled'] = foldx_df['ddg_foldx'].apply(foldx_scale)
|
foldx_df['foldx_scaled'] = foldx_df['ddg_foldx'].apply(foldx_scale)
|
||||||
|
@ -216,13 +220,16 @@ else:
|
||||||
, '\n======================================================')
|
, '\n======================================================')
|
||||||
|
|
||||||
#-------------------------
|
#-------------------------
|
||||||
# foldx outcome category
|
# foldx outcome category:
|
||||||
|
# Remember, its inverse
|
||||||
|
# +ve: Destabilising
|
||||||
|
# -ve: Stabilising
|
||||||
#--------------------------
|
#--------------------------
|
||||||
foldx_df['foldx_outcome'] = foldx_df['ddg_foldx'].apply(lambda x: 'Stabilising' if x >= 0 else 'Destabilising')
|
foldx_df['foldx_outcome'] = foldx_df['ddg_foldx'].apply(lambda x: 'Destabilising' if x >= 0 else 'Stabilising')
|
||||||
foldx_df[foldx_df['ddg_foldx']>=0].count()
|
foldx_df[foldx_df['ddg_foldx']>=0].count()
|
||||||
foc = foldx_df['foldx_outcome'].value_counts()
|
foc = foldx_df['foldx_outcome'].value_counts()
|
||||||
|
|
||||||
if foc['Stabilising'] == foldx_pos and foc['Stabilising'] == foldx_pos2:
|
if foc['Destabilising'] == foldx_pos and foc['Destabilising'] == foldx_pos2:
|
||||||
print('\nPASS: Foldx outcome category created')
|
print('\nPASS: Foldx outcome category created')
|
||||||
else:
|
else:
|
||||||
print('\nFAIL: Foldx outcome category could NOT be created'
|
print('\nFAIL: Foldx outcome category could NOT be created'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue