seu.Make.Cl.Label.per.cell | R Documentation |
Generates labels for each cell by combining gene names and cluster IDs. This function takes a named vector, typically representing top genes for clusters (values) and their corresponding cluster IDs (names), along with a vector of cell IDs. It then creates a new vector where each cell is labeled with its top gene and cluster ID in the format "GeneName.ClusterID".
seu.Make.Cl.Label.per.cell(TopGenes, clID.per.cell)
TopGenes |
A named vector with gene names as values and cluster IDs as names, representing the top or defining gene for each cluster. |
clID.per.cell |
A vector of cluster IDs for each cell, used to match each cell with its
corresponding top gene from |
A vector where each element corresponds to a cell labeled with both its defining gene name and cluster ID, in the format "GeneName.ClusterID".
## Not run:
if (interactive()) {
# Assuming `TopGenes.Classic` is a named vector of top genes and cluster IDs,
# and `metaD.CL.colname` is a column in metadata with cluster IDs per cell
cellLabels <- seu.Make.Cl.Label.per.cell(
TopGenes = TopGenes.Classic,
clID.per.cell = getMetadataColumn(ColName.metadata = metaD.CL.colname)
)
# `cellLabels` now contains labels for each cell in the format "GeneName.ClusterID"
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.