Compute nucleotide source annotations for CDR3 sequences
Source:R/plot_logo.R
compute_nucseq_src.RdFor each TCR, calls .analyze_junction() to determine the V/N/D/J
origin of each nucleotide in the CDR3 region. The result can be passed
to plot_cdr3_logo via its nucseq_src parameter to
display junction bars showing the rearrangement structure.
Usage
compute_nucseq_src(tcrs, organism, chain = c("alpha", "beta"))Value
A list of character vectors (one per TCR). Each vector has
length nchar(cdr3_nucseq) with elements from
c("V", "N", "J") for alpha chain, or
c("V", "N1", "D", "N2", "J") for beta chain. Returns
NULL for TCRs where junction analysis fails.
Examples
if (FALSE) { # \dontrun{
data(dash)
pa <- dash[dash$epitope == "PA", ][1:20, ]
src <- compute_nucseq_src(pa, organism = "mouse", chain = "beta")
plot_cdr3_logo(pa$cdr3b, chain = "beta", nucseq_src = src,
show_junction_bars = TRUE)
} # }