12
12
13
13
def build_workflow (config_file ):
14
14
"""Create the Nipype Workflow that supports the whole execution graph."""
15
- from niworkflows .utils .bids import check_pipeline_version , collect_participants
15
+ from niworkflows .utils .bids import check_pipeline_version
16
16
from niworkflows .utils .misc import check_valid_fs_license
17
17
18
18
from .. import config
@@ -42,24 +42,17 @@ def build_workflow(config_file):
42
42
desc_content = dset_desc_path .read_bytes ()
43
43
config .execution .bids_description_hash = sha256 (desc_content ).hexdigest ()
44
44
45
- # First check that bids_dir looks like a BIDS folder
46
- subject_list = collect_participants (
47
- config .execution .layout , participant_label = config .execution .participant_label
48
- )
49
- subjects_sessions = {
50
- subject : config .execution .session_id
51
- or config .execution .layout .get_sessions (scope = 'raw' , subject = subject )
52
- or [None ]
53
- for subject in subject_list
54
- }
55
-
56
45
# Called with reports only
57
46
if config .execution .reports_only :
58
47
from pkg_resources import resource_filename as pkgrf
59
48
60
- build_logger .log (25 , "Running --reports-only on participants %s" , ", " .join (subject_list ))
49
+ build_logger .log (
50
+ 25 ,
51
+ "Running --reports-only on participants %s" ,
52
+ ", " .join (config .execution .unique_labels ),
53
+ )
61
54
retval ["return_code" ] = generate_reports (
62
- subject_list ,
55
+ config . execution . unique_labels ,
63
56
nibabies_dir ,
64
57
config .execution .run_uuid ,
65
58
config = pkgrf ("nibabies" , "data/reports-spec.yml" ),
@@ -71,9 +64,9 @@ def build_workflow(config_file):
71
64
init_msg = f"""
72
65
Running nibabies version { config .environment .version } :
73
66
* BIDS dataset path: { config .execution .bids_dir } .
74
- * Participant list: { subject_list } .
67
+ * Participant list: { config . execution . unique_labels } .
75
68
* Run identifier: { config .execution .run_uuid } .
76
- * Output spaces: { config .execution .output_spaces } ."""
69
+ * Output spaces: { config .execution .output_spaces or 'MNIInfant' } ."""
77
70
78
71
if config .execution .anat_derivatives :
79
72
init_msg += f"""
@@ -84,7 +77,7 @@ def build_workflow(config_file):
84
77
* Pre-run FreeSurfer's SUBJECTS_DIR: { config .execution .fs_subjects_dir } ."""
85
78
build_logger .log (25 , init_msg )
86
79
87
- retval ["workflow" ] = init_nibabies_wf (subjects_sessions )
80
+ retval ["workflow" ] = init_nibabies_wf (config . execution . unique_labels )
88
81
89
82
# Check for FS license after building the workflow
90
83
if not check_valid_fs_license ():
0 commit comments