compareClonotypes {scRepertoire} | R Documentation

## Demonstrate the difference in clonal proportion between clonotypes

### Description

This function produces an alluvial or area graph of the proportion of the indicated clonotypes for all or selected samples. Clonotypes can be selected using the clonotypes parameter with the specific sequence of interest or using the number parameter with the top n clonotypes by proportion to be visualized. If multiple clonotypes have the same proportion and are within the selection by the number parameter, all the clonotypes will be visualized. In this instance, if less clonotypes are desired, reduce the number parameter.

### Usage

    compareClonotypes(
      df,
      cloneCall = "gene+nt",
      samples = NULL,
      clonotypes = NULL,
      numbers = NULL,
      graph = "alluvial",
      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).
`samples` | The specific samples to isolate for visualization.
`clonotypes` | The specific sequences of interest.
`numbers` | The top number clonotype sequences.
`graph` | The type of graph produced, either "alluvial" or "area".
`exportTable` | Returns the data frame used for forming the graph.

### Value

ggplot of the proportion of total sequencing read of selecting clonotypes

### 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")
    compareClonotypes(combined, numbers = 10,
    samples = c("PX_P", "PX_T"), cloneCall="aa")

[Package scRepertoire version 1.2.0 Index]