clusters.rename: Rename clusters from numeric to cell name

View source: R/clusters.rename.R

clusters.renameR Documentation

Rename clusters from numeric to cell name

Description

It renames the numerical clusters detected through FlowCT::fsom.clustering() to specific cell populations identified by flow cytometry user.

Usage

clusters.rename(x, cluster, name)

Arguments

x

Vector with numeric values corresponding to clusters detected with FlowCT::fsom.clustering().

cluster

Numeric vector or column name with numeric values for replacing.

name

Cell population names to replace numeric values from cluster column.

Examples

## Not run: 
# option 1  
head(replace_data)
 #   original_cluster new_cluster
 # 1 1                debris     
 # 2 2                lymphocytes
 # 3 3                monocytes
 # 4 4                lymphocytes
 # 5 5                eosinophils
 # 6 6                eosinophils
fcs$SOM_named <- clusters.rename(fcs$SOM, cluster = replacedata$original_cluster, 
		name = replacedata$new_cluster)

# option 2
fcs$SOM_named <- clusters.rename(fcs$SOM, cluster = 1:6, 
		name = c("debris", "lymphocytes", "monocytes", "lymphocytes", "eosinophils", 
		"eosinophils"))

## End(Not run)

jgarces02/FlowCT documentation built on March 28, 2023, 12:42 p.m.