Skip to content

Latest commit

 

History

History
109 lines (98 loc) · 8.77 KB

5. Resting-State fMRI Analysis.md

File metadata and controls

109 lines (98 loc) · 8.77 KB

Resting-State fMRI Analysis

Single-subject resting-state fMRI analysis using seed-based correlation. fMRI time series at a given seed (such as the mPFC for the DMN) brain location is used to correlate with the fMRI time series at other brain locations. The distribution of brain regions showing significant correlation to the chosen seed consists of a resting-state network. Here we chose the hippocampus as the seed region for its functional role in memory.

1. Pre-processing

  1. Pre-process the data following steps from the fMRI Pre-Processing page
  2. Create a folder path as such: /Users/jessica/data_analysis/seeg/s025/resting_analysis

2. Seed Time Series

  1. Download get_native_hippo_regressor_rest.m in your fhlin_toolbox/resting_analysis folder
  2. Change line 4 to root_path='/Users/jessica/data_analysis/seeg'; path to your seeg folder
  3. Change line 14 to setenv('SUBJECTS_DIR','/Users/jessica/data_analysis/seeg/subjects'); your subject directory
  4. Change line 24 to '028'; your subjects dicom number and 34 to 's025'; your subjects ID
  5. Change line 54 to '%s/%s/fmri_data/unpack/register.dat' location of your unpack folder
  6. Change line 57 to '%s/%s/fmri_data/unpack/bold/%s/%s.nii.gz' your subjects bold folder
  7. Comment out lines 5 and 15
  8. Make sure your directory is /Users/jessica/data_analysis/seeg/s025/resting_analysis and run. If done successfully, output should be "DONE!" There should now be 3 files in your resting_analysis folder "native_hippo_regressors_rest_hippo_right.m," "native_hippo_regressors_rest_hippo_left.m," and "028-aseg.mgz"

3. Perfrom Correlational Analysis

  1. Download fconn_native_vol_aseg_120423.m in your fhlin_toolbox/resting_analysis folder
  2. Change line 4 to '/Users/jessica/data_analysis/seeg/s025/fmri_data/unpack/bold/028'; your subjects bold folder
  3. Change line 9 to '/Users/jessica/data_analysis/seeg/s025/resting_analysis'; your subjects resting_analysis folder
  4. Change line 13 to '/Users/jessica/data_analysis/seeg/s025/fmri_data/unpack/mc_regressor.mat'; the location of your mc_regressor.mat file
  5. Change line 54 to 's025'; your subject ID
  6. Change line 107 to '%s/regressor_wm_ventrical_028.mat' you subjects dicom scan number
  7. Make sure your directory is /Users/jessica/data_analysis/seeg/s025/resting_analysis and run. If done successfully, output should be "mri_vol2vol done." There should now be 4 files starting with "hippo_fconn_native_vol_aseg" in your resting_analysis folder
  8. Change line 47 from 1 to 0 flag_gavg=0; this will create two hippo_fconn_native_vol_aseg_120423_hippo_left-anat.nii and two hippo_fconn_native_vol_aseg_120423_gavg_hippo_left-anat.nii (one left one right) in your resting_analysis folder in your resting_analysis folder

4. Render Results Over Brain

  1. Download show_gavg_fconn_native.m in your fhlin_toolbox/resting_analysis folder
  2. Change line 3 to setenv('SUBJECTS_DIR','/Users/jessica/data_analysis/seeg/subjects'); and line 5 to your subject ID
  3. Remove all lines after 10
  4. Make sure your directory is /Users/jessica/data_analysis/seeg/s025/resting_analysis and run. If done successfully, you should have a pop-up window labelled "Figure 1," if you click on a point another window "Figure 2" will pop-up
Figure 1 Screen Shot 2024-03-21 at 3 36 27 PM
Figure 2 Screen Shot 2024-03-21 at 3 42 49 PM

5. Morph Results From Native Volume to Native and Atlas Surfaces

  1. Download fconn_vol2surf_032124.m in your fhlin_toolbox/resting_analysis folder
  2. Change line 5 to file_register='/Users/jessica/data_analysis/seeg/s025/fmri_data/unpack/register.dat'; the location of your register.dat file
  3. Change line 16 to your subject ID
  4. Change line 20 to '/Users/jessica/data_analysis/seeg/s025/resting_analysis/hippo_fconn_native_vol_aseg_120423_gavg_hippo_left-anat.nii'; the location of your hippo_fconn_native_vol_aseg_120423_gavg_hippo_left-anat.nii file
  5. Change line 21 to '/Users/jessica/data_analysis/seeg/s026/resting_analysis/hippo_fconn_native_vol_aseg_120423_hippo_left-anat.nii'; the location of your hippo_fconn_native_vol_aseg_120423_hippo_left-anat.nii file
  6. Make sure your directory is /Users/jessica/data_analysis/seeg/s025/resting_analysis and run. If done successfully the output should be "DONE!" 8 files, two hippo_fconn_native_vol_aseg_120423_gavg_hippo_left-anat-lh.stc, two hippo_fconn_native_vol_aseg_120423_hippo_left-anat-lh.stc, two s025_2_fsaverage_hippo_fconn_gavg_032124-lh.stc files, and two s026_2_fsaverage_hippo_fconn_032124-lh.stc (one lh one rh) in your resting_analysis folder

6. Render Morphed Results Using Values on Surfaces

  1. etc_render_fsbrain;('subject','s025'); a Figure 1 popup window should come up
    Figure 1 Screen Shot 2024-03-25 at 11 32 24 PM
  2. Press F key to load hippo_fconn_native_vol_aseg_032124_gavg_hippo_left-anat-lh.stc file as a overlay
    Figure 1 with overlay Screen Shot 2024-03-25 at 11 35 54 PM
  3. Press D key to change the overlay threshold to [1.5 4]
    Figure 1 with adjusted overlay threshold Screen Shot 2024-03-25 at 11 35 00 PM
  4. Repeat steps 1-3 but now load s026_2_fsaverage_hippo_fconn_032124-lh.stc
    Figure 1 with fsaverage overlay Screen Shot 2024-03-25 at 11 42 40 PM
  5. You can also repeat these steps and load hippo_fconn_native_vol_aseg_120423_hippo_left-anat-lh.stc or s026_2_fsaverage_hippo_fconn_032124-lh.stc files and observe the differences in activation between fsaverage and functional connectivity maps or with and without global average.

Note

Within the Figure 1 GUI, press the W key for coordinates, G key for an advanced menu, and H to see options

7. Group-Level Analysis

Calculate Group-Level Activation

  1. Download average_surf change lines.m and add to your seeg/group_level_analysis/resting_state folder and open in MatLab
  2. Make a folder /Users/jessica/data_analysis/seeg/group_level_analysis/resting_state/average and go to this directory in MatLab
  3. List starting from line 4 the subjects you want to include
  4. Change line 16-20 to your 2_fsaverage_hippo_fconn_032124 files (which should be located in your subjects resting analysis folder)
cond_stem={
    '2_fsaverage_hippo_fconn_032124'
};
  1. Change line 22-26 to the output
cond_output_stem={
    'resting';
};
  1. Change line 29-33 to
cond_stem_str={
    'resting';
    };
  1. Change line 35 to your root directory root_dir='/Users/jessica/data_analysis/seeg';
  2. Change line 49 to the location of the stc files for your subjects and allow for indexing of your different subject IDs and the left/right hemisphere [dummy,v,a,b,timeVec]=inverse_read_stc(sprintf('%s/%s/resting_analysis/%s_%s-%s.stc',root_dir,subject{subj_idx},subject{subj_idx},cond_stem{cond_idx},hemi_str));
  3. Change line 59 to '%s/group_level_analysis/resting_analysis/average/fmri_surf_120423_%s_average.png' the location of your average group analysis folder
  4. If done successfully, you should have an image in your average folder
Example of Average Resting-State for s025, s026, s031, s032, and s034 Screen Shot 2024-04-05 at 1 03 43 PM