@@ -817,7 +817,9 @@ def _gen_filename(self, name):
817
817
818
818
class ReconAllInputSpec (CommandLineInputSpec ):
819
819
subject_id = traits .Str (
820
- "recon_all" , argstr = "-subjid %s" , desc = "subject name" ,
820
+ "recon_all" ,
821
+ argstr = "-subjid %s" ,
822
+ desc = "subject name" ,
821
823
)
822
824
directive = traits .Enum (
823
825
"all" ,
@@ -932,7 +934,7 @@ class ReconAllInputSpec(CommandLineInputSpec):
932
934
base_template_id = traits .Str (
933
935
argstr = "-base %s" ,
934
936
desc = "base template id" ,
935
- xor = ["subject_id" ,"longitudinal_timepoint_id" ],
937
+ xor = ["subject_id" , "longitudinal_timepoint_id" ],
936
938
requires = ["base_timepoint_ids" ],
937
939
)
938
940
base_timepoint_ids = InputMultiObject (
@@ -943,14 +945,12 @@ class ReconAllInputSpec(CommandLineInputSpec):
943
945
longitudinal_timepoint_id = traits .Str (
944
946
argstr = "-long %s" ,
945
947
desc = "longitudinal session/timepoint id" ,
946
- xor = ["subject_id" ,"base_template_id" ],
948
+ xor = ["subject_id" , "base_template_id" ],
947
949
requires = ["longitudinal_template_id" ],
948
- position = 1
950
+ position = 1 ,
949
951
)
950
952
longitudinal_template_id = traits .Str (
951
- argstr = "%s" ,
952
- desc = "longitudinal base tempalte id" ,
953
- position = 2
953
+ argstr = "%s" , desc = "longitudinal base tempalte id" , position = 2
954
954
)
955
955
956
956
# Expert options
@@ -1572,13 +1572,14 @@ def _list_outputs(self):
1572
1572
if isdefined (self .inputs .base_template_id ):
1573
1573
outputs .update (
1574
1574
FreeSurferSource (
1575
- subject_id = self .inputs .base_template_id , subjects_dir = subjects_dir ,
1576
- hemi = hemi
1575
+ subject_id = self .inputs .base_template_id ,
1576
+ subjects_dir = subjects_dir ,
1577
+ hemi = hemi ,
1577
1578
)._list_outputs ()
1578
1579
)
1579
1580
outputs ["subject_id" ] = self .inputs .base_template_id
1580
1581
elif isdefined (self .inputs .longitudinal_timepoint_id ):
1581
- subject_id = f"{ self .inputs .longitudinal_timepoint_id } .long.{ self .inputs .longitudinal_template_id } "
1582
+ subject_id = f"{ self .inputs .longitudinal_timepoint_id } .long.{ self .inputs .longitudinal_template_id } "
1582
1583
outputs .update (
1583
1584
FreeSurferSource (
1584
1585
subject_id = subject_id , subjects_id = subjects_dir , hemi = hemi
@@ -1588,7 +1589,9 @@ def _list_outputs(self):
1588
1589
else :
1589
1590
outputs .update (
1590
1591
FreeSurferSource (
1591
- subject_id = self .inputs .subject_id , subjects_dir = subjects_dir , hemi = hemi
1592
+ subject_id = self .inputs .subject_id ,
1593
+ subjects_dir = subjects_dir ,
1594
+ hemi = hemi ,
1592
1595
)._list_outputs ()
1593
1596
)
1594
1597
outputs ["subject_id" ] = self .inputs .subject_id
@@ -1604,12 +1607,18 @@ def _is_resuming(self):
1604
1607
# Check for longitudinal pipeline
1605
1608
if not isdefined (self .inputs .subject_id ):
1606
1609
if isdefined (self .inputs .base_template_id ):
1607
- if os .path .isdir (os .path .join (subjects_dir , self .inputs .base_template_id , "mri" )):
1610
+ if os .path .isdir (
1611
+ os .path .join (subjects_dir , self .inputs .base_template_id , "mri" )
1612
+ ):
1608
1613
return True
1609
1614
elif isdefined (self .inputs .longitudinal_template_id ):
1610
- if os .path .isdir (os .path .join (subjects_dir ,
1611
- f"{ self .inputs .longitudinal_timepoint_id } .long.{ self .inputs .longitudinal_template_id } " ,
1612
- "mri" )):
1615
+ if os .path .isdir (
1616
+ os .path .join (
1617
+ subjects_dir ,
1618
+ f"{ self .inputs .longitudinal_timepoint_id } .long.{ self .inputs .longitudinal_template_id } " ,
1619
+ "mri" ,
1620
+ )
1621
+ ):
1613
1622
return True
1614
1623
else :
1615
1624
if os .path .isdir (os .path .join (subjects_dir , self .inputs .subject_id , "mri" )):
0 commit comments