From 4c417195bf72af6209c7feed291bf00d986b10e6 Mon Sep 17 00:00:00 2001 From: linucks Date: Fri, 15 Jun 2018 16:54:39 +0100 Subject: [PATCH] Minor fix for cleanup --- ample/ensembler/__init__.py | 1 + ample/main.py | 2 +- ample/util/argparse_util.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ample/ensembler/__init__.py b/ample/ensembler/__init__.py index 460055f4..fabc39f1 100644 --- a/ample/ensembler/__init__.py +++ b/ample/ensembler/__init__.py @@ -94,6 +94,7 @@ def create_ensembles(amoptd): # Hack to pull out the data - need to update code to work with ensemble objects rather than dictionaries amoptd['ensembles'] = [e.pdb for e in ensembles] amoptd['ensembles_data'] = [e.__dict__ for e in ensembles] + amoptd['ensembles_workdir'] = ensembler.work_dir # We need to let the main process know that we have succeeded as this module could be run on a cluster node with no link # to the parent process, so we create a file here indicating that we got this far and didn't die from an exception diff --git a/ample/main.py b/ample/main.py index c1833f56..9cbc3d8d 100644 --- a/ample/main.py +++ b/ample/main.py @@ -167,7 +167,7 @@ def cleanup(optd): """Remove directories based on purge level """ purge_level = optd['purge'] - to_remove = {1 : ['modelling_workdir', 'ensemble_workdir'], + to_remove = {1 : ['modelling_workdir', 'ensembles_workdir'], 2 : ['models_dir', 'ensembles_directory', 'contacts_dir']} for level in to_remove.keys(): if purge_level >= level: diff --git a/ample/util/argparse_util.py b/ample/util/argparse_util.py index ab110f8e..d66a7e6b 100644 --- a/ample/util/argparse_util.py +++ b/ample/util/argparse_util.py @@ -89,7 +89,7 @@ def add_general_options(parser=None): parser.add_argument('-nmr_process', type=int, help='number of times to process the NMR models') parser.add_argument('-nmr_remodel', metavar='True/False', help='Remodel the NMR structures') parser.add_argument('-nmr_remodel_fasta', help='The FASTA sequence to be used for remodelling the NMR ensemble if different from the default FASTA sequence') - parser.add_argument('-purge', metavar='purge_level', choices=[0, 1, 2], help='Delete intermediate files and failed MRBUMP results: 0 - None, 1 - Some, 2 - All possible') + parser.add_argument('-purge', metavar='purge_level', type=int, choices=[0, 1, 2], help='Delete intermediate files and failed MRBUMP results: 0 - None, 1 - Some, 2 - All possible') parser.add_argument('-psipred_ss2', metavar='PSIPRED_FILE', help='Psipred secondary structure prediction file') parser.add_argument('-quick_mode', metavar='True/False', help='Preset options to run quickly, but less thoroughly') parser.add_argument('-restart_pkl', help='Rerun a job using the pickled ample dictionary')