Learn about Cell Types Database API with comprehensive guides and examples from Allen Institute for Brain Science.

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.
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.
Examples:
http://api.brain-map.org/api/v2/data/query.xml?criteria=
model::ApiCellTypesSpecimenDetail
,rma::options[num_rows$eqall]
http://api.brain-map.org/api/v2/data/query.xml?criteria=
model::ApiCellTypesSpecimenDetail
,rma::criteria,[tag__dendrite_type$eq'spiny']
,rma::options[num_rows$eqall]
http://api.brain-map.org/api/v2/data/query.xml?criteria=
model::ApiCellTypesSpecimenDetail
,rma::criteria,[structure__layer$eq'4']
,rma::options[num_rows$eqall]
http://api.brain-map.org/api/v2/data/query.xml?criteria=
model::ApiCellTypesSpecimenDetail
,rma::criteria,[donor__species$il'homo sapiens']
,rma::options[num_rows$eqall]
http://api.brain-map.org/api/v2/data/query.xml?criteria=
model::ApiCellTypesSpecimenDetail
,rma::criteria,[donor__disease_state$il'epilepsy']
,rma::options[num_rows$eqall]
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 overview whitepaperfor 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 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$eqNWBDownload]))
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:
See the electrophysiology overview 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:
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:
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.
Examples:
http://api.brain-map.org/api/v2/data/query.xml?criteria=
model::ProjectionImage
,rma::criteria,[specimen_id$eq313862022]
http://api.brain-map.org/api/v2/section_image_download/323637357
http://api.brain-map.org/api/v2/data/query.xml?criteria=
model::SubImage
,rma::criteria,data_set[specimen_id$eq313862022]
http://api.brain-map.org/api/v2/section_image_download/321549675
http://api.brain-map.org/api/v2/data/query.xml?criteria=
model::ApiCellTypesSpecimenDetail
,rma::criteria,[nr__reconstruction_type$nenull]
http://api.brain-map.org/api/v2/data/query.xml?criteria=
model::NeuronReconstruction
,rma::criteria,[specimen_id$eq313862306],rma::include,well_known_files
http://api.brain-map.org/api/v2/well_known_file_download/491119517
http://api.brain-map.org/api/v2/data/query.xml?criteria=
model::NeuronReconstruction
,rma::criteria,[specimen_id$eq313862022]
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.
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:
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:
http://api.brain-map.org/neuronal_model/download/566296565
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:
http://api.brain-map.org/api/v2/data/query.xml?criteria=
model::ApiCellTypesSpecimenDetail
,rma::criteria,[m__biophys_perisomatic$gt0]
http://api.brain-map.org/api/v2/data/query.xml?criteria=
model::ApiCellTypesSpecimenDetail
,rma::criteria,[m__glif$gt0]
http://api.brain-map.org/api/v2/data/query.xml?criteria=
model::NeuronalModel
,rma::critera,[specimen_id$eq469803127],neuronal_model_template[name$il'*LIF*']
http://api.brain-map.org/neuronal_model/download/566302806
http://alleninstitute.github.io/AllenSDK/glif_models.html#downloading-glif-models
http://celltypes.brain-map.org/mouse/experiment/electrophysiology/469803127Learn about Cell Types Database Transcriptomics with comprehensive guides and examples from Allen Institute for Brain Science.
You can download processed RNA sequencing data for mouse cells and human nuclei from the RNA Seq page. You can also download from that page the reference genomes (.gtf files) used to align the raw data. For information on the methods used to obtain the data see the whitepapers located in Documentation.
The sampled brain regions and the number of samples are listed below. The data for each brain region is provided in a zip file containing the numerical data in matrix form, and separate csv files with information on the individual samples (columns) and genes (rows) in the reference genome used. Details are provided in a README.txt file.
Learn about Cell Types Database Physiology And Morphology with comprehensive guides and examples from Allen Institute for Brain Science.
In the current release of the Allen Cell Types Database, we include electrophysiological recordings from 1058 mouse cells and 279 human cells. For a subset of these cells, we also include morphology reconstructions and neuronal models. The Cell Feature Search page allows you to select cells that satisfy certain conditions and to view summary cards for those cells in a desired sorting order. From a cell’s summary card, you can then navigate to pages that contain detailed electrophysiology or morphology information for that cell.
The Cell Feature Search page is divided into three areas: 1) In the top area, you can set filters for cell properties that have discrete values; for example, you can choose to select only cells from a certain species and certain cortical layers. You can also use this page to find cells for which specific types of data are available; for example, you can select only cells for which there is not only electrophysiology data, but also morphology reconstructions and neuronal models. 2) In the middle area, you can set conditions on numerical features in certain value ranges by using a parallel coordinate plot. 3) In the bottom area, you can view the summary cards for the cells selected with the filters set in the two areas above and then choose the sorting order in which those cards are displayed.
You can set filters for cell properties or data types by checking boxes and selecting one or more items from the drop-down menus at the top of the Cell Feature Search page. (Note: the Transgenic Targeting section applies only to mouse cells, while the Donor Profile selection applies only to human cells.)

The following table describes the meaning of the properties available for filtering. For more details on the properties, see the Documentation.
You can use the parallel coordinate plot to select cells whose numerical features satisfy certain conditions. First you choose up to five different fetures from the drop-down menus under the axes, and then you select the value ranges of interest by clicking on the axes. For example, the cells selected in the figure below have Upstroke:Downstroke ratios in the range 2.0 to 5.0 and Adaptation indeces in the range 0.0 to 0.4. Each line represents a cell and the intersection with each axis indicates the value of the feature associated with that axis. Cells that do not have feature values in the selected ranges are represented by gray lines.
The “color by” drop-down menu allows you to select the feature whose values determine the line color for the cells. For example, in the figure below the lines are colored according to the Upstroke:Downstroke ratio values, so cells with higher values are represented by purple lines while cells with lower values are represented by blue lines.

The following table describes the meaning of the properties available in the drop-down manus.For more details on the properties, see the Documentation.
The cell summary cards display the results of the selections specified by the filters and the parallel coordinate plot. You can sort the cards according to any cell feature by using the drop-down menus on the top right. For example, the figure below shows cards sorted in ascending value of the Parent:Daughter cell feature.
Each card provides a short summary of cell properties as well as links to pages with detailed information on the electrophysiology data and, when available, the morphology data.

The cards display the following information. For more details on the properties, see the Documentation.
The scale on the right represents the normalized cortical depth, from white matter to pia. The histogram shows the density of neuronal processes as a function of depth.|
|Morphology link|Like to page displaying morphology properties of the cell when they are available.|
The electrophysiology details page gives you access to the available electrophysiology information for a given cell. The top section of the page provides a summary of the cell properties, while the second allows you view the traces recorded for different stimulus types. For details on the experimental methods, see the Documentation.

The following discussion explains how to use the different menus and controls on the page to view and download the electrophysiology data. If neuronal models are available for that cell, you can choose to view the simulated data on the page and also download the model parameters. See also the Data access and download section.

Select Stimulus type: A drop-down menu from which you can select the stimulus type and see the resulting Cell Response.
Different sets of stimulation waveforms were used in order to:


The morphology details page gives you access to the available morphology information for a given cell. The top section of the page provides a summary of the cell properties, while the second displays two orthogonal projections of the biocytin filled neuron and the neuron’s 3D morphology reconstruction. From this page, you can also view the stack of high resolution images used for the reconstruction. For details on the imaging and neuron reconstruction methods, see the Documentation.

The following discussion explains how to use the different menus and controls on the page to view and download the morphology data. See also the Data access and download section.

From the Projected top view, you can zoom into the picture from the on-screen navigation tools, the Keyboard Commands or using your scroll wheel. The two views of the neuron are synched so zooming in on one will also zoom the other. Clicking on “View image stack” will take you to an image viewer to view the individual images taken of this neuron.
The image viewer of the 3D neuron reconstruction allows for visualization of the reconstructed neuron using the onscreen navigation tools. Clicking “Reset” will reset the neuron to its default view. The legend in the 3D reconstruction indicates the various components of the reconstruction.
You can download both the reconstruction (as an .swc file) or the calculated morphology measurements (as an XML) from the links below the viewers.
Clicking “View Image Stack” while browsing the Morphology data will take you to our image viewer. The title bar includes the Mouse Line, the Specimen ID, the structure and the hemisphere. The “Configure” icon opens a menu that will allow you to vary the image contrast and download the individual images. The entire image stack can be navigated through using the on screen navigation tools, using the Keyboard Commands or by clicking on the Projected Side View.

Shows the current viewing resolution of the image, in microns. This value dynamically changes as you zoom in/out of the image. You can position the scale bar anywhere on the main image by dragging the scale bar by its ruler.


You can toggle the orientation of the scale bar from horizontal to vertical by clicking on the scale bar text.
Reprocessing of the data occurred for the March 2016 release so any analysis performed prior to the March 2016 release date should be performed again with the new models.
The Allen Cell Types Database contains three types of neuronal models: two 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 biophysical models take into account dendritic morphological structure, whereas GLIF models are simple point neuron models that 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.
For more detailed information on each of the models, see the Documentation.
As indicated above, you can download electrophysiology recordings, morphology image data, 3D reconstructions and neuronal model parameters using links in the electrophysiology and morphology details pages for a cell.
You can also access the data programatically and obtain sample code to run your own model simulations. For more details go to the Download page.