combineBCR {scRepertoire} | R Documentation |
This function consolidates a list of BCR sequencing results to the level of the individual cell barcodes. Using the samples and ID parameters, the function will add the strings as prefixes to prevent issues with repeated barcodes. The resulting new barcodes will need to match the seurat or SCE object in order to use,
combineBCR( df, samples = NULL, ID = NULL, removeNA = FALSE, removeMulti = FALSE )
df |
List of filtered contig annotations from 10x Genomics. |
samples |
The labels of samples. |
ID |
The additional sample labeling option. |
removeNA |
This will remove any chain without values. |
removeMulti |
This will remove barcodes with greater than 2 chains. |
List of clonotypes for individual cell barcodes
combineExpression
. Unlike combineTCR(),
combineBCR produces a column CTstrict of an index of nucleotide sequence
and the corresponding v-gene. This index automatically caluclates
the Hammings distance between sequences of the same length and will
index sequences with <= 0.15 normalized Levenshtein distance with the same
ID for sequences with < 15 nucleotide difference in length. After which,
clonotype clusters are called using the igraph component() function.
Clonotype clusters will then be labeled with "LD" with the CTstrict
header.
#Data derived from the 10x Genomics intratumoral NSCLC B cells BCR <- read.csv("https://ncborcherding.github.io/vignettes/b_contigs.csv", stringsAsFactors = FALSE) combined <- combineBCR(BCR, samples = "Patient1", ID = "Time1")