clonesizeDistribution {scRepertoire} | R Documentation

## Hierarchical clustering of clonotypes on clonotype size and Jensen-Shannon divergence

### Description

This functionn produces a heirachial clustering of clonotypes by sample using the Jensen-Shannon distance and discrete gamma-GPD spliced threshold model in the [powerTCR R package] (https://bioconductor.org/packages/devel/bioc/html/powerTCR.html). Please read and cite PMID: 30485278 if using the function for analyses. If a matrix output for the data is preferred set exportTable = TRUE.

### Usage

    clonesizeDistribution(
      df,
      cloneCall = "gene+nt",
      method = "ward.D2",
      exportTable = FALSE
    )

### Arguments

`df` | The product of combineTCR(), combineBCR(), or expression2List().
`cloneCall` | How to call the clonotype - CDR3 gene (gene), CDR3 nucleotide (nt), CDR3 amino acid (aa), or CDR3 gene+nucleotide (gene+nt).
`method` | The clustering paramater for the dendrogram.
`exportTable` | Returns the data frame used for forming the graph.

### Value

ggplot dendrogram of the clone size distribution

### 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")
    clonesizeDistribution(combined, cloneCall = "gene+nt", method="ward.D2")

[Package scRepertoire version 1.4.0 Index]