occupiedscRepertoire: Visualize the number of single cells with clonotype...

Description Usage Arguments Value Examples

View source: R/seuratFunctions.R

Description

View the count of clonotypes frequency group in seurat or SCE object meta data after combineExpression(). The visualization will take the new meta data variable "cloneType" and plot the number of cells with each designation using a secondary variable, like cluster. Credit to the idea goes to Dr. Carmonia and his work with [ProjectTIL](https://github.com/carmonalab/ProjecTILs).

Usage

1
occupiedscRepertoire(sc, x.axis = "cluster", exportTable = FALSE)

Arguments

sc

The seurat or SCE object to visualize after combineExpression(). For SCE objects, the cluster variable must be in the meta data under "cluster".

x.axis

The variable in the meta data to graph along the x.axis

exportTable

Exports a table of the data into the global environment in addition to the visualization

Value

Stacked bar plot of counts of cells by clonotype frequency group

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#Getting the combined contigs
combined <- combineTCR(contig_list, rep(c("PX", "PY", "PZ"), each=2), 
rep(c("P", "T"), 3), cells ="T-AB")

#Getting a sample of a Seurat object
screp_example <- get(data("screp_example"))
sce <- suppressMessages(Seurat::UpdateSeuratObject(screp_example))
sce <- Seurat::as.SingleCellExperiment(sce)

#Using combineExpresion()
sce <- combineExpression(combined, sce)

#Using occupiedscRepertoire()
occupiedscRepertoire(sce, x.axis = "cluster")
table <- occupiedscRepertoire(sce, x.axis = "cluster", exportTable = TRUE)

scRepertoire documentation built on Nov. 8, 2020, 7 p.m.