# -------------------------------------------------- # just a reminder of where we should be cd AFNI_demos/AFNI_pamenc/AFNI_02_pamenc # -------------------------------------------------- # peek at some single subject results (60078 gets dropped) cd sub-60078 cat run.afni_proc.txt cat out.run.afni_proc.txt afni_open -e proc.sub-60078 ls -l sub-60078.results cat sub-60078.results/out.ss_review*.txt afni_open -b sub-60078.results/QC_sub-60078/index.html cd .. # -------------------------------------------------- # post-analysis QC and group prep # maybe view QC/ss_review_table.xls (as a spreadsheet) # note dropped subjects gen_ss_review_table.py -outlier_sep space \ -report_outliers 'censor fraction' GE 0.15 \ -report_outliers 'average censored motion' GE 0.1 \ -report_outliers 'max censored displacement' GE 8 \ -infiles sub*/s*.results/out.ss*.txt # get ACF (blur) means for Monte Carlo cluster simulations grep -h ACF sub*/*.results/out.ss*.txt | awk -F: '{print $2}' \ | 3dTstat -mean -prefix - 1D:stdin\' # -------------------------------------------------- # run group analysis (note subjects in each group) awk '/CONTROL/ {print $1}' QC/participants.short.tsv awk '/BIPOLAR/ {print $1}' QC/participants.short.tsv cat QC/outliers.c.drop.subs.txt gen_group_command.py -command 3dttest++ \ -write_script - \ -dsets sub-*/*.results/stats.sub*REML+tlrc.HEAD \ -dsets sub-*/*.results/stats.sub*REML+tlrc.HEAD \ -subs_betas "TASK#0_Coef" "CONTROL#0_Coef" \ -subj_prefix sub- \ -options -paired # view and run full script afni_open -e run.ggc.9.bipolar.T-C tcsh run.ggc.9.bipolar.T-C # -------------------------------------------------- # before looking at results, note clustering criteria 1d_tool.py -csim_show_clustsize \ -infile QC/files_ClustSim/ClustSim.ACF.NN1_bisided.1D # add: -verb 0 # how many degrees of freedom do we have? 3dinfo group_analysis.1*/ttest*.HEAD |& grep statpar 3dinfo group_analysis.2*/ttest*.HEAD |& grep statpar # check p=0.001 t-stat threshold (symmetric, pos/neg) cdf -p2t fitt 0.001 24 # -------------------------------------------------- # look at group results cd group_analysis.9.g_bipolar.paried.T-C ls -l # can run afni, p=0.001, cluterize bi-sided (NN1, 17), rpt, 3dclust # (this is not yet masked) afni # -------------------------------------------------- # do scripted clustering (|t| > 3.7454, nvox >= 17) 3dClusterize -mask group_mask.7+tlrc -inset ttest++_result+tlrc -idat 0 -ithr 1 -NN 1 -clust_nvox 17 -bisided -3.7454 3.7454 3dcalc -a ttest++_result+tlrc -b group_mask.7+tlrc -expr 'a*b' \ -prefix ttr_masked 3dClusterize -mask group_mask.7+tlrc -inset ttest++_result+tlrc \ -idat 0 -ithr 1 -NN 1 -clust_nvox 17 -bisided -3.7454 3.7454 \ -pref_map ttr_clust_rois # -------------------------------------------------- # what regions do these clusters overlap? # (e.g. in MNI_caez_ml_18+tlrc) grep -B 1 MNI_caez_ml_18 ~/abin/AFNI_atlas_spaces.niml whereami -omask ttr_clust_rois+tlrc -atlas CA_ML_18_MNI 3dROIstats -mask ttr_clust_rois+tlrc ttest++_result+tlrc 3dROIstats -mask ttr_clust_rois+tlrc'<1,2,3>' -nzvoxels ttest++_result+tlrc