Skip to content

Commit 39b05a2

Browse files
committed
RF: Check only relevant steps in ReconAll
1 parent dc68922 commit 39b05a2

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

nipype/interfaces/freesurfer/preprocess.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -949,10 +949,22 @@ def cmdline(self):
949949
if not isdefined(subjects_dir):
950950
subjects_dir = self._gen_subjects_dir()
951951

952+
# Check only relevant steps
953+
directive = self.inputs.directive
954+
if not isdefined(directive):
955+
steps = []
956+
elif directive == 'autorecon1':
957+
steps = self._autorecon1_steps
958+
elif directive.startswith('autorecon2'):
959+
steps = self._autorecon2_steps
960+
elif directive == 'autorecon3':
961+
steps = self._autorecon3_steps
962+
else:
963+
steps = self._steps
964+
952965
no_run = True
953966
flags = []
954-
for idx, step in enumerate(self._steps):
955-
step, outfiles, infiles = step
967+
for step, outfiles, infiles in steps:
956968
flag = '-{}'.format(step)
957969
noflag = '-no{}'.format(step)
958970
if noflag in cmd:

0 commit comments

Comments
 (0)