kd script with command line args and as function

This commit is contained in:
Tanushree Tunstall 2020-04-07 16:39:50 +01:00
parent 44577b4a0c
commit 6afe202931

View file

@ -70,6 +70,9 @@ print('Output filename:', out_filename
, '\n=============================================================')
#%% end of variable assignment for input and output files
#=======================================================================
#===================
#calculate KD values: same as the expasy server
#===================
#%%specify window size for hydropathy profile computation
# https://web.expasy.org/protscale/pscale/protscale_help.html
my_window = 3
@ -104,6 +107,9 @@ else:
,'\nExpected length:', expected_length
,'\nActual length:', len(kd_values)
, '\n=========================================================')
#===================
# creating two dfs
#===================
#%% make 2 dfs; 1) aa sequence and 2) kd_values. Then reset index for each df
# which will allow easy merging of the two dfs.
@ -153,7 +159,9 @@ else:
print('Checking dtype for after conversion:\n'
, '\ndtype is:', kd_df.index.dtype
, '\n=========================================================')
#%% write file
#===============
# writing file
#===============
print('Writing file:', out_filename
, '\nFilename:', out_filename
, '\nPath:', outdir
@ -166,7 +174,9 @@ print('Finished writing:', out_filename
, '\nNo. of cols:', len(kd_df.columns)
, '\n=============================================================')
#%% plot
#===============
# plot: optional!
#===============#%% plot
# http://www.dalkescientific.com/writings/NBN/plotting.html
# FIXME: save fig