View source: R/required_scripts.R
build_nomenclature_table | R Documentation |
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.
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"
)
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. |
a list containing two dendrogram versions and the initial nomenclature table:
# Describe is optional and can go after and param or return
Initial nomenclature table where rows correspond to cell sets (e.g., dendrogram leaves and nodes) and columns correspond to standard CCN columns.
A slightly clean version of the input 'dend'.
A dendrogram updated with node labels. This is useful to visualize when manually annotating dendrograms.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.