This function will take the meta data from the product of combineExpression() and generate a relational data frame to be used for a chord diagram. Each cord will represent the number of clone unique and shared across the multiple group.by variable. If using the downstream circlize R package, please read and cite the following manuscript. If looking for more advance ways for circular visualizations, there is a great cookbook for the circlize package.

getCirclize(
  sc.data,
  cloneCall = "strict",
  group.by = NULL,
  proportion = FALSE,
  include.self = TRUE
)

Arguments

sc.data

The single-cell object after combineExpression().

cloneCall

Defines the clonal sequence grouping. Accepted values are: gene (VDJC genes), nt (CDR3 nucleotide sequence), aa (CDR3 amino acid sequence), or strict (VDJC + nt). A custom column header can also be used.

group.by

A column header in the metadata to group the analysis by (e.g., "sample", "treatment"). If NULL, data will be analyzed by active identity.

proportion

Calculate the relationship unique clones (proportion = FALSE) or normalized by proportion (proportion = TRUE)

include.self

Include counting the clones within a single group.by comparison

Value

A data frame of shared clones between groups formatted for chordDiagram

Author

Dillon Corvino, Nick Borcherding

Examples

# Getting the combined contigs
combined <- combineTCR(contig_list, 
                        samples = c("P17B", "P17L", "P18B", "P18L", 
                                    "P19B","P19L", "P20B", "P20L"))

# Getting a sample of a Seurat object
scRep_example <- get(data("scRep_example"))
scRep_example <- combineExpression(combined, 
                                   scRep_example)

# Getting data frame output for Circlize
circles <- getCirclize(scRep_example, 
                       group.by = "seurat_clusters")