Thanks for your reply Matt. The log file indicates a syntax error.
The content of the log file is the following:
/mnt/2/opt/HCP/HCPpipelines/PreFreeSurfer/PreFreeSurferPipeline.sh
========================================
DIRECTORY: /opt/HCP/HCPpipelines
PRODUCT: HCP Pipeline Scripts
VERSION: v4.4.0-rc-MOD-e7a6af9
COMMIT: e7a6af936d3a9255a2585d2cc16cdea85454e6ca
MODIFIED: YES
========================================
Mon May 2 12:14:10 EDT 2022:PreFreeSurferPipeline.sh: HCPPIPEDIR: /opt/HCP/HCPpipelines
Mon May 2 12:14:10 EDT 2022:PreFreeSurferPipeline.sh: FSLDIR: /opt/fsl/fsl
Mon May 2 12:14:10 EDT 2022:PreFreeSurferPipeline.sh: HCPPIPEDIR_Global: /opt/HCP/HCPpipelines/global/scripts
Mon May 2 12:14:10 EDT 2022:PreFreeSurferPipeline.sh: Platform Information Follows:
Linux bhcr003 3.10.0-1160.6.1.el7.x86_64 #1 SMP Wed Oct 21 13:44:38 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
Mon May 2 12:14:10 EDT 2022:PreFreeSurferPipeline.sh: Parsing Command Line Options
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: Finished Parsing Command Line Options
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: StudyFolder: mnt/0/data/sub-C1052/preprocessed/
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: Subject: sub-C1052
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: T1wInputImages: mnt/0/data/sub-C1052//anat/sub-C1052_run-1_T1w.nii.gz
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: T2wInputImages: mnt/0/data/sub-C1052//anat/sub-C1052_run-1_T2w.nii.gz
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: T1wTemplate: /mnt/2/opt/HCP/HCPpipelines/global/templates/MNI152_T1_0.8mm.nii.gz
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: T1wTemplateBrain: /mnt/2/opt/HCP/HCPpipelines/global/templates/MNI152_T1_0.8mm_brain.nii.gz
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: T1wTemplate2mm: /mnt/2/opt/HCP/HCPpipelines/global/templates/MNI152_T1_2mm.nii.gz
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: T2wTemplate: /mnt/2/opt/HCP/HCPpipelines/global/templates/MNI152_T2_0.8mm.nii.gz
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: T2wTemplateBrain: /mnt/2/opt/HCP/HCPpipelines/global/templates/MNI152_T2_0.8mm_brain.nii.gz
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: T2wTemplate2mm: /mnt/2/opt/HCP/HCPpipelines/global/templates/MNI152_T2_2mm.nii.gz
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: TemplateMask: /mnt/2/opt/HCP/HCPpipelines/global/templates/MNI152_T1_0.8mm_brain_mask.nii.gz
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: Template2mmMask: /mnt/2/opt/HCP/HCPpipelines/global/templates/MNI152_T1_2mm_brain_mask_dil.nii.gz
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: BrainSize: 150
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: FNIRTConfig: /mnt/2/opt/HCP/HCPpipelines/global/config/T1_2_MNI152_2mm.cnf
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: MagnitudeInputName: NONE
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: PhaseInputName:
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: GEB0InputName:
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: TE:
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: SpinEchoPhaseEncodeNegative: mnt/0/data/sub-C1052//fmap/sub-C1052_dir-AP_run-1_epi.nii.gz
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: SpinEchoPhaseEncodePositive: mnt/0/data/sub-C1052//fmap/sub-C1052_dir-PA_run-1_epi.nii.gz
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: SEEchoSpacing:
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: SEUnwarpDir: y
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: T1wSampleSpacing: 0.0000074
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: T2wSampleSpacing: 0.0000035
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: UnwarpDir: z
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: GradientDistortionCoeffs:
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: AvgrdcSTRING: TOPUP
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: TopupConfig: /opt/HCP/HCPpipelines/global/config/b02b0.cnf
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: BiasFieldSmoothingSigma:
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: UseJacobian: true
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: T1wBiasCorrect:
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: CustomBrain: NONE
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: ProcessingMode: HCPStyleData
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: T1wFolder: mnt/0/data/sub-C1052/preprocessed//sub-C1052/T1w
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: T2wFolder: mnt/0/data/sub-C1052/preprocessed//sub-C1052/T2w
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: AtlasSpaceFolder: mnt/0/data/sub-C1052/preprocessed//sub-C1052/MNINonLinear
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: mkdir -p mnt/0/data/sub-C1052/preprocessed//sub-C1052/T1w/xfms/
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: mkdir -p mnt/0/data/sub-C1052/preprocessed//sub-C1052/T2w/xfms/
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: mkdir -p mnt/0/data/sub-C1052/preprocessed//sub-C1052/MNINonLinear/xfms/
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: POSIXLY_CORRECT=
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: Processing Modality: T1w
Mon May 2 12:14:11 EDT 2022:PreFreeSurferPipeline.sh: NOT PERFORMING GRADIENT DISTORTION CORRECTION
Mon May 2 12:14:13 EDT 2022:PreFreeSurferPipeline.sh: Not Averaging T1w Images
Mon May 2 12:14:13 EDT 2022:PreFreeSurferPipeline.sh: ONLY ONE IMAGE FOUND: COPYING
Mon May 2 12:14:14 EDT 2022:PreFreeSurferPipeline.sh: Aligning T1w image to /mnt/2/opt/HCP/HCPpipelines/global/templates/MNI152_T1_0.8mm.nii.gz to create native volume space
Mon May 2 12:14:14 EDT 2022:PreFreeSurferPipeline.sh: mkdir -p mnt/0/data/sub-C1052/preprocessed//sub-C1052/T1w/ACPCAlignment
Mon May 2 12:14:14 EDT 2022:ACPCAlignment.sh: HCPPIPEDIR: /opt/HCP/HCPpipelines
Mon May 2 12:14:14 EDT 2022:ACPCAlignment.sh: FSLDIR: /opt/fsl/fsl
Mon May 2 12:14:14 EDT 2022:ACPCAlignment.sh: START
Final FOV is:
0.000000 208.000000 0.000000 300.000000 97.000000 188.000000
Mon May 2 12:15:28 EDT 2022:ACPCAlignment.sh: END
Mon May 2 12:15:28 EDT 2022:PreFreeSurferPipeline.sh: Performing Brain Extraction using FNIRT-based Masking
Mon May 2 12:15:28 EDT 2022:PreFreeSurferPipeline.sh: mkdir -p mnt/0/data/sub-C1052/preprocessed//sub-C1052/T1w/BrainExtraction_FNIRTbased
Mon May 2 12:15:28 EDT 2022:BrainExtraction_FNIRTbased.sh: HCPPIPEDIR: /opt/HCP/HCPpipelines
Mon May 2 12:15:28 EDT 2022:BrainExtraction_FNIRTbased.sh: FSLDIR: /opt/fsl/fsl
Mon May 2 12:15:28 EDT 2022:BrainExtraction_FNIRTbased.sh: HCPPIPEDIR_Templates: /opt/HCP/HCPpipelines/global/templates
Mon May 2 12:15:28 EDT 2022:BrainExtraction_FNIRTbased.sh: START: BrainExtraction_FNIRT
Mon May 2 12:26:41 EDT 2022:BrainExtraction_FNIRTbased.sh: END: BrainExtraction_FNIRT
Mon May 2 12:26:41 EDT 2022:PreFreeSurferPipeline.sh: Processing Modality: T2w
Mon May 2 12:26:41 EDT 2022:PreFreeSurferPipeline.sh: NOT PERFORMING GRADIENT DISTORTION CORRECTION
Mon May 2 12:26:43 EDT 2022:PreFreeSurferPipeline.sh: Not Averaging T2w Images
Mon May 2 12:26:43 EDT 2022:PreFreeSurferPipeline.sh: ONLY ONE IMAGE FOUND: COPYING
Mon May 2 12:26:44 EDT 2022:PreFreeSurferPipeline.sh: Aligning T2w image to /mnt/2/opt/HCP/HCPpipelines/global/templates/MNI152_T2_0.8mm.nii.gz to create native volume space
Mon May 2 12:26:44 EDT 2022:PreFreeSurferPipeline.sh: mkdir -p mnt/0/data/sub-C1052/preprocessed//sub-C1052/T2w/ACPCAlignment
Mon May 2 12:26:44 EDT 2022:ACPCAlignment.sh: HCPPIPEDIR: /opt/HCP/HCPpipelines
Mon May 2 12:26:44 EDT 2022:ACPCAlignment.sh: FSLDIR: /opt/fsl/fsl
Mon May 2 12:26:44 EDT 2022:ACPCAlignment.sh: START
Final FOV is:
0.000000 208.000000 0.000000 300.000000 98.000000 188.000000
Mon May 2 12:28:00 EDT 2022:ACPCAlignment.sh: END
Mon May 2 12:28:00 EDT 2022:PreFreeSurferPipeline.sh: Performing Brain Extraction using FNIRT-based Masking
Mon May 2 12:28:00 EDT 2022:PreFreeSurferPipeline.sh: mkdir -p mnt/0/data/sub-C1052/preprocessed//sub-C1052/T2w/BrainExtraction_FNIRTbased
Mon May 2 12:28:00 EDT 2022:BrainExtraction_FNIRTbased.sh: HCPPIPEDIR: /opt/HCP/HCPpipelines
Mon May 2 12:28:00 EDT 2022:BrainExtraction_FNIRTbased.sh: FSLDIR: /opt/fsl/fsl
Mon May 2 12:28:00 EDT 2022:BrainExtraction_FNIRTbased.sh: HCPPIPEDIR_Templates: /opt/HCP/HCPpipelines/global/templates
Mon May 2 12:28:00 EDT 2022:BrainExtraction_FNIRTbased.sh: START: BrainExtraction_FNIRT
Mon May 2 12:39:35 EDT 2022:BrainExtraction_FNIRTbased.sh: END: BrainExtraction_FNIRT
Mon May 2 12:39:35 EDT 2022:PreFreeSurferPipeline.sh: Performing TOPUP Readout Distortion Correction
Mon May 2 12:39:35 EDT 2022:PreFreeSurferPipeline.sh: mkdir -p mnt/0/data/sub-C1052/preprocessed//sub-C1052/T2w/T2wToT1wDistortionCorrectAndReg
Mon May 2 12:39:35 EDT 2022:T2wToT1wDistortionCorrectAndReg.sh: HCPPIPEDIR: /opt/HCP/HCPpipelines
Mon May 2 12:39:35 EDT 2022:T2wToT1wDistortionCorrectAndReg.sh: FSLDIR: /opt/fsl/fsl
Mon May 2 12:39:35 EDT 2022:T2wToT1wDistortionCorrectAndReg.sh: HCPPIPEDIR_Global: /opt/HCP/HCPpipelines/global/scripts
Mon May 2 12:39:36 EDT 2022:T2wToT1wDistortionCorrectAndReg.sh: START
TopupPreprocessingAll.sh: HCPPIPEDIR: /opt/HCP/HCPpipelines
TopupPreprocessingAll.sh: FSLDIR: /opt/fsl/fsl
TopupPreprocessingAll.sh: HCPPIPEDIR_Global: /opt/HCP/HCPpipelines/global/scripts
Mon May 2 12:39:36 EDT 2022:TopupPreprocessingAll.sh: START: Topup Field Map Generation and Gradient Unwarping
(standard_in) 1: syntax error
Part of FSL (ID: 6.0.5:9e026117)
topup
Usage:
topup --imain=<some 4D image> --datain=<text file> --config=<text file with parameters> --out=my_topup_results
Compulsory arguments (You MUST set one or more of):
--imain name of 4D file with images
--datain name of text file with PE directions/times
Optional arguments (You may optionally specify one or more of):
--out base-name of output files (spline coefficients (Hz) and movement parameters)
--fout name of image file with field (Hz)
--iout name of 4D image file with unwarped images
--logout Name of log-file
--warpres (approximate) resolution (in mm) of warp basis for the different sub-sampling levels, default 10
--subsamp sub-sampling scheme, default 1
--fwhm FWHM (in mm) of gaussian smoothing kernel, default 8
--config Name of config file specifying command line arguments
--miter Max # of non-linear iterations, default 5
--lambda Weight of regularisation, default depending on --ssqlambda and --regmod switches. See user documetation.
--ssqlambda If set (=1), lambda is weighted by current ssq, default 1
--regmod Model for regularisation of warp-field [membrane_energy bending_energy], default bending_energy
--estmov Estimate movements if set, default 1 (true)
--minmet Minimisation method 0=Levenberg-Marquardt, 1=Scaled Conjugate Gradient, default 0 (LM)
--splineorder Order of spline, 2->Qadratic spline, 3->Cubic spline. Default=3
--numprec Precision for representing Hessian, double or float. Default double
--interp Image interpolation model, linear or spline. Default spline
--scale If set (=1), the images are individually scaled to a common mean, default 0 (false)
--regrid If set (=1), the calculations are done in a different grid, default 1 (true)
-h,--help display help info
-v,--verbose Print diagonostic information while running
-h,--help display help info
Mon May 2 12:40:07 EDT 2022:TopupPreprocessingAll.sh: While running '/opt/HCP/HCPpipelines/global/scripts/TopupPreprocessingAll.sh --workingdir=mnt/0/data/sub-C1052/preprocessed//sub-C1052/T2w/T2wToT1wDistortionCorrectAndReg/FieldMap --phaseone=mnt/0/data/sub-C1052//fmap/sub-C1052_dir-AP_run-1_epi.nii.gz --phasetwo=mnt/0/data/sub-C1052//fmap/sub-C1052_dir-PA_run-1_epi.nii.gz --scoutin=mnt/0/data/sub-C1052//fmap/sub-C1052_dir-PA_run-1_epi.nii.gz --echospacing= --unwarpdir=y --ofmapmag=mnt/0/data/sub-C1052/preprocessed//sub-C1052/T2w/T2wToT1wDistortionCorrectAndReg/Magnitude --ofmapmagbrain=mnt/0/data/sub-C1052/preprocessed//sub-C1052/T2w/T2wToT1wDistortionCorrectAndReg/Magnitude_brain --ofmap=mnt/0/data/sub-C1052/preprocessed//sub-C1052/T2w/T2wToT1wDistortionCorrectAndReg/FieldMap --ojacobian=mnt/0/data/sub-C1052/preprocessed//sub-C1052/T2w/T2wToT1wDistortionCorrectAndReg/Jacobian --gdcoeffs= --topupconfig=/opt/HCP/HCPpipelines/global/config/b02b0.cnf --usejacobian=true':
Mon May 2 12:40:07 EDT 2022:TopupPreprocessingAll.sh: ERROR: '/opt/fsl/fsl/bin/topup' command failed with return code: 1
Mon May 2 12:40:07 EDT 2022:TopupPreprocessingAll.sh: ERROR: '/opt/fsl/fsl/bin/topup' command failed with return code: 1
===> ERROR: Command returned with nonzero exit code
---------------------------------------------------
script: TopupPreprocessingAll.sh
stopped at line: 286
call: ${FSLDIR}/bin/topup --imain=${WD}/BothPhases --datain=$txtfname --config=${TopupConfig} --out=${WD}/Coefficents --iout=${WD}/Magnitudes --fout=${WD}/TopupField --dfout=${WD}/WarpField --rbmout=${WD}/MotionMatrix --jacout=${WD}/Jacobian -v
expanded call: /opt/fsl/fsl/bin/topup --imain=mnt/0/data/sub-C1052/preprocessed//sub-C1052/T2w/T2wToT1wDistortionCorrectAndReg/FieldMap/BothPhases --datain=mnt/0/data/sub-C1052/preprocessed//sub-C1052/T2w/T2wToT1wDistortionCorrectAndReg/FieldMap/acqparams.txt --config=/opt/HCP/HCPpipelines/global/config/b02b0.cnf --out=mnt/0/data/sub-C1052/preprocessed//sub-C1052/T2w/T2wToT1wDistortionCorrectAndReg/FieldMap/Coefficents --iout=mnt/0/data/sub-C1052/preprocessed//sub-C1052/T2w/T2wToT1wDistortionCorrectAndReg/FieldMap/Magnitudes --fout=mnt/0/data/sub-C1052/preprocessed//sub-C1052/T2w/T2wToT1wDistortionCorrectAndReg/FieldMap/TopupField --dfout=mnt/0/data/sub-C1052/preprocessed//sub-C1052/T2w/T2wToT1wDistortionCorrectAndReg/FieldMap/WarpField --rbmout=mnt/0/data/sub-C1052/preprocessed//sub-C1052/T2w/T2wToT1wDistortionCorrectAndReg/FieldMap/MotionMatrix --jacout=mnt/0/data/sub-C1052/preprocessed//sub-C1052/T2w/T2wToT1wDistortionCorrectAndReg/FieldMap/Jacobian -v
exit code: 1
My script to call PreFreeSurferPipeline.sh is the following:
${HCPPipe}/PreFreeSurfer/PreFreeSurferPipeline.sh \
--path="${datadir}" \
--subject="${subj}" \
--t1="${unprocesseddir}/anat/${subj}_run-1_T1w.nii.gz" \
--t2="${unprocesseddir}/anat/${subj}_run-1_T2w.nii.gz" \
--t1template="${t1template}" \
--t1templatebrain="${t1templatebrain}" \
--t1template2mm="${t1template2mm}" \
--t2template="${t2template}" \
--t2templatebrain="$t2templatebrain" \
--t2template2mm="$t2template2mm" \
--templatemask="$templatemask" \
--template2mmmask="$template2mmmask" \
--brainsize="${brainsize}" \
--fmapmag="NONE" \
--fnirtconfig="${HCPPipe}/global/config/T1_2_MNI152_2mm.cnf" \
--SEPhaseNeg="${unprocesseddir}/fmap/${subj}_dir-AP_run-1_epi.nii.gz" \
--SEPhasePos="${unprocesseddir}/fmap/${subj}_dir-PA_run-1_epi.nii.gz" \
--echospacing="$DwellTime_SE" \
--seunwarpdir="${seunwarpdir}" \
--t1samplespacing="$T1wSampleSpacing" \
--t2samplespacing="$T2wSampleSpacing" \
--unwarpdir="z" \
--grdcoeffs="NONE" \
--avgrdcmethod="TOPUP" \
--topupconfig="${HCPPIPEDIR_Config}/b02b0.cnf" \
Thank you,
Yonatan