History of AFNI updates  

|
April 23, 2014 07:47PM
Dear AFNI folks-

While translating a fragmented processing pipeline (many scripts) to proc.py, I hit a wall trying to do the regression given that my block design has block times that vary by subject (both within & between) for this subject-navigated task.

Paradigm stats-
We're contrasting 2 conditions, IN (getting included in a virtual ball-tossing game) & EX (getting excluded from it).
1 run, 252 TRs, TR=2 s.
Subjects' IN block starts at 41 s, lasts X amount of time (depending on subjects' RTs), then resumes at 292 s & lasts Y amount of time (depending on RTs). So, the IN condition is split into 2 blocks, each of variable duration.
Subjects' EX block starts immediately after the 2nd IN block (so, start time varies between subjects) & also has a variable duration (depending on RTs).
We had stim times related to their button presses, too, as well as manually-generated censor files that we don't anticipate using w/ proc.py.

How we were processing this-
We created waver files for each subject using, as an example for subjects S01001 & S01002:
waver -WAV -dt 2.0 -tstim 41.028:179.829 292.071:375.026 > S01001.IN_run.waver.1D
waver -WAV -dt 2.0 -tstim 375.026:451.237 > S01001.EX_run.waver.1D

waver -WAV -dt 2.0 -tstim 41.027:162.661 292.071:365.885 > S01002.IN_run.waver.1D
waver -WAV -dt 2.0 -tstim 365.885:432.771 > S01002.EX_run.waver.1D

Then, we used the waver files for deconvolution via:
3dDeconvolve -polort 5 \
-input $1.cyber.epi01.scaled+orig -num_stimts 9 \
-censor ../../Vectors/CB_vectors_afni_v1/$1.Censor.1D \
-stim_file 1 ../../Vectors/CB_vectors_afni_v1/$1.IN_run.waver.1D \
-stim_label 1 IN \
-stim_minlag 1 0 \
-stim_maxlag 1 0 \
-stim_file 2 ../../Vectors/CB_vectors_afni_v1/$1.EX_run.waver.1D \
-stim_label 2 EX \
-stim_minlag 2 0 \
-stim_maxlag 2 0 \
-stim_times 3 ../../Vectors/CB_vectors_afni_v1/$1.IN_Buttons.1D 'GAM' \
-stim_label 3 ButtonPress \
-stim_file 4 $1.cyber.vreg.epi01.motion.1D'[0]' -stim_base 4 \
-stim_file 5 $1.cyber.vreg.epi01.motion.1D'[1]' -stim_base 5 \
-stim_file 6 $1.cyber.vreg.epi01.motion.1D'[2]' -stim_base 6 \
-stim_file 7 $1.cyber.vreg.epi01.motion.1D'[3]' -stim_base 7 \
-stim_file 8 $1.cyber.vreg.epi01.motion.1D'[4]' -stim_base 8 \
-stim_file 9 $1.cyber.vreg.epi01.motion.1D'[5]' -stim_base 9 \
-gltsym ../../Vectors/CB_vectors_afni_v1/FullF.1D -glt_label 1 FullF \
-gltsym ../../Vectors/CB_vectors_afni_v1/EXvIN.1D -glt_label 2 EXvIN \
-gltsym ../../Vectors/CB_vectors_afni_v1/INvEX.1D -glt_label 2 INvEX \
-full_first -fout -tout \
-bucket $1.dec.CBv1_buttons

Hurdles toward moving to proc.py-
Using the uber_subject GUI, it was unclear to me how to provide the stim times (we probably need to create new files, 1 each for IN/EX?) &, more challengingly, how to select the basis funcs (the BLOCK option requests a set duration) & file types (is "times" appropriate?).

I tried another route whereby I had uber_subject preview the shorthand script that I hoped modify to conform to our paradigm, but here, too, it was unclear given the need to translate to the -regress_stim_times & -regress_basis. I had heard of dmBLOCK, but is this the way to go?

Finally, I went into the expanded script that's generated once you run uber_subject & located the relevant 3dDeconvolve segment within the "regress" step, but even if I copy-pasted what we had for 3dDeconvolve, I'm not sure (1) that it would run correctly (can't be that easy!) nor (2) how to back-translate this to the shorter processing script that's "more pleasing to the eye," that you get previewed for you w/ the uber_subject GUI.

So, in short, I'm not sure how to write a proc.py script for a block design that has block times vary by subject (between, within).

Thanks in advance for going through this & for any help you can give! Best, -Robie
Subject Author Posted

Using proc.py to model block design w/ block times varying by subject

neurobie April 23, 2014 07:47PM

Re: Using proc.py to model block design w/ block times varying by subject

rick reynolds April 24, 2014 11:30AM