Skip to content

Commit 6e6338f

Browse files
committed
Improves the way the plotting function handles 'prefixes'
1 parent 3f1593d commit 6e6338f

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

structure_threader/argparser.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,11 @@ def argument_parser(args):
166166
sort_opts_ex = sort_opts.add_mutually_exclusive_group(required=True)
167167

168168
main_opts.add_argument("-i", dest="prefix", type=str, required=True,
169-
help="The prefix of the output meanQ files."
170-
"You can provide a full path or just the "
171-
"prefix. Passing just the prefix will assume "
172-
"the current working diretory.")
169+
help="The directory where output meanQ files you "
170+
"want to plot are located."
171+
"If plotting MavericK results, provide"
172+
"the directory where the directories named"
173+
"`mav_KX` are located.")
173174
main_opts.add_argument("-f", dest="program", type=str, required=True,
174175
choices=["structure", "faststructure",
175176
"maverick"],

structure_threader/structure_threader.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -230,19 +230,17 @@ def plots_only(arg):
230230

231231
if prefix_dir == "":
232232
prefix_dir = "."
233+
k_vals = arg.bestk
233234

234235
if arg.program == "faststructure":
235-
infiles = [os.path.join(prefix_dir, x)
236-
for x in os.listdir(prefix_dir) if
237-
x.startswith(prefix_name) and
238-
x.endswith(".meanQ")]
236+
infiles = [os.path.join(prefix_abs_path, "fS_run_K." + x + ".meanQ")
237+
for x in k_vals]
238+
239239
elif arg.program == "structure":
240-
infiles = [os.path.join(prefix_dir, x)
241-
for x in os.listdir(prefix_dir) if
242-
x.startswith(prefix_name) and
243-
"rep1_" in x]
240+
infiles = [os.path.join(prefix_abs_path, "str_K" + x + "_rep1_f")
241+
for x in k_vals]
242+
244243
else:
245-
k_vals = arg.bestk
246244
infiles = [os.path.join(os.path.join(prefix_abs_path, "mav_K" + x),
247245
"outputQmatrix_ind_K" + x + ".csv")
248246
for x in k_vals]

0 commit comments

Comments
 (0)