Hello AFNI Experts,
I have used the fMRIPREP container (version 23.1.4) to run some minimal fMRI preprocessing, and now I want to use AFNI's 3ddeconvolve/remlfit commands to do task analysis on the output. I am using the AFNI container (version 23.1.10) to run processing, and I have some code setup that is giving reasonable results when ran on the fMRIPREP nifti outputs. However when I adapt that code to run on the fMRIPREP gifti outputs, most of the final files aren't produced. I was wondering if you had any suggestions? If 3ddeconvolve does not support gifti inputs, would it be possible for me to temporarily stuff my gifti data into a nifti file and run 3ddeconvolve on that (if so, what dimensions would 3ddeconvolve be expecting)?
For reference here is the command I am running inside the AFNI container :
3dDeconvolve -force_TR 1.8 -input /func_dir/sub-msc01_ses-01_task-FT4_rec-NoNoiseVols_run-04_hemi-R_space-fsnative_bold.func.gii \
-stim_times_subtract 0.9 \
-polort 2 -ok_1D_text \
-censor /stimuli_dir/custom_censoring_arr_InitialScans_FD0P5AndNeighbors.txt \
-num_stimts 15 \
-stim_times 1 /stimuli_dir/task-FT4_cond-pinky.1D 'BLOCK(12,1)' \
-stim_label 1 pinky \
-stim_times 2 /stimuli_dir/task-FT4_cond-thumb.1D 'BLOCK(12,1)' \
-stim_label 2 thumb \
-stim_times 3 /stimuli_dir/task-FT4_cond-index.1D 'BLOCK(12,1)' \
-stim_label 3 index \
-stim_file 4 /stimuli_dir/trans_x.txt'[0]' -stim_base 4 -stim_label 4 trans_x \
-stim_file 5 /stimuli_dir/trans_y.txt'[0]' -stim_base 5 -stim_label 5 trans_y \
-stim_file 6 /stimuli_dir/trans_z.txt'[0]' -stim_base 6 -stim_label 6 trans_z \
-stim_file 7 /stimuli_dir/trans_x_derivative1.txt'[0]' -stim_base 7 -stim_label 7 trans_x_derivative1 \
-stim_file 8 /stimuli_dir/trans_y_derivative1.txt'[0]' -stim_base 8 -stim_label 8 trans_y_derivative1 \
-stim_file 9 /stimuli_dir/trans_z_derivative1.txt'[0]' -stim_base 9 -stim_label 9 trans_z_derivative1 \
-stim_file 10 /stimuli_dir/rot_x.txt'[0]' -stim_base 10 -stim_label 10 rot_x \
-stim_file 11 /stimuli_dir/rot_y.txt'[0]' -stim_base 11 -stim_label 11 rot_y \
-stim_file 12 /stimuli_dir/rot_z.txt'[0]' -stim_base 12 -stim_label 12 rot_z \
-stim_file 13 /stimuli_dir/rot_x_derivative1.txt'[0]' -stim_base 13 -stim_label 13 rot_x_derivative1 \
-stim_file 14 /stimuli_dir/rot_y_derivative1.txt'[0]' -stim_base 14 -stim_label 14 rot_y_derivative1 \
-stim_file 15 /stimuli_dir/rot_z_derivative1.txt'[0]' -stim_base 15 -stim_label 15 rot_z_derivative1 \
-fout -tout -x1D /out_dir/X.xmat.1D -xjpeg /out_dir/X.jpg \
-fitts /out_dir/fitts -errts /out_dir/errts -bucket /out_dir/stats \
-fout -tout
And this is what I get for outputs:
** DA[0] has coordsys with intent NIFTI_INTENT_TIME_SERIES (should be NIFTI_INTENT_POINTSET)
** DA[1] has coordsys with intent NIFTI_INTENT_TIME_SERIES (should be NIFTI_INTENT_POINTSET)
** DA[2] has coordsys with intent NIFTI_INTENT_TIME_SERIES (should be NIFTI_INTENT_POINTSET)
** DA[3] has coordsys with intent NIFTI_INTENT_TIME_SERIES (should be NIFTI_INTENT_POINTSET)
.....MANY MORE LINES OF THIS.....
++ 3dDeconvolve: AFNI version=AFNI_23.1.10 (Jun 30 2023) [64-bit]
++ Authored by: B. Douglas Ward, et al.
** DA[0] has coordsys with intent NIFTI_INTENT_TIME_SERIES (should be NIFTI_INTENT_POINTSET)
** DA[1] has coordsys with intent NIFTI_INTENT_TIME_SERIES (should be NIFTI_INTENT_POINTSET)
** DA[2] has coordsys with intent NIFTI_INTENT_TIME_SERIES (should be NIFTI_INTENT_POINTSET)
** DA[3] has coordsys with intent NIFTI_INTENT_TIME_SERIES (should be NIFTI_INTENT_POINTSET)
.....MANY MORE LINES OF THIS.....
++ loading dataset /func_dir/sub-msc01_ses-01_task-FT4_rec-NoNoiseVols_run-04_hemi-R_space-fsnative_bold.func.gii
** DA[0] has coordsys with intent NIFTI_INTENT_TIME_SERIES (should be NIFTI_INTENT_POINTSET)
** DA[1] has coordsys with intent NIFTI_INTENT_TIME_SERIES (should be NIFTI_INTENT_POINTSET)
** DA[2] has coordsys with intent NIFTI_INTENT_TIME_SERIES (should be NIFTI_INTENT_POINTSET)
** DA[3] has coordsys with intent NIFTI_INTENT_TIME_SERIES (should be NIFTI_INTENT_POINTSET)
.....MANY MORE LINES OF THIS.....
++ forcibly using TR=1.8000 seconds for -input dataset
++ Skipping check for initial transients
*+ WARNING: Input polort=2; Longest run=430.2 s; Recommended minimum polort=3
++ -stim_times using TR=1.8 s for stimulus timing conversion
++ -stim_times using TR=1.8 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
++ Subtracted 0.90 sec from 5 times for -stim_times 1
++ ** GUESSED ** -stim_times 1 using GLOBAL times
++ Subtracted 0.90 sec from 5 times for -stim_times 2
++ ** GUESSED ** -stim_times 2 using GLOBAL times
++ Subtracted 0.90 sec from 5 times for -stim_times 3
++ ** GUESSED ** -stim_times 3 using GLOBAL times
++ Number of time points: 239 (before censor) ; 218 (after)
- Number of parameters: 18 [15 baseline ; 3 signal]
++ Memory required for output bricks = 285,763,040 bytes (about 286 million)
++ Wrote matrix image to file /out_dir/X.jpg
++ Wrote matrix values to file /out_dir/X.xmat.1D
++ ========= Things you can do with the matrix file =========
++ (a) Linear regression with ARMA(1,1) modeling of serial correlation:
3dREMLfit -matrix /out_dir/X.xmat.1D -input /func_dir/sub-msc01_ses-01_task-FT4_rec-NoNoiseVols_run-04_hemi-R_space-fsnative_bold.func.gii
-fout -tout -Rbuck /out_dir/stats_REML -Rvar /out_dir/stats_REMLvar
-Rfitts /out_dir/fitts_REML -Rerrts /out_dir/errts_REML -verb
++ N.B.: 3dREMLfit command above written to file /out_dir/stats.REML_cmd
++ (b) Visualization/analysis of the matrix via ExamineXmat.R
++ (c) Synthesis of sub-model datasets using 3dSynthesize
++ ==========================================================
++ ----- Signal+Baseline matrix condition (218x18): 4.25072 ++ VERY GOOD ++
++ ----- Signal-only matrix condition (218x3): 1 ++ VERY GOOD ++
++ ----- Baseline-only matrix condition (218x15): 4.0087 ++ VERY GOOD ++
++ ----- stim_base-only matrix condition (218x12): 3.6512 ++ VERY GOOD ++
++ ----- polort-only matrix condition (218x3): 1.03814 ++ VERY GOOD ++
++ +++++ Matrix inverse average error = 7.421e-14 ++ VERY GOOD ++
++ Matrix setup time = 0.39 s
++ Calculations starting; elapsed time=4.797
++ voxel loop:0123456789.0123456789.0123456789.0123456789.0123456789.
++ Calculations finished; elapsed time=12.474
** DA[0] has coordsys with intent NIFTI_INTENT_TIME_SERIES (should be NIFTI_INTENT_POINTSET)
** DA[1] has coordsys with intent NIFTI_INTENT_TIME_SERIES (should be NIFTI_INTENT_POINTSET)
** DA[2] has coordsys with intent NIFTI_INTENT_TIME_SERIES (should be NIFTI_INTENT_POINTSET)
** DA[3] has coordsys with intent NIFTI_INTENT_TIME_SERIES (should be NIFTI_INTENT_POINTSET)
.....MANY MORE LINES OF THIS.....
++ Smallest FDR q [0 Full_Fstat] = 2.33837e-14
++ Smallest FDR q [2 pinky#0_Tstat] = 5.70543e-14
++ Smallest FDR q [3 pinky_Fstat] = 5.70566e-14
++ Smallest FDR q [5 thumb#0_Tstat] = 3.15297e-13
++ Smallest FDR q [6 thumb_Fstat] = 3.15312e-13
++ Smallest FDR q [8 index#0_Tstat] = 5.49435e-14
++ Smallest FDR q [9 index_Fstat] = 5.49435e-14
** failed to open 'stats.gii' for gifti write
++ Wrote bucket dataset into /out_dir/stats.gii
- created 7 FDR curves in bucket header
** DA[0] has coordsys with intent NIFTI_INTENT_TIME_SERIES (should be NIFTI_INTENT_POINTSET)
** DA[1] has coordsys with intent NIFTI_INTENT_TIME_SERIES (should be NIFTI_INTENT_POINTSET)
** DA[2] has coordsys with intent NIFTI_INTENT_TIME_SERIES (should be NIFTI_INTENT_POINTSET)
** DA[3] has coordsys with intent NIFTI_INTENT_TIME_SERIES (should be NIFTI_INTENT_POINTSET)
.....MANY MORE LINES OF THIS.....
** failed to open 'fitts.gii' for gifti write
++ Wrote 3D+time dataset into /out_dir/fitts.gii
** DA[0] has coordsys with intent NIFTI_INTENT_TIME_SERIES (should be NIFTI_INTENT_POINTSET)
** DA[1] has coordsys with intent NIFTI_INTENT_TIME_SERIES (should be NIFTI_INTENT_POINTSET)
** DA[2] has coordsys with intent NIFTI_INTENT_TIME_SERIES (should be NIFTI_INTENT_POINTSET)
.....MANY MORE LINES OF THIS.....
** failed to open 'errts.gii' for gifti write
++ Wrote 3D+time dataset into /out_dir/errts.gii
++ #Flops=3.78844e+10 Average Dot Product=31.4392
And then in the output directory only the following three files are created:
X.xmat.1D
X.jpg
stats.REML_cmd
Thanks in advance for any suggestions!
Best,
Erik
AFNI version info (23.1.0
)