PlotTCellPack: Create T cell pack

View source: R/PlotTCellPack.R

PlotTCellPackR Documentation

Create T cell pack

Description

Creates a T cell pack from a gliph file, single-cell gene expression, or a combination of gliph and single-cell gene expression or gliph and T cell receptor sequencing.

Usage

PlotTCellPack(
  gliph = NULL,
  clonotype.data = NULL,
  cell.data = NULL,
  specificity.color = "#08306b",
  clonotype.color = "#4292c6",
  cell.color = "#9ecae1",
  color.gradient = "RdYlBu",
  line.color = "black",
  label.color = "black",
  label.size = 1,
  label = "none",
  legend = FALSE,
  cluster.size = 1
)

Arguments

gliph

Character vector providing the file path to convergence-groups.txt (GLIPH version 1) or cluster.txt (GLIPH version 2).The correct version will be detected automatically. Since GLIPH version 2 allows a single clonotype to be assigned to multiple specificity groups, which is incompatible with this visualization technique, TCellPack will visualize the clonotype belonging to the largest specificity group. For example, if CASSVALLGGTQYF is assigned to two specificity groups and each group has 5 and 10 other assigned clonotypes, then the visualized clonotype will be assigned to the specificity group with 10 members.

clonotype.data

Optional 2-3 column data frame named "clonotype", "frequency" and/or "data". If the second column is "frequency", then the T cell clone size is drawn proportional to its frequency. If the second column is "data", then the T cell clone is colored according the variable (discrete and continuous variables are supported).

cell.data

Optional 3 column data frame named "clonotype", "cell", and "data".

specificity.color

Character vector providing the color (single value) of the specificity circles.

clonotype.color

Character vector providing the color (single value) of the clonotype circles.

cell.color

Character vector providing the color (single value) of the cell circles.

color.gradient

Character vector providing the RColorBrewer color palette used color circles with discrete or continuous values.

line.color

Character vector providing the color (single value) of the circle borders.

label.color

Character vector providing the color (single value) of the labels.

label.size

Integer corresponding to text size of the labels.

label

Character vector indicating if labels should be displayed. Options include "none", "specificity", "clonotype", "cell", and "data".

legend

Logic indicating if legend should be displayed (TRUE) or not (FALSE).

cluster.size

Minimum number of clonotypes per specificity group.

Value

Returns a T cell circle packing plot.

Examples

# T cell clone size proportional to frequency with GLIPH specificity groups
PlotTCellPack(gliph = gliph.example, clonotype.data = clonotype.data.example, legend = TRUE)

# T cell colored by continuous variable with GLIPH specificity groups
PlotTCellPack(gliph = gliph.example, cell.data = cell.data.continuous.example, legend = TRUE)

# T cell colored by discrete variable with GLIPH specificity groups
PlotTCellPack(gliph = gliph.example, cell.data = cell.data.discrete.example, legend = TRUE)

# T cell colored by discrete variable without GLIPH specificity groups
PlotTCellPack(cell.data = cell.data.discrete.example, legend = TRUE)

# T cell colored by continuous variable without GLIPH specificity groups
PlotTCellPack(cell.data = cell.data.continuous.example, legend = TRUE)


davidcoffey/TCellPack documentation built on April 23, 2023, 11:16 p.m.