occupiedscRepertoire {scRepertoire} | R Documentation |
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 Drs. Carmona and Andreatta and their work with [ProjectTIL](https://github.com/carmonalab/ProjecTILs).
occupiedscRepertoire(sc, x.axis = "cluster", exportTable = FALSE)
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 |
Stacked bar plot of counts of cells by clonotype frequency group
#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)