Skip to content

Commit

Permalink
Subject ids completion
Browse files Browse the repository at this point in the history
  • Loading branch information
bclenet committed Mar 27, 2024
1 parent e562d8e commit 0247745
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions narps_open/pipelines/team_80GC.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ def get_group_level_analysis_single_group(self, method):

# Create a function to complete the subject ids out from the get_equal*_subjects node
complete_subject_ids = lambda l : [f'_subject_id_{a}' for a in l]
complete_sub_ids = lambda l : [f'sub-{a}' for a in l]

# Function Node list_intersection - Get subjects from the subject_list
# that are in the `method` group
Expand Down Expand Up @@ -402,7 +403,7 @@ def get_group_level_analysis_single_group(self, method):
name = 'masks', iterfield = 'input_str'
)
group_level.connect(select_files, 'masks', masks, 'input_str')
group_level.connect(subjects, ('out_list', complete_subject_ids), masks, 'elements')
group_level.connect(subjects, ('out_list', complete_sub_ids), masks, 'elements')

# MASK TOOL - Create mask intersection
mask_intersection = Node(MaskTool(), name = 'mask_intersection')
Expand Down Expand Up @@ -489,6 +490,7 @@ def get_group_level_analysis_group_comparison(self):

# Create a function to complete the subject ids out from the get_equal*_subjects node
complete_subject_ids = lambda l : [f'_subject_id_{a}' for a in l]
complete_sub_ids = lambda l : [f'sub-{a}' for a in l]

# Function Node list_intersection - Get subjects from the subject_list
# that are in the `equalRange` group
Expand Down Expand Up @@ -582,7 +584,7 @@ def get_group_level_analysis_group_comparison(self):
name = 'masks', iterfield = 'input_str'
)
group_level.connect(select_files, 'masks', masks, 'input_str')
group_level.connect(info_source, ('subject_list', complete_subject_ids), masks, 'elements')
group_level.connect(info_source, ('subject_list', complete_sub_ids), masks, 'elements')

# MASK TOOL - Create mask intersection
mask_intersection = Node(MaskTool(), name = 'mask_intersection')
Expand Down

0 comments on commit 0247745

Please sign in to comment.