Skip to content

Commit

Permalink
[TEST] updates for B23O
Browse files Browse the repository at this point in the history
  • Loading branch information
bclenet committed Jun 28, 2024
1 parent 0e7504b commit a525dc2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
9 changes: 3 additions & 6 deletions narps_open/pipelines/team_B5I6.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,10 +714,8 @@ def get_group_level_outputs(self):
'contrast_id': self.contrast_list,
'method': ['equalRange', 'equalIndifference'],
'file': [
'_cluster0/zstat1_pval.nii.gz', # TODO : output for randomise
'_cluster0/zstat1_threshold.nii.gz',
'_cluster1/zstat2_pval.nii.gz',
'_cluster1/zstat2_threshold.nii.gz',
'randomise_tfce_corrp_tstat1.nii.gz',
'randomise_tfce_corrp_tstat2.nii.gz',
'tstat1.nii.gz',
'tstat2.nii.gz',
'zstat1.nii.gz',
Expand All @@ -738,8 +736,7 @@ def get_group_level_outputs(self):
parameters = {
'contrast_id': self.contrast_list,
'file': [
'_cluster0/zstat1_pval.nii.gz', # TODO : output for randomise
'_cluster0/zstat1_threshold.nii.gz',
'randomise_tfce_corrp_tstat1.nii.gz',
'tstat1.nii.gz',
'zstat1.nii.gz'
]
Expand Down
27 changes: 14 additions & 13 deletions tests/pipelines/test_team_B5I6.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,22 @@ def test_outputs():

# 1 - 1 subject outputs
pipeline.subject_list = ['001']
helpers.test_pipeline_outputs(pipeline, [0, 4*6*4*1, 4*6*1, 8*4*2 + 4*4, 18])
helpers.test_pipeline_outputs(pipeline, [0, 4*6*4*1, 4*6*1, 6*6*2 + 3*2, 18])

# 2 - 4 subjects outputs
pipeline.subject_list = ['001', '002', '003', '004']
helpers.test_pipeline_outputs(pipeline, [0, 4*6*4*4, 4*6*4, 8*4*2 + 4*4, 18])
helpers.test_pipeline_outputs(pipeline, [0, 4*6*4*4, 4*6*4, 6*6*2 + 3*2, 18])

@staticmethod
@mark.unit_test
def test_subject_information():
""" Test the get_subject_information method """

# Get test files
test_file = join(Configuration()['directories']['test_data'], 'pipelines', 'events.tsv')
test_file_2 = join(
Configuration()['directories']['test_data'], 'pipelines', 'events_resp.tsv')
test_file = abspath(join(
Configuration()['directories']['test_data'], 'pipelines', 'events.tsv'))
test_file_2 = abspath(join(
Configuration()['directories']['test_data'], 'pipelines', 'events_resp.tsv'))

# Prepare several scenarii
info_missed = PipelineTeamB5I6.get_subject_information(test_file)
Expand Down Expand Up @@ -120,11 +121,11 @@ def test_confounds_file_no_outliers(temporary_data_dir):
""" Test the get_confounds_file method in the case with no outliers """

# Get input and reference output file
confounds_file = join(
Configuration()['directories']['test_data'], 'pipelines', 'confounds.tsv')
reference_file = join(
confounds_file = abspath(join(
Configuration()['directories']['test_data'], 'pipelines', 'confounds.tsv'))
reference_file = abspath(join(
Configuration()['directories']['test_data'],
'pipelines', 'team_B5I6', 'out_confounds_no_outliers.tsv')
'pipelines', 'team_B5I6', 'out_confounds_no_outliers.tsv'))

# Create new confounds file
confounds_node = Node(Function(
Expand Down Expand Up @@ -152,12 +153,12 @@ def test_confounds_file_outliers(temporary_data_dir):
""" Test the get_confounds_file method in the case with outliers """

# Get input and reference output file
confounds_file = join(
confounds_file = abspath(join(
Configuration()['directories']['test_data'],
'pipelines', 'team_B5I6', 'confounds_with_outliers.tsv')
reference_file = join(
'pipelines', 'team_B5I6', 'confounds_with_outliers.tsv'))
reference_file = abspath(join(
Configuration()['directories']['test_data'],
'pipelines', 'team_B5I6', 'out_confounds_outliers.tsv')
'pipelines', 'team_B5I6', 'out_confounds_outliers.tsv'))

# Create new confounds file
confounds_node = Node(Function(
Expand Down

0 comments on commit a525dc2

Please sign in to comment.