Skip to contents

Sort string-based cluster labels numerically and refactor

Usage

sort_string_numeric_clusters(seurat_obj, cluster_col)

Arguments

seurat_obj

A Seurat object.

cluster_col

A character string. The name of the metadata column containing cluster labels as strings.

Value

The Seurat object with the specified cluster column re-factored so that its levels are sorted numerically.

Examples

# seurat_obj <- sort_string_numeric_clusters(seurat_obj, "cluster_labels")