CD8 logistic regression score for paired TCRs
Source:R/cd8_scoring.R
make_cd8_score_table_column.RdScores each TCR using a logistic regression model trained on sorted CD4/CD8 bulk TCR data. The alpha-chain and beta-chain models are fit independently and their scores are averaged (each weighted 0.5).
Details
The model encodes V-gene, J-gene, CDR3 length, and positional amino acid features using one-hot and k-hot encodings, then computes a dot product with pre-trained weights.
Examples
# \donttest{
tcr_df <- data.frame(
va = "TRAV1-2*01", ja = "TRAJ33*01",
cdr3a = "CAVMDSSYKLIF",
vb = "TRBV6-4*01", jb = "TRBJ2-1*01",
cdr3b = "CASSLAPGATNEKLFF",
stringsAsFactors = FALSE
)
scores <- make_cd8_score_table_column(tcr_df)
# }