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.
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.
The Mouse Connectivity Jupyter notebook has many code samples to help get started with analysis:
Mouse Connectivity API¶
MouseConnectivityApi class provides a Python interface
for downloading data in the Allen Mouse Brain Connectivity Atlas. The following example demonstrates how to download
meta data for all wild-type injections and the projection signal density for one experiment:
from allensdk.api.queries.mouse_connectivity_api import MouseConnectivityApi import nrrd mca = MouseConnectivityApi() # get metadata for all non-Cre experiments experiments = mca.experiment_source_search(injection_structures='root', transgenic_lines=0) # download the projection density volume for one of the experiments mca.download_projection_density('example.nrrd', experiments['id'], resolution=25) # read it into memory pd_array, pd_info = nrrd.read('example.nrrd')
Mouse Connectivity Cache¶
MouseConnectivityCache class saves all of the data you can download
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 ontology class to get the id of the isocortex structure ontology = mcc.get_ontology('ontology.csv') isocortex = ontology['Isocortex'] # 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['id'])
This section provides a short description of the file formats used for data in the Allen Mouse Connectivity Atlas.
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 = 'experiment_180435652/projection_density_25.nrrd' data_array, metadata = nrrd.read(file_name)