select_clusters | R Documentation |
Given the vector of barcodes from Seurat, splits the input repertoires to separate subsets following the barcodes' assigned IDs. Useful in case you want to split immune repertoires by patients or clusters.
select_clusters(.data, .clusters, .field = "Cluster")
.data |
List of two elements "data" and "meta", with "data" being a list of immune repertoires, and "meta" being a metadata table. |
.clusters |
Factor vector with barcodes as vector names and cluster IDs as vector elements.
The output of the Seurat |
.field |
A string specifying the name of the field in the input metadata. New immune repertoire subsets will have cluster IDs in this field. |
A list with two elements "data" and "meta" with updated immune repertoire tables and metadata.
select_barcodes
## Not run:
library(Seurat)
Idents(pbmc_small)
new_cluster_ids <- c("A", "B", "C")
new_cluster_ids <- levels(pbmc_small)
new_cluster_ids
pbmc_small <- RenameIdents(pbmc_small, new_cluster_ids)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.