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:

NWB Download electrophysiology data in Neurodata Without Borders (NWB) format
Download computed electrophysiology features
Download images of 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

Experimental data from Allen Cell Types Database is associated with the "Mouse Cell Types" Product.

Each brain specimen is sectioned in the coronal plane at section thickness of 350 µm. The sections are then hemisected along the midline and a single cell in the hemisected tissue is targeted for electrophysiological recording and biocytin fill to visualize the cell morphology. Each cell is represented as Specimen object.

Each cell Specimen is associated with an anatomical Structure and CellSomaLocation record containing the coordinate of the cell in the Common Coordinate Framework and a normalized depth between pia (value of 0) and white matter (value of 1) surfaces.

Each cell Specimen is also associated with two SpecimenTags describing the “dendrite type” (spiny, aspiny, sparsely spiny) and the “apical dendrite” (intact, truncated, n/a).

See whitepapers for detailed experimental and annotation information.

From the API, detailed information about cells can be obtained using RMA queries.

Examples:

Electrophysiology

All cells in the Allen Cell Types Database have electrophysiological recordings of responses to stimuli from a common set of current injection protocols. Please see the (TODO) electrophysiology technical white paper 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

Description

Short Square

 

Short Square - Hold -60mV

 

Short Square - Hold -70mV

 

Short Square - Hold -80mV

 

Short Square - Triple

 

Long Square

 

Square - 2s Suprathreshold

 

Square - 0.5ms Subthreshold

 

Ramp

 

Ramp to Rheobase

 

Noise 1

 

Noise 2

 

Test

 


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:

http://api.brain-map.org/api/v2/data/query.xml?
criteria=model::Specimen
,rma::criteria,[id$eq320654829]
,rma::include,ephys_result(well_known_files(well_known_file_type[name$eqNWB]))

Please see the Allen SDK pages (LINKS TODO) on perisomatic biophysical models and generalized leaky integrate-and-fire models for details showing how to download these files in the context of neuronal model simulation.

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:

Feature

Description

Upstroke:downstroke ratio

 

Fast AP trough

 

FI curve slope

 

Rheobase

 

Ramp AP Time

 

Resting Vm

 

Please read the electrophysiology technical white paper (TODO) for a complete list of computed features and their interpretations.

Use this query to download the features computed for Scnn1a cell specimen 467703703:

http://api.brain-map.org/api/v2/data/query.xml?
criteria=model::EphysFeature
,rma::criteria,[specimen_id$eq467703703]

Morphology

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.  Please see the morphology technical white paper for more details (TODO).

The API provides programmatic access to the microscopy images used for reconstruction, axis-oriented projections of those images, and morphological reconstructions. Example queries:

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:

Feature Name

Description

Max Euclidean Distance

 

Number of Stems

 

Number of Bifurcations

 

Average Contraction

 

Parent:Daughter

 

For a complete list of computed morphological features, please see the morphology technical white paper (TODO).

To download all of the morphology features for Scnn1a cell 313862022:

http://api.brain-map.org/api/v2/data/query.xml?
criteria=model::NeuronReconstruction
,rma::criteria,[specimen_id$eq313862022]

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 rely strictly on the cell's stimulus and response. 

There are five types of GLIF models with varying 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. 

Model Name

Description

Biophysical, perisomatic

 

1 Leak Integrate and Fire (LIF)

 

2 LIF + Reset Rules (LIF-R)

 

3 LIF + Afterspike Currents (LIF-ASC)

 

4 LIF-R + Afterspike Currents (LIF-R-ASC)

 

5 LIF-R-ASC + Threshold Adaptation (LIF-R-ASC-A)

 

Please see the perisomatic biophysical and GLIF technical white papers for more details on how these models were created (TODO).
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:

Metric Name

Required Sweeps

Description

Explained Variance Ratio

Noise 2 (at least two)

 

Feature Average

Sweeps used for biophysical model fitting

 

* rheobase is defined as the Long Square amplitude

All models in the Allen Cell Types Database are available for download and local execution via theAllen 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. 

To download all of the configuration files necessary to run model 472427473:

 http://api.brain-map.org/neuronal_model/download/472427473