Learn R Programming

Seurat (version 2.1.0)

SetClusters: Set Cluster Assignments

Description

Easily set the cluster assignments using the output of GetClusters() --- a dataframe with cell names as the first column and cluster assignments as the second.

Usage

SetClusters(object, clusters = NULL)

Arguments

object

Seurat object

clusters

A dataframe containing the cell names and cluster assignments to set for the object.

Value

Returns a Seurat object with the identities set to the cluster assignments that were passed.

Examples

Run this code
# NOT RUN {
pbmc_small
# Get clusters as a dataframe with GetClusters.
clusters <- GetClusters(object = pbmc_small)
# Use SetClusters to set cluster IDs
pbmc_small <- SetClusters(object = pbmc_small, clusters = clusters)

# }

Run the code above in your browser using DataLab