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  

|
April 25, 2016 11:14AM
Hi all,

I have BOLD data from a breathhold task that I want to analyze using 3dDeconvolve, but I'm not sure how to proceed. I will begin by providing some context for my question.

The scan length was 5 minutes and 24 seconds (including 12s of scanner warm-up. There were a total of 78 TRs, with each TR = 4s (to accomodate BOLD and ASL scanning; I'm focusing on the BOLD piece right now).

The timing of the breathhold task was as follows:

0 = 1st rest onset
47 = 2nd rest onset
94 = 3rd rest onset
141 = 4th rest onset
188 = 5th rest onset
235 = 6th rest onset
282 = final rest onset

30 = breathe out onset
77 = breathe out onset
124 = breathe out onset
171 = breathe out onset
218 = breathe out onset
265 = breathe out onset
312 = final rest offset

32 = breathhold onset
79 = breathhold onset
126 = breathhold onset
173 = breathhold onset
220 = breathhold onset
267 = breathhold onset

From there, the BOLD and ASL data were isolated. The EPI was aligned to the anatomical in native space. I did not extract the brain or warp to MNI, as the superior sagittal sinus is a region of interest. Physiological correction and a lowpass filter was applied. Using the mean time series, a mean delay value was generated in MATLAB by calculating the average time required for the BOLD signal to peak after each breathhold (not including the first breath hold).

I want to remove the first 11 volumes (including the first BH) from the analysis, and to incorporate the mean delay value for each subject. So, I removed the first BH from the .1D stim_times file. Then, for each stimulus time, I subtracted 44 (11TRs x 4s) and added the mean delay value for the subject. Then, I used 3dTcat to remove the first 11TRs from the input data file. Does this make sense?

From here, I'm trying to run the individual-level regression analysis using 3dDeconvolve. But when I run the script I have copy/pasted below (3dDeconvolve_BLOCK.sh), I don't get the expected output files. Do I have this correctly set up? I have also copy/pasted the terminal output below. Any thoughts are greatly appreciated.

Cheers,
Alain

3dDeconvolve_BLOCK.sh
### run the regression analysis

3dDeconvolve -input 101.breathhold.BOLD.nophymotcorr.nii \
-polort 2 \
-num_stimts 1 \
-stim_times 1 breathhold_stimulus.1D 'BLOCK(15,1)' \
-stim_label 1 BH \
-iresp 1 BH.101 \
-jobs 2 \
-fout -tout -rout -bout -x1D X.xmat.1D -xjpeg X.jpg \
-fitts fitts.101 \
-errts errts.101 \
-bucket stats.101



Script started on Sun Apr 24 21:44:00 2016
-------- freesurfer-Darwin-lion-stable-pub-v5.3.0 --------
Setting up environment for FreeSurfer/FS-FAST (and FSL)
FREESURFER_HOME /Users/Alain/freesurfer
FSFAST_HOME /Users/Alain/freesurfer/fsfast
FSF_OUTPUT_FORMAT nii.gz
SUBJECTS_DIR /Users/Alain/freesurfer_data
MNI_DIR /Users/Alain/freesurfer/mni
FSL_DIR /Users/Alain/fsl
[?1034hbash-3.2$ 3d  bash 3d dDeconvolve_BLOCK.sh
++ 3dDeconvolve: AFNI version=AFNI_2011_12_21_1014 (Sep 23 2014) [64-bit]
++ Authored by: B. Douglas Ward, et al.
++ loading dataset 101.breathhold.BOLD.nophymotcorr.nii
++ STAT automask has 15206 voxels (out of 65536 = 23.2%)
++ Skipping check for initial transients
*+ WARNING: Input polort=2; Longest run=308.0 s; Recommended minimum polort=3
++ -stim_times using TR=4 s for stimulus timing conversion
++ -stim_times using TR=4 s for any -iresp output datasets
++ [you can alter the -iresp TR via the -TR_times option]
++ ** -stim_times NOTE ** guessing GLOBAL times if 1 time per line; LOCAL otherwise
++ ** GUESSED ** -stim_times 1 using LOCAL times
++ Number of time points: 77 (no censoring)
+ Number of parameters: 4 [3 baseline ; 1 signal]
++ total shared memory needed = 43,515,904 bytes (about 44 million [mega])
++ mmap() memory allocated: 43,515,904 bytes (about 44 million [mega])
++ Memory required for output bricks = 43,515,904 bytes (about 44 million [mega])
++ Wrote matrix image to file X.jpg
++ Wrote matrix values to file X.xmat.1D
++ ========= Things you can do with the matrix file =========
++ (a) Linear regression with ARMA(1,1) modeling of serial correlation:

3dREMLfit -matrix X.xmat.1D -input 101.breathhold.BOLD.nophymotcorr.nii \
-fout -tout -rout -Rbuck stats.101_REML -Rvar stats.101_REMLvar \
-Rfitts fitts.101_REML -Rerrts errts.101_REML -verb

++ N.B.: 3dREMLfit command above written to file stats.REML_cmd
++ (b) Visualization/analysis of the matrix via ExamineXmat.R
++ (c) Synthesis of sub-model datasets using 3dSynthesize
++ ==========================================================
++ ----- Signal+Baseline matrix condition [X] (77x4): 1.4143 ++ VERY GOOD ++
++ ----- Signal-only matrix condition [X] (77x1): 1 ++ VERY GOOD ++
++ ----- Baseline-only matrix condition [X] (77x3): 1 ++ VERY GOOD ++
++ ----- polort-only matrix condition [X] (77x3): 1 ++ VERY GOOD ++
++ +++++ Matrix inverse average error = 4.47315e-16 ++ VERY GOOD ++
++ Matrix setup time = 0.43 s
++ Voxels in dataset: 65536
++ Voxels per job: 32768
++ Job #1: processing voxels 32768 to 65535; elapsed time=0.559
++ Job #0: processing voxels 0 to 32767; elapsed time=0.570
++ voxel loop:0123456789.0123456789.0123456789.0123456789.012345678++ Job #1 finished; elapsed time=0.806
9.
++ Job #0 waiting for children to finish; elapsed time=0.809
++ Job #0 now finishing up; elapsed time=0.809
++ Wrote bucket dataset into ./stats.101+orig.BRIK
+ created 8 FDR curves in bucket header
++ Wrote iresp 3D+time dataset into ./BH.101+orig.BRIK
++ Wrote 3D+time dataset into ./fitts.101+orig.BRIK
++ Wrote 3D+time dataset into ./errts.101+orig.BRIK
++ Program finished; elapsed time=1.588
bash-3.2$ exit
exit

Script done on Sun Apr 24 21:44:13 2016
Subject Author Posted

Using 3dDeconvolve to analyze breathhold task

Alain April 25, 2016 11:14AM

Re: Using 3dDeconvolve to analyze breathhold task

rick reynolds April 25, 2016 03:06PM

Re: Using 3dDeconvolve to analyze breathhold task

Alain April 27, 2016 10:46AM

Re: Using 3dDeconvolve to analyze breathhold task

rick reynolds May 02, 2016 01:28PM

Re: Using 3dDeconvolve to analyze breathhold task

Alain May 02, 2016 11:18PM