addVariable: Adding variables after the combination of contigs.

Description Usage Arguments Value Examples

View source: R/processing.R

Description

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

Usage

1
addVariable(df, name = NULL, variables = NULL)

Arguments

df

The product of combineTCR() combineBCR() or expression2List().

name

The column header to add.

variables

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

Value

list of contigs with a new column (name).

Examples

1
2
3
4
x <- contig_list
combined <- combineTCR(x, rep(c("PX", "PY", "PZ"), each=2), 
rep(c("P", "T"), 3), cells ="T-AB")
combined <- addVariable(combined, name = "batch", variables = c(1,1,1,1,2,2))

scRepertoire documentation built on Nov. 8, 2020, 7 p.m.