update_dendrogram_with_nomenclature: Add nomenclature annotations to dendrogram

View source: R/required_scripts.R

update_dendrogram_with_nomenclatureR Documentation

Add nomenclature annotations to dendrogram

Description

This code will take the information from the table above and add it to the initial dendrogram object. When plotted the only visible difference will be that the new cell set alias names (if any) will show up to replace the n## labels from the initial plot. However, ALL of the meta-data read in from the table will be added to the relevant nodes or leafs.

Usage

update_dendrogram_with_nomenclature(
  dend,
  cell_set_information,
  current_label = "original_label",
  new_label = "cell_set_preferred_alias"
)

Arguments

dend

dendrogram of cell types to annotate

cell_set_information

any table or data frame with information to annotate a dendrogram, typically the nomenclature table output from 'build_nomenclature_table'

current_label

column name in 'cell_set_information' that contains dendrogram labels (default of "original_label" should be retained if running this function after 'build_nomenclature_table')

new_label

column name holding desired dendrogram labels after running script (default "cell_set_preferred_alias" )

Value

An annotated dendrogram with updated labels


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