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

View source: R/repertoire.r

occupiedscRepertoireR Documentation

Visualize the number of single cells with clonotype frequencies by cluster

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 Drs. Carmona and Andreatta and their work with ProjectTIL.

Usage

occupiedscRepertoire(
  Combined,
  group.by = NULL,
  cloneTypes = c(Small = 0.001, Medium = 0.01, Large = 0.1, Hyperexpanded = 1),
  proportion = TRUE,
  label = TRUE,
  facet.by = NULL,
  na.include = FALSE,
  exportTable = FALSE
)

Arguments

proportion

Convert the stacked bars into relative proportion

label

Include the number of clonotype in each category by x.axis variable

facet.by

The column header used for faceting the graph

na.include

Visualize NA values or not.

exportTable

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

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

Value

Stacked bar plot of counts of cells by clonotype frequency group

Examples

Combined <- getCombinedDataSet(TCR, Mice.sub2)
occupiedscRepertoire(Combined,group.by = 'clusters', cloneTypes=c(Small = 0.001, Medium = 0.01, Large = 0.1, Hyperexpanded = 1),proportion = TRUE,
 label = TRUE,facet.by = NULL, na.include = FALSE,exportTable = FALSE)

JuanXie19/LRT documentation built on April 14, 2025, 7:09 p.m.