clonalScatter: Scatter plot comparing the clonal expansion of two samples

View source: R/clonalScatter.R

clonalScatterR Documentation

Scatter plot comparing the clonal expansion of two samples

Description

This function produces a scatter plot directly comparing the specific clones between two samples. The clones will be categorized by counts into singlets or expanded, either exclusive or shared between the selected samples.

Usage

clonalScatter(
  input.data,
  cloneCall = "strict",
  x.axis = NULL,
  y.axis = NULL,
  chain = "both",
  dot.size = "total",
  group.by = NULL,
  graph = "proportion",
  exportTable = FALSE,
  palette = "inferno"
)

Arguments

input.data

The product of combineTCR, combineBCR, or combineExpression.

cloneCall

How to call the clone - VDJC gene (gene), CDR3 nucleotide (nt), CDR3 amino acid (aa), VDJC gene + CDR3 nucleotide (strict) or a custom variable in the data.

x.axis

name of the list element to appear on the x.axis.

y.axis

name of the list element to appear on the y.axis.

chain

indicate if both or a specific chain should be used - e.g. "both", "TRA", "TRG", "IGH", "IGL".

dot.size

either total or the name of the list element to use for size of dots.

group.by

The variable to use for grouping.

graph

graph either the clonal "proportion" or "count".

exportTable

Returns the data frame used for forming the graph.

palette

Colors to use in visualization - input any hcl.pals.

Value

ggplot of the relative clone numbers between two sequencing runs or groups

Examples

#Making combined contig data
combined <- combineTCR(contig_list, 
                        samples = c("P17B", "P17L", "P18B", "P18L", 
                                    "P19B","P19L", "P20B", "P20L"))
clonalScatter(combined, 
              x.axis = "P17B", 
              y.axis = "P17L",
              graph = "proportion")


ncborcherding/scRepertoire documentation built on April 7, 2024, 12:44 a.m.