VDJ_clonal_donut: Circular VDJ expansion plots

View source: R/VDJ_clonal_donut.R

VDJ_clonal_donutR Documentation

Circular VDJ expansion plots

Description

Generate circular plots of clonal expansion per repertoire directly from the VDJ matrix of the VDJ_GEX_matrix function

Usage

VDJ_clonal_donut(
  VDJ,
  counts.to.use,
  label.size,
  not.expanded.label.vjust,
  not.expanded.label.hjust,
  total.label.vjust,
  total.label.hjust,
  expanded.colors,
  non.expanded.color
)

Arguments

VDJ

VDJ dataframe generated using the VDJ_GEX_matrix function (VDJ_GEX_matrix.output[[1]]). Plots will be made by sample and using the clonal frequencies specified by counts.to.use

counts.to.use

How to count clonotypes and cells. A column name of the VDJ matrix containing clonotype IDs. This defaults to "clonotype_id_10x", which reflects clonotypes by Cellranger in an unaltered VGM. To use counts from the VDJ_clonotype_v3 function set this parameter to the relevant column e.g. "clonotype_id_cdr.aa" or "global_clonotype_id_cdr.aa" are two examples.

label.size

Size of text labels. All parameters below are purely for graphical purposes and optional. If necessary changes should be made in small (0.1) increments. ! It is recommended to optimize these ONLY once a format for saving the plot is set.

not.expanded.label.vjust

Numeric. Regulates the vertical position of the label for non expanded cells

not.expanded.label.hjust

Numeric. Regulates the horizontal position of the label for non expanded cells

total.label.vjust

Numeric. Regulates the vertical position of the center label

total.label.hjust

Numeric. Regulates the horizontal position of the center label

expanded.colors

Character vector. Colors to use for expanded clones. Should be more than 3 for better visibility. Defaults to a "darkorchid3"-based palette.

non.expanded.color

Character. Color to use for non expanded clones. Defaults to "black"

Value

Returns a list of circular plots showing proportions of expanded clones and non-expanded clones. One plot is generated for each sample in the sample_id column

Examples

VDJ_clonal_donut(VDJ = Platypus::small_vgm[[1]])


Platypus documentation built on Oct. 18, 2024, 5:08 p.m.