alluvialClonotypes {scRepertoire} | R Documentation

## Exploring interaction of clonotypes by seurat or SCE dynamics

### Description

View the proportional contribution of clonotypes by seurat or SCE object meta data after combineExpression(). The visualization is based on the ggalluvial package, which requires the aesthetics to be part of the axes that are visualized. Therefore, alpha, facet, and color should be part of the the axes you wish to view or will add an additional stratum/column to the end of the graph.

### Usage

    alluvialClonotypes(
      sc,
      cloneCall = c("gene", "nt", "aa", "gene+nt"),
      y.axes = NULL,
      color = NULL,
      alpha = NULL,
      facet = NULL
    )

### Arguments

`sc` | The seurat or SCE object to visualize after combineExpression(). For SCE objects, the cluster variable must be in the meta data under "cluster".
`cloneCall` | How to call the clonotype - CDR3 gene (gene), CDR3 nucleotide (nt) or CDR3 amino acid (aa), or CDR3 gene+nucleotide (gene+nt).
`y.axes` | The columns that will seperate the proportional visualizations.
`color` | The column header or clonotype(s) to be highlighted.
`alpha` | The column header to have gradieted opacity.
`facet` | The column label to seperate.

### Value

Alluvial ggplot comparing clonotype distribution across selected parameters.

### 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))
    sce <- Seurat::as.SingleCellExperiment(sce)

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

    #Using alluvialClonotypes()
    alluvialClonotypes(sce, cloneCall = "gene",
    y.axes = c("Patient", "cluster"), color = "cluster")

[Package scRepertoire version 1.2.0 Index]