It was solved after removing the space and some back slash ('')…
It seems that the space was the issue that I had.
Thank you…
Dear AFNI experts,
Hello, I’m trying to conduct 3dREMLfit using concatenated data for conducting 3dMEMA.
(Following the paper “FMRI group analysis combining effect estimates and their variances.” (Chen, Gang, et al., 2012))
The concatenated data means that, there are two runs in same condition and I concatenated those two runs using
3dTcat -prefix pb06.s10.scale_concat pb06.s10.run1.scale+tlrc pb06.s10.run2.scale+tlrc
I also concatenated each s10_censor.1D and s10_demean.1D from two runs using ‘cat’.
After that, I conducted 3dDeconvolve and 3dREMLfit using the script shown in below
# 3dDeconvolve
3dDeconvolve -input pb06.s10.scale_concat+tlrc.HEAD \
-censor s10_censor.1D \
-polort 0 \
-num_stimts 46 \
-stim_times 1 /path/onset_time/sti1_tsk4_blk1.txt 'WAV(15)' \
-stim_label 1 sti1_tsk4_blk1 \
-stim_times 2 /path/onset_time/sti1_tsk4_blk2.txt 'WAV(15)' \
-stim_label 2 sti1_tsk4_blk2 \
...
-stim_times 40 /path/onset_time_concat/sti4_tsk2_blk5.txt 'WAV(15)' \
-stim_label 40 sti4_tsk2_blk5 \
-stim_file 41 motion_s10_demean.1D'[0]' -stim_base 41 -stim_label 41 roll \
-stim_file 42 motion_s10_demean.1D'[1]' -stim_base 42 -stim_label 42 pitch \
-stim_file 43 motion_s10_demean.1D'[2]' -stim_base 43 -stim_label 43 yaw \
-stim_file 44 motion_s10_demean.1D'[3]' -stim_base 44 -stim_label 44 dS \
-stim_file 45 motion_s10_demean.1D'[4]' -stim_base 45 -stim_label 45 dL \
-stim_file 46 motion_s10_demean.1D'[5]' -stim_base 46 -stim_label 46 dP \
-gltsym 'SYM: sti1_tsk4_blk1 +sti1_tsk4_blk2 +sti1_tsk4_blk3 +sti1_tsk4_blk4 +sti1_tsk4_blk5 \
+sti1_tsk2_blk1 +sti1_tsk2_blk2 +sti1_tsk2_blk3 +sti1_tsk2_blk4 +sti1_tsk2_blk5' \
-glt_label 1 sti1 \
-gltsym 'SYM: sti2_tsk4_blk1 +sti2_tsk4_blk2 +sti2_tsk4_blk3 +sti2_tsk4_blk4 +sti2_tsk4_blk5 \
+sti2_tsk2_blk1 +sti2_tsk2_blk2 +sti2_tsk2_blk3 +sti2_tsk2_blk4 +sti2_tsk2_blk5' \
-glt_label 2 sti2 \
-gltsym 'SYM: sti1_tsk4_blk1 +sti1_tsk4_blk2 +sti1_tsk4_blk3 +sti1_tsk4_blk4 +sti1_tsk4_blk5 \
+sti1_tsk2_blk1 +sti1_tsk2_blk2 +sti1_tsk2_blk3 +sti1_tsk2_blk4 +sti1_tsk2_blk5 \
-sti2_tsk4_blk1 -sti2_tsk4_blk2 -sti2_tsk4_blk3 -sti2_tsk4_blk4 -sti2_tsk4_blk5 \
-sti2_tsk2_blk1 -sti2_tsk2_blk2 -sti2_tsk2_blk3 -sti2_tsk2_blk4 -sti2_tsk2_blk5' \
-glt_label 3 sti1_sti2 \
-gltsym 'SYM: sti1_tsk4_blk1 +sti1_tsk4_blk2 +sti1_tsk4_blk3 +sti1_tsk4_blk4 +sti1_tsk4_blk5 \
+sti1_tsk2_blk1 +sti1_tsk2_blk2 +sti1_tsk2_blk3 +sti1_tsk2_blk4 +sti1_tsk2_blk5 \
-sti1b_tsk4_blk1 -sti1b_tsk4_blk2 -sti1b_tsk4_blk3 -sti1b_tsk4_blk4 -sti1b_tsk4_blk5 \
-sti1b_tsk2_blk1 -sti1b_tsk2_blk2 -sti1b_tsk2_blk3 -sti1b_tsk2_blk4 -sti1b_tsk2_blk5 \
-sti2_tsk4_blk1 -sti2_tsk4_blk2 -sti2_tsk4_blk3 -sti2_tsk4_blk4 -sti2_tsk4_blk5 \
-sti2_tsk2_blk1 -sti2_tsk2_blk2 -sti2_tsk2_blk3 -sti2_tsk2_blk4 -sti2_tsk2_blk5 \
+sti2b_tsk4_blk1 +sti2b_tsk4_blk2 +sti2b_tsk4_blk3 +sti2b_tsk4_blk4 +sti2b_tsk4_blk5 \
+sti2b_tsk2_blk1 +sti2b_tsk2_blk2 +sti2b_tsk2_blk3 +sti2b_tsk2_blk4 +sti2b_tsk2_blk5' \
-glt_label 4 ssf_nnf \
-fout -tout -x1D X.xmat.1D -xjpeg X.jpg \
-x1D_uncensored X.nocensor.xmat.1D \
-errts errts.s10 \
-bucket stats.s10
# 3dREMLfit
3dREMLfit -input pb06.s10.scale_concat+tlrc -matrix X.xmat.1D -mask mask_group+tlrc \
-Rvar X_REMLvar -Rbeta X_beta_REML -Rbuck stats.X_beta_REML -Rglt stats.X_REML -tout -NEGcor
# rest of the script
# create ideal files for fixed response stim types
1dcat X.nocensor.xmat.1D'[1]' > ideal_sti1_tsk4_blk1.1D
1dcat X.nocensor.xmat.1D'[2]' > ideal_sti1_tsk4_blk2.1D
1dcat X.nocensor.xmat.1D'[3]' > idea_sti1_tsk4_blk3.1D
1dcat X.nocensor.xmat.1D'[4]' > ideal_sti1_tsk4_blk4.1D
1dcat X.nocensor.xmat.1D'[5]' > ideal_sti1_tsk4_blk5.1D
1dcat X.nocensor.xmat.1D'[6]' > ideal_sti1b_tsk4_blk1.1D
1dcat X.nocensor.xmat.1D'[7]' > ideal_sti1b_tsk4_blk2.1D
1dcat X.nocensor.xmat.1D'[8]' > ideal_sti1b_tsk4_blk3.1D
1dcat X.nocensor.xmat.1D'[9]' > ideal_sti1b_tsk4_blk4.1D
1dcat X.nocensor.xmat.1D'[10]' > ideal_sti1b_tsk4_blk5.1D
...
1dcat X.nocensor.xmat.1D'[31]' > ideal_sti2_tsk2_blk1.1D
1dcat X.nocensor.xmat.1D'[32]' > ideal_sti2_tsk2_blk2.1D
1dcat X.nocensor.xmat.1D'[33]' > ideal_sti2_tsk2_blk3.1D
1dcat X.nocensor.xmat.1D'[34]' > ideal_sti2_tsk2_blk4.1D
1dcat X.nocensor.xmat.1D'[35]' > ideal_sti2_tsk2_blk5.1D
1dcat X.nocensor.xmat.1D'[36]' > ideal_sti2b_tsk2_blk1.1D
1dcat X.nocensor.xmat.1D'[37]' > ideal_sti2b_tsk2_blk2.1D
1dcat X.nocensor.xmat.1D'[38]' > ideal_sti2b_tsk2_blk3.1D
1dcat X.nocensor.xmat.1D'[39]' > ideal_sti2b_tsk2_blk4.1D
1dcat X.nocensor.xmat.1D'[40]' > ideal_sti2b_tsk2_blk5.1D
# --------------------------------------------------------
# compute sum of non-baseline regressors from the X-matrix
# (use 1d_tool.py to get list of regressor colums)
set reg_cols = '1d_tool.py -infile /path/concatenate_scaled_prep_from_two_runs/X.nocensor.xmat.1D -show_indices_interest'
3dTstat -sum -prefix sum_ideal.1D /path/concatenate_scaled_prep_from_two_runs/X.nocensor.xmat.1D"[$reg_cols]"
# also, create a stimulus-only X-matrix, for easy review
1dcat /path/concatenate_scaled_prep_from_two_runs/X.nocensor.xmat.1D"[$reg_cols]" > X.stim.xmat.1D
Question 1. [Error message]
Can’t read 1D dataset file X.nocensor.xmat.1D[ ]
- Even I set the exact path for X.nocensor.xmat.1D, the error message still appeared.
Question 2. [Result related]
When I checked the “stats.X_beta_REML” file to use for “3dMEMA” using afni GUI, I could find three Coef and Tstat for same stimuli.
- For an example,
81 sti1#0_Coef
82 sti1#0_Tstat
83 sti1#1_Coef
84 sti1#1_Tstat
85 sti1#2_Coef
86 sti1#2_Tstat
87 sti2#0_Coef
88 sti2#0_Tstat
89 sti2#1_Coef
90 sti2#1_Tstat
91 sti2#2_Coef
92 sti2#2_Tstat
and so on…
However, I need only one Coef and Tstat stimuli for 3dMEMA, and I also think that the result should be only one Coef and Tstat for one stimuli…
I also used “-concat” option after “-polort 0” in 3dDeconvolve (i.e. -concat ‘1D: 0 160’ / there are 160 volumes in one run), but there was no difference…
Therefore, may I ask you what are the problem that I have?
Thank you in advance!!
Regards,
dawoon