diff --git a/xcp_d/interfaces/regression.py b/xcp_d/interfaces/regression.py index e0f892e93..54e1bce68 100644 --- a/xcp_d/interfaces/regression.py +++ b/xcp_d/interfaces/regression.py @@ -73,7 +73,6 @@ def _run_interface(self, runtime): if self.inputs.custom_confounds and exists(self.inputs.custom_confounds): confound = load_confound_matrix( original_file=self.inputs.original_file, - datafile=self.inputs.in_file, custom_confounds=self.inputs.custom_confounds, confound_tsv=self.inputs.confounds, params=self.inputs.params, @@ -81,10 +80,10 @@ def _run_interface(self, runtime): else: # No custom confounds confound = load_confound_matrix( original_file=self.inputs.original_file, - datafile=self.inputs.in_file, confound_tsv=self.inputs.confounds, params=self.inputs.params, ) + # for testing, let's write out the confounds file: confounds_file_output_name = fname_presuffix( self.inputs.confounds, diff --git a/xcp_d/utils/confounds.py b/xcp_d/utils/confounds.py index bd07922b9..ee5167a0f 100644 --- a/xcp_d/utils/confounds.py +++ b/xcp_d/utils/confounds.py @@ -300,14 +300,12 @@ def square_confound(confound): @fill_doc def load_confound_matrix( - datafile, original_file, params, custom_confounds=None, confound_tsv=None + original_file, params, custom_confounds=None, confound_tsv=None ): """Load a subset of the confounds associated with a given file. Parameters ---------- - datafile : str - BOLD file whose confounds we want. original_file : File used to find confounds json. %(params)s @@ -386,13 +384,13 @@ def load_confound_matrix( confound = pd.concat([derivative_rot_trans, acompcor, cosine], axis=1) elif params == "aroma": # Get the WM, CSF, and aroma values whitematter_csf = load_wm_csf(confoundtsv) - aroma = load_aroma(datafile=datafile) + aroma = load_aroma(datafile=original_file) confound = pd.concat([whitematter_csf, aroma], axis=1) elif ( params == "aroma_gsr" ): # Get the WM, CSF, and aroma values, as well as global signal whitematter_csf = load_wm_csf(confoundtsv) - aroma = load_aroma(datafile=datafile) + aroma = load_aroma(datafile=original_file) global_signal = load_global_signal(confoundtsv) confound = pd.concat([whitematter_csf, aroma, global_signal], axis=1) elif (