Analyzes physicochemical properties of CDR3 amino acid sequences to understand biochemical characteristics of T-cell receptor repertoires. Performs regression analysis between two cell groups at different CDR3 lengths for each physicochemical feature (hydrophobicity, volume, isoelectric point, etc.).
Analyzes physicochemical properties of CDR3 amino acid sequences to understand biochemical characteristics of T-cell receptor repertoires. Performs regression analysis between two cell groups at different CDR3 lengths for each physicochemical feature (hydrophobicity, volume, isoelectric point, etc.).
ScRepCombiningExpression (requires combined TCR + RNA data)[CDR3AAPhyschem]
cache = true
[CDR3AAPhyschem.in]
scrfile = ["ScRepCombiningExpression"]
scrfile: Output from ScRepCombiningExpression (RDS or qs/qs2 format)scRepertoire::combineExpression()[CDR3AAPhyschem.envs]
# Group comparison specification
group = "CellType"
comparison = {Treg = ["CD4 CTL", "CD4 Naive", "CD4 TCM", "CD4 TEM"], Tconv = "Tconv"}
target = "Treg"
each = "Sample"
# Chain selection
chain = "TRB"
Key Parameters:
group: Column name in metadata defining groups to compare (e.g., CellType, seurat_clusters)comparison: Two-group specification for regression analysis
Group1 = ["cell1", "cell2"], Group2 = "cell3"["Group1", "Group2"] (when groups exist in column)target: Which group to label as 1 in regression (default: first group in comparison)each: Column(s) to split data for separate analyses
"Sample"["Sample", "Patient"]"Sample,Patient"[CDR3AAPhyschem]
[CDR3AAPhyschem.in]
scrfile = ["ScRepCombiningExpression"]
[CDR3AAPhyschem]
[CDR3AAPhyschem.envs]
# Define cell type groups for comparison
group = "CellType"
comparison = {Treg = ["Treg"], Tconv = ["Tconv"]}
target = "Treg"
chain = "TRB"
[CDR3AAPhyschem]
[CDR3AAPhyschem.envs]
group = "CellType"
comparison = ["Treg", "Tconv"]
target = "Treg"
# Run regression separately for each sample
each = "Sample"
chain = "TRB"
[CDR3AAPhyschem]
[CDR3AAPhyschem.envs]
group = "Cluster"
# Define clusters to compare
comparison = {
HighQuality = ["c1", "c2", "c5"],
LowQuality = ["c3", "c4"]
}
target = "HighQuality"
chain = "TRB"
The process calculates 8 key physicochemical properties from CDR3 amino acid sequences:
| Property | Description | Biological Significance |
|---|---|---|
| length | Total amino acid count in CDR3 | Influences binding loop size and flexibility |
| gravy | Grand Average of Hydrophobicity (Kyte-Doolittle scale) | Hydrophobic CDR3s associate with self-reactivity and Treg fate |
| bulkiness | Average bulkiness (Zimmerman scale) | Measures steric bulk of amino acids |
| polarity | Average polarity (Grantham scale) | Influences interactions with peptide-MHC |
| aliphatic | Normalized aliphatic index (Ikai scale) | Related to thermal stability |
| charge | Normalized net charge at physiological pH | Affects electrostatic interactions |
| acidic | Acidic side chain residue content (D, E proportion) | Contributes to negative charge |
| aromatic | Aromatic side chain content (F, W, Y proportion) | Important for π-π interactions |
[CDR3AAPhyschem]
[CDR3AAPhyschem.envs]
# Literature-based: hydrophobic CDR3β promotes Treg fate
group = "CellType"
comparison = {Treg = ["Treg", "CD4+Treg"], Tconv = ["Tconv", "CD4+Tconv"]}
target = "Treg"
chain = "TRB"
each = "" # Analyze all samples together
[CDR3AAPhyschem]
[CDR3AAPhyschem.envs]
# Focus on hydrophobicity (key Treg feature)
group = "CellType"
comparison = ["Treg", "Tconv"]
target = "Treg"
chain = "TRB"
# To analyze specific chains separately
Run separate processes for different chains:
# TRB analysis
[CDR3AAPhyschem]
[CDR3AAPhyschem.envs]
chain = "TRB"
group = "CellType"
comparison = ["Treg", "Tconv"]
# Note: Create separate config for TRA analysis if needed
[CDR3AAPhyschem]
[CDR3AAPhyschem.envs]
group = "CellType"
comparison = {
Naive = ["CD4 Naive", "CD8 Naive"],
Memory = ["CD4 TEM", "CD4 TCM", "CD8 TEM", "CD8 TCM"],
Effector = ["CD4 CTL", "CD8 CTL"]
}
target = "Naive"
chain = "TRB"
ScRepCombiningExpression (required)Cause: Specified chain (TRA/TRB) not found in combined object Solution:
# Change to available chain
[CDR3AAPhyschem.envs]
chain = "TRA" # or "TRB"
Cause: group column or comparison values don't exist
Solution:
ScRepCombiningExpression output[CDR3AAPhyschem.envs]
group = "seurat_clusters" # If CellType not available
comparison = ["0", "1"] # Use cluster IDs
Cause: Too few cells in one or more groups Solution:
each to analyze samples separately if pooled analysis failscomparison[CDR3AAPhyschem.envs]
# Combine rare subtypes
comparison = {HighExpander = ["Treg", "Tconv"], LowExpander = ["Tfh"]}
Cause: Groups may not differ in physicochemical properties Solution:
comparison groups are biologically distinctgroup column (e.g., gene expression clusters)Use properties as features for:
{{in.scrfile | stem}}.cdr3aaphyschem/If using non-default scales (requires modifying underlying R script):
# Note: Advanced usage - may require script modification
[CDR3AAPhyschem]
[CDR3AAPhyschem.envs]
# Specify alternative hydrophobicity scale
hydro_scale = "Wimley"
pK_source = "Murray"
[CDR3AAPhyschem]
[CDR3AAPhyschem.envs]
# Analyze by CDR3 length bins
group = "CellType"
comparison = ["Treg", "Tconv"]
# Use metadata column with length information
each = "CDR3_Length_Bin"
chain = "TRB"
[CDR3AAPhyschem]
[CDR3AAPhyschem.envs]
group = "CellType"
comparison = {Treg = "Treg", Tconv = "Tconv"}
target = "Treg"
chain = "TRB"
# Publication parameters
plot_theme = "nature"
fig_dpi = 300
fig_format = "pdf"