This repository contains code for simulation and analysis used in Ju et al. 2019 (Network structure of neural systems supporting cascading dynamics predicts stimulus propagation and recovery).
Code developed using MATLAB 2018a
and python 3.7.3
. For help using python in MATLAB, see system configuration.
- Network generator (for figures 1, 2, 4, and 5)
- MIToolbox (for mutual information analysis in Figure 5)
- linspecer (for figures 2, 3, and 5)
- powerlaw (for figure 2)
The repository's high-level structure is:
├──analysis
├──cascades
├──depracated code
├──dynamics
├──graph
├──information
└──markov
├──dynamics
├──inputs
└──models
└──figures
└──supplement
To generate the figures from pre-generated data,
- Set
source_data_dir
to the directory containing the source data (e.g.source_data_dir = '/Users/username/Downloads/Source Data';
). Download the pre-generated source data from figshare. - Run the scripts in
figures
.
To generate all figures from scratch,
- Clear the variable
source_data_dir
(e.g.clear source_data_dir
). - For figures 2, 3, and 4, set
emp_data_dir
to the directory containing the empirical data (e.g.emp_data_dir = '/Users/username/Downloads/data';
). Download the empirical data from crcns. This may take a long time for some figures. - Run the scripts in
figures
.