lengthContig {scRepertoire} | R Documentation

## Demonstrate the distribution of lengths filtered contigs.

### Description

This function takes the output of combineTCR(), combineBCR(), or expression2List() and displays either the nucleotide (nt) or amino acid (aa) sequence length. The sequence length visualized can be selected using the chains parameter, either the combined clonotype (both chains) or across all single chains. Visualization can either be a histogram or if scale = TRUE, the output will be a density plot. Multiple sequencing runs can be group together using the group parameter. If a matrix output for the data is preferred, set exportTable = TRUE.

### Usage

    lengthContig(
      df,
      cloneCall = "aa",
      group = NULL,
      scale = FALSE,
      chains = "combined",
      exportTable = FALSE
    )

### Arguments

`df` | The product of combineTCR(), combineBCR(), or expression2List()
`cloneCall` | How to call the clonotype - CDR3 nucleotide (nt), CDR3 amino acid (aa).
`group` | The group header for which you would like to analyze the data.
`scale` | Converts the graphs into denisty plots in order to show relative distributions.
`chains` | Whether to keep clonotypes "combined" or visualize by chain.
`exportTable` | Returns the data frame used for forming the graph.

### Value

ggplot of the discrete or relative length distributions of clonotype sequences

### 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")
    lengthContig(combined, cloneCall="aa", chains = "combined")

[Package scRepertoire version 1.4.0 Index]