Skip to content

Commit a9cc329

Browse files
committed
fix: fixed failing tests
1 parent 138afc9 commit a9cc329

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

nipype/algorithms/confounds.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ def _run_interface(self, runtime):
432432

433433
def _list_outputs(self):
434434
outputs = self._outputs().get()
435-
outputs['components_file'] = self.inputs.components_file
435+
outputs['components_file'] = os.path.abspath(self.inputs.components_file)
436436
return outputs
437437

438438
def _compute_tSTD(self, M, x, axis=0):
@@ -498,9 +498,9 @@ class TCompCor(CompCor):
498498

499499
input_spec = TCompCorInputSpec
500500
output_spec = TCompCorOutputSpec
501-
_out_masks = []
502501

503502
def _run_interface(self, runtime):
503+
_out_masks = []
504504
imgseries = nb.load(self.inputs.realigned_file,
505505
mmap=NUMPY_MMAP).get_data()
506506

@@ -564,7 +564,7 @@ def _run_interface(self, runtime):
564564
self.inputs.realigned_file).affine).to_filename(mask_file)
565565
IFLOG.debug('tCompcor computed and saved mask of shape {} to '
566566
'mask_file {}'.format(mask.shape, mask_file))
567-
self._out_masks.append(mask_file)
567+
_out_masks.append(mask_file)
568568
self._set_header('tCompCor')
569569

570570
else:
@@ -581,10 +581,11 @@ def _run_interface(self, runtime):
581581
nb.load(self.inputs.realigned_file).affine).to_filename(mask_file)
582582
IFLOG.debug('tCompcor computed and saved mask of shape {} to mask_file '
583583
'{}'.format(mask.shape, mask_file))
584-
self._out_masks.append(mask_file)
584+
_out_masks.append(mask_file)
585585
self._set_header('tCompCor')
586586

587-
self.inputs.mask_files = self._out_masks
587+
self.inputs.mask_files = _out_masks
588+
print(self.inputs.mask_files)
588589
super(TCompCor, self)._run_interface(runtime)
589590
return runtime
590591

nipype/workflows/rsfmri/fsl/resting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def create_resting_preproc(name='restpreproc', base_dir=None):
138138
restpreproc.connect(realigner, 'outputspec.realigned_file',
139139
compcor, 'realigned_file')
140140
restpreproc.connect(threshold_stddev, 'out_file',
141-
compcor, 'mask_file')
141+
compcor, 'mask_files')
142142
restpreproc.connect(inputnode, 'num_noise_components',
143143
compcor, 'num_components')
144144
restpreproc.connect(tsnr, 'detrended_file',

0 commit comments

Comments
 (0)