Skip to contents

collapseBCR considers an input data frame of scBCR-seq contig annotations and collapses this data frame such that for each cell at most 1 heavy chain and 1 ligh chain are retained as representative, in order to merge these data into the Seurat object holding scRNA-seq data where data are organised at a per-cell level.

Usage

collapseBCR(tb, format = "10X", full.table = FALSE)

Arguments

tb

a single data.frame holding VDJ data of 1 library

format

data format. Default = '10X'. For the moment only '10X' is supported.

full.table

if TRUE, will return a list with two elements (1) the collapsed data with max 1H and 1L per cell, and (2) the full table (Default: FALSE)

Value

If full.table is FALSE, an input data frame where for each cell at most 1 heavy chain and 1 light chain will be retained as representative. Otherwise, it will be a list of 2 data frames, one the collapsed version and one the full version. An additional column 'bcr_type' will be added to the data frame indicating whether each cell barcode is a singlet/doublet etc. based on the number of observed heavy/light chains. (see ?annotatePairing())

Details

The function cleans the barcode table such that potential doublets and/or cells with more than 1 heavy/light chain sequences are dealt with prior to merging with scRNA-seq data in the form of Seurat objects to avoid problems in merging owing to one-to-many mapping between cell barcode and sequences. The most frequently observed contig is taken as the representative.