plot_heatmap_clonotypes: plot_heatmap_clonotypes

View source: R/heatmap.R

plot_heatmap_clonotypesR Documentation

plot_heatmap_clonotypes

Description

Visualize clonal expansion by heatmap. Default shows the clonal expansion of the top 20 unique clonotypes across all of a grouping variable, or the number of clones of the top 20 clonotypes per each facet by multiple grouping variables Bottom row annotation shows the total number of clones in each grouping variable

Usage

plot_heatmap_clonotypes(
  input,
  clonotype_by,
  patient_by = NULL,
  sample_by = NULL,
  group_by = NULL,
  sort_by = NULL,
  sort_id = NULL,
  ntop = 20,
  Count_limit = NULL
)

Arguments

input

Seurat Object or ExpressionSet

clonotype_by

meta.data or pData column name for clonotype ID's

patient_by

meta.data or pData column name for patient

sample_by

meta.data or pData column name for sample

group_by

What to color points by, either "UMI_sum", or meta.data or pData column name, ignored if gene is provided

sort_by

The metadata column for sorting

sort_id

The value in the metadata column for sorting

ntop

the number of top clonotypes to return

Count_limit

count limit for plot legend

Examples

# library
library(Seurat)

# analyzed data with tcr
data("seu_analyzed")

# get clonotype highlighted on embedding
plot_heatmap_clonotypes(seu_analyzed, clonotype_by = "cdr3s_aa", group_by = "seurat_clusters")
plot_heatmap_clonotypes(seu_analyzed, clonotype_by = "cdr3s_aa", group_by = "seurat_clusters", ntop = 10)

# some additional uses
plot_heatmap_clonotypes(pfizer, clonotype_by = "CTaa", patient_by = "Patient", sample_by = "Sample") # ClonotypeIDs not listed, as not directly comparable across different patients
plot_heatmap_clonotypes(pfizer, clonotype_by = "CTaa", group_by = "Sample_Type")


garber-lab/VDJChef documentation built on Aug. 30, 2022, 3:30 a.m.