-
Notifications
You must be signed in to change notification settings - Fork 9
Using CIVET with TFCE_mediation
trislett edited this page Jun 26, 2017
·
4 revisions
These steps assume that $TFCE_mediation variable has been exported to the environment.
export TFCE_mediation=/path/to/tfce_mediation/clone/directory
tm_tools convert-surface -i_mni LH_Surface.obj -o_fs LH_Surface.srf
tm_tools convert-surface -i_mni RH_Surface.obj -o_fs RH_Surface.srf
2. Create adjacency set for newly converted surfaces to be used later for applying surface based TFCE (~3-4 min)
$TFCE_mediation/tfce_mediation/misc_scripts/create_adjacency_list_mni.py -d 1 4 --surfaces LH_Surface.srf RH_Surface.srf
For group analysis, you will need to paste each subjects surface values into a csv formatted file. TFCE_mediation assumes freesurfer output so you will rename the mgh files to the following convention ?h.all.{surface}.03B.mgh.
$TFCE_mediation/tfce_mediation/misc_scripts/tm_mgh_txt_converter.py -i lh_cortical_thickness_for_all_subjects.csv
mv lh_cortical_thickness_for_all_subjects.csv.mgh lh.all.thickness.03B.mgh
$TFCE_mediation/tfce_mediation/misc_scripts/tm_mgh_txt_converter.py -i rh_cortical_thickness_for_all_subjects.csv
mv rh_cortical_thickness_for_all_subjects.csv.mgh rh.all.thickness.03B.mgh
Note: make sure use the -a option (Load custom adjacency set) for 'step1' analyses.
After statistical analysis, *mgh in the output folder can converted back to text file using 'tm_mgh_txt_converter.py -s'. Otherwise, the results can be visualized in freeview or convert to *.ply object for viewing in Blender etc.