get_topclonotypes: get_topclonotypes

View source: R/summary.R

get_topclonotypesR Documentation

get_topclonotypes

Description

Return a table of clonal expansion. 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

Usage

get_topclonotypes(
  input,
  clonotype_by,
  group_by = NULL,
  patient_by = NULL,
  sample_by = NULL,
  ntop = 20,
  split_by = NULL,
  chain_type = NULL
)

Arguments

input

Seurat Object or ExpressionSet

clonotype_by

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

group_by

meta.data or pData column names for grouping specific clonotype frequencies, if multiple columns are entered, columns are merged by paste

patient_by

meta.data or pData column name for patient, ignored if split_by is not NULL

sample_by

meta.data or pData column name for sample, ignored if split_by is not NULL

ntop

the number of top clonotypes to return

split_by

split tables by

chain_type

subset table to chain type

Examples

# library
library(Seurat)

# analyzed data with tcr
data("seu_analyzed")

# get clonotypes ordered by frequency
get_topclonotypes(seu_analyzed, clonotype_by = "cdr3s_aa", group_by = "seurat_clusters")
get_topclonotypes(seu_analyzed, clonotype_by = "cdr3s_aa", group_by = "seurat_clusters", ntop = 10)

# additional commands with possible uses
get_topclonotypes(seu_analyzed, clonotype_by = "CTaa", patient_by = "Patient", sample_by = "Sample")
get_topclonotypes(seu_analyzed, clonotype_by = "CTaa", group_by = "Sample")


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