Computational pipeline for TRAP analysis


Briefly, after deconvolution, images of the TRAP brains were downsampled 4x, a subset were used to generate an average reference brain, individual samples were nonlinearly registered to that average reference, and then that registration was applied to the locations of individual cells to count cell numbers using an anatomical atlas in the reference space. Registration was performed on the reference (autofluorescence channel) using elastix.

Data processing pipeline for image registration, cell detection, annotation and quantification 

Data processing pipeline for image registration, cell detection, annotation and quantification 

Detailed procedures: To initialize the reference, 21 brains and their reflection across the midline axis of the image volume (total of 2*21=42 samples) were globally aligned to the Allen Brain Atlas Nissl-stained volume and then averaged. Each brain was then affine registered to the current average five times, and then resulting registered brains were again averaged to provide the input to the next iteration. Finally, all the brains were nonlinearly registered to the current reference (using an affine transformation as initialization), then averaged, for five iterations.

Each of the experimental samples was then nonlinearly registered to the average reference. Cell locations were detected in deconvolved images using Imaris (v8.1.2 Bitplane). The resulting nonlinear transformation for each brain was applied to every cell location found.  Binary mask volumes were made for each brain region in the atlas either manually drawn or from aligned Allen Brain Atlas (manually registered using 30 landmarks, using 3D-slicer) and indices from these mask volumes were used to compute the number of warped cell locations in each anatomical region. Of note, we excluded the regions where ArcTRAP is known to have strong non-tamoxifen dependent labeling (hippocampus, somatosensory and motor cortex). Also, consistent with the original paper, AcrTRAP labeling was mainly in the forebrain; therefore, although we detected sparse signal/changes in the broader midbrain/hindbrain regions, the manual validation and analysis was focused on the forebrain. Principal component analysis was performed in MATLAB on the fold-change values relative to controls of all brain regions containing non-zero values.

Manually-defined brain regions: the 3D reference brain was digitally resliced into coronal sections with 100 µm spacing. Eight regions were drawn onto every coronal section with manually identified boundaries based on Allen Brain Atlas. The 2D contours were then used to generate a 3D surface using Imaris to quantify the cell numbers for each brain region. The atlas building, registration, and analysis pipeline was implemented with custom Python scripts and are freely available at request.  

Codes for TRAP analysis can be download here