This repo contains all code used in "Dispersion of functional gradients across the lifespan" by Bethlehem & Paquola et al.
./PostProcessing/camcan_functional_gradients.m
This function runs the main gradient analyses including:
- Gradient construction
- Linear effects within individual gradient
- Projection of gradients into 3D gradient space
- Quantification of within and between network dispersion
- Generate surface projections for figures
- Saves all output to csv for follow analyses and figure plotting
./PostProcessing/camcan_mediation.R Runs the mediation analyses
./PostProcessing/camcan_moderation.R Runs the moderation analyses
./PostProcessing/connectomise_holdout.m Generates connectomes from surface files
./Figures_code/... Contains code used to generate paper figures
./PreProcessing/... Contains all code used to pre-process data
./Utilities/... Contains various matlab functions, colourmaps and utiltities for plotting. Also includes a setup script to setup folder structure locally (just change your relevant folder paths :)
./Data/... All data used for analyses including connectomes and output generated during analyses, excluding the Conte69 surface maps (due to space constraints)
Tested on linux 18.04/16.0, using Matlab v17-19
- Matlab (for gradient construction and analyses)
- SurfStat (for surface based projection, analyses and visualisation)
- MICA Tools (e.g. Matlab tools and Surfstat add-ons): https://github.com/MICA-MNI/micasoft
- R (for figures and mediation and moderation analyses)