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  

|
January 10, 2019 02:45PM
I am attempting to do a surface based analysis of an n-back task (2 back minus 0 back conditions), and I am having trouble piecing together the appropriate procedure through the docs.

I manually edited the skull-stripping in FreeSurfer, then converted the edited brainmask file to a surface via:

@SUMA_Make_Spec_FS -NIFTI -fspath ./subject_ID -sid ./subject_ID

Then, I followed example 8 (but using a standard mesh - as advised by Rick Reynolds: [afni.nimh.nih.gov] )

afni_proc.py -subj_id subject_ID \
-scr_overwrite \
-blocks tshift align volreg surf blur scale regress \
-copy_anat ./subject_ID/SUMA/brainmask.nii \
-dsets ./funct1.nii.gz ./funct2.nii.gz \
-surf_anat ./subject_ID/SUMA/subject_ID_SurfVol.nii \
-surf_spec ./subject_ID/SUMA/std.60.subject_ID_?h.spec \
-tshift_opts_ts \
-tpattern alt-z \
-align_opts_aea -cost lpc+ZZ \
-volreg_align_to MIN_OUTLIER \
-volreg_align_e2a \
-blur_size 6 \
-regress_stim_times \
./0_back.1D \
./2_back.1D \
-regress_stim_labels back_0 back_2 \
-regress_basis 'BLOCK(45,1)' \
-regress_opts_3dD \
-gltsym 'SYM: back_2 - back_0' \
-glt_label 2minus0 \
-regress_censor_outliers .1 \
-regress_censor_motion 0.3 \
-regress_motion_per_run \
-regress_run_clustsim no \
-execute

Then, I looked through the SUMA handout:
[afni.nimh.nih.gov]
My reading of slide 88 is that the output of the afni_proc.py script using the (-surf_anat and -surf_spec) options can be used in the 3dXXXX group analyses:

gen_group_command.py -command 3dttest++ \
-write_script ./twominuszero_lh.tcsh \
-prefix twominuszero_lh.niml.dset \
-dsets ./subject_ID/subject_ID.results/stats.*_ID.lh.niml.dset \
-set_labels back2 back0 \
-subs_betas 'back_2#0_Coef' 'back_0#0_Coef' \
-subs_tstats 'back_2#0_Tstat' 'back_0#0_Tstat' \
-options \
-nomeans -no1sam

Then twominuszero_lh.tcsh runs without error, and creates twominuszero_lh.niml.dset

My goal is to visualize the functional data, and eventually (I think) run slow_surf_clustsim.py to perform the correction for multiple comparisons as in example 3 of the slow_surf_clustsim.py -help output.

My questions are:

1) Is the "stats.subject_ID.?h.niml.dset" the correct file to use for 3dttest++ if the goal is to visualize the functional data (that was included as volumetric data in afni_proc.py as .nii.gz files)

2) I am confused about the spec/std files. I visualized the "twominuszero_lh.niml.dset" file in SUMA by:

afni -niml &
suma -spec ./suma_MNI_N27/std.60.MNI_N27_lh.spec -sv ./suma_MNI_N27/MNI_N27_SurfVol.nii

View -> Object Controller -> Load Dset -> twominuszero_lh.niml.dset

This "looks right" - but I'm unsure if those were appropriate -spec and -sv files.

3) I am unclear if slow_surf_clustsim.py is a surface equivalent of the -clustsim option in 3dttest++ for volumes. The description of the z.max output values sound like analogous information, but based on ( [afni.nimh.nih.gov] ) "... we haven't looked at this for a cluster-control FPR test"

4) If the output of slow_surf_clustim.py can be used for mutliple comparison correction of functional data projected on a surface, I am unsure of which files to use. Copying example 3 I tried:

slow_surf_clustsim.py -save_script surf_lh \
-on_surface yes \
-uvar blur 4.0 \
-uvar spec_file */std.60.subject_ID_lh.spec \
-uvar surf_vol ./subject_ID_SurfVol_Alnd_Exp+orig

The above script works when I use just one subject picked at random, but when I try to use data from all of the subjects included in the analysis (as in the gen_group_command.py):

slow_surf_clustsim.py -save_script surf_lh \
-on_surface yes \
-uvar blur 4.0 \
-uvar spec_file ./std.60.*_ID_lh.spec \
-uvar surf_vol ./*_ID_SurfVol_Alnd_Exp+orig

I get "** error: arg #44 (-uvar) requires 2 params, found 1"

My understanding of the std.60.subject_ID.lh.spec file is that it essentially defines the conversion of/relationship between the surface of subject "subject_ID", and the std.60 mesh (which, seems like the equivalent of a template). Similarly, the subject_ID_SurfVol_Alnd_Exp+orig defines the conversion of/relationship between the volume that was used to create the surface (in my case, the brainmask edited in freesurfer, created from a T1), and the experimental volume (in my case, the functional scans aligned to the MIN_OUTLIER slice).

If my understanding of the files is correct, I don't understand how slow_surf_clustsim.py can use information from only one subject, to determine cluster correction for a group analysis.

Any clarification would be very helpful, as I want to make sure I'm using these tools correctly!
Thanks!!
Subject Author Posted

Surface-based Group Analysis Questions

usaelzler January 10, 2019 02:45PM

Re: Surface-based Group Analysis Questions

usaelzler February 07, 2019 07:49PM