With Biostrings::pairwiseAlignment() the borders of the V(D)J-segments in your TCR sequence can be determined. The sequence within these border may then be used for further steps. In case of mouse, IMGT gene segments from Mus musculus are preferred.

align_imgt_ref_to_TCR_seq(
  chain,
  TCR,
  cl_long,
  cl_wide,
  imgt_ref,
  sequence_col = "consensus_seq_cr",
  C_allele
)

Arguments

chain

character which TCR chain to align, currently only TRA and TRB

TCR

a named vector; which of your TCRs to align, the name indicates which column name of cl_long to use, the value indicates what to look for in that column

cl_long

clonotype data frame long format

cl_wide

clonotype data frame wide format

imgt_ref

the prepared data.frame of IMGT references

sequence_col

name of the column to pull sequences from

C_allele

optional name of the constant allele to use for the alignment, must be the entry in the "Allele"-column of the imgt_ref data frame

Value

a list

Examples

if (FALSE) {

}