clonalOverlay {scRepertoire} | R 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 Dr. Carmona and his work with [ProjectTIL](https://github.com/carmonalab/ProjecTILs).

### Usage

    clonalOverlay(
      sc,
      reduction = NULL,
      freq.cutpoint = 30,
      bins = 25,
      facet = NULL
    )

### Arguments

`sc` | The seurat or SCE object to visualize after combineExpression().
`reduction` | The dimensional reduction to visualize
`freq.cutpoint` | The overlay cutpoint to include, this corresponds to the Frequency variable in the single-cell objecter
`bins` | The number of contours to the overlay
`facet` | 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, rep(c("PX", "PY", "PZ"), each=2),
    rep(c("P", "T"), 3), cells ="T-AB")

    #Getting a sample of a Seurat object
    screp_example <- get(data("screp_example"))
    sce <- suppressMessages(Seurat::UpdateSeuratObject(screp_example))

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

    #Using clonalOverlay()
    clonalOverlay(sce, freq.cutpoint = 0.3, bins = 5)

[Package scRepertoire version 1.4.0 Index]