Skip to content

Commit d9eec1d

Browse files
tsalormarkello
authored andcommitted
Add outputspec and reml_script.
1 parent e78852f commit d9eec1d

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

nipype/interfaces/afni/model.py

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,17 @@ class DeconvolveInputSpec(AFNICommandInputSpec):
8787
desc='Build a mask automatically from input data (will be slow for '
8888
'long time series datasets)',
8989
argstr='-automask')
90+
STATmask = File(
91+
desc='Build a mask from input file, and use this mask for the purpose '
92+
'of reporting truncation-to float issues AND for computing the '
93+
'FDR curves. The actual results ARE not masked with this option '
94+
'(only with \'mask\' or \'automask\' options).',
95+
argstr='-STATmask %s',
96+
exists=True)
9097
censor = File(
91-
desc='Filename of censor .1D time series. This is a file of 1s and 0s, '
92-
'indicating which time points are to be included (1) and which '
93-
'are to be excluded (0).',
98+
desc='Filename of censor .1D time series. This is a file of 1s and '
99+
'0s, indicating which time points are to be included (1) and '
100+
'which are to be excluded (0).',
94101
argstr='-censor %s',
95102
exists=True)
96103
polort = traits.Int(
@@ -181,8 +188,9 @@ class DeconvolveInputSpec(AFNICommandInputSpec):
181188

182189

183190
class DeconvolveOutputSpec(AFNICommandOutputSpec):
184-
out_file = File(desc='output statistics file',
185-
exists=True)
191+
out_file = File(desc='output statistics file')
192+
reml_script = File(desc='Autogenerated script for 3dREML')
193+
x1D = File(desc='save out X matrix')
186194

187195

188196
class Deconvolve(AFNICommand):
@@ -202,16 +210,16 @@ class Deconvolve(AFNICommand):
202210
>>> stim_times = [(1, 'timeseries.txt', 'SPMG1(4)'), (2, 'timeseries.txt', 'SPMG2(4)')]
203211
>>> deconvolve.inputs.stim_times = stim_times
204212
>>> deconvolve.inputs.stim_label = [(1, 'Houses'), (2, 'Apartments')]
205-
>>> deconvolve.inputs.gltsym = [('SYM: +Houses -Apartments')]
206-
>>> deconvolve.inputs.glt_label = [(1, 'Houses-Apartments')]
213+
>>> deconvolve.inputs.gltsym = [('+Houses -Apartments')]
214+
>>> deconvolve.inputs.glt_label = [(1, 'Houses_Apartments')]
207215
>>> deconvolve.cmdline # doctest: +ALLOW_UNICODE
208216
'3dDeconvolve -num_stimts 2 -num_glt 1 -glt_label 1 Houses_Apartments -gltsym SYM: +Houses -Apartments -input functional.nii functional2.nii -bucket output.nii -stim_label 1 Houses -stim_label 2 Apartments -stim_times 1 timeseries.txt SPMG1(4) -stim_times 2 timeseries.txt SPMG2(4) -x1D output.1D'
209217
>>> res = deconvolve.run() # doctest: +SKIP
210218
"""
211219

212220
_cmd = '3dDeconvolve'
213221
input_spec = DeconvolveInputSpec
214-
output_spec = AFNICommandOutputSpec
222+
output_spec = DeconvolveOutputSpec
215223

216224
def _parse_inputs(self, skip=None):
217225
if skip is None:
@@ -230,5 +238,10 @@ def _list_outputs(self):
230238
else:
231239
outputs['x1D'] = self.inputs.x1D
232240

241+
_gen_fname_opts = {}
242+
_gen_fname_opts['basename'] = self.inputs.out_file
243+
_gen_fname_opts['cwd'] = os.getcwd()
244+
245+
outputs['reml_script'] = self._gen_fname(suffix='.REML_cmd', **_gen_fname_opts)
233246
outputs['out_file'] = self.inputs.out_file
234247
return outputs

0 commit comments

Comments
 (0)