From 26cc84c3f173b282fe07aa71dc665ea9e23d631f Mon Sep 17 00:00:00 2001 From: Simon R Date: Mon, 30 Nov 2015 16:43:08 +0100 Subject: [PATCH 1/3] Added XOR to mkmask and source_file mri_surf2vol can either be run using a source file OR without a source_file if the user wants to create a binary mask. Added XOR parameter to take this behavior into account --- nipype/interfaces/freesurfer/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/freesurfer/utils.py b/nipype/interfaces/freesurfer/utils.py index 0213dc30d4..5697130131 100644 --- a/nipype/interfaces/freesurfer/utils.py +++ b/nipype/interfaces/freesurfer/utils.py @@ -390,7 +390,7 @@ def _gen_filename(self, name): class Surface2VolTransformInputSpec(FSTraitedSpec): source_file = File(exists=True, argstr='--surfval %s', - copyfile=False, mandatory=True, + copyfile=False, mandatory=True, xor=['mkmask'], desc='This is the source of the surface values') hemi = traits.Str(argstr='--hemi %s', mandatory=True, desc='hemisphere of data') @@ -404,7 +404,7 @@ class Surface2VolTransformInputSpec(FSTraitedSpec): template_file = File(exists=True, argstr='--template %s', desc='Output template volume') mkmask = traits.Bool(desc='make a mask instead of loading surface values', - argstr='--mkmask') + argstr='--mkmask', xor=['source_file']) vertexvol_file = File(name_template="%s_asVol_vertex.nii", desc=('Path name of the vertex output volume, which ' 'is the same as output volume except that the ' From 51aa4f5fb12ceeeda59d6f24f26b52538056bcae Mon Sep 17 00:00:00 2001 From: Simon R Date: Fri, 15 Jan 2016 08:08:51 +0100 Subject: [PATCH 2/3] Include OAR-args MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The arguments passed to the oars command weren’t actually passed to it. Now they are, thus one can for example use a longer walltime etc --- nipype/pipeline/plugins/oar.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nipype/pipeline/plugins/oar.py b/nipype/pipeline/plugins/oar.py index fab0f2513a..07ceb8e417 100644 --- a/nipype/pipeline/plugins/oar.py +++ b/nipype/pipeline/plugins/oar.py @@ -37,6 +37,8 @@ def __init__(self, **kwargs): self._max_tries = 2 self._max_jobname_length = 15 if 'plugin_args' in kwargs and kwargs['plugin_args']: + if 'oarsub_args' in kwargs['plugin_args']: + self._oarsub_args = kwargs['plugin_args']['oarsub_args'] if 'retry_timeout' in kwargs['plugin_args']: self._retry_timeout = kwargs['plugin_args']['retry_timeout'] if 'max_tries' in kwargs['plugin_args']: From adefb22d8a37fd77a0c7d153a6b6e97f58cf8c6c Mon Sep 17 00:00:00 2001 From: Simon R Date: Fri, 15 Jan 2016 08:11:05 +0100 Subject: [PATCH 3/3] Undo Commit --- nipype/pipeline/plugins/oar.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/nipype/pipeline/plugins/oar.py b/nipype/pipeline/plugins/oar.py index 07ceb8e417..fab0f2513a 100644 --- a/nipype/pipeline/plugins/oar.py +++ b/nipype/pipeline/plugins/oar.py @@ -37,8 +37,6 @@ def __init__(self, **kwargs): self._max_tries = 2 self._max_jobname_length = 15 if 'plugin_args' in kwargs and kwargs['plugin_args']: - if 'oarsub_args' in kwargs['plugin_args']: - self._oarsub_args = kwargs['plugin_args']['oarsub_args'] if 'retry_timeout' in kwargs['plugin_args']: self._retry_timeout = kwargs['plugin_args']['retry_timeout'] if 'max_tries' in kwargs['plugin_args']: