calc_gene_pairs: Calculate paired usage of V(D)J segments across chains

View source: R/calc-gene-usage.R

calc_gene_pairsR Documentation

Calculate paired usage of V(D)J segments across chains

Description

Quantify the paired usage of V(D)J segments across two chains. For example, calc_gene_pairs() can calculate the frequency that different TRA and TRB V segments appear together.

Usage

calc_gene_pairs(
  input,
  data_col,
  chains,
  cluster_col = NULL,
  chain_col = global$chain_col,
  sep = global$sep
)

Arguments

input

Object containing V(D)J data. If a data.frame is provided, the cell barcodes should be stored as row names.

data_col

meta.data column containing V(D)J genes identified for each clonotype.

chains

Chains to use for calculating usage of different gene pairs. This should be a character vector containing the two chains to use for calculations, e.g. c("IGH", "IGK").

cluster_col

meta.data column containing cell clusters to use when calculating gene usage

chain_col

meta.data column containing chains for each cell

sep

Separator used for storing per cell V(D)J data

Value

data.frame containing gene pair summary

See Also

plot_gene_pairs(), calc_gene_usage(), plot_gene_usage()

Examples

# Calculate the frequency of different V genes for IGH and IGK chains
calc_gene_pairs(
  vdj_sce,
  data_col    = "v_gene",
  chains      = c("IGH", "IGK"),
  cluster_col = "orig.ident"
)


rnabioco/AVIDtools documentation built on Oct. 28, 2023, 10:23 a.m.