10X单细胞(10X空间转录组)细胞通讯分析之Inferring a spatial code of cell-cell interactions(cell2cell)

把核心放在第一句,Intercellular distance and interactions are negatively correlated.

hello,大家好,今天我们再来分享一个有关细胞通讯的内容,而且和细胞位置的空间相关联,文章在Inferring a spatial code of cell-cell interactions across a whole animal body,所以对细胞通讯的认识又更近了一层。我们也要与时俱进,跟上时代。

图片.png

Summary(提取一下关键信息)

1、compute the potential for intercellular interactions from the coexpression of ligand-receptor pairs.(看来对配受体的相对位置更加的看重了)。
2、a genetic algorithm we identify the ligand-receptor pairs most informative of the spatial organization of cells(配体-受体对最能提供细胞空间组织的信息 )。
3、The resulting intercellular distances are negatively correlated with the potential for cell-cell interaction(确实,细胞之间的距离和细胞通讯强度成反比)。
4、single-cell molecular measurements provide spatial information that may help elucidate organismal phenotypes and disease.(这才是终极目的)。

其中我认为最为重要的认知就是Intercellular distance and interactions are negatively correlated。

Introduction

1、CCIs relay signals between cells and trigger downstream signaling events that culminate in altered gene expression.(基础认知)。
2、通过这些和其他功能相互作用,CCI 形成相互作用的空间模式并调节集体细胞行为。
3、(划一下重点)CCIs often take the form of secreted or surface proteins produced by a sender cell (ligands) interacting with their cognate surface proteins in a receiver cell (receptors). Ligands can mediate CCIs across a range of distances and can encode positional information for cells within tissues, which is critical for cellular function and decision-making, and therefore organismal phenotypes。例如,一些配体形成梯度作为细胞迁移的线索。因此,研究 CCI 可以帮助阐明介导 CCI 的分子及其空间环境如何协调多细胞功能。
4、CCIs can define cell location and community spatial structure, enabling coordination of functions between interacting cells(这一点也很重要)。
5、As such, molecules mediating CCIs encode and pass a spatial code between cells.所以研究CCI可以帮助解码空间组织和功能。
Although spatial information is lost during tissue dissociation in conventional single-cell RNA-sequencing technologies (scRNA-seq), previous studies have proven that gene expression levels still encode spatial information that can be recovered by adding extra information such as protein-protein interactions and/or microscopy data(这个被空间转录组完美的解决了~~)。不过有一些软件是根据单细胞数据的通讯作用来推断细胞之间的相对距离,比如RNA-Magnet、ProximID等。
单细胞分析细胞通讯的问题,it remains unclear if one can find, in RNA, a spatial code of messages transmitted between cells that defines spatial organization and cellular functions across a whole animal body.

看一下结果,

1、Computing cell-cell interactions
最为核心的一句话,CCI score is based on the idea that proximal cells coordinate their gene expressions such that their total production of ligands and receptors is more complementary than with distant cells。
Intercellular communication allows cells to coordinate their gene expression and to form spatial patterns of molecule exchange,These events also allow cells to sense their spatial proximity。该 CCI 分数是根据配体和受体的 mRNA 表达计算得出的,以表示一对相互作用细胞的分子互补性。 与之前的 CCI 分数相比,权衡了一对细胞用于通过配对中每个细胞产生的配体和受体的总和进行交流的 LR 对的数量 。CCI 评分的主要假设是细胞间距离越小,一对细胞中配体和受体的产生就越互补(这个才是真正的细胞通讯)。
图片.png
图片.png

看来对于通讯来讲,一方面是强度,一方面是距离。而且关键在于定义长中短距离的通讯定义分析,我们来看一下示例代码(scRNA)。

代码

1、加载模块
import cell2cell as c2c
import scanpy as sc
import pandas as pd
2、读取数据(h5ad的数据结构大家应该都清楚吧)。
rnaseq = sc.read_h5ad('pbmc.h5ad')
3、读取先验的配受体对,这个大家找一个数据库的配受体对就可以了,比如cellphoneDB
lr_pairs = pd.read_csv('Human-2020-Jin-LR-pairs.csv')
图片.png
The names of genes/proteins have to match those in the rnaseq dataset.
So we will make all names to be all capital letters. We will also change the annotation of the complexes to easily integrate the data with cell2cell.
# Change complex annotations
lr_pairs['ligand2'] = lr_pairs.interaction_name_2.apply(lambda x: x.split(' - ')[0].upper())
lr_pairs['receptor2'] = lr_pairs.interaction_name_2.apply(lambda x: x.split(' - ')[1].upper() \
                                                       .replace('(', '').replace(')', '').replace('+', '&'))

lr_pairs['c2c_interaction'] = lr_pairs.apply(lambda row: row['ligand2'] + '^' + row['receptor2'], axis=1)
Metadata for the single cells
meta = rnaseq.obs.copy()
meta.head()
图片.png

Cell-cell Interactions and Communication Analysis

The pipeline integrates the RNA-seq and PPI datasets by using the analysis setups. It generates an interaction space containing an instance for each sample/cell type, containing the values assigned to each protein in the PPI list given the setups for computing the CCI and CCC scores.
interactions = c2c.analysis.SingleCellInteractions(rnaseq_data=rnaseq.to_df().T,
                                                   ppi_data=lr_pairs,
                                                   metadata=meta,
                                                   interaction_columns=('ligand2', 'receptor2'),
                                                   communication_score='expression_thresholding',
                                                   expression_threshold=0.1, # values after aggregation
                                                   cci_score='bray_curtis',
                                                   cci_type='undirected',
                                                   aggregation_method='nn_cell_fraction',
                                                   barcode_col='index',
                                                   celltype_col='cluster',
                                                   complex_sep='&',
                                                   verbose=False)
Compute communication scores for each PPI or LR pair
interactions.compute_pairwise_communication_scores()
Compute CCI scores for each pair of cells
It is computed according to the analysis setups. We computed an undirected Bray-Curtis-like score for each pair, meaning that score(C1, C2) = score(C2, C1). Notice that our score is undirected, so for C1 and C2 was not necessary to compute C2 and C1 as happened for the communication scores(这个是核心思想)
interactions.compute_pairwise_cci_scores()
Perform permutation analysis
cci_pvals = interactions.permute_cell_labels(evaluation='interactions', 
                                             permutations=10, 
                                             fdr_correction=False,
                                             verbose=True)
cci_pvals
图片.png
ccc_pvals = interactions.permute_cell_labels(evaluation='communication',
                                             permutations=10, 
                                             fdr_correction=False,
                                             verbose=True)
图片.png

可视化

group_meta = pd.DataFrame(columns=['Celltype', 'Group'])
group_meta['Celltype'] = meta['cluster'].unique().tolist()
group_meta['Group'] = ['Mono', 'DC', 'T', 'T', 'T', 'T', 'Mk', 'B', 'B', 'DC', 'Mono', 'NK', 'Eryth']
图片.png
颜色设置
colors = c2c.plotting.get_colors_from_labels(labels=group_meta['Group'].unique().tolist(),
                                             cmap='tab10'
                                            )
Visualize communication scores for each LR pair and each cell pair
interaction_clustermap = c2c.plotting.clustermap_ccc(interactions,
                                                     metric='jaccard',
                                                     method='complete',
                                                     metadata=group_meta,
                                                     sample_col='Celltype',
                                                     group_col='Group',
                                                     colors=colors,
                                                     row_fontsize=14,
                                                     title='Active ligand-receptor pairs for interacting cells',
                                                     filename=None,
                                                     cell_labels=('SENDER-CELLS', 'RECEIVER-CELLS'),
                                                     **{'figsize' : (10,9)}
                                                     )

# Add a legend to know the groups of the sender and receiver cells:
l1 = c2c.plotting.generate_legend(color_dict=colors,
                                  loc='center left',
                                  bbox_to_anchor=(20, -2), # Indicated where to include it
                                  ncol=1, fancybox=True,
                                  shadow=True,
                                  title='Groups',
                                  fontsize=14,
                                 )
图片.png

Circos plot

sender_cells = ['DC', 'pDC']
receiver_cells = ['CD8 T', 'CD4 Memory T', 'B activated']
ligands = ['TGFB1',
           'APP',
           'MIF',
           'CCL3'
          ]
receptors = ['TGFBR1&TGFBR2',
             'CD74&CD44',
             'CD74',
             'CCR1',
            ]

c2c.plotting.circos_plot(interaction_space=interactions,
                         sender_cells=sender_cells,
                         receiver_cells=receiver_cells,
                         ligands=ligands,
                         receptors=receptors,
                         excluded_score=0,
                         metadata=group_meta,
                         sample_col='Celltype',
                         group_col='Group',
                         colors=colors,
                         fontsize=15,
                        )
图片.png
c2c.plotting.circos_plot(interaction_space=interactions,
                         sender_cells=sender_cells,
                         receiver_cells=receiver_cells,
                         ligands=ligands,
                         receptors=receptors,
                         excluded_score=0,
                         fontsize=20,
                         ligand_label_color='orange',
                         receptor_label_color='brown',
                        )
图片.png

Dot plot for significance

fig = c2c.plotting.dot_plot(interactions,
                            evaluation='communication',
                            significance = 0.11,
                            figsize=(16, 9),
                            cmap='PuOr',
                            senders=sender_cells,
                            receivers=receiver_cells
                            )
图片.png

Visualize CCI scores

Since this case is undirected, a triangular heatmap is plotted instead of the complete one.
cm = c2c.plotting.clustermap_cci(interactions,
                                 method='complete',
                                 metadata=group_meta,
                                 sample_col="Celltype",
                                 group_col="Group",
                                 colors=colors,
                                 title='CCI scores for cell-types',
                                 cmap='Blues'
                                 )

# Add a legend to know the groups of the sender and receiver cells:
l1 = c2c.plotting.generate_legend(color_dict=colors,
                                  loc='center left',
                                  bbox_to_anchor=(20, -2), # Indicated where to include it
                                  ncol=1, fancybox=True,
                                  shadow=True,
                                  title='Groups',
                                  fontsize=14,
                                 )
图片.png

Dot plot for significance

fig = c2c.plotting.dot_plot(interactions,
                            evaluation='interactions',
                            significance = 0.11,
                            figsize=(16, 9),
                            cmap='Blues',
                            )
图片.png

Project samples/cells with PCoA into a Euclidean space

We can project the samples/cells given their CCI scores with other cells and see how close they are given their potential of interaction(这部分最好)
if interactions.analysis_setup['cci_type'] == 'undirected':
        
    pcoa = c2c.plotting.pcoa_3dplot(interactions,
                                    metadata=group_meta,
                                    sample_col="Celltype",
                                    group_col="Group",
                                    title='PCoA based on potential CCIs',
                                    colors=colors,
                                    )
图片.png
if interactions.analysis_setup['cci_type'] == 'undirected':
    celltype_colors = c2c.plotting.get_colors_from_labels(labels=meta['cluster'].unique().tolist(),
                                                          cmap='tab10'
                                                         )    
    pcoa = c2c.plotting.pcoa_3dplot(interactions,
                                    title='PCoA based on potential CCIs',
                                    colors=celltype_colors,
                                    )
图片.png

生活很好,有你更好

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
禁止转载,如需转载请通过简信或评论联系作者。
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 212,222评论 6 493
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 90,455评论 3 385
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 157,720评论 0 348
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 56,568评论 1 284
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 65,696评论 6 386
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 49,879评论 1 290
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,028评论 3 409
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 37,773评论 0 268
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 44,220评论 1 303
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 36,550评论 2 327
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 38,697评论 1 341
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 34,360评论 4 332
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,002评论 3 315
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 30,782评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,010评论 1 266
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 46,433评论 2 360
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 43,587评论 2 350

推荐阅读更多精彩内容