Code repository

The code supplied on this page is freely available for re-use and study.

Spike-train Communities Toolbox (MATLAB)

Detecting neural ensembles

A MATLAB toolbox for spike-train "community detection" based on the ideas in Humphries, M. D. (2011) J Neurosci.

The latest version is available to download from Github .

Analysing neural ensembles

A MATLAB toolbox for analysing neural ensembles is available to download from Github

This toolbox takes the groups of neurons detected by the spike-train community algorithms and statistically characterises them. Includes the new ``fit-space" approach to clustering based on probability distributions.


Basal ganglia models

Spiking neuron model of the basal ganglia

The model presented in Humphries, Stewart & Gurney (2006) J Neurosci.

We have written a short guide to using the model: User manual v1.0

The main code is contained in a single archive: Download

The version of the Chronux toolbox for MATLAB we used is also available: Download
(The latest version of Chronux toolbox is available here).

Population level models of basal ganglia circuitry

Intrinsic model

The basal ganglia model described in Gurney et al (2001a) and Gurney et al (2001b) is available in Simulink and MATLAB formats.

Extended model

The basal ganglia-thalamocortical loop model described in Humphries & Gurney (2002) is available in Simulink and MATLAB formats.


Large-scale models of the striatum

First complete model (Model v1): Humphries, Wood & Gurney (2009) Neural Networks

To begin identifying potential dynamically-defined computational elements within the striatum, we constructed a new three-dimensional model of the striatal microcircuit's connectivity, and instantiated this with our dopamine-modulated neuron models of the MSNs and FSIs. A new model of gap junctions between the FSIs was introduced and tuned to experimental data. We introduced a novel multiple spike-train analysis method, and apply this to the outputs of the model to find groups of synchronised neurons at multiple time-scales. We found that, with realistic in vivo background input, small assemblies of synchronised MSNs spontaneously appeared, consistent with experimental observations, and that the number of assemblies and the time-scale of synchronisation was strongly dependent on the simulated concentration of dopamine. We also showed that feed-forward inhibition from the FSIs counter-intuitively increases the firing rate of the MSNs.

The code archive contains all of the MATLAB scripts, functions and MEX files that produced the results from that paper; the source C++ code for the MEX files is also included so they can be recompiled for other systems. The code includes the full set of analysis routines for detecting cell assemblies in spike train data-sets.

The results archive contains all of the spike-trains data-sets from the simulations that were analysed in the paper. See the README file for further details.

Spatial scales of the striatal network (Model v1.5): Humphries, Wood & Gurney (2010) PLoS Computational Biology

The main thrust of this paper was the development of the 3D anatomical network of the striatum's GABAergic microcircuit. We grew dendrite and axon models for the MSNs and FSIs and extracted probabilities for the presence of these neurites as a function of distance from the soma. From these, we found the probabilities of intersection between the neurites of two neurons given their inter-somatic distance, and used these to construct three-dimensional striatal networks. These networks were examined for their predictions for the distributions of the numbers and distances of connections for all the connections in the microcircuit. We then combined the neuron models from model v1 (see above) with the new anatomical model, forming v1.5. We used this model to examine the impact of the anatomical network on the firing properties of the MSN and FSI populations, and to study the influence of all the inputs to one MSN within the network.

The code archive contains all of the MATLAB scripts, functions and MEX files that produced the dynamical model results from that paper. The source C++ code for the MEX files is also included so they can be recompiled for other systems. The code includes the full set of analysis routines for finding the firing rate distributions (Fig. 9 in the paper) and for assessing the impact of the inputs to a single MSN in the network (Fig. 10 in the paper). We also make available a complete connectivity matrix (129MB) describing all the connections in a 1mm3 model with 1% FSIs. This can be loaded by the StriatumNetworkParameters.m function - see that function for instructions.

Notes: both the above models contain our first reduced models of the dopamine-modulated MSN. These have subsequently been updated and published separately (see below) .


Reduced models of the striatal medium spiny neuron and its modulation by dopamine

We extended a reduced model of the striatal medium spiny neuron (MSN) to account for dopaminergic modulation of its intrinsic ion channels and synaptic inputs. We tuned our D1 and D2 receptor MSN models using data from a recent large-scale compartmental model. The new models capture the input-output relationships for both current injection and spiking input with remarkable accuracy, despite the order of magnitude decrease in system size. They also capture the paired pulse facilitation shown by MSNs. Finally, they show how the MSN membrane potential can be bimodal, even if the neuron is not bistable. Reference: Humphries, Lepora, Wood & Gurney (2009) Front. Comp. Neurosci.

The code archive contains all of the MATLAB scripts and functions that produced the results from that paper. This includes the full code for the parameter search routines, so that they can be re-run if the model is changed and/or extended.


The brainstem medial reticular formation model: anatomy and dynamics

A set of models to study the medial reticular formation (mRF) of the brainstem. We developed a collection of algorithms to derive the adult-state wiring of the model: one set a stochastic model; the other set mimicking the developmental process. We found that the anatomical models had small-world properties, irrespective of the choice of algorithm; and that the cluster-like organisation of the mRF may have arisen to minimise wiring costs. (The model code includes options to be run as dynamic models; papers examining these dynamics are included in the .zip file). Download here .

The anatomical models are detailed in Humphries, Prescott & Gurney (2006) Proc Roy Soc B.
A review of the functions of the mRF, and study of a simple population-level dynamic model are in Humphries,Prescott & Gurney (2007) Phil Trans Roy Soc B.


Izhikevich neuron solution methods

In Humphries & Gurney (2007) Neural Comp. we outlined solution methods for the recent neuron model of Izhikevich, a form of extended quadratic integrate-and-fire model. This model was used as the basis for the neurons models in our studies of the striatal medium spiny neuron and of the dynamics of complete striatal network. The code archive contains all of the MATLAB scripts, functions, MEX-files, and original C code that produced the results from that paper. The C code can be used as the basis for a general Izhikevich neuron solution engine.


Models-as-animals: Monte Carlo simulation code

Coming soon... Request code