Mouse Connectivity

The Allen Mouse Brain Connectivity Atlas consists of high-resolution images of axonal projections targeting different anatomic regions or various cell types using Cre-dependent specimens. Each data set is processed through an informatics data analysis pipeline to obtain spatially mapped quantified projection information.

This page describes how to use the SDK to access experimental projection data and metadata. For more information, please visit the Connectivity Atlas home page and the API documentation

Structure-Level Projection Data

All AAV projection signal in the Allen Mouse Connectivity Atlas has been registered to the expert-annotated Common Coordinate Framework (CCF) and summarized to structures in the adult mouse structure ontology. Most commonly used for analysis are measures of the density of projection signal in all brain areas for every experiment. This data is available for download and is described in more detail on the structure unionizes page.

Voxel-Level Projection Data

The CCF-registered AAV projection signal is also available for download as a set of 3D volumes for each experiment. The following data volumes are available for download:

  • projection density: sum of detected projection pixels / sum of all pixels in voxel

  • injection_fraction: fraction of pixels belonging to manually annotated injection site

  • injection_density: density of detected projection pixels within the manually annotated injection site

  • data_mask: binary mask indicating if a voxel contains valid data. Only valid voxels should be used for analysis.

Code Examples

The Mouse Connectivity Jupyter notebook has many code samples to help get started with analysis:

Mouse Connectivity Cache

The MouseConnectivityCache class saves all of the data you can download via the MouseConenctivityApi in well known locations so that you don’t have to think about file names and directories. It also takes care of knowing if you’ve already downloaded some files and reads them from disk instead of downloading them again. The following example demonstrates how to download meta data for all experiments with injections in the isocortex and download the projetion density volume for one of them:

from allensdk.core.mouse_connectivity_cache import MouseConnectivityCache

# tell the cache class what resolution (in microns) of data you want to download
mcc = MouseConnectivityCache(resolution=25)

# use the structure tree class to get information about the isocortex structure
structure_tree = mcc.get_structure_tree()
isocortex_id = structure_tree.get_structures_by_name(['Isocortex'])[0]['id']

# a list of dictionaries containing metadata for non-Cre experiments
experiments = mcc.get_experiments(file_name='non_cre.json',
                                  injection_structure_ids=[isocortex_id])

# download the projection density volume for one of the experiments
pd = mcc.get_projection_density(experiments[0]['id'])

File Formats

This section provides a short description of the file formats used for data in the Allen Mouse Connectivity Atlas.

NRRD Files

All of the volumetric data in the connectivity atlas are stored as NRRD (Nearly Raw Raster Data) files. A NRRD file consists of a short ASCII header followed by a binary array of data values.

To read these in Python, we recommend the pynrrd package. Usage is straightforward:

import nrrd

file_name = 'mouse_connectivity/experiment_644250774/projection_density_25.nrrd'
data_array, metadata = nrrd.read(file_name)