Skip to content

Commit

Permalink
Merge pull request #435 from effigies/enh/reports_only
Browse files Browse the repository at this point in the history
ENH: Allow both --write-graph and --reports-only
  • Loading branch information
effigies authored Apr 7, 2017
2 parents 2319d22 + 4054191 commit a6e941e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions fmriprep/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,18 +178,22 @@ def create_workflow(opts):

logger.info('Subject list: %s', ', '.join(subject_list))

# Build main workflow and run
preproc_wf = base_workflow_enumerator(subject_list, task_id=opts.task_id,
settings=settings, run_uuid=run_uuid)
preproc_wf.base_dir = settings['work_dir']

if opts.reports_only:
if opts.write_graph:
preproc_wf.write_graph(graph2use="colored", format='svg',
simple_form=True)

for subject_label in subject_list:
run_reports(settings['reportlets_dir'],
settings['output_dir'],
subject_label, run_uuid=run_uuid)
sys.exit()

# Build main workflow and run
preproc_wf = base_workflow_enumerator(subject_list, task_id=opts.task_id,
settings=settings, run_uuid=run_uuid)
preproc_wf.base_dir = settings['work_dir']

try:
preproc_wf.run(**plugin_settings)
except RuntimeError as e:
Expand Down

0 comments on commit a6e941e

Please sign in to comment.