Skip to end of metadata
Go to start of metadata

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 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:

  • All cells in the "Mouse Cell Types" Product
    http://api.brain-map.org/api/v2/data/query.xml?criteria=
    model::Specimen
    ,rma::criteria,[is_cell_specimen$eq'true'],products[name$eq'Mouse Cell Types']
    ,rma::include,structure,donor(transgenic_lines),specimen_tags,cell_soma_locations
    ,rma::options[num_rows$eqall]
    
  • All cells tagged with 'dendrite type - spiny'
    http://api.brain-map.org/api/v2/data/query.xml?criteria=
    model::Specimen
    ,rma::criteria,[is_cell_specimen$eq'true'],products[name$eq'Mouse Cell Types']
    ,rma::include,
    structure,donor(transgenic_lines),specimen_tags[name$eq'dendrite type - spiny'],cell_soma_locations
    ,rma::options[num_rows$eqall]
    
  • All cells annotated to be in layer 4
    http://api.brain-map.org/api/v2/data/query.xml?criteria=
    model::Specimen
    ,rma::criteria,[is_cell_specimen$eq'true'],products[name$eq'Mouse Cell Types']
    ,rma::include,structure[name$il'*layer 4*'],donor(transgenic_lines),specimen_tags,cell_soma_locations
    ,rma::options[num_rows$eqall]
    

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

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.

Long Square

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).

Ramp

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.

Noise 1

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 2

Noise 1, with a different random seed

Test

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:

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

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.

Rheobase

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.

Resting Vm

Average resting potential across all "Long Square" sweeps.

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).

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).

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

Examples:

  • Find all cells with morphological images
http://api.brain-map.org/api/v2/data/query.xml?
criteria=model::Specimen
,rma::criteria,[is_cell_specimen$eq'true'],data_sets
  • Find projection image IDs for layer 4 spiny cell (Specimen 313862022):
http://api.brain-map.org/api/v2/data/query.xml?
criteria=model::ProjectionImage
,rma::criteria,[specimen_id$eq313862022]

  • Download an image from its ID
     
  • Find all images used for reconstruction for a layer 4 spiny cell (Specimen 313862022)
    http://api.brain-map.org/api/v2/data/query.xml?criteria=model::SubImage,rma::criteria,data_set[specimen_id$eq313862022]
    
  • Download an image from the image stack
    http://api.brain-map.org/api/v2/section_image_download/321549675
    
  • Find all cells with morphological reconstructions
    http://api.brain-map.org/api/v2/data/query.xml?
    criteria=model::Specimen
    ,rma::criteria,[is_cell_specimen$eq'true'],neuron_reconstructions
    
  • Find the reconstruction file for one of those cells
    http://api.brain-map.org/api/v2/data/query.xml?
    criteria=model::NeuronReconstruction
    ,rma::criteria,[specimen_id$eq313862306],rma::include,well_known_files
    
  • Download the reconstruction file
    http://api.brain-map.org/api/v2/well_known_file_download/475125282
    
  • 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

Models with active conductances at the soma and morphology based on full 3D reconstruction.

1 Leaky Integrate and Fire (LIF)

Membrane potential evolves as a function of neuron properties and external current and is reset to a fixed value if it surpasses a fixed threshold.

2 LIF + Reset Rules (LIF-R)

LIF with biologically-defined afterspike threshold decay rules.

3 LIF + Afterspike Currents (LIF-ASC)

LIF with spike-induced currents to model long-term effects of fast 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.

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

 

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 472427473 (a LIF model for Scnn1a cell 467703703) looks like this:

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

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.

Examples:

  • Find all cells with perisomatic biophysical models
http://api.brain-map.org/api/v2/data/query.xml?
criteria=model::Specimen
,rma::criteria,neuronal_models(neuronal_model_template[name$eq'Biophysical - perisomatic'])
  • Find all cells with GLIF models
http://api.brain-map.org/api/v2/data/query.xml?
criteria=model::Specimen,rma::criteria,neuronal_models(neuronal_model_template[description$il'*GLIF*'])
  • Download all GLIF models for Scnn1a-Tg3 cell 469803127
http://api.brain-map.org/api/v2/data/query.xml?
criteria=model::Specimen,rma::criteria,[id$eq469803127]
,rma::include,neuronal_models(neuronal_model_template[name$il'*LIF*'])
  • Download the files necessary to run simple LIF model 472423251
 http://api.brain-map.org/neuronal_model/download/472423251
  • Allen SDK documentation for how to run simple LIF model 472423251
 http://sdk.brain-map.org/glif_models.html#downloading-glif-models
  • Link to the electrophysiology page for Scnn1a-Tg3 cell 469803127
 http://celltypes.brain-map.org/mouse/experiment/electrophysiology/469803127
  • No labels