clonalOverlay: Visualize distribution of clonal frequency overlaid on...

View source: R/clonalOverlay.R

clonalOverlayR Documentation

Visualize distribution of clonal frequency overlaid on dimensional reduction plots

Description

This function allows the user to visualize the clonal expansion by overlaying the cells with specific clonal frequency onto the dimensional reduction plots in Seurat. Credit to the idea goes to Drs Andreatta and Carmona and their work with ProjectTIL.

Usage

clonalOverlay(
  sc.data,
  reduction = NULL,
  cut.category = "clonalFrequency",
  cutpoint = 30,
  bins = 25,
  facet.by = NULL
)

Arguments

sc.data

The single-cell object after combineExpression.

reduction

The dimensional reduction to visualize.

cut.category

Meta data variable of the single-cell object to use for filtering.

cutpoint

The overlay cut point to include, this corresponds to the cut.category variable in the meta data of the single-cell object.

bins

The number of contours to the overlay

facet.by

meta data variable to facet the comparison

Value

ggplot object

Author(s)

Francesco Mazziotta, 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"))

#Using combineExpresion()
scRep_example <- combineExpression(combined, 
                                   scRep_example)

#Using clonalOverlay()
clonalOverlay(scRep_example, 
              reduction = "umap", 
              cutpoint = 3, 
              bins = 5) 


ncborcherding/scRepertoire documentation built on May 22, 2024, 9:43 p.m.