build_nomenclature_table: Build initial nomenclature table from dendrogram

View source: R/required_scripts.R

build_nomenclature_tableR Documentation

Build initial nomenclature table from dendrogram

Description

Take a standard R dendrogram variable and some taxonomy metadata and generate an initial nomenclature table with one cell set corresponding to each dendrogram node and leaf, retaining leaf labels as preferred aliases.

Usage

build_nomenclature_table(
  dend,
  first_label = setNames("All", 1),
  taxonomy_id = paste0("CCN", format(Sys.time(), "%Y%m%d"), 0),
  taxonomy_author = "Unspecified",
  taxonomy_citation = "",
  structure = "neocortex",
  ontology_tag = "UBERON:0001950"
)

Arguments

dend

dendrogram of cell types to annotate

first_label

a named vector used as prefix for cell_set_label

taxonomy_id

unique accession ID for the taxonomy also used to prefix the cell sets accessions. Defaults to 'CCN[YYYYMMDD]0'. If more than one is provided (not recommended), any IDs beyond the first in the character vector are saved in a "taxonomy_alias" column.

taxonomy_author

the name of a point person for this taxonomy

taxonomy_citation

permanent data identifier corresponding to the taxonomy (or default="" if none). Ideally the DOI for a relevant publication.

structure

the location in the brain (or body) from where the data in the taxonomy was collected

ontology_tag

a standard ontology term (e.g., from UBERON) for the 'structure', or "none" if unavailable. The function 'find_ontology_terms' can be used to find one.

Value

a list containing two dendrogram versions and the initial nomenclature table:

# Describe is optional and can go after and param or return

cell_set_information

Initial nomenclature table where rows correspond to cell sets (e.g., dendrogram leaves and nodes) and columns correspond to standard CCN columns.

initial_dendrogram

A slightly clean version of the input 'dend'.

updated_dendrogram

A dendrogram updated with node labels. This is useful to visualize when manually annotating dendrograms.


AllenInstitute/CCN documentation built on April 15, 2023, 10:48 p.m.