Skip to content

DynamicBrainMind/rtfMRI_prep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rtfMRI-prep

These scripts are for processing functional localizer data immediately after task-fMRI data collection to define individual-level ROIs to target with real-time fMRI. The current version was based on using the GradCPT as the functional localizer task. Currently, functional localization is performed for one pair of brain regions (dorsal anterior insular cortex and posteromedial cortex) or one pair of brain networks (dorsal attention and default mode). Peak voxels are identified based, based on BOLD activation (dorsal anterior insula and dorsal attention network) or deactivation (posteromedial cortex and default mode network) to target stimuli during GradCPT performance. The code generates set-up files for performing real-time fMRI analysis using OpenNFT software.

Setup

  1. After cloning this repository, add the path to your bash startup script (.bash_profile on Mac), e.g. by adding these 2 lines (replacing the path below with your own path) to the script:

PATH="/Users/ak4379/Documents/scripts/rtfMRI_prep:${PATH}"

export PATH

  1. Make sure that all of the scripts are executable. For example, go to the rtfMRI_prep path in terminal and type "chmod u+x *"

  2. Make sure that FSL is installed. If you'd like to use the scripts with "_niimath" suffix (which is slightly faster), make sure niimath is installed. Currently niimath is required for the network-based localizer version.

Running the code

All scripts must be run from the terminal within the folder that contains 3 files: (1) fMRI data (one run) from functional localizer task; (2) anatomical data; (3) Text file with event information in 3-column format for performing GLM in FSL ("EV" file; required only for rtfmri_localizer_proc)

rtfmri_localizer_proc or rtfmri_localizer_proc_DMN_DAN: Main functions that compute ROIs/networks using functional localizer task data. Requires 4 arguments: (1) subject name; (2) name of fMRI file; (3) name of T1 (anatomical) file; (4) 1 or 2 for order of ROIs. Outputs an "OpenNFT" folder within the path where the command was run. Toward the end of completion, the script will output images displaying select brain slices with the functionally localized daIC and PMC ROIs.

rtfmri_localizer_proc_niimath: Same as rtfmri_localizer_proc but uses niimath instead of fslmaths to speed things up.

rtfmri_localizer_proc_noGLM: Function that uses registration from standard space to get ROIs (does not use functional localizer task to generate the ROIs) and outputs OpenNFT folder. Requires same arguments as rtfmri_localizer_proc. This should be if, for example, the functional localizer task was not performed or there was error during data acquisition.

rtfmri_view_localizer_rois: Use fsleyes to view ROIs on functional data after running rtfmri_localizer_proc. No arguments required (just run it from the folder containing original files).

rtfmri_view_localizer_rois_noGLM: Use fsleyes to view ROIs on functional data after running rtfmri_localizer_proc_noGLM. No arguments required (just run it from the folder containing original files).

About

Functional localizer processing for rt-fMRI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published