add_cdr3_anchors: Add CDR3 anchor residues

View source: R/add_cdr3_anchors.R

add_cdr3_anchorsR Documentation

Add CDR3 anchor residues

Description

Construct full TCR junction sequence by adding conservative anchor residues (C and F/W) to CDR3 sequence.

Usage

add_cdr3_anchors(sequence_df, chains, species = "human")

Arguments

sequence_df

A data.frame containing CDR3 sequences and J genes. Columns must be named cdr3_beta and j_beta and/or cdr3_alpha and j_alpha.

chains

Which chains to process. "B" for beta chain only, "A" for alpha, "AB" for both.

species

From which species are the sequences. Currently only human and mouse are supported.

Value

Same data.frame as input with additional columns junction_beta and/or jucntion_alpha

Examples

# make example table without anchor residues
df <- example_TCR_df
df$cdr3_beta <- substr(df$junction_beta, 2, nchar(df$junction_beta) - 2)

# generate column with beta chain junction sequence
df <- add_cdr3_anchors(df, "B", species="human")

obrzts/BLscore documentation built on Nov. 21, 2024, 4:28 a.m.