addVariable: Adding variables after combineTCR() or combineBCR()

View source: R/addVariable.R

addVariableR Documentation

Adding variables after combineTCR() or combineBCR()

Description

This function adds variables to the product of combineTCR, or combineBCR to be used in later visualizations. For each element, the function will add a column (labeled by variable.name) with the variable. The length of the variables parameter needs to match the length of the combined object.

Usage

addVariable(input.data, variable.name = NULL, variables = NULL)

Arguments

input.data

The product of combineTCR or combineBCR.

variable.name

The new column name/header.

variables

The exact values to add to each element of the list.

Value

input.data list with the variable column added to each element.

Examples

combined <- combineTCR(contig_list, 
                       samples = c("P17B", "P17L", "P18B", "P18L", 
                                    "P19B","P19L", "P20B", "P20L"))
combined <- addVariable(combined, 
                        variable.name = "Type", 
                        variables = rep(c("B", "L"), 4))


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