Skip to content

Add output spec and reml script. #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 23, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion nipype/interfaces/afni/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ class DeconvolveInputSpec(AFNICommandInputSpec):
class DeconvolveOutputSpec(AFNICommandOutputSpec):
out_file = File(desc='output statistics file',
exists=True)
reml_script = File(desc='Autogenerated script for 3dREML')
x1D = File(desc='save out X matrix')


class Deconvolve(AFNICommand):
Expand Down Expand Up @@ -230,7 +232,7 @@ class Deconvolve(AFNICommand):

_cmd = '3dDeconvolve'
input_spec = DeconvolveInputSpec
output_spec = AFNICommandOutputSpec
output_spec = DeconvolveOutputSpec

def _parse_inputs(self, skip=None):
if skip is None:
Expand All @@ -249,5 +251,10 @@ def _list_outputs(self):
else:
outputs['x1D'] = self.inputs.x1D

_gen_fname_opts = {}
_gen_fname_opts['basename'] = self.inputs.out_file
_gen_fname_opts['cwd'] = os.getcwd()
outputs['reml_script'] = self._gen_fname(suffix='.REML_cmd', **_gen_fname_opts))

outputs['out_file'] = self.inputs.out_file
return outputs