@@ -494,7 +494,12 @@ def _dedup(in_list):
494
494
return workflow
495
495
496
496
497
- def init_sphere_reg_wf (* , msm_sulc : bool = False , name : str = "sphere_reg_wf" ):
497
+ def init_sphere_reg_wf (
498
+ * ,
499
+ msm_sulc : bool = False ,
500
+ sloppy : bool = False ,
501
+ name : str = "sphere_reg_wf" ,
502
+ ):
498
503
"""Generate GIFTI registration files to fsLR space"""
499
504
from ..interfaces .surf import FixGiftiMetadata
500
505
from ..interfaces .workbench import SurfaceSphereProjectUnproject
@@ -564,7 +569,7 @@ def init_sphere_reg_wf(*, msm_sulc: bool = False, name: str = "sphere_reg_wf"):
564
569
fix_sphere_meta = pe .MapNode (
565
570
FixGiftiMetadata (), iterfield = 'in_file' , name = 'fix_sphere_meta' ,
566
571
)
567
- msm_sulc_wf = init_msm_sulc_wf ()
572
+ msm_sulc_wf = init_msm_sulc_wf (sloppy = sloppy )
568
573
# fmt:off
569
574
workflow .connect ([
570
575
(get_surfaces , sphere_gii , [(('sphere' , _sorted_by_basename ), 'in_file' )]),
@@ -578,7 +583,7 @@ def init_sphere_reg_wf(*, msm_sulc: bool = False, name: str = "sphere_reg_wf"):
578
583
return workflow
579
584
580
585
581
- def init_msm_sulc_wf (* , name : str = 'msm_sulc_wf' ):
586
+ def init_msm_sulc_wf (* , sloppy : bool = False , name : str = 'msm_sulc_wf' ):
582
587
"""Run MSMSulc registration to fsLR surfaces, per hemisphere."""
583
588
from ..interfaces .msm import MSM
584
589
from ..interfaces .workbench import SurfaceAffineRegression , SurfaceApplyAffine
@@ -618,8 +623,9 @@ def init_msm_sulc_wf(*, name: str = 'msm_sulc_wf'):
618
623
# --indata=sub-${SUB}_ses-${SES}_hemi-${HEMI)_sulc.shape.gii \
619
624
# --refdata=tpl-fsaverage_hemi-${HEMI}_den-164k_sulc.shape.gii \
620
625
# --out=${HEMI}. --verbose
626
+ msm_conf = load_resource (f'msm/MSMSulcStrain{ "Sloppy" if sloppy else "Final" } conf' )
621
627
msmsulc = pe .MapNode (
622
- MSM (verbose = True , config_file = load_resource ( 'msm/MSMSulcStrainFinalconf' ) ),
628
+ MSM (verbose = True , config_file = msm_conf ),
623
629
iterfield = ['in_mesh' , 'reference_mesh' , 'in_data' , 'reference_data' , 'out_base' ],
624
630
name = 'msmsulc' ,
625
631
mem_gb = 2 ,
0 commit comments