clonalDiversity: Examine the clonal diversity of samples

Description Usage Arguments Value Examples

View source: R/diversity.R

Description

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

Usage

1
2
3
4
5
6
clonalDiversity(
  df,
  cloneCall = "gene+nt",
  group = "samples",
  exportTable = FALSE
)

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

Value

ggplot of the diversity of clonotype sequences across list

Examples

1
2
3
4
5
#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")

scRepertoire documentation built on Nov. 8, 2020, 7 p.m.