select_clusters: Split the immune repertoire data to clusters from single-cell...

Description Usage Arguments Value See Also Examples

Description

Given the vector of barcodes from Seurat, split the input repertoires to separate subsets following the barcodes' assigned IDs. Useful when you want to split immune repertoires by patients or clusters.

Usage

1
select_clusters(.data, .clusters, .field = "Cluster")

Arguments

.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 Idents function works.

.field

A string specifying the name of the field in the input metadata. New immune repertoire subsets will have cluster IDs in this field.

Value

A list with two elements "data" and "meta" with updated immune repertoire tables and metadata.

See Also

select_barcodes

Examples

1
2
3
4
5
6
7
8
9
## 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)

immunarch documentation built on July 2, 2020, 1:57 a.m.