Skip to content
Snippets Groups Projects
Commit fbfc632c authored by Joana Pereira's avatar Joana Pereira
Browse files

added option to provide directory with pdb files as input

parent 22afd4e8
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,7 @@ from random import *
from scipy import stats
## DEFINE DEFAULT PARAMETERS
accepted_input_types = ['pdb_file', 'pdbID', 'hhpred', 'pdbsum_fasta']
accepted_input_types = ['pdb_file', 'pdbID', 'pdb_folder', 'hhpred', 'pdbsum_fasta']
accepted_modes = ['membrane', 'non-membrane', 'all']
## 0. FOR LOGGING
......@@ -333,6 +333,9 @@ def get_all_pdbIDs(input_files, input_types):
if input_types[i] == 'pdb_file':
pdb_file = input_string
pdbIDs.append(pdb_file)
elif input_types[i] == 'pdb_folder':
pdb_files = ['{}/{}'.format(input_string, f) for f in os.listdir(input_string) if f.endswith('.pdb')]
pdbIDs += pdb_files
elif input_types[i] == 'pdbID':
pdbIDs.append(input_string)
elif input_types[i] == 'hhpred':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment