首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >【生信分析】免疫组库基础分析10-CDR3 氨基酸理化性质分析

【生信分析】免疫组库基础分析10-CDR3 氨基酸理化性质分析

作者头像
三兔测序学社
发布2025-10-20 17:02:57
发布2025-10-20 17:02:57
1130
举报
文章被收录于专栏:免疫组库研究免疫组库研究

1.工具:alakazam包

alakazam包括一套功能来分析Ig和TCR氨基酸序列的物理化学性质。特别是对CDR3氨基酸特性的分析。可以通过 aminoAcidProperties 函数获取多种氨基酸 理化特征,包括:

length‌: 氨基酸长度 (total amino acid count) ‌gravy‌: 平均疏水性 (grand average of hydrophobicity) ‌bulkiness‌: 平均体积 (average bulkiness) ‌polarity‌: 平均极性 (average polarity) ‌aliphatic‌: 归一化脂肪族指数 (normalized aliphatic index) ‌charge‌: 归一化净电荷 (normalized net charge) ‌acidic‌: 酸性氨基酸 含量 (acidic side chain residue content) ‌basic‌: 碱性氨基酸含量 (basic side chain residue content) ‌aromatic‌: 芳香族氨基酸含量 (aromatic side chain content)

2.举例说明

代码语言:javascript
复制
# Load required packages
library(alakazam)
library(dplyr)
# Subset example data
data(ExampleDb)
db <- ExampleDb[ExampleDb$sample_id == "+7d", ]

这个例子演示了如何从先前加载的AIRR文件计算DNA序列对应氨基酸特性。默认情况下,使用nt=TRUE参数完成DNA序列到氨基酸序列的翻译。如果只关注CDR3序列,我们指定参数trim=TRUE,这将在分析之前剥离第一个和最后一个密码子(保守残基)。使用label="cdr3"参数将前缀cdr3添加到输出列名中。

代码语言:javascript
复制
#核心代码
db_props <- aminoAcidProperties(db, seq="junction", trim=TRUE, 
                                label="cdr3")
# The full set of properties are calculated by default
dplyr::select(db_props[1:3, ], starts_with("cdr3"))
# Define a ggplot theme for all plots
tmp_theme <- theme_bw() + theme(legend.position="bottom")
# Generate plots for all four of the properties
g1 <- ggplot(db_props, aes(x=c_call, y=cdr3_aa_length)) + tmp_theme +
    ggtitle("CDR3 length") + 
    xlab("Isotype") + ylab("Amino acids") +
    scale_fill_manual(name="Isotype", values=IG_COLORS) +
    geom_boxplot(aes(fill=c_call))
g2 <- ggplot(db_props, aes(x=c_call, y=cdr3_aa_gravy)) + tmp_theme + 
    ggtitle("CDR3 hydrophobicity") + 
    xlab("Isotype") + ylab("GRAVY") +
    scale_fill_manual(name="Isotype", values=IG_COLORS) +
    geom_boxplot(aes(fill=c_call))
g3 <- ggplot(db_props, aes(x=c_call, y=cdr3_aa_basic)) + tmp_theme +
    ggtitle("CDR3 basic residues") + 
    xlab("Isotype") + ylab("Basic residues") +
    scale_y_continuous(labels=scales::percent) +
    scale_fill_manual(name="Isotype", values=IG_COLORS) +
    geom_boxplot(aes(fill=c_call))
g4 <- ggplot(db_props, aes(x=c_call, y=cdr3_aa_acidic)) + tmp_theme +
    ggtitle("CDR3 acidic residues") + 
    xlab("Isotype") + ylab("Acidic residues") +
    scale_y_continuous(labels=scales::percent) +
    scale_fill_manual(name="Isotype", values=IG_COLORS) +
    geom_boxplot(aes(fill=c_call))
# Plot in a 2x2 grid
gridPlot(g1, g2, g3, g4, ncol=2)

图1:CDR3氨基酸理化特征

图片来源

图1https://alakazam.readthedocs.io/en/stable/vignettes/AminoAcids-Vignette/

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2025-08-20,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 三兔测序学社 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 1.工具:alakazam包
  • 2.举例说明
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档