clonalDiversity {scRepertoire} | R Documentation |
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.
clonalDiversity( df, cloneCall = "gene+nt", group = "samples", exportTable = FALSE, n.boots = 100 )
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 |
ggplot of the diversity of clonotype sequences across list
Andrew Malone, Nick Borcherding
#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")