clonalHomeostasis: Examining the clonal homeostasis of the repertoire

View source: R/clonalHomeostasis.R

clonalHomeostasisR Documentation

Examining the clonal homeostasis of the repertoire

Description

This function calculates the space occupied by clone proportions. The grouping of these clones is based on the parameter cloneSize, at default, cloneSize will group the clones into bins of Rare = 0 to 0.0001, Small = 0.0001 to 0.001, etc. To adjust the proportions, change the number or labeling of the cloneSize parameter. If a matrix output for the data is preferred, set exportTable = TRUE.

Usage

clonalHomeostasis(
  input.data,
  cloneSize = c(Rare = 1e-04, Small = 0.001, Medium = 0.01, Large = 0.1, Hyperexpanded =
    1),
  cloneCall = "strict",
  chain = "both",
  group.by = NULL,
  order.by = NULL,
  exportTable = FALSE,
  palette = "inferno"
)

Arguments

input.data

The product of combineTCR(), combineBCR(), or combineExpression().

cloneSize

The cut points of the proportions.

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.

chain

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

group.by

The variable to use for grouping

order.by

A vector of specific plotting order or "alphanumeric" to plot groups in order

exportTable

Exports a table of the data into the global environment in addition to the visualization.

palette

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

Value

ggplot of the space occupied by the specific proportion of clones

Examples

#Making combined contig data
combined <- combineTCR(contig_list, 
                        samples = c("P17B", "P17L", "P18B", "P18L", 
                                    "P19B","P19L", "P20B", "P20L"))
clonalHomeostasis(combined, cloneCall = "gene")


ncborcherding/scRepertoire documentation built on Nov. 5, 2024, 2:05 p.m.