changed outcols in dssp and kd outputs
This commit is contained in:
parent
5bab99c15f
commit
c0bac6fd7b
3 changed files with 14 additions and 9 deletions
|
@ -59,6 +59,7 @@ print('Input filename:', in_filename
|
|||
, '\nInput path:', indir)
|
||||
|
||||
print('======================================================================')
|
||||
|
||||
#=======
|
||||
# output
|
||||
#=======
|
||||
|
@ -111,7 +112,7 @@ print('======================================================================')
|
|||
|
||||
# df1: df of aa seq with index reset to start from 1 (reflective of the actual aa position in a sequence)
|
||||
# Name column of wt as 'wild_type' to be the same name used in the file required for merging later.
|
||||
dfSeq = pd.DataFrame({'wild_type':list(sequence)})
|
||||
dfSeq = pd.DataFrame({'wild_type_kd':list(sequence)})
|
||||
dfSeq.index = np.arange(1, len(dfSeq) + 1) # python is not inclusive
|
||||
|
||||
# df2: df of kd_values with index reset to start from offset + 1 and subsequent matched length of the kd_values
|
||||
|
@ -122,9 +123,9 @@ dfVals.index = np.arange(offset + 1, len(dfVals) + 1 + offset)
|
|||
max(dfVals['kd_values'])
|
||||
min(dfVals['kd_values'])
|
||||
|
||||
#============
|
||||
# merging dfs
|
||||
#============
|
||||
#===================
|
||||
# concatenating dfs
|
||||
#===================
|
||||
# Merge the two on index (as these are now reflective of the aa position numbers): df1 and df2
|
||||
# This will introduce NaN where there is missing values. In our case this will be 2 (first and last ones)
|
||||
# Conveniently, the last position in this case is not part of the struc, so not much loss of info
|
||||
|
@ -133,7 +134,7 @@ min(dfVals['kd_values'])
|
|||
kd_df = pd.concat([dfSeq, dfVals], axis = 1)
|
||||
|
||||
#============================
|
||||
# Renaming index to position
|
||||
# renaming index to position
|
||||
#============================
|
||||
kd_df = kd_df.rename_axis('position')
|
||||
kd_df.head
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue