Code and data for the manuscript "Geometric constraints on human brain function"
Uses an eigenmode-based analysis to study how the geometric structure of the brain constrains function captured by fMRI
The code also serves as a toolbox for people to calculate surface and/or volume geometric eigenmodes using their own data (See demo_eigenmode_calculation.sh
)
data/
: folder containing example data, parcellations, empirical data, results from the paper, figure source data, template eigenmodes, and template surfaces and volumesfunctions_matlab/
: folder containing various utility analysis and visualization MATLAB functionssurface_eigenmodes.py
: Python script to calculate geometric eigenmodes of a cortical surfacevolume_eigenmodes.py
: Python script to calculate geometric eigenmodes of a 3D volumedemo_eigenmode_calculation.sh
: Bash shell script to demonstrate how to calculate geometric eigenmodesdemo_eigenmode_analysis.m
: MATLAB script to demonstrate how to use eigenmodes to analyze fMRI datademo_eigenmode_visualization.m
: MATLAB script to demonstrate how to visualize surface and volume eigenmodesdemo_connectome_eigenmode_calculation.m
: MATLAB script to demonstrate how to calculate connectome and EDR connectome eigenmodesdemo_wave_model_simulation.m
: MATLAB script to demonstrate how to simulate waves on a cortical surface using eigenmodesgenerate_paper_figures_main_bioRxiv.m
: MATLAB script to generate the Main figures of the bioRxiv preprintgenerate_paper_figures_supp_bioRxiv.m
: MATLAB script to generate the Supplementary figures of the bioRxiv preprintgenerate_paper_figures_main_Nature.m
: MATLAB script to generate the Main figures of the Nature papergenerate_paper_figures_supp_Nature.m
: MATLAB script to generate the Supplementary figures of the Nature papergenerate_paper_figures_extended_Nature.m
: MATLAB script to generate the Extended Data figures of the Nature paper
Download the repository and you're good to go. Read the comments and documentation within each code for usage guidance.
Due to their file sizes exceeding the limit allowed by GitHub, you will need to fill the data/empirical/
, data/results/
, and data/template_eigenmodes/
directories with data that you can download from this OSF repository. The total file size is 11.3GB.
VERY IMPORTANT NOTE: Some portions of generate_paper_figures.m
and generate_paper_suppfigures.m
require the abovementioned data hosted in OSF. Hence, you need them to be saved in the appropriate folders to be able to run these two scripts smoothly.
Original empirical data are from the Human Connectome Project. Please consult the link for detailed information about access, licensing, and terms and conditions of usage.
Some important aspects you need to do before running demo_eigenmode_calculation.sh
, surface_eigenmodes.py
, or volume_eigenmodes.py
- Install FreeSurfer and load module if using an HPC system.
- Install Connectome Workbench and load module if using an HPC system.
- Install Gmsh and load module if using an HPC system.
- Install the following Python libraries (e.g., via pip): lapy, nibabel, and brainspace
- Make sure you also have the following common Python libraries: numpy, scipy, os, argparse, subprocess
Some of the MATLAB-based scripts depend on packages developed by others. Copies of these packages have been stored in the functions_matlab/
folder to ensure version compatibility. However, please visit their respective links below to get more details and don't forget to give them some love.
- gifti
- cifti
- cbrewer (NOTE: The link is for the new version cbrewer2, but the repo uses the older version.)
- Stuart Oldham's repository for drawing ROI boundaries on a surface
- Frantisek Vasa's repository for creating rotations of a parcellated map
The codes have been tested on versions of Python from 3.7 to 3.8 and versions of MATLAB from R2019b to R2020b.
If you use our code in your research, please cite us as follows:
[PREPRINT] J.C. Pang, K.M. Aquino, M. Oldehinkel, P.A. Robinson, B.D. Fulcher, M. Breakspear, A. Fornito, Geometric constraints on human brain function, bioRxiv (2022) (DOI: 10.1101/2022.10.04.510897)
[ARTICLE] J.C. Pang, K.M. Aquino, M. Oldehinkel, P.A. Robinson, B.D. Fulcher, M. Breakspear, A. Fornito, Geometric constraints on human brain function (TO BE UPDATED)
Please contact james.pang1@monash.edu if you need any further details.