Skip to content

Commit

Permalink
C88N refactoring (#116)
Browse files Browse the repository at this point in the history
* [REFAC] make C88N conform with the Pipeline class + PEP8 clean

* [BUG] typo in dir names

* [TEST] making paths consistent in pipeline test execution [skip ci]

* Using the right contrast ids

* Using the right contrast ids

* [BUG] in ci script for pipeline changes

* [BUG] correctly forming results download link

* Allowing to tweak the number of processes the runner uses

* [ENH] Allowing to run group and subject level independantly

* [TEST] test the runner launching first level or second level only

* [DOC] runner : allow to run levels separately

* [BUG] inside unit_tests workflow

* Pipeline refac after merge

* Refac pipeline

* [TEST] rewrite test file + bugs in pipeline file

* Codespell

* [REFAC] C88N [skip ci]

* [REFAC] using narps_open.core for contrast files selection [TEST] updates [skip ci]

* Issue with base directory [skip ci]

* Back to the right order of contrasts [skip ci]

* [REFAC] naming [skip ci]

* Issue with groupComp [skip ci]

* [BUG] subject ids in search patterns [skip ci]

* Remove unwanted graphs[skip ci]
  • Loading branch information
bclenet authored Jan 4, 2024
1 parent 27b567e commit 94cf9cb
Show file tree
Hide file tree
Showing 5 changed files with 786 additions and 577 deletions.
2 changes: 1 addition & 1 deletion narps_open/pipelines/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
'B23O': None,
'B5I6': None,
'C22U': None,
'C88N': None,
'C88N': 'PipelineTeamC88N',
'DC61': None,
'E3B6': None,
'E6R3': None,
Expand Down
12 changes: 5 additions & 7 deletions narps_open/pipelines/team_2T6S.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ def get_group_level_analysis_sub_workflow(self, method):
height_threshold = 0.001, height_threshold_type = 'p-value',
force_activation = True),
name = 'threshold', iterfield = ['stat_image', 'contrast_index'])
threshold.synchronize = True

l2_analysis = Workflow(
base_dir = self.directories.working_dir,
Expand All @@ -512,7 +513,8 @@ def get_group_level_analysis_sub_workflow(self, method):
(selectfiles_groupanalysis, sub_contrasts, [
('contrast', 'file_list'),
('participants', 'participants_file')]),
(estimate_model, estimate_contrast, [('spm_mat_file', 'spm_mat_file'),
(estimate_model, estimate_contrast, [
('spm_mat_file', 'spm_mat_file'),
('residual_image', 'residual_image'),
('beta_images', 'beta_images')]),
(estimate_contrast, threshold, [('spm_mat_file', 'spm_mat_file'),
Expand All @@ -528,11 +530,9 @@ def get_group_level_analysis_sub_workflow(self, method):

if method in ('equalRange', 'equalIndifference'):
contrasts = [('Group', 'T', ['mean'], [1]), ('Group', 'T', ['mean'], [-1])]

threshold.inputs.contrast_index = [1, 2]
threshold.synchronize = True

## Specify design matrix
# Specify design matrix
one_sample_t_test_design = Node(OneSampleTTestDesign(),
name = 'one_sample_t_test_design')

Expand All @@ -543,11 +543,9 @@ def get_group_level_analysis_sub_workflow(self, method):
elif method == 'groupComp':
contrasts = [
('Eq range vs Eq indiff in loss', 'T', ['Group_{1}', 'Group_{2}'], [-1, 1])]

threshold.inputs.contrast_index = [1]
threshold.synchronize = True

# Node for the design matrix
# Specify design matrix
two_sample_t_test_design = Node(TwoSampleTTestDesign(),
name = 'two_sample_t_test_design')

Expand Down
Loading

0 comments on commit 94cf9cb

Please sign in to comment.