From 7a9b16255a47160168bf7f33e344307236c563d4 Mon Sep 17 00:00:00 2001 From: Tanushree Tunstall Date: Wed, 2 Dec 2020 11:26:26 +0000 Subject: [PATCH] added user defined option for processing dir to allow me to specify external storage device for running it --- foldx/runFoldx.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/foldx/runFoldx.py b/foldx/runFoldx.py index 219f421..1538a6c 100755 --- a/foldx/runFoldx.py +++ b/foldx/runFoldx.py @@ -35,9 +35,10 @@ arg_parser.add_argument('-g', '--gene', help = 'gene name (case sensitive)', arg_parser.add_argument('--datadir', help = 'Data Directory. By default, it assmumes homedir + git/Data') arg_parser.add_argument('-i', '--input_dir', help = 'Input dir containing pdb files. By default, it assmumes homedir + + input') arg_parser.add_argument('-o', '--output_dir', help = 'Output dir for results. By default, it assmes homedir + + output') +arg_parser.add_argument('-p', '--process_dir', help = 'Temp processing dir for running foldX. By default, it assmes homedir + + processing. Make sure it is somewhere with LOTS of storage as it writes all output!') arg_parser.add_argument('-pdb', '--pdb_file', help = 'PDB File to process. By default, it assmumes a file called _complex.pdb in input_dir') -arg_parser.add_argument('-m', '--mutation_file', help = 'Mutation list. By default, assumes a file called _snps.csv exists') +arg_parser.add_argument('-m', '--mutation_file', help = 'Mutation list. By default, assumes a file called _mcsm_snps.csv exists') arg_parser.add_argument('-c1', '--chain1', help = 'Chain1 ID', default = 'A') # case sensitive arg_parser.add_argument('-c2', '--chain2', help = 'Chain2 ID', default = 'B') # case sensitive @@ -56,6 +57,7 @@ gene = args.gene datadir = args.datadir indir = args.input_dir outdir = args.output_dir +process_dir = args.process_dir mut_filename = args.mutation_file chainA = args.chain1 @@ -79,10 +81,10 @@ if not indir: if not outdir: outdir = datadir + '/' + drug + '/output' -# FIXME: this is a temporary directory and should be correctly handled -process_dir = datadir + '/' + drug +'/' + 'processing' +#TODO: perhaps better handled by refactoring code to prevent generating lots of output files! +if not process_dir: + process_dir = datadir + '/' + drug +'/' + 'processing' -#os.mkdir(process_dir) #======= # input #=======