VDJ_clonal_barplot: Function to create stacked barplots to visualize clonal...

View source: R/VDJ_clonal_barplot.R

VDJ_clonal_barplotR Documentation

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
)

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"

Value

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

Examples

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


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