Simulate seizures with The Virtual Brain
How to run a seizure simulation built from a patient's own connectivity, using The Virtual Brain and the Epileptor model - an interactive notebook rather than a video.
Load a patient connectivity matrix, place the Epileptor model on it, mark which regions are epileptogenic, and run the simulation to see how a seizure propagates through that particular brain network.
The methods and software used in this tutorial have not been certified for clinical practice, and should be considered for research purposes only.
What the simulation does
The Virtual Brain builds a whole-brain network model from a patient's structural connectivity, then places a dynamical model at each node. The Epileptor is the model used for seizures: it reproduces the transition from normal activity to seizure and back again.
By designating some regions as epileptogenic and others as healthy, you can watch how a seizure starting in one place spreads through that specific patient's network - and test what would change if it started somewhere else.
What you will need
Applications - The Virtual Brain, from the Applications catalogue. The tutorial runs as a Jupyter notebook, simulation.ipynb.
Data - the preprocessed Virtual Brain tutorial dataset, which supplies the connectivity matrix and the region definitions. Copy it into your own workspace before you start.
Background - some familiarity with Python and with running notebooks. You do not need to write the model yourself; the notebook is complete and you work through it cell by cell.
Working through the notebook
Unlike the other tutorials, this is a notebook you run rather than a video you watch. Open simulation.ipynb and execute the cells in order.
Load the connectivity
Read in the patient connectivity matrix and inspect it - which regions are present, and how strongly they are linked.
Set up the Epileptor
Attach the Epileptor model to the network and set its parameters.
Define the epileptogenic zone
Mark which regions are epileptogenic, which are in the propagation zone, and which are healthy.
Run the simulation
Execute the simulation over the chosen time window and collect the output.
Look at the results
Plot the simulated activity per region and follow the seizure as it spreads through the network.
Change something and re-run
Move the epileptogenic zone, or alter the coupling, and see how propagation changes. This is where the model earns its keep.
Where to go next
This is the last of the tutorials. The Applications catalogue lists everything else available on the platform.