Skip to content

Commit f135955

Browse files
committed
Added a "popfile" option to arguments.
1 parent ccbc281 commit f135955

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

plotter/structplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,4 +180,4 @@ def main(result_files, fmt, outdir, popfile=None):
180180
# Usage: structplot.py results_file format outdir
181181
datafile = []
182182
datafile.append(argv[1])
183-
main(datafile, argv[2], argv[3])
183+
main(datafile, argv[2], argv[3], argv[4])

structure_threader.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def structureHarvester(resultsdir):
138138
def create_plts(resultsdir):
139139
"""Create plots from result dir.
140140
:param resultsdir: path to results directory"""
141-
# This is only for Structure - it must be changed for fastStructure too.
141+
142142
outdir = os.path.join(resultsdir, "plots")
143143
if not os.path.exists(outdir):
144144
os.mkdir(outdir)
@@ -152,7 +152,7 @@ def create_plts(resultsdir):
152152
plt_files = [os.path.join(resultsdir, "fS_run_K.") + str(i) + ".meanQ"
153153
for i in range(max(arg.minK, 2), arg.Ks + 1)]
154154

155-
sp.main(plt_files, wrapped_prog, outdir)
155+
sp.main(plt_files, wrapped_prog, outdir, arg.popfile)
156156

157157
if __name__ == "__main__":
158158
import argparse
@@ -203,6 +203,10 @@ def create_plts(resultsdir):
203203
"in.\n",
204204
metavar="output_directory")
205205

206+
io_opts.add_argument("--pop", dest="popfile", type=str, required=False,
207+
help="File wth population information.",
208+
metavar="popfile", default=None)
209+
206210
misc_opts.add_argument("-t", dest="threads", type=int, required=True,
207211
help="Number of threads to use "
208212
"(default:%(default)s).\n",

0 commit comments

Comments
 (0)