clonalDiversity {scRepertoire} | R Documentation

## Examine the clonal diversity of samples

### Description

This function calculates traditional measures of diversity - Shannon, inverse Simpson, Chao1 index, and abundance-based coverage estimators (ACE) by sample or group. The function automatically down samples the diversity metrics using 100 boot straps The group paramter can be used to condense the individual samples. If a matrix output for the data is preferred, set exportTable = TRUE.

### Usage

    clonalDiversity(
      df,
      cloneCall = "gene+nt",
      group = "samples",
      exportTable = FALSE,
      n.boots = 100
    )

### Arguments

`df` | The product of combineTCR(), combineBCR(), or expression2List().
`cloneCall` | How to call the clonotype - CDR3 gene (gene), CDR3 nucleotide (nt) or CDR3 amino acid (aa), or CDR3 gene+nucleotide (gene+nt).
`group` | The column header for which you would like to analyze the data.
`exportTable` | Exports a table of the data into the global environment in addition to the visualization
`n.boots` | number of bootstraps to downsample in order to get mean diversity

### Value

ggplot of the diversity of clonotype sequences across list

### Author(s)

Andrew Malone, Nick Borcherding

### 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")
    clonalDiversity(combined, cloneCall = "gene")

[Package scRepertoire version 1.4.0 Index]