clonalProportion: Examining the clonal space occupied by specific clones

View source: R/clonalProportion.R

clonalProportionR Documentation

Examining the clonal space occupied by specific clones

Description

This function calculates the relative clonal space occupied by the clones. The grouping of these clones is based on the parameter clonalSplit, at default, clonalSplit will group the clones into bins of 1:10, 11:100, 101:1001, etc. To adjust the clones selected, change the numbers in the variable split. If a matrix output for the data is preferred, set exportTable = TRUE.

Usage

clonalProportion(
  input.data,
  clonalSplit = c(10, 100, 1000, 10000, 30000, 1e+05),
  cloneCall = "strict",
  chain = "both",
  group.by = NULL,
  exportTable = FALSE,
  palette = "inferno"
)

Arguments

input.data

The product of combineTCR, combineBCR, or combineExpression.

clonalSplit

The cut points for the specific clones.

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.

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 rank of clones

Examples

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


ncborcherding/scRepertoire documentation built on May 8, 2024, 6:28 a.m.