This page describes how to perform seed-based functional connectivity (FC) analysis in FSFAST. The FC analysis is an extension of the task-based analysis for which there is much more documentation. These instructions mainly cover the details specific to FC analysis. The other steps are given minimal treatment under the understanding that many more details can be found in the task based analysis documentation as found in [[http://surfer.nmr.mgh.harvard.edu/pub/docs/freesurfer.fsfast.ppt|FS-FAST powerpoint]] and the [[http://surfer.nmr.mgh.harvard.edu/fswiki/FsFastTutorial|FS-FAST tutorial]]. Steps 4, 5, and 6 are the only ones specific to FC analysis. *STEP 1: Unpack Data into the FSFAST Hierarchy using dcmunpack (run with -help for more documentation): Sample cmd: dcmunpack -src dicomdir -targ sessionid -fsfast -run 3 bold nii.gz f.nii.gz -run 4 bold nii.gz f.nii.gz In this sample command... * Have all fMRI dicoms for this subject in the dicomdir folder or subfolders under this folder * Arguement for "-targ" specifies output directory here called "sessionid". This should be unique to the subject (and visit if longitudinal). This is called the session folder. * -run 3 bold nii.gz f.nii.gz will unpack run 3 fmri to sessionid/bold/003/f.nii.gz * To get a list of runs, run dcmunpack -src dicomdir/subject/ALLDICOMS * Use "-fsfast" to generate fsfast hierarchy shown in the image below * The parent folder of the sessionid folder is called the "Project Folder" or "Project Directory". All the commands below should be run from the Project Folder. {{attachment:fsfast-hierarchy.jpg}} *STEP 2: Link to FreeSurfer anatomical analysis. This is done by creating a text file called sessionid/subjectname with the name of the FreeSurfer anatomical folder as created with recon-all and found in $SUBJECTS_DIR. *STEP 3: Pre-process your bold data using preproc-sess [[http://surfer.nmr.mgh.harvard.edu/fswiki/preproc-sess|preproc-sess]] Sample command {{{preproc-sess -s sessionid -fwhm 5 -surface fsaverage lhrh -mni305-2mm}}} By default this will do motion correction, masking, registration to the anatomical, sampling to the surface, and surface smoothing by 5mm as well as sampling to the mni305 with volume smoothing. The surface sampling is done onto the surface of the lh and rh hemispheres of fsaverage. The mni305 is only used for volume-based analysis of subcortical structures. Note that eventhough the time series data are sampled onto fsaverage, the FC seeds are derived from the indvidual anatomy as shown below using unsmoothed data. See the task-based analysis documentation for more information. *STEP 4: Use fcseed-config to configure the parameters you wish to pass to your connectivity analysis. Sample command: {{{fcseed-config -segid 1010 -fcname L_Posteriorcingulate.dat -fsd bold -mean -rescale-global -cfg mean.L_Posteriorcingulate.config}}} This example will use the FreeSurfer cortical segmentation for the left posterior cingulate (segID: 1010, see $FREESURFER_HOME/FreeSurferColorLUT.txt for more) as defined for this individual in aparc+aseg.mgz. For seed regions, we recommend generating the mean signal timecourse by using "-mean". Note that this does not perform any analysis, it just creates a text file with the configuration. You can include more -segid flags to include more regions (though it will create only one seed time course). NOTE: Once a config file is created it may be used for multiple sessions. The -rescale-global option will rescale the seed to be 100/GlobalMean where GlobalMean is computed from the mean over the brain mask. It is also possible to rescale based on the mean inside of the ROI with -rescale-local. Finally, one can specify -no-rescale to turn off rescaling entirely; this is not recommended, but this is the way FSFAST computed the seed for all versions up to and including 7.4.1. If you want to split a Freesurfer parcellation into multiple seeds ("split parcellation"), follow the [[FsFastFunctionalConnectivityWalkthroughSplittingSeeds |additional steps here]] - and resume with step 4 on this page... *STEP 5: Create the FC seed for an individual {{{fcseed-sess -s sessionid -cfg L_Posteriorcingulate.config}}} This creates a file called L_Posteriorcingulate.dat in each resting state run. This will have a single time course in it *STEP 6: Create nuisance variables for white matter: . fcseed-config -wm -fcname wm.dat -fsd bold -pca -cfg wm.config . fcseed-sess -s sessionid -cfg wm.config for ventricles + CSF: . fcseed-config -vcsf -fcname vcsf.dat -fsd bold -pca -cfg vcsf.config . fcseed-sess -s sessionid -cfg vcsf.config These commands will create wm.dat and vcsf.dat in for each resting state run. These are text files with multiple columns. Each column is a principle component. You will choose the number of components to use below. *STEP 7: Use [[http://surfer.nmr.mgh.harvard.edu/fswiki/mkanalysis-sess|mkanalysis-sess]] to configure an analysis for your FC data. Like the fcseed-config above, this is done once regardless of how many sessionds you have. {{{mkanalysis-sess -analysis fc.lpccseed.surf.lh -surface fsaverage lh -fwhm 5 -notask -taskreg L_Posteriorcingulate.dat 1 -nuisreg vcsf.dat 5 -nuisreg wm.dat 5 -mcextreg -polyfit 5 -nskip 4 -fsd bold -TR