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 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 )
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 |
ggplot of the diversity of clonotype sequences across list
#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")