69 lines
2.5 KiB
Python
69 lines
2.5 KiB
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
"""
|
|
Created on Wed May 25 02:01:19 2022
|
|
|
|
@author: tanu
|
|
"""
|
|
# TODO
|
|
categorical_cols = ['ss_class', 'wt_prop_water', 'mut_prop_water', 'wt_prop_polarity',
|
|
'mut_prop_polarity', 'wt_calcprop', 'mut_calcprop']
|
|
|
|
foo['water_prop_change'] = foo['wt_prop_water'] + str('_to_') + foo['mut_prop_water']
|
|
foo['water_prop_change'].value_counts()
|
|
water_prop_changeD = {
|
|
'hydrophobic_to_neutral' : ''
|
|
, 'hydrophobic_to_hydrophobic' : 'no_change'
|
|
, 'neutral_to_neutral' : 'no_change'
|
|
, 'neutral_to_hydrophobic' : ''
|
|
, 'hydrophobic_to_hydrophilic' : ''
|
|
, 'neutral_to_hydrophilic' : ''
|
|
, 'hydrophilic_to_neutral' : ''
|
|
, 'hydrophilic_to_hydrophobic' : ''
|
|
, 'hydrophilic_to_hydrophilic' : 'no_change'
|
|
}
|
|
|
|
foo['polarity_prop_change'] = foo['wt_prop_polarity'] + str('_to_') + foo['mut_prop_polarity']
|
|
foo['polarity_prop_change'].value_counts()
|
|
# add a no change category
|
|
|
|
polarity_prop_changeD = {
|
|
'non-polar_to_non-polar' : 'no_change'
|
|
, 'non-polar_to_neutral' : ''
|
|
, 'neutral_to_non-polar' : ''
|
|
, 'neutral_to_neutral' : ''
|
|
, 'non-polar_to_basic' : ''
|
|
, 'acidic_to_neutral' : ''
|
|
, 'basic_to_neutral' : ''
|
|
, 'non-polar_to_acidic' : ''
|
|
, 'neutral_to_basic' : ''
|
|
, 'acidic_to_non-polar' : ''
|
|
, 'basic_to_non-polar' : ''
|
|
, 'neutral_to_acidic' : ''
|
|
, 'acidic_to_acidic' : 'no_change'
|
|
, 'basic_to_acidic' : ''
|
|
, 'basic_to_basic' : 'no_change'
|
|
, 'acidic_to_basic' : ''}
|
|
|
|
|
|
foo['calc_prop_change'] = foo['wt_calcprop'] + str('_to_') + foo['mut_calcprop']
|
|
foo['calc_prop_change'].value_counts()
|
|
|
|
calc_prop_changeD = {
|
|
'non-polar_to_non-polar' : 'no_change'
|
|
, 'non-polar_to_polar' : ''
|
|
, 'polar_to_non-polar' : ''
|
|
, 'non-polar_to_pos' : ''
|
|
, 'neg_to_non-polar' : ''
|
|
, 'non-polar_to_neg' : ''
|
|
, 'pos_to_polar' : ''
|
|
, 'pos_to_non-polar' : ''
|
|
, 'polar_to_polar' : 'no_change'
|
|
, 'neg_to_neg' : 'no_change'
|
|
, 'polar_to_neg' : ''
|
|
, 'pos_to_neg' : ''
|
|
, 'pos_to_pos' : ''
|
|
, 'polar_to_pos' : ''
|
|
, 'neg_to_polar' : ''
|
|
, 'neg_to_pos' : ''
|
|
}
|