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  

|
July 05, 2014 09:00PM
Hi Rick,

So the data is archival and unfortunatley a rapid event related design with randomly interspersed conditions (ie. no convenient blocking); obviously not ideal for FC. Therefore we did 3dDeconolve -errts independently for each condition. For condition A: regressing out B + C, for B: regressing out C + A etc and so forth. Then within each version of the data we cut out task events of no interest (leaving single rows of NaN to break them up), creating "simulated blocks" of just our desired condition with -in theory- the residual effects of the recovery and refractory periods of the surrounding non-interest task events removed. 3dMaskAv generated time series from each of these newly agregated task "blocks" to create pearsons correlations for each condition. This would allow us to run ttests of ROI-to-ROI FC coeffs between the different task conditions. That - in a larger nutshell - was the rationale for regressing only tasks of no interest. There was also the added benefit that these new "blocks" made the data suitable for entering into an effective connectivity modeling program we used to assess if probable pathways differed by condition. If there is anything grossly wrong with this way of -errts + data parsing which we didn't consider, please let me know.

I couldn't find any materials or AFNI -help files on how to insert bandpassing directly into my existant 3dDeconvolve script. Is there a -option, like "-bandpass_freq" which I am missing somewhere? Also If I do go this route I would do scaling beforehand and concat runs after, correct? I also need to admit to my naivety and confusion about what your suggestion of using 3dTproject with the resulting 3dDecon X-matrix functionlly accomplishes.

I read up on Afni_proc.py and wrote a script, as you suggested, for my continued education and as a backup option. My apologies, I didn't realize how adaptable afni_proc is and that I could use it for just portions of my analysis. I see now why you suggested it so strongly. My attempt to edit Example 9 from -helpfile to accomplish 3dDeconvolve+Bandpassing+censoring+motion+scaling all simultaneously is below. I would most likely concatentate runs afterwards correct?

I am obviously new to python and this particular script so feel free to correct me and edit any slip ups.

--------------------------------------------------------------------------------------------------------------------------------------------------
#!/bin/tcsh

set subjects = ( 2H 5U etc...)
set subjectsdir = /Volumes/...
set censorfile = /Volumes/....
set stimdir = /Volumes/.....

cd ${subjectsdir}

foreach subj ( 2H 5U etc...)

cd ${subj}

foreach sess ( s4 s5 s6 s7 s8 s9 )

afni_proc.py -dsets ${subj}_$(sess)_vr_zp4_cardnudg_e2a_FWHM+tlrc. \
-out_dir /Volumes/.../ICN_Runs \
-force_TR 2.5 \
-regress_censor_extern $censorfile/${subj}_$(sess)_autocensor_AC3VC_pre-moco.1D \
-regress_polort 3
-regress_apply_mask ${subj}_s4_vr_zp4_cardnudg_e2a_amsk+tlrc. \
-regress_basis 'TENT(2.5,17.5,7)' \
-regress_local_times \
-regress_stim_times 1 $stimdir/${subj}_Strong_stim4b.1D -regress_stim_label 1 'Strg' \
-regress_stim_times 2 $stimdir/${subj}_Weak_stim4b.1D -regress_stim_label 2 'Weak' \
-regress_stim_file 3 $stimdir/Motion_Pre-moco/${subj}_${sess}_motion.1D'[0]' -regress_stim_label 3 'roll' -regress_stim_base 3 \
-regress_stim_file 4 $stimdir/Motion_Pre-moco/${subj}_${sess}_motion.1D'[1]' -regress_stim_label 4 'pitch' -regress_stim_base 4 \
-regress_stim_file 5 $stimdir/Motion_Pre-moco/${subj}_${sess}_motion.1D'[2]' -regress_stim_label 5 'yaw' -regress_stim_base 5
-regress_stim_file 6 $stimdir/Motion_Pre-moco/${subj}_${sess}_motion.1D'[3]' -regress_stim_label 6 'x' -regress_stim_base 6 \
-regress_stim_file 7 $stimdir/Motion_Pre-moco/${subj}_${sess}_motion.1D'[4]' -regress_stim_label 7 'y' -regress_stim_base 7 \
-regress_stim_file 8 $stimdir/Motion_Pre-moco/${subj}_${sess}_motion.1D'[5]' -regress_stim_label 8 'z' -regress_stim_base 8 \
-regress_bandpass 0.008 0.07 \
-scale_max_val 100
-regress_errts_prefix ${subj}_$(sess)_prepro_bp07 \

end

end


Note: EPI datasets are not all of the same length so if any of these -options dont work please notify me.

Thanks for the ongoing help. Really don't know what I would do without it.

~`Dane



Edited 1 time(s). Last edit at 07/05/2014 09:20PM by d6anders.
Subject Author Posted

Bandpass + 3dDeconvolve for tasked-based FC analysis

d6anders June 30, 2014 12:59AM

Re: Bandpass + 3dDeconvolve for tasked-based FC analysis

rick reynolds June 30, 2014 10:18AM

Re: Bandpass + 3dDeconvolve for tasked-based FC analysis

d6anders June 30, 2014 07:55PM

Re: Bandpass + 3dDeconvolve for tasked-based FC analysis

rick reynolds July 01, 2014 09:11AM

Re: Bandpass + 3dDeconvolve for tasked-based FC analysis

d6anders July 05, 2014 09:00PM

Re: Bandpass + 3dDeconvolve for tasked-based FC analysis

rick reynolds July 09, 2014 10:17AM

Re: Bandpass + 3dDeconvolve for tasked-based FC analysis

d6anders July 09, 2014 07:57PM

Re: Bandpass + 3dDeconvolve for tasked-based FC analysis

rick reynolds July 09, 2014 09:10PM

Re: Bandpass + 3dDeconvolve for tasked-based FC analysis

d6anders July 09, 2014 10:21PM

Re: Bandpass + 3dDeconvolve for tasked-based FC analysis

rick reynolds July 10, 2014 01:35PM

Re: Bandpass + 3dDeconvolve for tasked-based FC analysis

d6anders July 10, 2014 10:22PM

Re: Bandpass + 3dDeconvolve for tasked-based FC analysis

rick reynolds July 11, 2014 09:15AM

Re: Bandpass + 3dDeconvolve for tasked-based FC analysis

d6anders July 11, 2014 10:27PM

Re: Bandpass + 3dDeconvolve for tasked-based FC analysis

d6anders July 12, 2014 11:11PM

Re: Bandpass + 3dDeconvolve for tasked-based FC analysis

rick reynolds July 13, 2014 02:32PM

Re: Bandpass + 3dDeconvolve for tasked-based FC analysis

d6anders July 08, 2014 03:56PM