File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -21,14 +21,13 @@ class MCRIBReconAllInputSpec(CommandLineInputSpec):
21
21
subjects_dir = Directory (
22
22
exists = True ,
23
23
hash_files = False ,
24
- desc = 'path to subjects directory' ,
25
- required = True ,
24
+ desc = 'Path to FreeSurfer subjects directory' ,
26
25
)
27
26
subject_id = traits .Str (
28
- # required=True,
27
+ required = True ,
29
28
argstr = '%s' ,
30
29
position = - 1 ,
31
- desc = 'subject name ' ,
30
+ desc = 'Subject ID ' ,
32
31
)
33
32
t1w_file = File (
34
33
exists = True ,
@@ -112,7 +111,7 @@ def cmdline(self):
112
111
# Avoid processing if valid
113
112
if self .inputs .outdir :
114
113
sid = self .inputs .subject_id
115
- logf = self .inputs .outdir / sid / 'logs' / f'{ sid } .log'
114
+ logf = Path ( self .inputs .outdir ) / sid / 'logs' / f'{ sid } .log'
116
115
if logf .exists ():
117
116
logtxt = logf .read_text ().splitlines ()[- 3 :]
118
117
self ._no_run = 'Finished without error' in logtxt
@@ -203,7 +202,7 @@ def _list_outputs(self):
203
202
# Copy freesurfer directory into FS subjects dir
204
203
sid = self .inputs .subject_id
205
204
mcribs_fs = self ._mcribs_dir / sid / 'freesurfer' / sid
206
- if mcribs_fs .exists ():
205
+ if mcribs_fs .exists () and self . inputs . subjects_dir :
207
206
dst = Path (self .inputs .subjects_dir ) / self .inputs .subject_id
208
207
if not dst .exists ():
209
208
shutil .copytree (mcribs_fs , dst )
You can’t perform that action at this time.
0 commit comments