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  

|
March 17, 2019 11:51AM
Hi everyone,

I've been collecting multi-echo data and using meica.py for some time now. I recently decided to switch to afni_proc, and have been having issues. I started by modelling my script from example 12b in the afni_proc documentation. However, tedana failed to reach convergence in about 1 in 3 subjects. This is much higher than if I use meica.py. I checked the usage recommendations for tedana and they suggest that you perform perform distortion correction, spatial normalization, smoothing, and any rescaling or filtering after tedana.

However, the default block order for the afni_proc multi_echo examples is
-blocks tshift align tlrc volreg mask combine blur scale regress

If I switch the block order to
-blocks tshift volreg combine align tlrc mask blur scale regress

tedana converges on all subjects, but because the epi2anat alignment is done in the volreg stage, this order breaks the alignment pipeline in afni_proc.

Side note, I tried passing the epi2anat option to the alignment block, but this results in the following align block:

align_epi_anat.py -anat2epi -anat 034.anat.aparc_ss+orig \
       -suffix _al_keep                                  \
       -epi vr_base_min_outlier+orig -epi_base 0         \
       -epi_strip 3dAutomask                             \
       -anat_has_skull no                                \
       -giant_move -epi2anat -partial_axial -cost lpc+ZZ \
       -volreg off -tshift off

It appears that the -anat2epi flag is added by default even if you try to force the epi2anat.

I guess my question is:

How do I write my afni_proc command so that tedana works consistently and so I end up with my EPI data in MNI space?

thanks,
-nick

P.S. Here is my afni_proc script:

afni_proc.py \
-script proc.${subject}.me \
-scr_overwrite \
-subj_id ${subject} \
-out_dir ${deldir}/${subject}.results.me \
-blocks despike tshift volreg mask combine tlrc align blur scale regress \
-align_opts_aea \
-giant_move \
-partial_axial \
-cost lpc+ZZ \
-copy_anat ${t1} \
-anat_has_skull no \
-tlrc_base MNI152_T1_2009c+tlrc \
-tlrc_NL_warp \
-blip_forward_dset $forwardepi \
-blip_reverse_dset $reversedepi \
-volreg_align_to MIN_OUTLIER \
-dsets_me_run $run1epi \
-dsets_me_run $run2epi \
-dsets_me_run $run3epi \
-dsets_me_run $run4epi \
-echo_times ${e[1]} ${e[2]} ${e[3]} \
-combine_method tedana \
-combine_opts_tedana --sourceTEs=0 --kdaw=10 --rdaw=1 \
-reg_echo 2 \
-blur_in_mask yes \
-regress_opts_3dD \
-regress_motion_per_run \
-regress_apply_mot_types demean deriv \
-regress_censor_motion 0.5 \
-regress_censor_outliers 0.15 \
-regress_censor_first_trs 4 \
-regress_est_blur_errts \
-regress_stim_times \
${stmdir}/${subject}.button_presses.1d \
${stmdir}/${subject}.shocks.1d \
${stmdir}/${subject}.cue.saf.hgh.hgh.l.1d \
${stmdir}/${subject}.cue.saf.hgh.hgh.r.1d \
${stmdir}/${subject}.cue.saf.hgh.low.l.1d \
${stmdir}/${subject}.cue.saf.hgh.low.r.1d \
${stmdir}/${subject}.cue.saf.low.hgh.l.1d \
${stmdir}/${subject}.cue.saf.low.hgh.r.1d \
${stmdir}/${subject}.cue.saf.low.low.l.1d \
${stmdir}/${subject}.cue.saf.low.low.r.1d \
${stmdir}/${subject}.cue.thr.hgh.hgh.l.1d \
${stmdir}/${subject}.cue.thr.hgh.hgh.r.1d \
${stmdir}/${subject}.cue.thr.hgh.low.l.1d \
${stmdir}/${subject}.cue.thr.hgh.low.r.1d \
${stmdir}/${subject}.cue.thr.low.hgh.l.1d \
${stmdir}/${subject}.cue.thr.low.hgh.r.1d \
${stmdir}/${subject}.cue.thr.low.low.l.1d \
${stmdir}/${subject}.cue.thr.low.low.r.1d \
${stmdir}/${subject}.square.saf.hgh.hgh.l.1d \
${stmdir}/${subject}.square.saf.hgh.hgh.r.1d \
${stmdir}/${subject}.square.saf.hgh.low.l.1d \
${stmdir}/${subject}.square.saf.hgh.low.r.1d \
${stmdir}/${subject}.square.saf.low.hgh.l.1d \
${stmdir}/${subject}.square.saf.low.hgh.r.1d \
${stmdir}/${subject}.square.saf.low.low.l.1d \
${stmdir}/${subject}.square.saf.low.low.r.1d \
${stmdir}/${subject}.square.thr.hgh.hgh.l.1d \
${stmdir}/${subject}.square.thr.hgh.hgh.r.1d \
${stmdir}/${subject}.square.thr.hgh.low.l.1d \
${stmdir}/${subject}.square.thr.hgh.low.r.1d \
${stmdir}/${subject}.square.thr.low.hgh.l.1d \
${stmdir}/${subject}.square.thr.low.hgh.r.1d \
${stmdir}/${subject}.square.thr.low.low.l.1d \
${stmdir}/${subject}.square.thr.low.low.r.1d \
${stmdir}/${subject}.target.saf.hgh.hgh.l.1d \
${stmdir}/${subject}.target.saf.hgh.hgh.r.1d \
${stmdir}/${subject}.target.saf.hgh.low.l.1d \
${stmdir}/${subject}.target.saf.hgh.low.r.1d \
${stmdir}/${subject}.target.saf.low.hgh.l.1d \
${stmdir}/${subject}.target.saf.low.hgh.r.1d \
${stmdir}/${subject}.target.saf.low.low.l.1d \
${stmdir}/${subject}.target.saf.low.low.r.1d \
${stmdir}/${subject}.target.thr.hgh.hgh.l.1d \
${stmdir}/${subject}.target.thr.hgh.hgh.r.1d \
${stmdir}/${subject}.target.thr.hgh.low.l.1d \
${stmdir}/${subject}.target.thr.hgh.low.r.1d \
${stmdir}/${subject}.target.thr.low.hgh.l.1d \
${stmdir}/${subject}.target.thr.low.hgh.r.1d \
${stmdir}/${subject}.target.thr.low.low.l.1d \
${stmdir}/${subject}.target.thr.low.low.r.1d \
-regress_stim_types \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
times \
-regress_basis_multi \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
'BLOCK(1,1)' \
-regress_stim_labels \
"button_presses" \
"shocks" \
"cue.saf.hgh.hgh.l" \
"cue.saf.hgh.hgh.r" \
"cue.saf.hgh.low.l" \
"cue.saf.hgh.low.r" \
"cue.saf.low.hgh.l" \
"cue.saf.low.hgh.r" \
"cue.saf.low.low.l" \
"cue.saf.low.low.r" \
"cue.thr.hgh.hgh.l" \
"cue.thr.hgh.hgh.r" \
"cue.thr.hgh.low.l" \
"cue.thr.hgh.low.r" \
"cue.thr.low.hgh.l" \
"cue.thr.low.hgh.r" \
"cue.thr.low.low.l" \
"cue.thr.low.low.r" \
"square.saf.hgh.hgh.l" \
"square.saf.hgh.hgh.r" \
"square.saf.hgh.low.l" \
"square.saf.hgh.low.r" \
"square.saf.low.hgh.l" \
"square.saf.low.hgh.r" \
"square.saf.low.low.l" \
"square.saf.low.low.r" \
"square.thr.hgh.hgh.l" \
"square.thr.hgh.hgh.r" \
"square.thr.hgh.low.l" \
"square.thr.hgh.low.r" \
"square.thr.low.hgh.l" \
"square.thr.low.hgh.r" \
"square.thr.low.low.l" \
"square.thr.low.low.r" \
"target.saf.hgh.hgh.l" \
"target.saf.hgh.hgh.r" \
"target.saf.hgh.low.l" \
"target.saf.hgh.low.r" \
"target.saf.low.hgh.l" \
"target.saf.low.hgh.r" \
"target.saf.low.low.l" \
"target.saf.low.low.r" \
"target.thr.hgh.hgh.l" \
"target.thr.hgh.hgh.r" \
"target.thr.hgh.low.l" \
"target.thr.hgh.low.r" \
"target.thr.low.hgh.l" \
"target.thr.low.hgh.r" \
"target.thr.low.low.l" \
"target.thr.low.low.r" \
-test_stim_files no \
-remove_preproc_files \
-execute

Subject Author Posted

multi-echo, tedana, block order, alignment

Nicholas Balderston March 17, 2019 11:51AM

Re: multi-echo, tedana, block order, alignment

Nicholas Balderston March 25, 2019 12:13PM