Flexible annotation atlas of the mouse brain: combining and dividing brain structures of the Allen Brain Atlas while maintaining anatomical hierarchy

A brain atlas is necessary for analyzing structure and function in neuroimaging research. Although various annotation volumes (AVs) for the mouse brain have been proposed, it is common in magnetic resonance imaging (MRI) of the mouse brain that regions-of-interest (ROIs) for brain structures (nodes) are created arbitrarily according to each researcher’s necessity, leading to inconsistent ROIs among studies. One reason for such a situation is the fact that earlier AVs were fixed, i.e. combination and division of nodes were not implemented. This report presents a pipeline for constructing a flexible annotation atlas (FAA) of the mouse brain by leveraging public resources of the Allen Institute for Brain Science on brain structure, gene expression, and axonal projection. A mere two-step procedure with user-specified, text-based information and Python codes constructs FAA with nodes which can be combined or divided objectively while maintaining anatomical hierarchy of brain structures. Four FAAs with total node count of 4, 101, 866, and 1381 were demonstrated. Unique characteristics of FAA realized analysis of resting-state functional connectivity (FC) across the anatomical hierarchy and among cortical layers, which were thin but large brain structures. FAA can improve the consistency of whole brain ROI definition among laboratories by fulfilling various requests from researchers with its flexibility and reproducibility.


Supplementary Tables
This "preprocessing" eliminates destructive brain structures (nodes) in the original resources, performed by a Python code without user inputs.
1 Combine brain structures -AObase.json -AObase_c.json This first step combines leaf-nodes to obtain a new leaf-node with larger volume while maintaining anatomical hierarchy by manually editing a JSON-formatted text file, AObase.json. Specifically, copy AObase.json and rename it to AObase_c.json. Then, to combine all descendent nodes of an inner node, delete all contents within brackets [] of a key "children" for the inner node. This would be facilitated by a text editor such as Vim (https://www.vim.org/) with functionality to jump to matching brackets. To support this further, a zoomable plot of an anatomical hierarchy in AObase_c.json is provided as an HTML file using D3.js (https://d3js.org/) (e.g. Fig. 1d). To open this HTML-file, it is recommend that "Web Server for Chrome" (github.com/kzahel/web-server-chrome) be used. It is available at the Chrome web store because direct access to a local file is prohibited for security reasons in a recent web-browser, e.g. Firefox after ver. 68.0.
2 Divide_nodes.ipynb A user-specified text-based information on -AObase_c.json -Target_ROI_IDs (brain structures) defined in AObase_c.json for dividing nodes -ExpID defined at AIBS to specify a gene of interest -Acronyms for brain structures to specify source-and target-node for axonal projection This second step divides leaf nodes based on gene expression and axonal fiber projection using a Python code with a user-specified text-based information, resulting in a flexible annotation atlas (FAA) that comprises an annotation ontology (AO) text-file and an annotation volume (AV). Five additional modifications are performed during this step: 1) assigning different IDs for homotopic nodes in the right and left side of the brain to make annotation atlas bilateral, e.g. Fig. 2c; 2) remapping IDs for brain structures in the original AO and AV to be in the range of 16-bit UINT; 3) transforming a format of the original AV from NRRD to NIfTI-1 (https://nifti.nimh.nih.gov/) because some programs such as MRIcron and SPM do not support NRRD format; 4) modifying image orientation from posterior-inferior-right (PIR) to right-anterior-superior (RAS) as is widely used in NIfTI standard; and 5) setting spatial origin of AV and AT to the bregma referring to the mouse brain atlas (Paxinos and Franklin, 2001), from that at top left corner of a volume image. This step enables specification of the location of the brain structure using mm-coordinates, as in human MRI study. There are 6 nodes located only in the midline: Medulla, behavioral state related (MY-sat), its child nodes (nucleus raphe magnus (RM), pallidus (RPA), and obscurus (RO)), vascular organ of the lamina terminalis (OV), and Edinger-Westphal nucleus (EW).
These nodes were assigned to the right side of the brain during the first step. For reconstruction of FAA, share the text-based information shown in bold face above: AObase_c.json, Target_ROI_IDs, ExpID, and Acronyms (Fiber_from and Fiber_to). AObase_c.json is updated reflecting AVbase_c_g.nrrd. Node with the maximum ID is regarded as a node with high gene expression. Acronym for a node with high or low gene expression is suffixed with "_geneH" or "_geneL". Node name for high gene expression is suffixed with "_gene+ExpID". A node is divided depending on the density of fiber innervation from a source to a destination node. Injection into the right hemisphere is used for this study. AObase_c_g.json is updated reflecting AVbase_c_g_f.nrrd. Node with the maximum ID is regarded as a node with high fiber innervation. Acronym for a node with high or low fiber innervation is suffixed with "_fiberH" or "_fiberL". Node name for high fiber innervation is suffixed with "_Fiber_from_Fiber_to". This makes an annotation volume bilateral by adding a constant value to IDs on the right side of the brain.

Supplementary
3-2 Prepare_AO_LR.ipynb -AObase_c_g_f.json -AO_L.json -AO_R.json Anatomical ontology text file is updated to be bilateral. Node name is suffixed with "_L" or "_R". This merges json files for the right and left side of the brain. Nodes "root_peri_L" and "root_peri_R" were dismissed from an annotation ontology json-file because they were not assigned to any structures such as grey, fiber tracts, or ventricular systems. Image orientation was modified from PIR to RAS by assigning s-form and q-form code in NifTI-header. The length unit was changed from micrometers to millimeters. The scale dimension unit was ×10 of naive space. ITK-snap reads only q-form, and SPM outputs only s-form. For preparation of FAAsegment without dividing nodes and without making it double-sided, skip steps 1-1 to 3-3 and perform only steps 0-1, 0-2, 3-4 to 5. In this case, rename AObase_c.json and AVbase_c.nrrd to AO_LR_wo_VC.json and AVbase_c_g_f_LR.nrrd, respectively, before performing a step 3-4. See FAA reconstruction information at https://github.com/ntakata/flexible-annotation-atlas/tree/master/FAAs/FAAsegment/.