ALLEN BRAIN ATLAS API
The Allen Cell Types Database provides multimodal single cell characterization data to enable data-driven approaches to cell type classification.
From the API, you can:
Download electrophysiology data in Neurodata Without Borders (NWB) format
Download computed electrophysiology features
Download cell morphology images
Download morphological reconstructions in SWC format
Download computed morphology features
Download neuronal models trained on this data set
This document provides a brief overview of the data, database organization and example queries. API database object names are in camel case. See the main API Documentation for more information on data models and query syntax.
The accompanying Allen Software Development Kit (SDK) provides python code for accessing electrophysiology data (NWB files) for all cells and morphological reconstructions (SWC files) for a subset of cells. The Allen SDK also provides sample code demonstrating how to download neuronal model parameters and run your own simulations using stimuli for the experiments or custom current injections.
Experimental Overview And Metadata
All data used in the web application is available in the ApiCellTypesSpecimenDetail table. Data includes structure, cortical layer, dendrite type (spiny, aspiny, sparsely spiny, n/a), apical dendrite status (intact, truncated, n/a), and others. Mouse-specific records include the transgenic line name and reporter status. Mouse-specific records include disease condition (epilepsy, tumor, none) and years of seizure history.
See whitepapers for detailed experimental and annotation information.
From the API, detailed information about cells can be obtained using RMA queries.
All cells in the database
All cells tagged with 'dendrite type - spiny'
All cells annotated to be in layer 4
All human cells
All human cells with disease condition 'epilepsy'
All cells in the Allen Cell Types Database have electrophysiological recordings of responses to stimuli from a common set of current injection protocols. See the electrophysiology technical whitepaper for details on specimen selection, tissue processing, recording, and quality control.
The Cell Types Database categorizes detailed stimulus protocols into set of high level descriptions:
Stimulus Group Name
3 ms square pulse injections from 100 pA to action potential generation, then 10 pA increments to further probe action potential threshold.
Short Square - Hold -60mV
Short Square, holding rest at -60mV
Short Square - Hold -70mV
Short Square, holding rest at -70mV
Short Square - Hold -80mV
Short Square, holding rest at -80mV
Short Square - Triple
3 x 3 ms square current injections at threshold amplitude. Interpulse intervals (start to start) are 7, 11, 15, 19, 23, 27, 31, and 35 ms.
1 s square current injections from -110 pA (or -190 pA for some Pvalb neurons) to rheobase + 160 pA, in 20 pA increments. For a subset of cells, rheobase is further probed to within 10 pA.
Square - 2s Suprathreshold
2 s square current injections to rheobase + 40 pA and 80 pA. Each amplitude is repeated 3-4 times.
Square - 0.5ms Subthreshold
0.5 ms square current injections to +/- 200 pA, repeated 20 times (200 ms intervals).
A ramp current injection with a slope of 25 pA/s is delivered, then terminated after the neuron fires a short series of action potentials.
Ramp to Rheobase
1 s pink noise epochs created using two different random seeds riding on top of a ramp transitioning to a plateau. The ramp portion of the stimulus is 14 seconds long. The noise on the ramp consists of alternating seeds all with a CV of .01. The noise on the plateau are organized into periods of six seconds containing noise of three different CV's with increasing and decreasing CV at 0.2, 0.4, 0.6, 0.4, and 0.2. After a period is completed using one random seed, the other random seed is played for a total of three periods.
Pink noise with a coefficient of variation (CV) equal to 0.2 is used to as it resembles in vivo data. These stimuli consist of 3 x 3 s noise epochs riding on top of square pulses at 0.75, 1, and 1.5 times rheobase. Recovery intervals between stimuli are 5 s.
Noise 1, with a different random seed
General protocols used for testing experiment status
Stimulus sweeps that pass quality control standards are available for download as Neurodata Without Borders (NWB) files. To find the NWB download link for Rorb cell specimen 320654829, use this query:
The Allen SDK provides a simple Python module to support downloading metadata and NWB files for cells in the Cell Types Database. Please see the Data API Client documentation page to see an example.
A standard set of electrophysiological features are automatically computed from the recorded responses of each cell. A subset of those features are displayed at the top of the electrophysiology page for a cell:
The average ratio between the absolute values of the action potential peak upstroke (i.e. max dV/dt) and the action potential peak downstroke (i.e. min dV/dt) for "Short Square" pulses.
Fast AP trough
Minimum value of the membrane potential in the interval lasting 5 ms after the peak of the first action potential for the minimum amplitude "Long Square" stimulus that elicited an action potential.
FI curve slope
Slope of the frequency response (in spikes/sec) vs. stimulus intensity (in pA) curve based on a linear regression for all suprathreshold "Long Square" sweeps.
Minimum stimulus amplitude eliciting an action potential from "Long Square" sweeps.
Ramp AP Time
Average time of the peak of the first action potential for "Ramp" sweeps.
Average resting potential across all "Long Square" sweeps.
See the electrophysiology technical whitepaper for a complete list of computed features and their interpretations.
Use this query to download the features computed for Scnn1a cell specimen 467703703:
The Allen Cell Types Database contains morphological reconstructions generated from bright-field images of biocytin-stained cells. Reconstructions are generated by manually curating the results of an automated segmentation algorithm. See the morphology technical whitepaper for more details.
A standard set of morphological features were computed for all reconstructed cells. A subset of those features are displayed at the top of the cell-specific morphology page:
Max Euclidean Distance
The maximum Euclidean distance of all nodes. Euclidean distance is the straight line distance from the soma (root) to the node.
Number of Stems
The number of stems attached to the soma. When the type of the node is not soma, it is labeled as a stem.
Number of Bifurcations
The number of bifurcations for the given input neuron. A bifurcation point has two daughters.
The average ratio between Euclidean distance of a branch and its path length. Euclidean distance of a branch is the straight-line distance from the soma to the branch. Path length is the sum of the lengths between each node along the path.
The average ratio between the diameter of a daughter branch and its parent branch. One value for each daughter branch is generated at each bifurcation point.
See the morphology technical morphology technical whitepaper for a complete list of computed morphological features.
The API provides programmatic access to the microscopy images used for reconstruction, axis-oriented projections of those images, and morphological reconstructions. A cell can have up to four axis-oriented projections of the images used for reconstruction:
- XY minimum intensity projection
- YZ minimum intensity projection
- XY maximum intensity projection
- YZ maximum intensity projection
The reconstruction images display a dark, biocytin-filled cell on a light background. The maximum intensity projections are constructed from inverted and contrast-enhanced versions of the morphology images, resulting in a light cell on a dark background.
- Find projection image IDs for layer 4 spiny cell (Specimen 313862022):
- Download a projection image from its ID
- Find all images used for reconstruction for a layer 4 spiny cell (Specimen 313862022)
- Download an image from the image stack
- Find all cells with morphological reconstructions
- Find the reconstruction file for one of those cells
- Download the reconstruction file
- Download all of the morphology features for Scnn1a cell 313862022
Single Cell Neuronal Models
The Allen Cell Types Database contains two types of neuronal models: perisomatic biophysical models and generalized leaky integrate-and-fire (GLIF) models. These models attempt to mathematically reproduce a cell's recorded response to a current injection. The perisomatic biophysical models take into account dendritic morphological structure, whereas GLIF models are simple point neuron models which represent the neuron as a single compartment.
There are five levels of GLIF models with increasing levels of complexity. The most basic model is a simple leaky integrate-and-fire equation. More advanced GLIFs attempt to model variable spike threshold, afterspike currents, and threshold adaptation.
1 Leaky Integrate and Fire (LIF)
Standard circuit representation of a resistor and capacitor in parallel with a leaky membrane.
2 LIF + Reset Rules (LIF-R)
LIF with biologically-derived threshold and voltage reset rules in addition to a biologically derived threshold decay.
3 LIF + Afterspike Currents (LIF-ASC)
LIF with spike-induced currents to model long-term effects of voltage-activated ion channels.
4 LIF-R + Afterspike Currents (LIF-R-ASC)
LIF with additional Reset Rules and Afterspike Currents.
5 LIF-R-ASC + Threshold Adaptation (LIF-R-ASC-A)
All of the above, with an additional voltage-dependent component of threshold.
Models with active conductances at the soma and passive dendritic morphology based on full 3D reconstruction.
See the perisomatic biophysical and GLIF technical whitepapers for more details on how these models were created.
A cell's electrophysiology page displays all available models. Choose a model to see its simulated response to all stimuli presented to the cell. If the required sweeps are available, two model evaluation metrics are computed per model:
Explained Variance Ratio
Noise 2 (at least two)
For "Noise 2" sweeps, the ratio of the mean explained variance of model spike times vs. experimental spike times to experiment-only mean explained variance.
Sweeps used for biophysical model fitting
Average absolute z-score comparing average spike features computed on model responses for sweeps used for fitting to spike features computed on experimental responses.
After selecting a model for display, the models ID number and a link for downloading necessary to run the model are available. For example, the link to download model 566296565 (a LIF model for Scnn1a cell 467703703) looks like this:
All models in the Allen Cell Types Database are available for download and local execution via the Allen Software Development Kit (SDK). The biophysical models require NEURON to be run, which the SDK helps to configure. The GLIF simulation module comes as part of the Allen SDK. Please visit the Allen SDK page for more details.
- Find all cells with perisomatic biophysical models
- Find all cells with GLIF models
- Download all GLIF models for Scnn1a-Tg3 cell 469803127
- Download the files necessary to run simple LIF model 566302806
- Allen SDK documentation for how to run simple LIF model 566302806
- Link to the electrophysiology page for Scnn1a-Tg3 cell 469803127