vizVgenes {scRepertoire} | R Documentation

## Visualizing the distribution of TCR V gene usage

### Description

This function will allow for the visualizing the distribution ofthe V-genes of the TCR by categroical variables.

### Usage

    vizVgenes(
      df,
      TCR = "TCR1",
      facet.x = "sample",
      facet.y = NULL,
      fill = NULL,
      exportTable = FALSE
    )

### Arguments

`df` | The product of combineTCR(), combineBCR(), or expression2List().
`TCR` | Which TCR chain to use, TCR1 = TCRA or TCR2 = TCRB
`facet.x` | Categorical variable which to seperate by along x-axis
`facet.y` | Categorical variable which to seperate by along y-axis
`fill` | Categorical variable which to add color to bar chart
`exportTable` | Returns the data frame used for forming the graph.

### Value

ggplot bar diagram of vgene counts

### Examples

    #Making combined contig data
    x <- contig_list
    combined <- combineTCR(x, rep(c("PX", "PY", "PZ"), each=2),
    rep(c("P", "T"), 3), cells ="T-AB")

    vizVgenes(combined, TCR = "TCR1", facet.x = "sample")

[Package scRepertoire version 1.0.0 Index]