getCirclize: Generate data frame to be used with circlize R package to...

View source: R/getCircilize.R

getCirclizeR Documentation

Generate data frame to be used with circlize R package to visualize clones as a chord diagram.

Description

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.

Usage

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

Arguments

sc.data

The single-cell object after combineExpression.

cloneCall

How to call the clone - VDJC gene (gene), CDR3 nucleotide (nt), CDR3 amino acid (aa), VDJC gene + CDR3 nucleotide (strict) or a custom variable in the data.

group.by

The group header for which you would like to analyze the data.

proportion

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

Value

A data frame of shared clones between groups formated for chordDiagram

Author(s)

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")



ncborcherding/scRepertoire documentation built on April 27, 2024, 8:34 p.m.