AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
December 08, 2015 01:32PM
Hello,

I've recently moved over to trying afni_proc.py as opposed to my home-brewed preprocessing pipeline. I'm having an interesting issue with EPI-to-structural alignment. For some background, structural is 0.75mm isotropic and EPI is 1.8x1.8x2.0mm. The EPI is a partial volume with axial slices that covers from roughly the bottom of the temporal lobe to just above the apex of the cingulate cortex (i.e., I'm not grabbing anything above the cingulate). Importantly, I am acquiring the entire anterior-posterior extent of the brain. Moreover, though the EPI and structural are not in exactly the same space, they start off fairly close (and the EPI is not acquired at an angle).

In a nutshell, what appears to be happening is that the EPI volumes are pushed forward during alignment to extend beyond the front of the brain, and visual cortex is clipped off. What is particularly odd about it is that within the brain, everything seems to be aligned perfectly (see an example picture in the link here: [imgur.com]).

Is the partial volume throwing things off? I have "Giant Move" enabled, which in my own processing pipeline typically works okay. Is there a quick modification I can do to patch up the process?

Thanks so much in advance. Below is my proc script:

#!/bin/tcsh -xef

echo "auto-generated by afni_proc.py, Mon Dec  7 15:07:47 2015"
echo "(version 4.56, October 28, 2015)"
echo "execution started: `date`"

# execute via : 
#   tcsh -xef proc.s101 |& tee output.proc.s101

# =========================== auto block: setup ============================
# script setup

# take note of the AFNI version
afni -ver

# check that the current AFNI version is recent enough
afni_history -check_date 28 Oct 2015
if ( $status ) then
    echo "** this script requires newer AFNI binaries (than 28 Oct 2015)"
    echo "   (consider: @update.afni.binaries -defaults)"
    exit
endif

# the user may specify a single subject to run with
if ( $#argv > 0 ) then
    set subj = $argv[1]
else
    set subj = s101
endif

# assign output directory name
set output_dir = $subj.results

# verify that the results directory does not yet exist
if ( -d $output_dir ) then
    echo output dir "$subj.results" already exists
    exit
endif

# set list of runs
set runs = (`count -digits 2 1 4`)

# create results and stimuli directories
mkdir $output_dir
mkdir $output_dir/stimuli

# copy stim files into stimulus directory
cp /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/stimtimes.01.1D  \
    /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/stimtimes.02.1D \
    /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/stimtimes.03.1D \
    /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/stimtimes.04.1D \
    /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/stimtimes.05.1D \
    /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/stimtimes.06.1D \
    /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/stimtimes.07.1D \
    /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/stimtimes.08.1D \
    /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/stimtimes.09.1D \
    /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/stimtimes.10.1D \
    $output_dir/stimuli

# copy anatomy to results dir
3dcopy /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/struct+orig $output_dir/struct

# ============================ auto block: tcat ============================
# apply 3dTcat to copy input dsets to results dir, while
# removing the first 0 TRs
3dTcat -prefix $output_dir/pb00.$subj.r01.tcat \
    /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/test_run1+orig'[0..$]'
3dTcat -prefix $output_dir/pb00.$subj.r02.tcat \
    /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/test_run2+orig'[0..$]'
3dTcat -prefix $output_dir/pb00.$subj.r03.tcat \
    /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/test_run3+orig'[0..$]'
3dTcat -prefix $output_dir/pb00.$subj.r04.tcat \
    /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/test_run4+orig'[0..$]'

# and make note of repetitions (TRs) per run
set tr_counts = ( 104 104 104 104 )

# -------------------------------------------------------
# enter the results directory (can begin processing data)
cd $output_dir


# ========================== auto block: outcount ==========================
# data check: compute outlier fraction for each volume
touch out.pre_ss_warn.txt
foreach run ( $runs )
    3dToutcount -automask -fraction -polort 2 -legendre                     \
                pb00.$subj.r$run.tcat+orig > outcount.r$run.1D

    # outliers at TR 0 might suggest pre-steady state TRs
    if ( `1deval -a outcount.r$run.1D"{0}" -expr "step(a-0.4)"` ) then
        echo "** TR #0 outliers: possible pre-steady state TRs in run $run" \
            >> out.pre_ss_warn.txt
    endif
end

# catenate outlier counts into a single time series
cat outcount.r*.1D > outcount_rall.1D

# get run number and TR index for minimum outlier volume
set minindex = `3dTstat -argmin -prefix - outcount_rall.1D\'`
set ovals = ( `1d_tool.py -set_run_lengths $tr_counts                       \
                          -index_to_run_tr $minindex` )
# save run and TR indices for extraction of min_outlier_volume
set minoutrun = $ovals[1]
set minouttr  = $ovals[2]
echo "min outlier: run $minoutrun, TR $minouttr" | tee out.min_outlier.txt

# ================================= tshift =================================
# time shift data so all slice timing is the same 
foreach run ( $runs )
    3dTshift -tzero 0 -quintic -prefix pb01.$subj.r$run.tshift \
             pb00.$subj.r$run.tcat+orig
end

# copy min outlier volume as registration base
3dbucket -prefix min_outlier_volume                            \
    pb01.$subj.r$minoutrun.tshift+orig"[$minouttr]"

# ================================= align ==================================
# for e2a: compute anat alignment transformation to EPI registration base
# (new anat will be intermediate, stripped, struct_ns+orig)
align_epi_anat.py -anat2epi -anat struct+orig   \
       -save_skullstrip -suffix _al_junk        \
       -epi min_outlier_volume+orig -epi_base 0 \
       -epi_strip 3dAutomask                    \
       -giant_move                              \
       -volreg off -tshift off

# ================================== tlrc ==================================
# warp anatomy to standard space
@auto_tlrc -base TT_N27+tlrc -input struct_ns+orig -no_ss

# store forward transformation matrix in a text file
cat_matvec struct_ns+tlrc::WARP_DATA -I > warp.anat.Xat.1D

# ================================= volreg =================================
# align each dset to base volume, align to anat, warp to tlrc space

# verify that we have a +tlrc warp dataset
if ( ! -f struct_ns+tlrc.HEAD ) then
    echo "** missing +tlrc warp dataset: struct_ns+tlrc.HEAD" 
    exit
endif

# register and warp
foreach run ( $runs )
    # register each volume to the base
    3dvolreg -verbose -zpad 1 -base min_outlier_volume+orig     \
             -1Dfile dfile.r$run.1D -prefix rm.epi.volreg.r$run \
             -cubic                                             \
             -1Dmatrix_save mat.r$run.vr.aff12.1D               \
             pb01.$subj.r$run.tshift+orig

    # create an all-1 dataset to mask the extents of the warp
    3dcalc -overwrite -a pb01.$subj.r$run.tshift+orig -expr 1   \
           -prefix rm.epi.all1

    # catenate volreg, epi2anat and tlrc transformations
    cat_matvec -ONELINE                                         \
               struct_ns+tlrc::WARP_DATA -I                     \
               struct_al_junk_mat.aff12.1D -I                   \
               mat.r$run.vr.aff12.1D > mat.r$run.warp.aff12.1D

    # apply catenated xform : volreg, epi2anat and tlrc
    3dAllineate -base struct_ns+tlrc                            \
                -input pb01.$subj.r$run.tshift+orig             \
                -1Dmatrix_apply mat.r$run.warp.aff12.1D         \
                -mast_dxyz 1.5                                  \
                -prefix rm.epi.nomask.r$run 

    # warp the all-1 dataset for extents masking 
    3dAllineate -base struct_ns+tlrc                            \
                -input rm.epi.all1+orig                         \
                -1Dmatrix_apply mat.r$run.warp.aff12.1D         \
                -mast_dxyz 1.5 -final NN -quiet                 \
                -prefix rm.epi.1.r$run 

    # make an extents intersection mask of this run
    3dTstat -min -prefix rm.epi.min.r$run rm.epi.1.r$run+tlrc

    # if there was an error, exit so user can see
    if ( $status ) exit

end

# make a single file of registration params
cat dfile.r*.1D > dfile_rall.1D

# ----------------------------------------
# create the extents mask: mask_epi_extents+tlrc
# (this is a mask of voxels that have valid data at every TR)
3dMean -datum short -prefix rm.epi.mean rm.epi.min.r*.HEAD 
3dcalc -a rm.epi.mean+tlrc -expr 'step(a-0.999)' -prefix mask_epi_extents

# and apply the extents mask to the EPI data 
# (delete any time series with missing data)
foreach run ( $runs )
    3dcalc -a rm.epi.nomask.r$run+tlrc -b mask_epi_extents+tlrc \
           -expr 'a*b' -prefix pb02.$subj.r$run.volreg
end

# create an anat_final dataset, aligned with stats
3dcopy struct_ns+tlrc anat_final.$subj

# -----------------------------------------
# warp anat follower datasets (affine)
3dAllineate -source struct+orig                                 \
            -master anat_final.$subj+tlrc                       \
            -final wsinc5 -1Dmatrix_apply warp.anat.Xat.1D      \
            -prefix anat_w_skull_warped

# ================================== blur ==================================
# blur each volume of each run
foreach run ( $runs )
    3dmerge -1blur_fwhm 3.0 -doall -prefix pb03.$subj.r$run.blur \
            pb02.$subj.r$run.volreg+tlrc
end

# ================================== mask ==================================
# create 'full_mask' dataset (union mask)
foreach run ( $runs )
    3dAutomask -dilate 1 -prefix rm.mask_r$run pb03.$subj.r$run.blur+tlrc
end

# create union of inputs, output type is byte
3dmask_tool -inputs rm.mask_r*+tlrc.HEAD -union -prefix full_mask.$subj

# ---- create subject anatomy mask, mask_anat.$subj+tlrc ----
#      (resampled from tlrc anat)
3dresample -master full_mask.$subj+tlrc -input struct_ns+tlrc         \
           -prefix rm.resam.anat

# convert to binary anat mask; fill gaps and holes
3dmask_tool -dilate_input 5 -5 -fill_holes -input rm.resam.anat+tlrc  \
            -prefix mask_anat.$subj

# compute overlaps between anat and EPI masks
3dABoverlap -no_automask full_mask.$subj+tlrc mask_anat.$subj+tlrc    \
            |& tee out.mask_ae_overlap.txt

# note Dice coefficient of masks, as well
3ddot -dodice full_mask.$subj+tlrc mask_anat.$subj+tlrc               \
      |& tee out.mask_ae_dice.txt

# ---- create group anatomy mask, mask_group+tlrc ----
#      (resampled from tlrc base anat, TT_N27+tlrc)
3dresample -master full_mask.$subj+tlrc -prefix ./rm.resam.group      \
           -input /usr/local/afni/TT_N27+tlrc

# convert to binary group mask; fill gaps and holes
3dmask_tool -dilate_input 5 -5 -fill_holes -input rm.resam.group+tlrc \
            -prefix mask_group

# ================================= scale ==================================
# scale each voxel time series to have a mean of 100
# (be sure no negatives creep in)
# (subject to a range of [0,200])
foreach run ( $runs )
    3dTstat -prefix rm.mean_r$run pb03.$subj.r$run.blur+tlrc
    3dcalc -a pb03.$subj.r$run.blur+tlrc -b rm.mean_r$run+tlrc \
           -c mask_epi_extents+tlrc                            \
           -expr 'c * min(200, a/b*100)*step(a)*step(b)'       \
           -prefix pb04.$subj.r$run.scale
end

# ================================ regress =================================

# compute de-meaned motion parameters (for use in regression)
1d_tool.py -infile dfile_rall.1D -set_nruns 4                                 \
           -demean -write motion_demean.1D

# compute motion parameter derivatives (for use in regression)
1d_tool.py -infile dfile_rall.1D -set_nruns 4                                 \
           -derivative -demean -write motion_deriv.1D

# create censor file motion_${subj}_censor.1D, for censoring motion 
1d_tool.py -infile dfile_rall.1D -set_nruns 4                                 \
    -show_censor_count -censor_prev_TR                                        \
    -censor_motion 0.3 motion_${subj}

# note TRs that were not censored
set ktrs = `1d_tool.py -infile motion_${subj}_censor.1D                       \
                       -show_trs_uncensored encoded`

# ------------------------------
# run the regression analysis
3dDeconvolve -input pb04.$subj.r*.scale+tlrc.HEAD                             \
    -censor motion_${subj}_censor.1D                                          \
    -polort 2                                                                 \
    -num_stimts 22                                                            \
    -stim_times 1 stimuli/stimtimes.01.1D 'TENT(0,15,6)'                      \
    -stim_label 1 Hit1rep                                                     \
    -stim_times 2 stimuli/stimtimes.02.1D 'TENT(0,15,6)'                      \
    -stim_label 2 Miss1rep                                                    \
    -stim_times 3 stimuli/stimtimes.03.1D 'TENT(0,15,6)'                      \
    -stim_label 3 Hit3rep                                                     \
    -stim_times 4 stimuli/stimtimes.04.1D 'TENT(0,15,6)'                      \
    -stim_label 4 Miss3rep                                                    \
    -stim_times 5 stimuli/stimtimes.05.1D 'TENT(0,15,6)'                      \
    -stim_label 5 CR1rep                                                      \
    -stim_times 6 stimuli/stimtimes.06.1D 'TENT(0,15,6)'                      \
    -stim_label 6 FA1rep                                                      \
    -stim_times 7 stimuli/stimtimes.07.1D 'TENT(0,15,6)'                      \
    -stim_label 7 CR3rep                                                      \
    -stim_times 8 stimuli/stimtimes.08.1D 'TENT(0,15,6)'                      \
    -stim_label 8 FA3rep                                                      \
    -stim_times 9 stimuli/stimtimes.09.1D 'TENT(0,15,6)'                      \
    -stim_label 9 FoilCR                                                      \
    -stim_times 10 stimuli/stimtimes.10.1D 'TENT(0,15,6)'                     \
    -stim_label 10 Junk                                                       \
    -stim_file 11 motion_demean.1D'[0]' -stim_base 11 -stim_label 11 roll_01  \
    -stim_file 12 motion_demean.1D'[1]' -stim_base 12 -stim_label 12 pitch_01 \
    -stim_file 13 motion_demean.1D'[2]' -stim_base 13 -stim_label 13 yaw_01   \
    -stim_file 14 motion_demean.1D'[3]' -stim_base 14 -stim_label 14 dS_01    \
    -stim_file 15 motion_demean.1D'[4]' -stim_base 15 -stim_label 15 dL_01    \
    -stim_file 16 motion_demean.1D'[5]' -stim_base 16 -stim_label 16 dP_01    \
    -stim_file 17 motion_deriv.1D'[0]' -stim_base 17 -stim_label 17 roll_02   \
    -stim_file 18 motion_deriv.1D'[1]' -stim_base 18 -stim_label 18 pitch_02  \
    -stim_file 19 motion_deriv.1D'[2]' -stim_base 19 -stim_label 19 yaw_02    \
    -stim_file 20 motion_deriv.1D'[3]' -stim_base 20 -stim_label 20 dS_02     \
    -stim_file 21 motion_deriv.1D'[4]' -stim_base 21 -stim_label 21 dL_02     \
    -stim_file 22 motion_deriv.1D'[5]' -stim_base 22 -stim_label 22 dP_02     \
    -iresp 1 iresp_Hit1rep.$subj                                              \
    -iresp 2 iresp_Miss1rep.$subj                                             \
    -iresp 3 iresp_Hit3rep.$subj                                              \
    -iresp 4 iresp_Miss3rep.$subj                                             \
    -iresp 5 iresp_CR1rep.$subj                                               \
    -iresp 6 iresp_FA1rep.$subj                                               \
    -iresp 7 iresp_CR3rep.$subj                                               \
    -iresp 8 iresp_FA3rep.$subj                                               \
    -iresp 9 iresp_FoilCR.$subj                                               \
    -iresp 10 iresp_Junk.$subj                                                \
    -jobs 8                                                                   \
    -GOFORIT 5                                                                \
    -gltsym 'SYM: .1*Hit1rep +.1*Miss1rep +.1*Hit3rep +.1*Miss3rep +.1*CR3rep \
    +.1*CR1rep +.1*FA3rep +.1*FA1rep +.1*FoilCR +.1*Junk'                     \
    -glt_label 1 Mean                                                         \
    -gltsym 'SYM: Hit3rep -Hit1rep'                                           \
    -glt_label 2 Hit3                                                         \
    -gltsym 'SYM: CR3rep +CR1rep -FA3rep -FA1rep'                             \
    -glt_label 3 CRvsFA                                                       \
    -gltsym 'SYM: CR3rep -CR1rep'                                             \
    -glt_label 4 CR3-1                                                        \
    -gltsym 'SYM: Hit1rep -FA1rep'                                            \
    -glt_label 5 Hit1-FA1                                                     \
    -gltsym 'SYM: Hit3rep -FA3rep'                                            \
    -glt_label 6 Hit3-FA3                                                     \
    -gltsym 'SYM: FoilCR'                                                     \
    -glt_label 7 FoilCR                                                       \
    -fout -tout -x1D X.xmat.1D -xjpeg X.jpg                                   \
    -x1D_uncensored X.nocensor.xmat.1D                                        \
    -errts errts.${subj}                                                      \
    -bucket stats.$subj


# if 3dDeconvolve fails, terminate the script
if ( $status != 0 ) then
    echo '---------------------------------------'
    echo '** 3dDeconvolve error, failing...'
    echo '   (consider the file 3dDeconvolve.err)'
    exit
endif


# display any large pairwise correlations from the X-matrix
1d_tool.py -show_cormat_warnings -infile X.xmat.1D |& tee out.cormat_warn.txt

# look for odd timing in files for TENT functions
timing_tool.py -multi_timing stimuli/stimtimes.01.1D                          \
                             stimuli/stimtimes.02.1D                          \
                             stimuli/stimtimes.03.1D                          \
                             stimuli/stimtimes.04.1D                          \
                             stimuli/stimtimes.05.1D                          \
                             stimuli/stimtimes.06.1D                          \
                             stimuli/stimtimes.07.1D                          \
                             stimuli/stimtimes.08.1D                          \
                             stimuli/stimtimes.09.1D                          \
                             stimuli/stimtimes.10.1D                          \
               -tr 2.5 -warn_tr_stats |& tee out.TENT_warn.txt

# -- execute the 3dREMLfit script, written by 3dDeconvolve --
tcsh -x stats.REML_cmd 

# if 3dREMLfit fails, terminate the script
if ( $status != 0 ) then
    echo '---------------------------------------'
    echo '** 3dREMLfit error, failing...'
    exit
endif


# create an all_runs dataset to match the fitts, errts, etc.
3dTcat -prefix all_runs.$subj pb04.$subj.r*.scale+tlrc.HEAD

# --------------------------------------------------
# create a temporal signal to noise ratio dataset 
#    signal: if 'scale' block, mean should be 100
#    noise : compute standard deviation of errts
3dTstat -mean -prefix rm.signal.all all_runs.$subj+tlrc"[$ktrs]"
3dTstat -stdev -prefix rm.noise.all errts.${subj}_REML+tlrc"[$ktrs]"
3dcalc -a rm.signal.all+tlrc                                                  \
       -b rm.noise.all+tlrc                                                   \
       -c full_mask.$subj+tlrc                                                \
       -expr 'c*a/b' -prefix TSNR.$subj 

# ---------------------------------------------------
# compute and store GCOR (global correlation average)
# (sum of squares of global mean of unit errts)
3dTnorm -norm2 -prefix rm.errts.unit errts.${subj}_REML+tlrc
3dmaskave -quiet -mask full_mask.$subj+tlrc rm.errts.unit+tlrc                \
          > gmean.errts.unit.1D
3dTstat -sos -prefix - gmean.errts.unit.1D\' > out.gcor.1D
echo "-- GCOR = `cat out.gcor.1D`"

# ---------------------------------------------------
# compute correlation volume
# (per voxel: average correlation across masked brain)
# (now just dot product with average unit time series)
3dcalc -a rm.errts.unit+tlrc -b gmean.errts.unit.1D -expr 'a*b' -prefix rm.DP
3dTstat -sum -prefix corr_brain rm.DP+tlrc

# create fitts dataset from all_runs and errts
3dcalc -a all_runs.$subj+tlrc -b errts.${subj}+tlrc -expr a-b                 \
       -prefix fitts.$subj
# create fitts from REML errts
3dcalc -a all_runs.$subj+tlrc -b errts.${subj}_REML+tlrc -expr a-b            \
       -prefix fitts.$subj\_REML

# --------------------------------------------------------
# compute sum of non-baseline regressors from the X-matrix
# (use 1d_tool.py to get list of regressor colums)
set reg_cols = `1d_tool.py -infile X.nocensor.xmat.1D -show_indices_interest`
3dTstat -sum -prefix sum_ideal.1D X.nocensor.xmat.1D"[$reg_cols]"

# also, create a stimulus-only X-matrix, for easy review
1dcat X.nocensor.xmat.1D"[$reg_cols]" > X.stim.xmat.1D

# ============================ blur estimation =============================
# compute blur estimates
touch blur_est.$subj.1D   # start with empty file

# -- estimate blur for each run in epits --
touch blur.epits.1D

# restrict to uncensored TRs, per run
foreach run ( $runs )
    set trs = `1d_tool.py -infile X.xmat.1D -show_trs_uncensored encoded      \
                          -show_trs_run $run`
    if ( $trs == "" ) continue
    3dFWHMx -detrend -mask full_mask.$subj+tlrc                               \
        all_runs.$subj+tlrc"[$trs]" >> blur.epits.1D
end

# compute average blur and append
set blurs = ( `3dTstat -mean -prefix - blur.epits.1D\'` )
echo average epits blurs: $blurs
echo "$blurs   # epits blur estimates" >> blur_est.$subj.1D

# -- estimate blur for each run in errts --
touch blur.errts.1D

# restrict to uncensored TRs, per run
foreach run ( $runs )
    set trs = `1d_tool.py -infile X.xmat.1D -show_trs_uncensored encoded      \
                          -show_trs_run $run`
    if ( $trs == "" ) continue
    3dFWHMx -detrend -mask full_mask.$subj+tlrc                               \
        errts.${subj}+tlrc"[$trs]" >> blur.errts.1D
end

# compute average blur and append
set blurs = ( `3dTstat -mean -prefix - blur.errts.1D\'` )
echo average errts blurs: $blurs
echo "$blurs   # errts blur estimates" >> blur_est.$subj.1D

# -- estimate blur for each run in err_reml --
touch blur.err_reml.1D

# restrict to uncensored TRs, per run
foreach run ( $runs )
    set trs = `1d_tool.py -infile X.xmat.1D -show_trs_uncensored encoded      \
                          -show_trs_run $run`
    if ( $trs == "" ) continue
    3dFWHMx -detrend -mask full_mask.$subj+tlrc                               \
        errts.${subj}_REML+tlrc"[$trs]" >> blur.err_reml.1D
end

# compute average blur and append
set blurs = ( `3dTstat -mean -prefix - blur.err_reml.1D\'` )
echo average err_reml blurs: $blurs
echo "$blurs   # err_reml blur estimates" >> blur_est.$subj.1D


# add 3dClustSim results as attributes to any stats dset
set fxyz = ( `tail -1 blur_est.$subj.1D` )
3dClustSim -both -mask full_mask.$subj+tlrc -fwhmxyz $fxyz[1-3]               \
           -prefix ClustSim
set cmd = ( `cat 3dClustSim.cmd` )
$cmd stats.$subj+tlrc stats.${subj}_REML+tlrc


# ================== auto block: generate review scripts ===================

# generate a review script for the unprocessed EPI data
gen_epi_review.py -script @epi_review.$subj \
    -dsets pb00.$subj.r*.tcat+orig.HEAD

# generate scripts to review single subject results
# (try with defaults, but do not allow bad exit status)
gen_ss_review_scripts.py -mot_limit 0.3 -exit0

# ========================== auto block: finalize ==========================

# remove temporary files
\rm -f rm.*

# if the basic subject review script is here, run it
# (want this to be the last text output)
if ( -e @ss_review_basic ) ./@ss_review_basic |& tee out.ss_review.$subj.txt

# return to parent directory
cd ..

echo "execution finished: `date`"




# ==========================================================================
# script generated by the command:
#
# afni_proc.py -subj_id s101 -script proc.s101 -scr_overwrite -blocks tshift  \
#     align tlrc volreg blur mask scale regress -copy_anat                    \
#     /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/struct+orig                    \
#     -tcat_remove_first_trs 0 -dsets                                         \
#     /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/test_run1+orig.HEAD            \
#     /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/test_run2+orig.HEAD            \
#     /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/test_run3+orig.HEAD            \
#     /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/test_run4+orig.HEAD            \
#     -align_opts_aea -giant_move -volreg_align_to MIN_OUTLIER                \
#     -volreg_align_e2a -volreg_tlrc_warp -blur_size 3.0 -regress_stim_times  \
#     /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/stimtimes.01.1D                \
#     /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/stimtimes.02.1D                \
#     /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/stimtimes.03.1D                \
#     /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/stimtimes.04.1D                \
#     /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/stimtimes.05.1D                \
#     /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/stimtimes.06.1D                \
#     /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/stimtimes.07.1D                \
#     /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/stimtimes.08.1D                \
#     /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/stimtimes.09.1D                \
#     /tmp/yassamri/CTTfMRI/MRIdata_Round2/101/stimtimes.10.1D                \
#     -regress_stim_labels Hit1rep Miss1rep Hit3rep Miss3rep CR1rep FA1rep    \
#     CR3rep FA3rep FoilCR Junk -regress_basis 'TENT(0,15,6)'                 \
#     -regress_censor_motion 0.3 -regress_apply_mot_types demean deriv        \
#     -regress_opts_3dD -jobs 8 -GOFORIT 5 -gltsym 'SYM: .1*Hit1rep           \
#     +.1*Miss1rep +.1*Hit3rep +.1*Miss3rep +.1*CR3rep +.1*CR1rep +.1*FA3rep  \
#     +.1*FA1rep +.1*FoilCR +.1*Junk' -glt_label 1 Mean -gltsym 'SYM: Hit3rep \
#     -Hit1rep' -glt_label 2 Hit3 -gltsym 'SYM: CR3rep +CR1rep -FA3rep        \
#     -FA1rep' -glt_label 3 CRvsFA -gltsym 'SYM: CR3rep -CR1rep' -glt_label 4 \
#     CR3-1 -gltsym 'SYM: Hit1rep -FA1rep' -glt_label 5 Hit1-FA1 -gltsym      \
#     'SYM: Hit3rep -FA3rep' -glt_label 6 Hit3-FA3 -gltsym 'SYM: FoilCR'      \
#     -glt_label 7 FoilCR -regress_reml_exec -regress_compute_fitts           \
#     -regress_make_ideal_sum sum_ideal.1D -regress_est_blur_epits            \
#     -regress_est_blur_errts



Edited 2 time(s). Last edit at 12/08/2015 01:34PM by zreagh.
Subject Author Posted

Interesting alignment problem in afni_proc.py

zreagh December 08, 2015 01:32PM

Re: Interesting alignment problem in afni_proc.py

rick reynolds December 08, 2015 09:24PM