View source: R/required_scripts.R
annotate_nomenclature_from_metadata | R Documentation |
Automatically annotate existing cell sets and add new cell sets as needed based on existing metadata columns, for metadata that represent groups of cell types (e.g., something like "sex" would not be appropriate, but "broad class" would). More specifically, this function will: 1. Identify all values corresponding to that column 2. For each value it (i) finds all relevant dendrogram labels, (ii) generates the corresponding cell set label, and (iii) cross-references this label with the existing table 3. If the label exists, the new metadata is added to the requested column in the nomenclature table, and if not it will generate a new entree in the table and then add the requested metadata 4. Repeat this processes for all relevant metadata columns and associated values
annotate_nomenclature_from_metadata(
cell_set_information,
metadata,
metadata_columns,
metadata_order = NULL,
annotation_columns = rep("cell_set_preferred_alias", length(metadata_columns)),
cluster_column = "cluster_label",
append = TRUE,
duplicate_annotations = NULL
)
cell_set_information |
the nomenclature table output from 'build_nomenclature_table' or related/downstream functions |
metadata |
cell or cell type metadata table that includes the columns to annotate |
metadata_columns |
a character vector of column names corresponding to the metadata fields to add annotations |
metadata_order |
optional character vector of column names indicating the order to include metadata. If supplied, must be the same lengthh as "metadata_columns" |
annotation_columns |
character vector indicating which column to annotate for each metadata column supplied (default is is "cell_set_preferred_alias") |
cluster_column |
column name in "metadata" that corresponds to values in the "cell_set_preferred_alias" column of "cell_set_information" |
append |
If TRUE (default), it will append info; if FALSE, it will skip cases where there is already an entry |
duplicate_annotations |
either NULL (default) or a character indicating which column to append annotations if the annotation_columns column already has an entry. Only used if append=TRUE. |
An updated nomenclature table with new cell sets and updated annotations based on requested metadata
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.