Skip to content

Commit

Permalink
Substructure Name Selection (#42)
Browse files Browse the repository at this point in the history
Since the argparse argument was already present without any use, I added
in logic to gather data based off of the users preference with the default
being 'OPT'. This is useful if you want to gather data from a particular
substructure that you are not parameterizing.
  • Loading branch information
arosale4 authored Sep 27, 2017
1 parent f96697c commit 2cf52a5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions q2mm/calculate.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,17 @@ def main(args):
# If we remove/with sorting removed, the Datum class is less
# useful. We may want to reduce this to a N x 3 matrix or
# 3 vectors (labels, weights, values).
sub_names = ['OPT']
if opts.subnames:
sub_names = opts.subnames
if opts.fake:
data = collect_data_fake(
commands, inps, direc=opts.directory, invert=opts.invert)
commands, inps, direc=opts.directory, invert=opts.invert,
sub_names=sub_names)
else:
data = collect_data(
commands, inps, direc=opts.directory, invert=opts.invert)
commands, inps, direc=opts.directory, invert=opts.invert,
sub_names=sub_names)
# Adds weights to the data points in the data list.
if opts.weight:
compare.import_weights(data)
Expand Down

0 comments on commit 2cf52a5

Please sign in to comment.