From 40541917e74260351239646c0df19d48ffec04d8 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Fri, 7 Apr 2017 16:05:24 -0400 Subject: [PATCH] ENH: Allow both --write-graph and --reports-only --- fmriprep/cli/run.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/fmriprep/cli/run.py b/fmriprep/cli/run.py index 534aeb8c0..67008ba3a 100755 --- a/fmriprep/cli/run.py +++ b/fmriprep/cli/run.py @@ -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: