Hi all, I have 2 questions about this preprocessing command. My team has split this process into 2 separate scripts:
part 1
# labels
set subj = $1
set template = MNI152_2009_template_SSW.nii.gz
# upper directories
set topdir = /data/projects/STUDIES/IMPACT/fMRI
set dir_bids = ${topdir}/bids
set dir_ssw = ${topdir}/derivatives/ssw
set dir_log = ${topdir}/derivatives/logs
# subject directories
set sdir_basic = ${dir_bids}/sub-${subj}
set sdir_epi = ${sdir_basic}/func
set sdir_anat = ${sdir_basic}/anat
set sdir_ssw = ${dir_ssw}/sub-${subj}
# --------------------------------------------------------------------------
# data and control variables
# --------------------------------------------------------------------------
# dataset inputs
set dset_anat_00 = ${sdir_anat}/sub-${subj}_T1w.nii.gz
# control variables
# check available N_threads and report what is being used
# + consider using up to 16 threads (alignment programs are parallelized)
# + N_threads may be set elsewhere; to set here, uncomment the following line:
### setenv OMP_NUM_THREADS 16
set nthr_avail = `afni_system_check.py -disp_num_cpu'`
set nthr_using = `afni_check_omp`
echo "++ INFO: Using ${nthr_avail} of available ${nthr_using} threads"
# ---------------------------------------------------------------------------
# run programs
# ---------------------------------------------------------------------------
time @SSwarper \
-base "${template}" \
-subid "${subj}" \
-input "${dset_anat_00}" \
-cost_nl_final lpa \
-odir "${sdir_ssw}"
echo "++ FINISHED SSW"
Part 2
# specify script to execute
set cmd = IMPACT_Setup_02_ssw
# labels
set subj = ( s4347 )
# LOG:
# Round 1: s606 s333 s807
# Round 2: s1287 s4326 s926 s1476 s1324 s169 s35 s1350 s701 s601 s191 s578 s820 s523 s692 s4272
# Round 3: s4345, s1253, s1143, s1323, s4127, s1000, s1745, s1595, s4348, s1630, s418, s4347, s745
# upper directories
set dir_scr = $PWD
set topdir = /data/projects/STUDIES/IMPACT/fMRI
set dir_log = ${topdir}/derivatives/logs
# running
set cdir_log = ${dir_log}/logs_${cmd}
set scr_cmd = ${dir_scr}/${cmd}.tcsh
# --------------------------------------------------------------------------
foreach subj ($subj)
# make directory for storing text files to log the processing
\mkdir -p ${cdir_log}
# --------------------------------------------------------------------------
set log = ${cdir_log}/log_${cmd}_sub-${subj}.txt
# run command script (verbosely and stop at any failure); log terminal text.
tcsh -xf ${scr_cmd} ${subj} |& tee ${log}
end
Q1: Does this command require this nested design in order to run multiple participants? Is there another reason why it should be nested?
When looking for answers to this question on the afni help pages I saw that there is a newer version of @SSwarper, named ssw2. There are not many differences between the two scripts. Would anyone recommend switching to ssw2? Why or why not? (Context: we are launching a new study and are revisiting the rationale for each step of our preprocessing pipeline)
Thanks so much!