Skip to content

Commit 83e7421

Browse files
committed
Added --fieldmap-number= argument to SubmitStructuralPreprocessingTest.sh
1 parent de72c20 commit 83e7421

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

StructuralPreprocessing/SubmitStructuralPreprocessingTest.sh

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ DEFAULT_HCP_PIPELINES_DIR="${HOME}/pipeline_tools/HCPpipelines"
1010
DEFAULT_FSL_DIR="/export/HCP/fsl-6.0.1b0"
1111
DEFAULT_FREESURFER_DIR="/export/freesurfer-6.0"
1212
DEFAULT_WORKBENCH_DIR="/export/HCP/workbench-v1.3.2"
13+
DEFAULT_FIELDMAP_NUMBER=1
1314

1415
inform()
1516
{
@@ -32,7 +33,8 @@ get_options()
3233
g_fsl_dir="${DEFAULT_FSL_DIR}"
3334
g_freesurfer_dir="${DEFAULT_FREESURFER_DIR}"
3435
g_workbench_dir="${DEFAULT_WORKBENCH_DIR}"
35-
36+
g_fieldmap_number="${DEFAULT_FIELDMAP_NUMBER}"
37+
3638
# parse arguments
3739
local num_args=${#arguments[@]}
3840
local argument
@@ -78,6 +80,10 @@ get_options()
7880
g_workbench_dir=${argument/*=/""}
7981
index=$(( index + 1 ))
8082
;;
83+
--fieldmap-number=*)
84+
g_fieldmap_number=${argument/*=/""}
85+
index=$(( index + 1 ))
86+
;;
8187
*)
8288
inform "Unrecognized option: ${argument}"
8389
exit 1
@@ -146,6 +152,13 @@ get_options()
146152
inform "Workbench dir: ${g_workbench_dir}"
147153
fi
148154

155+
if [ -z " ${g_fieldmap_number}" ]; then
156+
inform "--fieldmap-number= required"
157+
error_count=$(( error_count + 1 ))
158+
else
159+
inform "Fieldmap number: ${g_fieldmap_number}"
160+
fi
161+
149162
if [ ${error_count} -gt 0 ]; then
150163
inform "ABORTING"
151164
exit 1
@@ -233,8 +246,8 @@ ${g_run_dir}/StructuralPreprocessing.SINGULARITY_PROCESS \\
233246
--fnirtconfig=T1_2_MNI152_2mm.cnf \\
234247
--gdcoeffs=Prisma_3T_coeff_AS82.grad \\
235248
--topupconfig=b02b0.cnf \\
236-
--se-phase-pos=${g_session}_SpinEchoFieldMap1_PA.nii.gz \\
237-
--se-phase-neg=${g_session}_SpinEchoFieldMap1_AP.nii.gz \\
249+
--se-phase-pos=${g_session}_SpinEchoFieldMap${g_fieldmap_number}_PA.nii.gz \\
250+
--se-phase-neg=${g_session}_SpinEchoFieldMap${g_fieldmap_number}_AP.nii.gz \\
238251
239252
EOF
240253
# --processing-phase=PreFreeSurfer

0 commit comments

Comments
 (0)