Skip to content

Commit 2b8df5a

Browse files
committed
Fixed #52.
1 parent 73d9d3d commit 2b8df5a

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

structure_threader/structure_threader.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,7 @@ def runprogram(wrapped_prog, iterations, arg):
7373
cli = [arg.external_prog, "-K", str(K), "-i", arg.infile, "-o",
7474
output_file]
7575
if arg.params is not None:
76-
mainparams = arg.params
77-
extraparams = os.path.join(os.path.dirname(arg.params),
78-
"extraparams")
79-
if os.path.isfile(extraparams) is False:
80-
logging.warning("No 'extraparams' file was found. This is not "
81-
"critical, but it is highly recommended that "
82-
"you use one.")
83-
cli += ["-m", mainparams]
84-
else:
85-
cli += ["-m", mainparams, "-e", extraparams]
76+
cli += arg.params
8677

8778
elif wrapped_prog == "maverick": # Run MavericK
8879
# MavericK requires a trailing "/" (or "\" if on windows)
@@ -163,6 +154,17 @@ def structure_threader(Ks, replicates, threads, wrapped_prog, arg):
163154
replicates = [1]
164155
else:
165156
os.chdir(os.path.dirname(arg.infile))
157+
if arg.params is not None:
158+
mainparams = arg.params
159+
extraparams = os.path.join(os.path.dirname(arg.params),
160+
"extraparams")
161+
if os.path.isfile(extraparams) is False:
162+
logging.warning("No 'extraparams' file was found. An empty one "
163+
"was created, but it is highly recommended "
164+
"that you fill one out.")
165+
touch = open(extraparams, 'w')
166+
touch.close()
167+
arg.params = ["-m", mainparams, "-e", extraparams]
166168

167169
jobs = list(itertools.product(Ks, replicates))[::-1]
168170

0 commit comments

Comments
 (0)