fatmacankara commited on
Commit
22b381a
·
1 Parent(s): 220f66c

Update code/pdb_featureVector.py

Browse files
Files changed (1) hide show
  1. code/pdb_featureVector.py +19 -19
code/pdb_featureVector.py CHANGED
@@ -455,26 +455,26 @@ def pdb(input_set, mode, impute):
455
  final_data = final_data.replace({'nan': np.NaN})
456
  final_data.domains_all = final_data.domains_all.replace({-1: 'NULL'})
457
 
458
- # ready.to_csv(path_to_output_files / 'featurevector_pdb.txt', sep='\t', index=False)
459
- if len(final_data) == 0:
460
- print(
461
- 'No feature vector could be produced for input data. Please check the presence of a structure for the input proteins.')
462
- final_data.to_csv(path_to_output_files / 'featurevector_pdb.txt', sep='\t', index=False)
463
-
464
- print('Feature vector successfully created...')
465
- end = timer()
466
- hours, rem = divmod(end - start, 3600)
467
- minutes, seconds = divmod(rem, 60)
468
- print("Time passed: {:0>2}:{:0>2}:{:05.2f}".format(int(hours), int(minutes), seconds))
469
- if len(no_modbase_models_updated) >0 and (len(no_modbase_models_updated) !=org_len):
470
- st.write(f'{len(no_modbase_models_updated)} of {org_len} datapoins could not be mapped to any structures.')
471
- st.write(f'{org_len-len(no_modbase_models_updated)} of {org_len} datapoins were mapped to a structure.')
472
- elif len(no_modbase_models_updated) == org_len:
473
- st.write(f'0 of {org_len} datapoins could not be mapped to any structures. Feature vector could not be created.')
474
-
475
- return final_data
476
- elif len(no_modbase_models_updated) >0 and (len(no_modbase_models_updated) !=org_len):
477
  st.write(f'{len(no_modbase_models_updated)} of {org_len} datapoins could not be mapped to any structures.')
478
  st.write(f'{org_len-len(no_modbase_models_updated)} of {org_len} datapoins were mapped to a structure.')
479
  elif len(no_modbase_models_updated) == org_len:
480
  st.write(f'0 of {org_len} datapoins could not be mapped to any structures. Feature vector could not be created.')
 
 
 
 
 
 
 
 
455
  final_data = final_data.replace({'nan': np.NaN})
456
  final_data.domains_all = final_data.domains_all.replace({-1: 'NULL'})
457
 
458
+ # ready.to_csv(path_to_output_files / 'featurevector_pdb.txt', sep='\t', index=False)
459
+ if len(final_data) == 0:
460
+ print(
461
+ 'No feature vector could be produced for input data. Please check the presence of a structure for the input proteins.')
462
+ final_data.to_csv(path_to_output_files / 'featurevector_pdb.txt', sep='\t', index=False)
463
+
464
+ print('Feature vector successfully created...')
465
+ end = timer()
466
+ hours, rem = divmod(end - start, 3600)
467
+ minutes, seconds = divmod(rem, 60)
468
+ print("Time passed: {:0>2}:{:0>2}:{:05.2f}".format(int(hours), int(minutes), seconds))
469
+ if len(no_modbase_models_updated) >0 and (len(no_modbase_models_updated) !=org_len):
 
 
 
 
 
 
 
470
  st.write(f'{len(no_modbase_models_updated)} of {org_len} datapoins could not be mapped to any structures.')
471
  st.write(f'{org_len-len(no_modbase_models_updated)} of {org_len} datapoins were mapped to a structure.')
472
  elif len(no_modbase_models_updated) == org_len:
473
  st.write(f'0 of {org_len} datapoins could not be mapped to any structures. Feature vector could not be created.')
474
+
475
+ return final_data
476
+ elif len(no_modbase_models_updated) >0 and (len(no_modbase_models_updated) !=org_len):
477
+ st.write(f'{len(no_modbase_models_updated)} of {org_len} datapoins could not be mapped to any structures.')
478
+ st.write(f'{org_len-len(no_modbase_models_updated)} of {org_len} datapoins were mapped to a structure.')
479
+ elif len(no_modbase_models_updated) == org_len:
480
+ st.write(f'0 of {org_len} datapoins could not be mapped to any structures. Feature vector could not be created.')