find_children: Find smaller areas (children) of a larger brain area...

Description Usage Arguments Examples

View source: R/manage_aba_atlas.R

Description

The Allen Brain Atlas is organized with a tree structure, where smaller brain areas (e.g. nuclei) are grouped into larger brain areas. Given a particular (parent) acronym, this function finds related sub-brain areas, which are returned in a string. The function also returns children that are parents themselves, but it does not return the smallest categorization of brain areas. To find the smallest categorizations, use the find_all_children().

If the parent acronym provided is not present in atlas, the function returns an empty string.

Usage

1
find_children(atlas, parent)

Arguments

atlas

Data frame with (at least) two character variables: one for the parents (parent_acronym), and one for the children (acronym).

parent

Acronym of the parent brain area. It must be a character vector of length 1.

Examples

1
2
3
4
5
6
7
x <- data.frame(
parent_acronym = c(rep("main_parent", 3), rep("child_with_children", 2), "grandchild_with_children"),
acronym = c("main_parent", "child_with_children", "child_without_children", "grandchild_with_children", "grandchild_without_children", "great_grandchild"))
this_parent <- "child_with_children"

find_children(atlas = x, parent = this_parent)
# to return also "great_grandchild", you find_all_children

valeriabonapersona/abc4d documentation built on Dec. 23, 2021, 2:09 p.m.