Code repository for the action hippo project
Code is split into separate directories to analyse behavioural, fMRI and eyetracking data. Files are named sequentially, allowing a straightforward replication by following the ordered files. File paths are relative to the local user, and will need changing to relevant local directories.
All code assumes adherence to the BIDS format for fMRI data; behavioural and eyetracking data is saved separately in a pseudo-BIDS format. For details see code comments.
Code was mostly run on a compute server (SLURM). Code necessary for this is labelled with a letter and 'submit_slurm', but can easily be adapted for use on any personal compute server or run as individual files using the 'sys.argv' commands from terminal.
For any further information, feel free to contact Alex (alex.eperon@gmail.com).
- Convert raw files to BIDS format and move to working directories
- Preprocess using fmriprep
- Create events files and ROIs for future analyses; define event files based on planned analysis (RSA)
- Run first-level GLM for 4 main conditions using nilearn
- Create a subject-specific version of the Juelich atlas mamimum probability maps to use for ROI analysis
- Segment the Juelich atlas into ROIs
- Create neural RDMs
- Compare model RDMs in entorhinal ROIs, excluding the effects of other models using partial correlation
- Run a searchlight analysis in subject space (T1W)
- Convert searchlight maps to MNI space
- Run cluster correction to check for significant clusters in searchlight maps
- Use a permutation-based method to create whole-brain voxel reliability maps for a single subject
- Create intersected ROIs using the voxel reliability maps created in the previous step
- Code to plot the results of the RSA analyses.
- Code to predict eye position using deepMReye toolbox (Frey, Nau and Doeller, 2021)
- Code to extract events from deepMReye-predicted gaze positions for use in further analyses
- Data preprocessing; blink removal
- Create an events file to categorise data by condition
- Visualise data and create a big dataframe organised by subject and condition
- Test if eye movements are skewed right or left in x and y
- Test if deepMReye-predicted eye movements are skewed left or right in x
- Test if deepMReye-predicted eye movements are skewed left or right in y