fixed white space prob with mcsm input with merge

This commit is contained in:
Tanushree Tunstall 2020-07-14 14:07:23 +01:00
parent 5a2084ba11
commit 8dc2fa7326
6 changed files with 108 additions and 98 deletions

View file

@ -36,7 +36,6 @@ arg_parser.add_argument('--datadir', help = 'Data Directory. By default, it assm
arg_parser.add_argument('-i', '--input_dir', help = 'Input dir containing pdb files. By default, it assmumes homedir + <drug> + input')
arg_parser.add_argument('-o', '--output_dir', help = 'Output dir for results. By default, it assmes homedir + <drug> + output')
arg_parser.add_argument('-pdb', '--pdb_file', help = 'PDB File to process. By default, it assmumes a file called <gene>_complex.pdb in input_dir')
arg_parser.add_argument('-m', '--mutation_file', help = 'Mutation list. By default, assumes a file called <gene>_snps.csv exists')
@ -50,38 +49,36 @@ args = arg_parser.parse_args()
#gene = 'pncA'
#gene_match = gene + '_p.'
#%%=====================================================================
# Command Line Options
drug = args.drug
gene = args.gene
# Command line options
drug = args.drug
gene = args.gene
data_dir = args.data_dir
indir = args.input_dir
outdir = args.output_dir
datadir = args.datadir
indir = args.input_dir
outdir = args.output_dir
mut_filename = args.mutation_file
chainA = args.chain1
chainB = args.chain2
pdb_filename = args.pdb_file
mut_filename = args.mutation_file
chainA = args.chain1
chainB = args.chain2
pdb_filename = args.pdb_file
# os.path.splitext will fail interestingly with file.pdb.txt.zip
#pdb_name = os.path.splitext(pdb_file)[0]
# Just the filename, thanks
#pdb_name = Path(in_filename_pdb).stem
#============
#==============
# directories
#============
if data_dir:
datadir = data_dir
else:
#==============
if not datadir:
datadir = homedir + '/' + 'git/Data'
if not indir:
indir = datadir + '/' + drug + '/' + 'input'
if not outdir:
outdir = datadir + '/' + drug + '/' + 'output'
if not indir:
indir = datadir + '/' + drug + '/input'
if not outdir:
outdir = datadir + '/' + drug + '/output'
# FIXME: this is a temporary directory and should be correctly handled
process_dir = datadir + '/' + drug +'/' + 'processing'
@ -90,7 +87,6 @@ os.mkdir(process_dir)
# input
#=======
# FIXME
if pdb_filename:
pdb_name = Path(pdb_filename).stem
else: