Learn R Programming

Platypus (version 3.6.0)

VDJ_clonal_barplot: Function to create stacked barplots to visualize clonal expansion per repertoire directly from a VDJ matrix (either from the minimal_VDJ() or VDJ_GEX_matrix())

Description

Function to create stacked barplots to visualize clonal expansion per repertoire directly from a VDJ matrix (either from the minimal_VDJ() or VDJ_GEX_matrix()).

Usage

VDJ_clonal_barplot(
  VDJ,
  counts.to.use,
  group.by,
  expanded.colors,
  non.expanded.color
)

Value

Returns a list with a ggplot for each group.by element.

Arguments

VDJ

VDJ matrix (either from the minimal_VDJ() or VDJ_GEX_matrix()

counts.to.use

The column name in the VDJ matrix of the clonotypes you want to use. Defaults to "clonotype_id".

group.by

The column name in the VDJ matrix on which you want to seperate the repertoire plots. If the entire VDJ matrix is one repertoire, this argument should be "none" or empty.

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"

Examples

Run this code
out <- VDJ_clonal_barplot(Platypus::small_vgm[[1]],
counts.to.use = "clonotype_id_10x",group.by = "sample_id")

Run the code above in your browser using DataLab