16
16
17
17
python rsfmri_preprocessing.py -d /data/12345-34-1.dcm -f /data/Resting.nii
18
18
-s subj001 -n 2 --despike -o output
19
- -p "plugin_args=dict(plugin=' PBS', plugin_args= dict(qsub_args='-q many') )"
19
+ -p PBS -- plugin_args " dict(qsub_args='-q many')"
20
20
"""
21
21
22
22
import os
@@ -471,7 +471,8 @@ def create_workflow(files,
471
471
else :
472
472
wf .connect (calc_median , 'median_file' , aparctransform , 'source_file' )
473
473
wf .connect (register , 'out_reg_file' , aparctransform , 'reg_file' )
474
- wf .connect (fssource , ('aparc_aseg' , get_aparc_aseg ), aparctransform , 'target_file' )
474
+ wf .connect (fssource , ('aparc_aseg' , get_aparc_aseg ),
475
+ aparctransform , 'target_file' )
475
476
476
477
# Sample the average time series in aparc ROIs
477
478
sampleaparc = MapNode (freesurfer .SegStats (avgwf_txt_file = True ,
@@ -729,9 +730,11 @@ def create_resting_workflow(args):
729
730
help = "Output directory base" )
730
731
parser .add_argument ("-w" , "--work_dir" , dest = "work_dir" ,
731
732
help = "Output directory base" )
732
- parser .add_argument ("-p" , "--plugin_args" , dest = "plugin_args" ,
733
- default = 'plugin_args=dict()' ,
734
- help = "Plugin args" )
733
+ parser .add_argument ("-p" , "--plugin" , dest = "plugin" ,
734
+ default = 'Linear' ,
735
+ help = "Plugin to use" )
736
+ parser .add_argument ("--plugin_args" , dest = "plugin_args" ,
737
+ help = "Plugin arguments" )
735
738
parser .add_argument ("--field_maps" , dest = "field_maps" , nargs = "+" ,
736
739
help = "field map niftis" )
737
740
parser .add_argument ("--fm_echospacing" , dest = "echo_spacing" , type = float ,
@@ -750,5 +753,7 @@ def create_resting_workflow(args):
750
753
work_dir = os .getcwd ()
751
754
752
755
wf .base_dir = work_dir
753
- exec args .plugin_args
754
- wf .run (** plugin_args )
756
+ if args .plugin_args :
757
+ wf .run (args .plugin , plugin_args = eval (args .plugin_args ))
758
+ else :
759
+ wf .run (args .plugin )
0 commit comments