plot_abundance: Plot clonotype abundance

Description Usage Arguments Value

View source: R/plots_SCE.R

Description

Plot clonotype abundance

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
plot_abundance(
  SCE_in,
  clonotype_col = "cdr3_nt",
  cluster_col = NULL,
  calc_abundances = FALSE,
  plot_type = "bar",
  yaxis = "percent",
  plot_colors = NULL,
  plot_lvls = NULL,
  label_col = "cdr3",
  n_clonotypes = 5,
  color_col = NULL,
  label_aes = list(),
  facet_rows = 1,
  facet_scales = "free_x",
  ...
)

Arguments

SCE_in

Seurat object containing V(D)J data

clonotype_col

meta.data column containing clonotype IDs to use for calculating clonotype abundance

cluster_col

meta.data column containing cluster IDs to use for grouping cells when calculating clonotype abundance

calc_abundances

Default: FALSE. Set to TRUE if the clonotype abundances are not part of the SCE_in yet.

plot_type

Type of plot to create, can be 'bar' or 'line'

yaxis

Units to plot on the y-axis, either "frequency" or "percent"

plot_colors

Character vector containing colors for plotting

plot_lvls

Character vector containing levels for ordering

label_col

meta.data column containing labels to use for plot

n_clonotypes

Number of clonotypes to label

color_col

meta.data column to use for coloring bars

label_aes

Named list providing additional label aesthetics (color, size, etc.)

facet_rows

The number of facet rows. Use this argument if plot_type = 'bar'

facet_scales

If plot_type = 'bar', this argument passes a scales specification to facet_wrap, can be "fixed", "free", "free_x", or "free_y"

...

Additional arguments to pass to geom_line

Value

ggplot object


friedue/SCEdjvdj documentation built on April 21, 2021, 7:54 a.m.