Skip to content

Commit

Permalink
[TEST] sorting results before computing correlations
Browse files Browse the repository at this point in the history
  • Loading branch information
bclenet committed Sep 22, 2023
1 parent 7e43045 commit 20201e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
17 changes: 6 additions & 11 deletions narps_open/pipelines/team_Q6O0.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,7 @@ def get_subject_level_analysis(self):
- l1_analysis : nipype.WorkFlow
"""
# Infosource Node - To iterate on subjects
infosource = Node(IdentityInterface(
fields = ['subject_id', 'dataset_dir', 'results_dir', 'working_dir', 'run_list'],
dataset_dir = self.directories.dataset_dir,
results_dir = self.directories.results_dir,
working_dir = self.directories.working_dir,
run_list = self.run_list),
infosource = Node(IdentityInterface( fields = ['subject_id']),
name = 'infosource')
infosource.iterables = [('subject_id', self.subject_list)]

Expand Down Expand Up @@ -359,9 +354,9 @@ def get_subject_level_analysis(self):
# Function nodes get_contrasts_* - get the contrasts
contrasts_gain = Node(Function(
function = self.get_contrasts_gain,
input_names=['subject_id'],
output_names=['contrasts']),
name='contrasts_gain')
input_names = ['subject_id'],
output_names = ['contrasts']),
name = 'contrasts_gain')

contrasts_loss = Node(Function(
function = self.get_contrasts_loss,
Expand All @@ -371,10 +366,10 @@ def get_subject_level_analysis(self):

# EstimateContrast - estimates contrasts
contrast_estimate_gain = Node(EstimateContrast(),
name="contrast_estimate_gain")
name = 'contrast_estimate_gain')

contrast_estimate_loss = Node(EstimateContrast(),
name="contrast_estimate_loss")
name = 'contrast_estimate_loss')

# Function node remove_gunzip_files - remove output of the gunzip node
remove_gunzip_files = Node(Function(
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def test_pipeline_execution(

# Retrieve the paths to the results files
collection = ResultsCollection(team_id)
results_files = [join(collection.directory, f) for f in collection.files.keys()]
results_files = [join(collection.directory, f) for f in sorted(collection.files.keys())]
results_files = [results_files[i] for i in indices]

# Compute the correlation coefficients
Expand Down

0 comments on commit 20201e9

Please sign in to comment.