changed outcols in dssp and kd outputs

This commit is contained in:
Tanushree Tunstall 2020-03-26 17:12:59 +00:00
parent 5bab99c15f
commit c0bac6fd7b
3 changed files with 14 additions and 9 deletions

View file

@ -56,20 +56,23 @@ in_filename = gene.lower() +'.dssp'
infile = indir + '/' + in_filename
print('Input filename:', in_filename
, '\nInput path:', indir)
# specify PDB chain
my_chain = 'A'
print('======================================================================')
#=======
# output
#=======
outdir = datadir + '/' + drug + '/' + 'output'
out_filename = gene.lower() + '_dssp_df'
out_filename = gene.lower() + '_dssp.csv'
outfile = outdir + '/' + out_filename
print('Output filename:', out_filename
, '\nOutput path:', outdir
,'\nOutfile: ', outfile)
print('======================================================================')
#%% end of variable assignment for input and output files
#=======================================================================
# Process dssp output and extract into df
@ -87,7 +90,7 @@ pp.pprint(dssp_df)
# Rename column (amino acid) as 'wild_type' and (site} as 'position'
# to be the same names as used in the file required for merging later.
dssp_df.columns
dssp_df.rename(columns = {'site':'position', 'amino_acid':'wild_type'}, inplace = True)
dssp_df.rename(columns = {'site':'position', 'amino_acid':'wild_type_dssp'}, inplace = True)
dssp_df.columns
#%% Write ouput csv file