tidy code and saving work for the day
This commit is contained in:
parent
69e2567ffc
commit
afd6ca8881
6 changed files with 307 additions and 284 deletions
|
@ -55,13 +55,12 @@ indir = datadir + '/' + drug + '/' + 'output'
|
|||
in_filename = gene.lower() +'.dssp'
|
||||
infile = indir + '/' + in_filename
|
||||
print('Input filename:', in_filename
|
||||
, '\nInput path:', indir)
|
||||
, '\nInput path:', indir
|
||||
, '\n============================================================')
|
||||
|
||||
# specify PDB chain
|
||||
my_chain = 'A'
|
||||
|
||||
print('======================================================================')
|
||||
|
||||
#=======
|
||||
# output
|
||||
#=======
|
||||
|
@ -70,9 +69,9 @@ out_filename = gene.lower() + '_dssp.csv'
|
|||
outfile = outdir + '/' + out_filename
|
||||
print('Output filename:', out_filename
|
||||
, '\nOutput path:', outdir
|
||||
,'\nOutfile: ', outfile)
|
||||
, '\nOutfile: ', outfile
|
||||
, '\n=============================================================')
|
||||
|
||||
print('======================================================================')
|
||||
#%% end of variable assignment for input and output files
|
||||
#=======================================================================
|
||||
# Process dssp output and extract into df
|
||||
|
@ -96,14 +95,15 @@ dssp_df.columns
|
|||
#%% Write ouput csv file
|
||||
print('Writing file:', outfile
|
||||
, '\nFilename:', out_filename
|
||||
, '\nPath:', outdir)
|
||||
, '\nPath:', outdir
|
||||
, '\n=============================================================')
|
||||
|
||||
# write to csv
|
||||
dssp_df.to_csv(outfile, header=True, index = False)
|
||||
|
||||
print('Finished writing:', out_filename
|
||||
, '\nNo. of rows:', len(dssp_df)
|
||||
, '\nNo. of cols:', len(dssp_df.columns))
|
||||
print('======================================================================')
|
||||
, '\nNo. of cols:', len(dssp_df.columns)
|
||||
, '\n==============================================================')
|
||||
#%% end of script
|
||||
#=======================================================================
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue