StartracDiversity {scRepertoire} | R Documentation

## Diversity indices for single-cell RNA-seq

### Description

This function utilizes the Startrac R package derived from [PMID: 30479382](https://pubmed.ncbi.nlm.nih.gov/30479382/) Required to run the function, the "type" variable needs to include the difference in where the cells were derived. The output of this function will produce 3 indices: expa (clonal expansion), migra (cross-tissue migration), and trans (state transition). In order to understand the underlying analyses of the outputs please read and cite the linked manuscript.

### Usage

    StartracDiversity(
      sc,
      type = "Type",
      sample = NULL,
      by = "overall",
      exportTable = FALSE
    )

### 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".
`type` | The column header in the meta data that gives the where the cells were derived from, not the patient sample IDs
`sample` | The column header corresponding to individual samples or patients.
`by` | Method to subset the indices by either overall (across all samples) or by specific group
`exportTable` | Returns the data frame used for forming the graph

### Value

ggplot object of Startrac diversity metrics

[Package scRepertoire version 1.2.0 Index]