diff --git a/narps_open/pipelines/team_4SZ2.py b/narps_open/pipelines/team_4SZ2.py index c9c37580..dbf23353 100644 --- a/narps_open/pipelines/team_4SZ2.py +++ b/narps_open/pipelines/team_4SZ2.py @@ -223,8 +223,10 @@ def get_group_level_regressors(subject_list: list, run_list: list): # * 0 otherwise equal_range_group = get_group('equalRange') equal_indif_group = get_group('equalIndifference') - equal_range_regressor = [1 if s in equal_range_group else 0 for s in subject_list for _ in run_list] - equal_indif_regressor = [1 if s in equal_indif_group else 0 for s in subject_list for _ in run_list] + equal_range_regressor = [ + 1 if s in equal_range_group else 0 for s in subject_list for _ in run_list] + equal_indif_regressor = [ + 1 if s in equal_indif_group else 0 for s in subject_list for _ in run_list] # Get gender and age of participants participants_data = get_participants_information()[['participant_id', 'gender', 'age']] @@ -242,10 +244,7 @@ def get_group_level_regressors(subject_list: list, run_list: list): gender = [1 if i == 'F' else 0 for i in genders for _ in run_list] ) - # Create groups outputs - groups = [1 if i == 1 else 2 for i in equal_range_regressor] - - return regressors, groups + return regressors def get_group_level_analysis(self): """ @@ -351,12 +350,13 @@ def get_group_level_analysis(self): group_level.connect(merge_masks, 'merged_file', mask_intersection, 'in_file') # Get regressors for the group level analysis - regressors, groups = self.get_group_level_regressors(self.subject_list, self.run_list) + regressors = self.get_group_level_regressors(self.subject_list, self.run_list) # MultipleRegressDesign Node - Specify model + # NB : no "groups" input is needed because equalRange and equalIndifference groups + # are already modeled in the design specify_model = Node(MultipleRegressDesign(), name = 'specify_model') specify_model.inputs.regressors = regressors - specify_model.inputs.groups = groups specify_model.inputs.contrasts = self.group_level_contrasts # FLAMEO Node - Estimate model diff --git a/tests/pipelines/test_team_4SZ2.py b/tests/pipelines/test_team_4SZ2.py index 69a581be..2328885e 100644 --- a/tests/pipelines/test_team_4SZ2.py +++ b/tests/pipelines/test_team_4SZ2.py @@ -88,7 +88,7 @@ def test_subject_information(): def test_get_group_level_regressors(): """ Test the get_group_level_regressors method """ - regressors, groups = PipelineTeam4SZ2.get_group_level_regressors( + regressors = PipelineTeam4SZ2.get_group_level_regressors( ['001', '002', '003', '004'], ['01', '02']) @@ -98,7 +98,6 @@ def test_get_group_level_regressors(): assert regressors['equalRange'] == [0, 0, 1, 1, 0, 0, 1, 1] assert regressors['age'] == [24, 24, 25, 25, 27, 27, 25, 25] assert regressors['gender'] == [0, 0, 0, 0, 1, 1, 0, 0] - assert groups == [2, 2, 1, 1, 2, 2, 1, 1] @staticmethod @mark.pipeline_test