get_tree: Create a dataframe of hierarchical region cell count data.

View source: R/get_tree.R

get_treeR Documentation

Create a dataframe of hierarchical region cell count data.

Description

Generates a dataframe of showing nested relationship of brain regions, their cell counts, and their cell count densities. Output can also be used for simple plots showing nested heirarchical relationships, such as treemaps. As a convention, higher level columns will indicate child regions while lower level columns indicate parent regions.

Usage

get_tree(dataset, rois = c("CH", "BS"), base = "grey", subtract = TRUE)

Arguments

dataset

(required) Whole brain dataset returned as an output of the forward_warp() function.

rois

(optional, default = c("CH", "BS")) The acronyms of the regions of interest. Acronyms must follow Allen Brain Atlas abbreviation standards.

base

(optional, default = "grey") The base parent region you want subregions traced back to. This will be stored in the first hierarchy level (col 1) of the dataframe. Note, base region MUST be a lower level parent of all rois provided to the rois argument.

subtract

(optional, default = TRUE) Subtract the cell counts of all child regions from parent regions. All counts number then uniquely belong to a single acronym.

Value

Returns tree, a dataframe storing the hierarchical relationship between subregions. Cell counts, region colors, and cell count density is also stored. Descriptions of columns of the dataframe are below:

  • Col 1-10. Each higher level column to the right is a sublevel of parent column to the left.

  • Col 11. Cell counts of regions

  • Col 12. ABA color


jdknguyen/SMART documentation built on May 30, 2022, 10:51 p.m.