Beauchamp:SurfaceAveraging: Difference between revisions
(New page: == Creating Surface Average of Functional Data == Averaging on the surface has many advantages over averaging in the volume but requires more processing steps. What is needed for each subj...) |
(No difference)
|
Revision as of 13:00, 24 March 2017
Creating Surface Average of Functional Data
Averaging on the surface has many advantages over averaging in the volume but requires more processing steps. What is needed for each subject is a surface that is folded and aligned to the individual subject anatomy but that has the same number of nodes in each subject (this way a node-wise group map can be created) AND has the nodes aligned to a template brain (this way node X has the same anatomical location in each subject). Each subject's functional data is mapped to that subject's standardized surface and then node-based group maps are created. The process must be performed separately for the left and right hemispheres. Here is a sample processing stream.
- Perform group analysis
Many of the same techniques and tools used to perform volume group analysis can also be used on the surface. Smoothing before averaging can be performed with SurfSmooth
SurfSmooth -overwrite -target_fwhm 10 -output temp{$ec}.niml.dset -i rh.sphere.reg.asc -met HEAT_07 -input {$ec}v1mr_{$hemi}_all_reg.1D'[13]'
A t-test can be performed to find all nodes that are different from 0
3dttest -base1 0 -set2 FLv1mr_FL_VisLoc_reg.1D'[7]' FMv1mr_lh_VisLoc_reg.1D'[7]' FNv1mr_lh_VisLoc_reg.1D'[7]' \ -prefix testavg
The results from averaging the three subjects above are shown here (with no smoothing) Here are the results from 9 subjects, with and without smoothing:
- A similar process can be used to calculate the average time series across subjects for each node on the surface
This requires that a percent signal change IRF brik has been created already (it only makes to average data in standardized % signal change.) This data is mapped to the surface and then to the standard surface, as above:
3dVol2Surf -overwrite -spec {$sd}/??_rh.spec -surf_A smoothwm -sv {$ec}_SurfVol_Alnd_Exp+orig -oob_value 0 \ -grid_parent {$ec}_short_irfpcnt+orig -map_func mask -out_1D {$ec}v1mr_rh_irf.1D SurfToSurf -overwrite -prefix {$ec}v1mr_rh_irf_reg.1D -output_params Data -data {$ec}v1mr_rh_irf.1D \ -i /Volumes/data9/surfaces/fsaverage/SUMA/rh.sphere.reg.asc -i {$sd}/rh.sphere.reg.asc &
To speed things up, the lh and rh can be done in parallel ("&" above)
3dVol2Surf -overwrite -spec {$sd}/??_lh.spec -surf_A smoothwm -sv {$ec}_SurfVol_Alnd_Exp+orig -oob_value 0 \ -grid_parent {$ec}_short_irfpcnt+orig -map_func mask -out_1D {$ec}v1mr_lh_irf.1D SurfToSurf -overwrite -prefix {$ec}v1mr_lh_irf_reg.1D -output_params Data -data {$ec}v1mr_lh_irf.1D \ -i /Volumes/data9/surfaces/fsaverage/SUMA/lh.sphere.reg.asc -i {$sd}/lh.sphere.reg.asc
SurfToSurf writes out 12 un-needed columns in the inefficient 1D format; take just the needed columns and convert to binary .niml format
3dbucket -prefix {$ec}v1mr_lh_irf_reg.niml.dset -fbuc {$ec}v1mr_lh_irf_reg.1D'[13..$]' 3dbucket -prefix {$ec}v1mr_rh_irf_reg.niml.dset -fbuc {$ec}v1mr_rh_irf_reg.1D'[13..$]'
This process can be repeated across subjects. Copy all of the datasets to the group directory. For instance,
cp ??v1mr_?h_irf_reg.niml.dset /Volumes/data1/UT/TacRelGroup/
Then, they can be merged with
3dmean -prefix Group_Block_lh_psc.1D FPv1mr_lh_irf_reg.1D'[13-68]' FRv1mr_lh_irf_reg.1D'[13-68]' ...
Note this requires an equal number of columns (time points) from each subject. If this is not true, create a "minimum % change" BRIK of only the tasks that all subjects have in common. For instance,
3dbucket -prefix junk -abuc {$ec}_Decv{$v}_REML_rbeta+orig'[24..65,80..107]' 3dcalc -a {$ec}EPIanatAlbl+orig -b junk+orig -prefix {$ec}_short_irfpcnt -expr '100 * b/a * step(1-abs(b/a))'
The average IRF dataset (or any individual) can be loaded into SUMA with the "Load Dset" button. It doesn't make sense to color in the surface based on the timeseries, so unclick the "View" button and instead turn on the graph with the "G" button.