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

Description Usage Arguments Value

View source: R/get_tree.R

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

1
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:


mjin1812/SMART documentation built on Oct. 30, 2021, 7:25 p.m.