lengthContig: Demonstrate the distribution of lengths filtered contigs.

Description Usage Arguments Value Examples

View source: R/viz.R

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

1
2
3
4
5
6
7
8
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

1
2
3
4
5
#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")

scRepertoire documentation built on Nov. 8, 2020, 7 p.m.