Skip to content

fix: let spm use base class for version #1199

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 3 commits into from
Sep 9, 2015
Merged
Show file tree
Hide file tree
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
6 changes: 4 additions & 2 deletions nipype/interfaces/spm/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,8 @@ class Segment(SPMCommand):

"""

if Info.version() and Info.version()['name'] == "SPM12":
_local_version = SPMCommand().version
if _local_version and '12.' in _local_version:
_jobtype = 'tools'
_jobname = 'oldseg'
else:
Expand Down Expand Up @@ -893,7 +894,8 @@ class NewSegment(SPMCommand):

input_spec = NewSegmentInputSpec
output_spec = NewSegmentOutputSpec
if Info.version() and Info.version()['name'] == "SPM12":
_local_version = SPMCommand().version
if _local_version and '12.' in _local_version:
_jobtype = 'spatial'
_jobname = 'preproc'
else:
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/spm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def _list_outputs(self):
from glob import glob
outputs = self._outputs().get()
od = os.path.abspath(self.inputs.output_dir)

ext = self.inputs.format
if self.inputs.output_dir_struct == "flat":
outputs['out_files'] = glob(os.path.join(od, '*.%s'%ext))
Expand Down
2 changes: 1 addition & 1 deletion nipype/pipeline/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,7 @@ def clean_working_directory(outputs, cwd, inputs, needed_outputs, config,
inputdict = inputs.get()
input_files.extend(walk_outputs(inputdict))
needed_files += [path for path, type in input_files if type == 'f']
for extra in ['_0x*.json', 'provenance.*', 'pyscript*.m',
for extra in ['_0x*.json', 'provenance.*', 'pyscript*.m', 'pyjobs*.mat',
'command.txt', 'result*.pklz', '_inputs.pklz', '_node.pklz']:
needed_files.extend(glob(os.path.join(cwd, extra)))
if files2keep:
Expand Down